File tree 3 files changed +9
-2
lines changed
actions/javascript/getDeployPullRequestList
3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ import GitUtils from '@github/libs/GitUtils';
7
7
8
8
type WorkflowRun = RestEndpointMethodTypes [ 'actions' ] [ 'listWorkflowRuns' ] [ 'response' ] [ 'data' ] [ 'workflow_runs' ] [ number ] ;
9
9
10
+ const BUILD_AND_DEPLOY_JOB_NAME_PREFIX = 'Build and deploy' ;
11
+
10
12
/**
11
13
* This function checks if a given release is a valid baseTag to get the PR list with `git log baseTag...endTag`.
12
14
*
@@ -45,7 +47,7 @@ async function wasDeploySuccessful(runID: number) {
45
47
filter : 'latest' ,
46
48
} )
47
49
) . data . jobs ;
48
- return jobsForWorkflowRun . some ( ( job ) => job . name . startsWith ( 'Build and deploy' ) && job . conclusion === 'success' ) ;
50
+ return jobsForWorkflowRun . some ( ( job ) => job . name . startsWith ( BUILD_AND_DEPLOY_JOB_NAME_PREFIX ) && job . conclusion === 'success' ) ;
49
51
}
50
52
51
53
/**
Original file line number Diff line number Diff line change @@ -11502,6 +11502,7 @@ const github = __importStar(__nccwpck_require__(5438));
11502
11502
const ActionUtils_1 = __nccwpck_require__(6981);
11503
11503
const GithubUtils_1 = __importDefault(__nccwpck_require__(9296));
11504
11504
const GitUtils_1 = __importDefault(__nccwpck_require__(1547));
11505
+ const BUILD_AND_DEPLOY_JOB_NAME_PREFIX = 'Build and deploy';
11505
11506
/**
11506
11507
* This function checks if a given release is a valid baseTag to get the PR list with `git log baseTag...endTag`.
11507
11508
*
@@ -11535,7 +11536,7 @@ async function wasDeploySuccessful(runID) {
11535
11536
run_id: runID,
11536
11537
filter: 'latest',
11537
11538
})).data.jobs;
11538
- return jobsForWorkflowRun.some((job) => job.name.startsWith('Build and deploy' ) && job.conclusion === 'success');
11539
+ return jobsForWorkflowRun.some((job) => job.name.startsWith(BUILD_AND_DEPLOY_JOB_NAME_PREFIX ) && job.conclusion === 'success');
11539
11540
}
11540
11541
/**
11541
11542
* This function checks if a given deploy workflow is a valid basis for comparison when listing PRs merged between two versions.
Original file line number Diff line number Diff line change 38
38
secrets : inherit
39
39
40
40
android :
41
+ # WARNING: getDeployPullRequestList depends on this job name. do not change job name without adjusting that action accordingly
41
42
name : Build and deploy Android
42
43
needs : validateActor
43
44
if : ${{ fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }}
@@ -122,6 +123,7 @@ jobs:
122
123
SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK }}
123
124
124
125
desktop :
126
+ # WARNING: getDeployPullRequestList depends on this job name. do not change job name without adjusting that action accordingly
125
127
name : Build and deploy Desktop
126
128
needs : validateActor
127
129
if : ${{ fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }}
@@ -165,6 +167,7 @@ jobs:
165
167
GITHUB_TOKEN : ${{ github.token }}
166
168
167
169
iOS :
170
+ # WARNING: getDeployPullRequestList depends on this job name. do not change job name without adjusting that action accordingly
168
171
name : Build and deploy iOS
169
172
needs : validateActor
170
173
if : ${{ fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }}
@@ -276,6 +279,7 @@ jobs:
276
279
SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK }}
277
280
278
281
web :
282
+ # WARNING: getDeployPullRequestList depends on this job name. do not change job name without adjusting that action accordingly
279
283
name : Build and deploy Web
280
284
needs : validateActor
281
285
if : ${{ fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }}
You can’t perform that action at this time.
0 commit comments