Skip to content

Commit e3a1536

Browse files
committed
Merge remote-tracking branch 'upstream/main' into 64012-improve-navigation-expense-from-reports
2 parents 3baa8e8 + 62084c0 commit e3a1536

419 files changed

Lines changed: 35113 additions & 3471 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: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15842,7 +15842,10 @@ class GithubUtils {
1584215842
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
1584315843
// Tag version and comparison URL
1584415844
// 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`;
15845+
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n\r\n`;
15846+
// Warn deployers about potential bugs with the new process
15847+
issueBody +=
15848+
'> 💡 **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';
1584615849
// PR list
1584715850
if (sortedPRList.length > 0) {
1584815851
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
@@ -15980,6 +15983,17 @@ class GithubUtils {
1598015983
})
1598115984
.then((response) => response.data.workflow_runs.at(0)?.id ?? -1);
1598215985
}
15986+
/**
15987+
* List workflow runs for the repository.
15988+
*/
15989+
static async listWorkflowRunsForRepo(options = {}) {
15990+
return this.octokit.actions.listWorkflowRunsForRepo({
15991+
owner: CONST_1.default.GITHUB_OWNER,
15992+
repo: CONST_1.default.APP_REPO,
15993+
per_page: options.per_page ?? 50,
15994+
...(options.status && { status: options.status }),
15995+
});
15996+
}
1598315997
/**
1598415998
* Generate the URL of an New Expensify pull request given the PR number.
1598515999
*/

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12633,7 +12633,10 @@ class GithubUtils {
1263312633
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
1263412634
// Tag version and comparison URL
1263512635
// 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`;
12636+
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n\r\n`;
12637+
// Warn deployers about potential bugs with the new process
12638+
issueBody +=
12639+
'> 💡 **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';
1263712640
// PR list
1263812641
if (sortedPRList.length > 0) {
1263912642
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
@@ -12771,6 +12774,17 @@ class GithubUtils {
1277112774
})
1277212775
.then((response) => response.data.workflow_runs.at(0)?.id ?? -1);
1277312776
}
12777+
/**
12778+
* List workflow runs for the repository.
12779+
*/
12780+
static async listWorkflowRunsForRepo(options = {}) {
12781+
return this.octokit.actions.listWorkflowRunsForRepo({
12782+
owner: CONST_1.default.GITHUB_OWNER,
12783+
repo: CONST_1.default.APP_REPO,
12784+
per_page: options.per_page ?? 50,
12785+
...(options.status && { status: options.status }),
12786+
});
12787+
}
1277412788
/**
1277512789
* Generate the URL of an New Expensify pull request given the PR number.
1277612790
*/

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737335,7 +737335,10 @@ class GithubUtils {
737335737335
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
737336737336
// Tag version and comparison URL
737337737337
// 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`;
737338+
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n\r\n`;
737339+
// Warn deployers about potential bugs with the new process
737340+
issueBody +=
737341+
'> 💡 **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';
737339737342
// PR list
737340737343
if (sortedPRList.length > 0) {
737341737344
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
@@ -737473,6 +737476,17 @@ class GithubUtils {
737473737476
})
737474737477
.then((response) => response.data.workflow_runs.at(0)?.id ?? -1);
737475737478
}
737479+
/**
737480+
* List workflow runs for the repository.
737481+
*/
737482+
static async listWorkflowRunsForRepo(options = {}) {
737483+
return this.octokit.actions.listWorkflowRunsForRepo({
737484+
owner: CONST_1.default.GITHUB_OWNER,
737485+
repo: CONST_1.default.APP_REPO,
737486+
per_page: options.per_page ?? 50,
737487+
...(options.status && { status: options.status }),
737488+
});
737489+
}
737476737490
/**
737477737491
* Generate the URL of an New Expensify pull request given the PR number.
737478737492
*/

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11899,7 +11899,10 @@ class GithubUtils {
1189911899
const sortedDeployBlockers = [...new Set(deployBlockers)].sort((a, b) => GithubUtils.getIssueOrPullRequestNumberFromURL(a) - GithubUtils.getIssueOrPullRequestNumberFromURL(b));
1190011900
// Tag version and comparison URL
1190111901
// 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`;
11902+
let issueBody = `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/${process.env.GITHUB_REPOSITORY}/compare/production...staging\r\n\r\n`;
11903+
// Warn deployers about potential bugs with the new process
11904+
issueBody +=
11905+
'> 💡 **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';
1190311906
// PR list
1190411907
if (sortedPRList.length > 0) {
1190511908
issueBody += '\r\n**This release contains changes from the following pull requests:**\r\n';
@@ -12037,6 +12040,17 @@ class GithubUtils {
1203712040
})
1203812041
.then((response) => response.data.workflow_runs.at(0)?.id ?? -1);
1203912042
}
12043+
/**
12044+
* List workflow runs for the repository.
12045+
*/
12046+
static async listWorkflowRunsForRepo(options = {}) {
12047+
return this.octokit.actions.listWorkflowRunsForRepo({
12048+
owner: CONST_1.default.GITHUB_OWNER,
12049+
repo: CONST_1.default.APP_REPO,
12050+
per_page: options.per_page ?? 50,
12051+
...(options.status && { status: options.status }),
12052+
});
12053+
}
1204012054
/**
1204112055
* Generate the URL of an New Expensify pull request given the PR number.
1204212056
*/

.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)