Skip to content

Commit

Permalink
Use constant for label name
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Aug 8, 2024
1 parent 52f7d23 commit 16c5a62
Show file tree
Hide file tree
Showing 18 changed files with 20 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/actions/javascript/authorChecklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17017,6 +17017,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
1 change: 1 addition & 0 deletions .github/actions/javascript/awaitStagingDeploys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12258,6 +12258,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
1 change: 1 addition & 0 deletions .github/actions/javascript/checkDeployBlockers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11541,6 +11541,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14353,6 +14353,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
1 change: 1 addition & 0 deletions .github/actions/javascript/getArtifactInfo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11502,6 +11502,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11636,6 +11636,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
1 change: 1 addition & 0 deletions .github/actions/javascript/getPreviousVersion/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2769,6 +2769,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
1 change: 1 addition & 0 deletions .github/actions/javascript/getPullRequestDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11604,6 +11604,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
1 change: 1 addition & 0 deletions .github/actions/javascript/isStagingDeployLocked/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11502,6 +11502,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12761,7 +12761,7 @@ async function run() {
pull_number: prNumber,
});
// Check for the CP Staging label on the issue to see if it was cherry-picked
const isCP = pr.labels.some(({ name: labelName }) => labelName === 'CP Staging');
const isCP = pr.labels.some(({ name: labelName }) => labelName === CONST_1.default.LABELS.CP_STAGING);
// Determine the deployer. For most PRs it will be whoever merged the PR.
// For CPs it will be whoever created the tag for the PR (i.e: whoever triggered the CP)
let deployer = pr.merged_by?.login;
Expand Down Expand Up @@ -12886,6 +12886,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ async function run() {
});

// Check for the CP Staging label on the issue to see if it was cherry-picked
const isCP = pr.labels.some(({name: labelName}) => labelName === 'CP Staging');
const isCP = pr.labels.some(({name: labelName}) => labelName === CONST.LABELS.CP_STAGING);

// Determine the deployer. For most PRs it will be whoever merged the PR.
// For CPs it will be whoever created the tag for the PR (i.e: whoever triggered the CP)
Expand Down
1 change: 1 addition & 0 deletions .github/actions/javascript/postTestBuildComment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11601,6 +11601,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
1 change: 1 addition & 0 deletions .github/actions/javascript/proposalPoliceComment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18089,6 +18089,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
1 change: 1 addition & 0 deletions .github/actions/javascript/reopenIssueWithComment/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11512,6 +11512,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
1 change: 1 addition & 0 deletions .github/actions/javascript/reviewerChecklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11604,6 +11604,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
1 change: 1 addition & 0 deletions .github/actions/javascript/verifySignedCommits/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11544,6 +11544,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
1 change: 1 addition & 0 deletions .github/libs/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const CONST = {
DEPLOY_BLOCKER: 'DeployBlockerCash',
INTERNAL_QA: 'InternalQA',
HELP_WANTED: 'Help Wanted',
CP_STAGING: 'CP Staging',
},
ACTIONS: {
CREATED: 'created',
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/markPullRequestsAsDeployedTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/**
* @jest-environment node
*/
import CONST from '../../.github/libs/CONST';
import type {InternalOctokit} from '../../.github/libs/GithubUtils';
import GithubUtils from '../../.github/libs/GithubUtils';
import GitUtils from '../../.github/libs/GitUtils';
Expand Down Expand Up @@ -249,7 +250,7 @@ platform | result
merged_by: {
login: 'thor',
},
labels: [{name: 'CP Staging'}],
labels: [{name: CONST.LABELS.CP_STAGING}],
},
};
}
Expand Down

0 comments on commit 16c5a62

Please sign in to comment.