Skip to content

Commit b02c571

Browse files
committed
fix: merge main
2 parents f64b790 + daeff95 commit b02c571

821 files changed

Lines changed: 50651 additions & 18282 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ module.exports = {
237237
'react-native-a11y/has-accessibility-hint': ['off'],
238238
'react/require-default-props': 'off',
239239
'react/prop-types': 'off',
240+
'react/jsx-key': 'error',
240241
'react/jsx-no-constructed-context-values': 'error',
241242
'react-native-a11y/has-valid-accessibility-descriptors': [
242243
'error',

.github/actions/javascript/authorChecklist/index.js

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15574,6 +15574,21 @@ const CONST = {
1557415574
EVENTS: {
1557515575
ISSUE_COMMENT: 'issue_comment',
1557615576
},
15577+
RUN_EVENT: {
15578+
PULL_REQUEST: 'pull_request',
15579+
PULL_REQUEST_TARGET: 'pull_request_target',
15580+
PUSH: 'push',
15581+
},
15582+
RUN_STATUS: {
15583+
COMPLETED: 'completed',
15584+
IN_PROGRESS: 'in_progress',
15585+
QUEUED: 'queued',
15586+
},
15587+
RUN_STATUS_CONCLUSION: {
15588+
SUCCESS: 'success',
15589+
},
15590+
TEST_WORKFLOW_NAME: 'Jest Unit Tests',
15591+
TEST_WORKFLOW_PATH: '.github/workflows/test.yml',
1557715592
PROPOSAL_KEYWORD: 'Proposal',
1557815593
DATE_FORMAT_STRING: 'yyyy-MM-dd',
1557915594
PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/pull/([0-9]+).*`),
@@ -15842,7 +15857,10 @@ class GithubUtils {
1584215857
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
1584315858
// Tag version and comparison URL
1584415859
// eslint-disable-next-line max-len
15845-
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
15860+
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n\r\n`;
15861+
// Warn deployers about potential bugs with the new process
15862+
issueBody +=
15863+
'> 💡 **Deployer FYI:** This checklist was generated using a new process. PR list from original method and detail logging can be found in the most recent [deploy workflow](https://github.com/Expensify/App/actions/workflows/deploy.yml) labeled `staging`, in the `createChecklist` action. Please tag @Julesssss with any issues.\r\n\r\n';
1584615864
// PR list
1584715865
if (sortedPRList.length > 0) {
1584815866
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
@@ -15980,6 +15998,17 @@ class GithubUtils {
1598015998
})
1598115999
.then((response) => response.data.workflow_runs.at(0)?.id ?? -1);
1598216000
}
16001+
/**
16002+
* List workflow runs for the repository.
16003+
*/
16004+
static async listWorkflowRunsForRepo(options = {}) {
16005+
return this.octokit.actions.listWorkflowRunsForRepo({
16006+
owner: CONST_1.default.GITHUB_OWNER,
16007+
repo: CONST_1.default.APP_REPO,
16008+
per_page: options.per_page ?? 50,
16009+
...(options.status && { status: options.status }),
16010+
});
16011+
}
1598316012
/**
1598416013
* Generate the URL of an New Expensify pull request given the PR number.
1598516014
*/

.github/actions/javascript/awaitStagingDeploys/index.js

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12365,6 +12365,21 @@ const CONST = {
1236512365
EVENTS: {
1236612366
ISSUE_COMMENT: 'issue_comment',
1236712367
},
12368+
RUN_EVENT: {
12369+
PULL_REQUEST: 'pull_request',
12370+
PULL_REQUEST_TARGET: 'pull_request_target',
12371+
PUSH: 'push',
12372+
},
12373+
RUN_STATUS: {
12374+
COMPLETED: 'completed',
12375+
IN_PROGRESS: 'in_progress',
12376+
QUEUED: 'queued',
12377+
},
12378+
RUN_STATUS_CONCLUSION: {
12379+
SUCCESS: 'success',
12380+
},
12381+
TEST_WORKFLOW_NAME: 'Jest Unit Tests',
12382+
TEST_WORKFLOW_PATH: '.github/workflows/test.yml',
1236812383
PROPOSAL_KEYWORD: 'Proposal',
1236912384
DATE_FORMAT_STRING: 'yyyy-MM-dd',
1237012385
PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/pull/([0-9]+).*`),
@@ -12633,7 +12648,10 @@ class GithubUtils {
1263312648
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
1263412649
// Tag version and comparison URL
1263512650
// eslint-disable-next-line max-len
12636-
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
12651+
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n\r\n`;
12652+
// Warn deployers about potential bugs with the new process
12653+
issueBody +=
12654+
'> 💡 **Deployer FYI:** This checklist was generated using a new process. PR list from original method and detail logging can be found in the most recent [deploy workflow](https://github.com/Expensify/App/actions/workflows/deploy.yml) labeled `staging`, in the `createChecklist` action. Please tag @Julesssss with any issues.\r\n\r\n';
1263712655
// PR list
1263812656
if (sortedPRList.length > 0) {
1263912657
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
@@ -12771,6 +12789,17 @@ class GithubUtils {
1277112789
})
1277212790
.then((response) => response.data.workflow_runs.at(0)?.id ?? -1);
1277312791
}
12792+
/**
12793+
* List workflow runs for the repository.
12794+
*/
12795+
static async listWorkflowRunsForRepo(options = {}) {
12796+
return this.octokit.actions.listWorkflowRunsForRepo({
12797+
owner: CONST_1.default.GITHUB_OWNER,
12798+
repo: CONST_1.default.APP_REPO,
12799+
per_page: options.per_page ?? 50,
12800+
...(options.status && { status: options.status }),
12801+
});
12802+
}
1277412803
/**
1277512804
* Generate the URL of an New Expensify pull request given the PR number.
1277612805
*/

.github/actions/javascript/checkAndroidStatus/index.js

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737067,6 +737067,21 @@ const CONST = {
737067737067
EVENTS: {
737068737068
ISSUE_COMMENT: 'issue_comment',
737069737069
},
737070+
RUN_EVENT: {
737071+
PULL_REQUEST: 'pull_request',
737072+
PULL_REQUEST_TARGET: 'pull_request_target',
737073+
PUSH: 'push',
737074+
},
737075+
RUN_STATUS: {
737076+
COMPLETED: 'completed',
737077+
IN_PROGRESS: 'in_progress',
737078+
QUEUED: 'queued',
737079+
},
737080+
RUN_STATUS_CONCLUSION: {
737081+
SUCCESS: 'success',
737082+
},
737083+
TEST_WORKFLOW_NAME: 'Jest Unit Tests',
737084+
TEST_WORKFLOW_PATH: '.github/workflows/test.yml',
737070737085
PROPOSAL_KEYWORD: 'Proposal',
737071737086
DATE_FORMAT_STRING: 'yyyy-MM-dd',
737072737087
PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/pull/([0-9]+).*`),
@@ -737335,7 +737350,10 @@ class GithubUtils {
737335737350
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
737336737351
// Tag version and comparison URL
737337737352
// eslint-disable-next-line max-len
737338-
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
737353+
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n\r\n`;
737354+
// Warn deployers about potential bugs with the new process
737355+
issueBody +=
737356+
'> 💡 **Deployer FYI:** This checklist was generated using a new process. PR list from original method and detail logging can be found in the most recent [deploy workflow](https://github.com/Expensify/App/actions/workflows/deploy.yml) labeled `staging`, in the `createChecklist` action. Please tag @Julesssss with any issues.\r\n\r\n';
737339737357
// PR list
737340737358
if (sortedPRList.length > 0) {
737341737359
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
@@ -737473,6 +737491,17 @@ class GithubUtils {
737473737491
})
737474737492
.then((response) => response.data.workflow_runs.at(0)?.id ?? -1);
737475737493
}
737494+
/**
737495+
* List workflow runs for the repository.
737496+
*/
737497+
static async listWorkflowRunsForRepo(options = {}) {
737498+
return this.octokit.actions.listWorkflowRunsForRepo({
737499+
owner: CONST_1.default.GITHUB_OWNER,
737500+
repo: CONST_1.default.APP_REPO,
737501+
per_page: options.per_page ?? 50,
737502+
...(options.status && { status: options.status }),
737503+
});
737504+
}
737476737505
/**
737477737506
* Generate the URL of an New Expensify pull request given the PR number.
737478737507
*/

.github/actions/javascript/checkDeployBlockers/index.js

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11631,6 +11631,21 @@ const CONST = {
1163111631
EVENTS: {
1163211632
ISSUE_COMMENT: 'issue_comment',
1163311633
},
11634+
RUN_EVENT: {
11635+
PULL_REQUEST: 'pull_request',
11636+
PULL_REQUEST_TARGET: 'pull_request_target',
11637+
PUSH: 'push',
11638+
},
11639+
RUN_STATUS: {
11640+
COMPLETED: 'completed',
11641+
IN_PROGRESS: 'in_progress',
11642+
QUEUED: 'queued',
11643+
},
11644+
RUN_STATUS_CONCLUSION: {
11645+
SUCCESS: 'success',
11646+
},
11647+
TEST_WORKFLOW_NAME: 'Jest Unit Tests',
11648+
TEST_WORKFLOW_PATH: '.github/workflows/test.yml',
1163411649
PROPOSAL_KEYWORD: 'Proposal',
1163511650
DATE_FORMAT_STRING: 'yyyy-MM-dd',
1163611651
PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/pull/([0-9]+).*`),
@@ -11899,7 +11914,10 @@ class GithubUtils {
1189911914
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
1190011915
// Tag version and comparison URL
1190111916
// eslint-disable-next-line max-len
11902-
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n`;
11917+
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n\r\n`;
11918+
// Warn deployers about potential bugs with the new process
11919+
issueBody +=
11920+
'> 💡 **Deployer FYI:** This checklist was generated using a new process. PR list from original method and detail logging can be found in the most recent [deploy workflow](https://github.com/Expensify/App/actions/workflows/deploy.yml) labeled `staging`, in the `createChecklist` action. Please tag @Julesssss with any issues.\r\n\r\n';
1190311921
// PR list
1190411922
if (sortedPRList.length > 0) {
1190511923
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
@@ -12037,6 +12055,17 @@ class GithubUtils {
1203712055
})
1203812056
.then((response) => response.data.workflow_runs.at(0)?.id ?? -1);
1203912057
}
12058+
/**
12059+
* List workflow runs for the repository.
12060+
*/
12061+
static async listWorkflowRunsForRepo(options = {}) {
12062+
return this.octokit.actions.listWorkflowRunsForRepo({
12063+
owner: CONST_1.default.GITHUB_OWNER,
12064+
repo: CONST_1.default.APP_REPO,
12065+
per_page: options.per_page ?? 50,
12066+
...(options.status && { status: options.status }),
12067+
});
12068+
}
1204012069
/**
1204112070
* Generate the URL of an New Expensify pull request given the PR number.
1204212071
*/

.github/actions/javascript/createOrUpdateStagingDeploy/createOrUpdateStagingDeploy.ts

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,39 @@ async function run(): Promise<IssuesCreateResponse | void> {
5757
// Find the list of PRs merged between the current checklist and the previous checklist
5858
const mergedPRs = await GitUtils.getPullRequestsDeployedBetween(previousChecklistData.tag, newStagingTag);
5959

60+
// mergedPRs includes cherry-picked PRs that have already been released with previous checklist, so we need to filter these out
61+
const previousPRNumbers = new Set(previousChecklistData.PRList.map((pr) => pr.number));
62+
core.startGroup('Filtering PRs:');
63+
core.info('mergedPRs includes cherry-picked PRs that have already been released with previous checklist, so we need to filter these out');
64+
core.info(`Found ${previousPRNumbers.size} PRs in the previous checklist:`);
65+
core.info(JSON.stringify(Array.from(previousPRNumbers)));
66+
const newPRNumbers = mergedPRs.filter((prNum) => !previousPRNumbers.has(prNum));
67+
core.info(`Found ${newPRNumbers.length} PRs deployed since the previous checklist:`);
68+
core.info(JSON.stringify(newPRNumbers));
69+
70+
// Log the PRs that were filtered out
71+
const removedPRs = mergedPRs.filter((prNum) => previousPRNumbers.has(prNum));
72+
if (removedPRs.length > 0) {
73+
core.info(`⚠️⚠️ Filtered out the following cherry-picked PRs that were released with the previous checklist: ${removedPRs.join(', ')} ⚠️⚠️`);
74+
}
75+
core.endGroup();
76+
console.info(`[api] Checklist PRs: ${newPRNumbers.join(', ')}`);
77+
6078
// Next, we generate the checklist body
6179
let checklistBody = '';
6280
let checklistAssignees: string[] = [];
6381
if (shouldCreateNewDeployChecklist) {
6482
const stagingDeployCashBodyAndAssignees = await GithubUtils.generateStagingDeployCashBodyAndAssignees(
6583
newVersion,
66-
mergedPRs.map((value) => GithubUtils.getPullRequestURLFromNumber(value)),
84+
newPRNumbers.map((value) => GithubUtils.getPullRequestURLFromNumber(value)),
6785
);
6886
if (stagingDeployCashBodyAndAssignees) {
6987
checklistBody = stagingDeployCashBodyAndAssignees.issueBody;
7088
checklistAssignees = stagingDeployCashBodyAndAssignees.issueAssignees.filter(Boolean) as string[];
7189
}
7290
} else {
7391
// Generate the updated PR list, preserving the previous state of `isVerified` for existing PRs
74-
const PRList = mergedPRs.map((prNum) => {
92+
const PRList = newPRNumbers.map((prNum) => {
7593
const indexOfPRInCurrentChecklist = currentChecklistData?.PRList.findIndex((pr) => pr.number === prNum) ?? -1;
7694
const isVerified = indexOfPRInCurrentChecklist >= 0 ? currentChecklistData?.PRList[indexOfPRInCurrentChecklist].isVerified : false;
7795
return {

0 commit comments

Comments
 (0)