File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
source/ci_source/providers Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -66,13 +66,13 @@ export class CodeBuild implements CISource {
66
66
67
67
private async _getPrId ( ) : Promise < string > {
68
68
const sourceParts = ( this . env . CODEBUILD_SOURCE_VERSION || "" ) . split ( "/" )
69
- const triggerParts = ( this . env . CODEBUILD_WEBHOOK_TRIGGER || "" ) . split ( "/" )
69
+ const triggerParts = this . env . CODEBUILD_WEBHOOK_TRIGGER || ""
70
70
71
- const branchName = triggerParts [ 0 ] === "branch" ? triggerParts [ 1 ] : null
71
+ const branchName = triggerParts . startsWith ( "branch/" ) ? triggerParts . replace ( "branch/" , "" ) : null
72
72
let prId = sourceParts [ 0 ] === "pr" ? sourceParts [ 1 ] : null
73
73
74
74
if ( ! prId ) {
75
- prId = triggerParts [ 0 ] === "pr" ? triggerParts [ 1 ] : null
75
+ prId = triggerParts . startsWith ( "pr/" ) ? triggerParts . replace ( "pr/" , "" ) : null
76
76
}
77
77
78
78
if ( ! prId && branchName ) {
You can’t perform that action at this time.
0 commit comments