Skip to content

Commit c6c1b9a

Browse files
authored
fix: Revert "feat(1355): Add PR comment support (#13)" (#14)
This reverts commit 843b76c.
1 parent 843b76c commit c6c1b9a

File tree

3 files changed

+1
-32
lines changed

3 files changed

+1
-32
lines changed

index.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -257,17 +257,6 @@ class ScmRouter extends Scm {
257257
return this.chooseScm(config).then(scm => scm.getCommitSha(config));
258258
}
259259

260-
/**
261-
* Add a comment on a pull request
262-
* @method _addPrComment
263-
* @param {Object} config Configuration
264-
* @param {String} config.scmContext Name of scm context
265-
* @return {Promise}
266-
*/
267-
_addPrComment(config) {
268-
return this.chooseScm(config).then(scm => scm.addPrComment(config));
269-
}
270-
271260
/**
272261
* Update the commit status for a given repo and sha
273262
* @method _updateCommitStatus

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
},
4444
"dependencies": {
4545
"async": "^2.6.1",
46-
"screwdriver-scm-base": "^5.0.0"
46+
"screwdriver-scm-base": "^4.4.3"
4747
},
4848
"release": {
4949
"debug": false,

test/index.test.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ describe('index test', () => {
4646
'getPermissions',
4747
'getOrgPermissions',
4848
'getCommitSha',
49-
'addPrComment',
5049
'updateCommitStatus',
5150
'getFile',
5251
'getChangedFiles',
@@ -731,25 +730,6 @@ describe('index test', () => {
731730
});
732731
});
733732

734-
describe('_addPrComment', () => {
735-
const config = { scmContext: 'example.context' };
736-
737-
it('call origin addPrComment', () => {
738-
const scmGithub = scm.scms['github.context'];
739-
const exampleScm = scm.scms['example.context'];
740-
const scmGitlab = scm.scms['gitlab.context'];
741-
742-
return scm._addPrComment(config)
743-
.then((result) => {
744-
assert.strictEqual(result, 'example');
745-
assert.notCalled(scmGithub.addPrComment);
746-
assert.notCalled(scmGitlab.addPrComment);
747-
assert.calledOnce(exampleScm.addPrComment);
748-
assert.calledWith(exampleScm.addPrComment, config);
749-
});
750-
});
751-
});
752-
753733
describe('_updateCommitStatus', () => {
754734
const config = { scmContext: 'example.context' };
755735

0 commit comments

Comments
 (0)