Skip to content

Commit 0183ca5

Browse files
committed
Add constant and warning comment in workflow
1 parent 5a7f15f commit 0183ca5

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

.github/actions/javascript/getDeployPullRequestList/getDeployPullRequestList.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import GitUtils from '@github/libs/GitUtils';
77

88
type WorkflowRun = RestEndpointMethodTypes['actions']['listWorkflowRuns']['response']['data']['workflow_runs'][number];
99

10+
const BUILD_AND_DEPLOY_JOB_NAME_PREFIX = 'Build and deploy';
11+
1012
/**
1113
* This function checks if a given release is a valid baseTag to get the PR list with `git log baseTag...endTag`.
1214
*
@@ -45,7 +47,7 @@ async function wasDeploySuccessful(runID: number) {
4547
filter: 'latest',
4648
})
4749
).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');
4951
}
5052

5153
/**

.github/actions/javascript/getDeployPullRequestList/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11502,6 +11502,7 @@ const github = __importStar(__nccwpck_require__(5438));
1150211502
const ActionUtils_1 = __nccwpck_require__(6981);
1150311503
const GithubUtils_1 = __importDefault(__nccwpck_require__(9296));
1150411504
const GitUtils_1 = __importDefault(__nccwpck_require__(1547));
11505+
const BUILD_AND_DEPLOY_JOB_NAME_PREFIX = 'Build and deploy';
1150511506
/**
1150611507
* This function checks if a given release is a valid baseTag to get the PR list with `git log baseTag...endTag`.
1150711508
*
@@ -11535,7 +11536,7 @@ async function wasDeploySuccessful(runID) {
1153511536
run_id: runID,
1153611537
filter: 'latest',
1153711538
})).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');
1153911540
}
1154011541
/**
1154111542
* This function checks if a given deploy workflow is a valid basis for comparison when listing PRs merged between two versions.

.github/workflows/platformDeploy.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
secrets: inherit
3939

4040
android:
41+
# WARNING: getDeployPullRequestList depends on this job name. do not change job name without adjusting that action accordingly
4142
name: Build and deploy Android
4243
needs: validateActor
4344
if: ${{ fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }}
@@ -122,6 +123,7 @@ jobs:
122123
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
123124

124125
desktop:
126+
# WARNING: getDeployPullRequestList depends on this job name. do not change job name without adjusting that action accordingly
125127
name: Build and deploy Desktop
126128
needs: validateActor
127129
if: ${{ fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }}
@@ -165,6 +167,7 @@ jobs:
165167
GITHUB_TOKEN: ${{ github.token }}
166168

167169
iOS:
170+
# WARNING: getDeployPullRequestList depends on this job name. do not change job name without adjusting that action accordingly
168171
name: Build and deploy iOS
169172
needs: validateActor
170173
if: ${{ fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }}
@@ -276,6 +279,7 @@ jobs:
276279
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
277280

278281
web:
282+
# WARNING: getDeployPullRequestList depends on this job name. do not change job name without adjusting that action accordingly
279283
name: Build and deploy Web
280284
needs: validateActor
281285
if: ${{ fromJSON(needs.validateActor.outputs.IS_DEPLOYER) }}

0 commit comments

Comments
 (0)