File tree Expand file tree Collapse file tree 2 files changed +4
-19
lines changed Expand file tree Collapse file tree 2 files changed +4
-19
lines changed Original file line number Diff line number Diff line change @@ -572,18 +572,15 @@ class BitbucketScm extends Scm {
572572 * @param {String } config.buildStatus The screwdriver build status to translate into scm commit status
573573 * @param {String } config.token The token used to authenticate to the SCM
574574 * @param {String } config.url Target Url of this commit status
575- * @param {String } [ config.jobName] Optional name of the job that finished
576- * @param {Number } [ config.pipelineId] Pipeline ID
575+ * @param {String } config.jobName Optional name of the job that finished
576+ * @param {Number } config.pipelineId Pipeline ID
577577 * @return {Promise }
578578 */
579579 _updateCommitStatus ( config ) {
580- let context = `Screwdriver/${ config . pipelineId } ` ;
581580 const scm = getScmUriParts ( config . scmUri ) ;
582- const jobName = config . jobName && / ^ P R / . test ( config . jobName ) ? 'PR' : config . jobName ;
581+ let context = `Screwdriver/ ${ config . pipelineId } /` ;
583582
584- if ( jobName ) {
585- context += `/${ jobName } ` ;
586- }
583+ context += / ^ P R / . test ( config . jobName ) ? 'PR' : config . jobName ;
587584
588585 const options = {
589586 url : `${ REPO_URL } /${ scm . repoId } /commit/${ config . sha } /statuses/build` ,
Original file line number Diff line number Diff line change @@ -1073,18 +1073,6 @@ describe('index', function () {
10731073 } )
10741074 ) ;
10751075
1076- it ( 'successfully update status with correct values' , ( ) => {
1077- config . buildStatus = 'ABORTED' ;
1078- delete config . jobName ;
1079-
1080- expectedOptions . body . state = 'STOPPED' ;
1081- expectedOptions . body . description = 'Screwdriver/123' ;
1082-
1083- return scm . updateCommitStatus ( config ) . then ( ( ) => {
1084- assert . calledWith ( requestMock , expectedOptions ) ;
1085- } ) ;
1086- } ) ;
1087-
10881076 it ( 'rejects if status code is not 201 or 200' , ( ) => {
10891077 fakeResponse = {
10901078 statusCode : 401 ,
You can’t perform that action at this time.
0 commit comments