Skip to content

Commit

Permalink
Merge branch 'main' into Rory-FixPusherSuffix
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Mar 1, 2023
2 parents 0e3c449 + f730c16 commit b703eac
Show file tree
Hide file tree
Showing 687 changed files with 52,953 additions and 14,308 deletions.
22 changes: 13 additions & 9 deletions .github/ISSUE_TEMPLATE/Accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,26 @@ How does this affect the user?
## Suggested resolution:
What can we do to fix the issue?

## Platform:
## Platforms:
<!---
Remove any platforms that aren't affected by this issue
Check off any platforms that are affected by this issue
--->
Where is this issue occurring?

- Web
- iOS
- Android
- Desktop App
- Mobile Web
Which of our officially supported platforms is this issue occurring on?
- [ ] Android / native
- [ ] Android / Chrome
- [ ] iOS / native
- [ ] iOS / Safari
- [ ] MacOS / Chrome / Safari
- [ ] MacOS / Desktop

**Version Number:**
**Reproducible in staging?:**
**Reproducible in production?:**
**Email or phone of affected tester (no customers):**
**Logs:** https://stackoverflow.com/c/expensify/questions/4856
**Notes/Photos/Videos:** Any additional supporting documentation
**Expensify/Expensify Issue URL:**
**Issue reported by:**
**Slack conversation:**

[View all open jobs on GitHub](https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3A%22Help+Wanted%22)
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/DesignDoc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Design Doc tracking issue
about: A standard template to follow when leading a project
labels: Daily, NewFeature
---

## Proposal

## Tasks

- [ ] Post **Proposal (full Problem/Solution statement)** in `#expensify-open-source`
- [ ] Wait at least one full business day, and until the post has a majority (2/3) of positive reactions (👍)
- [ ] Paste Proposal in the space above with a link to the Slack thread
- [ ] Email `strategy@expensify.com` and paste in the Proposal
- [ ] Fill out the **High-level overview of the problem**, **Timeline**, and **Terminology** sections of the Design Doc
- [ ] Email `strategy@expensify.com` (continue the same email chain as before) with the link to your Design Doc
- [ ] Host a **pre-design** meeting ([example](https://expensify.slack.com/archives/C01GTK53T8Q/p1665794669539419)) in `#expensify-open-source` to discuss any necessary details in public before filling out the **High-level of proposed solution** section.
- [ ] Fill out the **High-level of proposed solution** section
- [ ] Email `stategy@expensify.com` again with links to the doc and pre-design conversation in Slack
- [ ] Add the `DesignDocReview` label to get the **High-level of proposed solution** section reviewed
- [ ] Respond to any questions or concerns and bring up blockers in Slack to get a consensus if necessary
- [ ] Confirm that the doc has the minimum necessary number of reviews before proceeding
- [ ] Host another pre-design meeting in `#expensify-open-source` to ask for engineering feedback on the technical solution.
- [ ] Fill out the **Detailed implementation of the solution** and related sections.
- [ ] Re-add the `DesignDocReview` label to this issue
- [ ] Respond to any questions or concerns and bring up blockers in Slack to get consensus if necessary
- [ ] Confirm that the doc has the minimum necessary number of reviews before proceeding
- [ ] Email `strategy@expensify.com` one last time to let them know the Design Doc is moving into the implementation phase
- [ ] Implement the changes
- [ ] Send out a follow up email to `strategy@expensify.com` once everything has been implemented and do a **Project Wrap-Up** retrospective that provides:
- Summary of what we accomplished with this project
- What went well?
- What could we have done better?
- What did we learn?
24 changes: 16 additions & 8 deletions .github/ISSUE_TEMPLATE/Performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,26 @@ Please list out the steps you think we should take to solve this issue.
## List any benchmarks after implementing the changes to show impacts of the proposed solution (if any)
Note: These should be the same as the benchmarks collected before any changes.

## Platform:
Where is this issue occurring?

- [ ] Web
- [ ] iOS
- [ ] Android
- [ ] Desktop App
- [ ] Mobile Web
## Platforms:
<!---
Check off any platforms that are affected by this issue
--->
Which of our officially supported platforms is this issue occurring on?
- [ ] Android / native
- [ ] Android / Chrome
- [ ] iOS / native
- [ ] iOS / Safari
- [ ] MacOS / Chrome / Safari
- [ ] MacOS / Desktop

**Version Number:**
**Reproducible in staging?:**
**Reproducible in production?:**
**Email or phone of affected tester (no customers):**
**Logs:** https://stackoverflow.com/c/expensify/questions/4856
**Notes/Photos/Videos:** Any additional supporting documentation
**Expensify/Expensify Issue URL:**
**Issue reported by:**
**Slack conversation:**

[View all open jobs on Upwork](https://www.upwork.com/ab/jobs/search/?q=Expensify%20React%20Native&sort=recency&user_location_match=2)
35 changes: 18 additions & 17 deletions .github/ISSUE_TEMPLATE/Standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,27 @@ Describe what actually happened
## Workaround:
Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

## Platform:
## Platforms:
<!---
Remove any platforms that aren't affected by this issue
Check off any platforms that are affected by this issue
--->
Where is this issue occurring?

- Web
- iOS
- Android
- Desktop App
- Mobile Web

**Version Number:**
**Reproducible in staging?:**
**Reproducible in production?:**
**Email or phone of affected tester (no customers):**
Which of our officially supported platforms is this issue occurring on?
- [ ] Android / native
- [ ] Android / Chrome
- [ ] iOS / native
- [ ] iOS / Safari
- [ ] MacOS / Chrome / Safari
- [ ] MacOS / Desktop

**Version Number:**
**Reproducible in staging?:**
**Reproducible in production?:**
**If this was caught during regression testing, add the test name, ID and link from TestRail:**
**Email or phone of affected tester (no customers):**
**Logs:** https://stackoverflow.com/c/expensify/questions/4856
**Notes/Photos/Videos:** Any additional supporting documentation
**Expensify/Expensify Issue URL:**
**Issue reported by:**
**Slack conversation:**
**Expensify/Expensify Issue URL:**
**Issue reported by:**
**Slack conversation:**

[View all open jobs on GitHub](https://github.com/Expensify/App/issues?q=is%3Aopen+is%3Aissue+label%3A%22Help+Wanted%22)
13 changes: 9 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,20 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c
- [ ] I tested this PR with a [High Traffic account](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#high-traffic-accounts) against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
- [ ] I included screenshots or videos for tests on [all platforms](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#make-sure-you-can-test-on-all-platforms)
- [ ] I ran the tests on **all platforms** & verified they passed on:
- [ ] iOS / native
- [ ] Android / native
- [ ] iOS / Safari
- [ ] Android / Chrome
- [ ] MacOS / Chrome
- [ ] iOS / native
- [ ] iOS / Safari
- [ ] MacOS / Chrome / Safari
- [ ] MacOS / Desktop
- [ ] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
- [ ] I followed proper code patterns (see [Reviewing the code](https://github.com/Expensify/App/blob/main/contributingGuides/PR_REVIEW_GUIDELINES.md#reviewing-the-code))
- [ ] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. `toggleReport` and not `onIconClick`)
- [ ] I verified that comments were added to code that is not self explanatory
- [ ] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
- [ ] I verified any copy / text shown in the product was added in all `src/languages/*` files
- [ ] I verified any copy / text shown in the product is localized by adding it to `src/languages/*` files and using the [translation method](https://github.com/Expensify/App/blob/4bd99402cebdf4d7394e0d1f260879ea238197eb/src/components/withLocalize.js#L60)
- [ ] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
- [ ] I verified all numbers, amounts, dates and phone numbers shown in the product are using the [localization methods](https://github.com/Expensify/App/blob/4bd99402cebdf4d7394e0d1f260879ea238197eb/src/components/withLocalize.js#L60-L68)
- [ ] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the `Waiting for Copy` label for a copy review on the original GH to get the correct copy.
- [ ] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
- [ ] I verified the JSDocs style guidelines (in [`STYLE.md`](https://github.com/Expensify/App/blob/main/contributingGuides/STYLE.md#jsdocs)) were followed
Expand All @@ -101,12 +103,15 @@ This is a checklist for PR authors. Please make sure to complete all tasks and c
- [ ] Any internal methods bound to `this` are necessary to be bound (i.e. avoid `this.submit = this.submit.bind(this);` if `this.submit` is never passed to a component event handler like `onClick`)
- [ ] All JSX used for rendering exists in the render method
- [ ] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
- [ ] If any new file was added I verified that:
- [ ] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
- [ ] If a new CSS style is added I verified that:
- [ ] A similar style doesn't already exist
- [ ] The style can't be created with an existing [StyleUtils](https://github.com/Expensify/App/blob/main/src/styles/StyleUtils.js) function (i.e. `StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG`)
- [ ] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like `Avatar` is modified, I verified that `Avatar` is working as expected in all cases)
- [ ] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
- [ ] If a new page is added, I verified it's using the `ScrollView` component to make it scrollable when more elements are added to the page.
- [ ] If the `main` branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the `Test` steps.
- [ ] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

### Screenshots/Videos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ inputs:
runs:
using: composite
steps:
- uses: 8398a7/action-slack@2780b654eb23ee546e54052f0d2b0ed66ea30eaa
- uses: 8398a7/action-slack@v3
name: Job failed Slack notification
with:
status: custom
Expand All @@ -20,7 +20,7 @@ runs:
attachments: [{
color: "#DB4545",
pretext: `<!subteam^S4TJJ3PSL>`,
text: `💥 ${process.env.AS_REPO} failed on ${process.env.AS_WORKFLOW_RUN} workflow 💥`,
text: `💥 ${process.env.AS_REPO} failed on <https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}|${{ github.workflow }}> workflow 💥`,
}]
}
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/authorChecklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ class GithubUtils {
// eslint-disable-next-line max-len
issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`;
// eslint-disable-next-line max-len
issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] I checked [Firebase Crashlytics](https://console.firebase.google.com/u/0/project/expensify-chat/crashlytics/app/android:com.expensify.chat/issues?state=open&time=last-seven-days&tag=all) and verified that this release does not introduce any new crashes.`;
issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] I checked [Firebase Crashlytics](https://console.firebase.google.com/u/0/project/expensify-chat/crashlytics/app/android:com.expensify.chat/issues?state=open&time=last-seven-days&tag=all) and verified that this release does not introduce any new crashes. More detailed instructions on this verification can be found [here](https://stackoverflowteams.com/c/expensify/questions/15095/15096).`;

issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
return issueBody;
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/awaitStagingDeploys/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ class GithubUtils {
// eslint-disable-next-line max-len
issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`;
// eslint-disable-next-line max-len
issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] I checked [Firebase Crashlytics](https://console.firebase.google.com/u/0/project/expensify-chat/crashlytics/app/android:com.expensify.chat/issues?state=open&time=last-seven-days&tag=all) and verified that this release does not introduce any new crashes.`;
issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] I checked [Firebase Crashlytics](https://console.firebase.google.com/u/0/project/expensify-chat/crashlytics/app/android:com.expensify.chat/issues?state=open&time=last-seven-days&tag=all) and verified that this release does not introduce any new crashes. More detailed instructions on this verification can be found [here](https://stackoverflowteams.com/c/expensify/questions/15095/15096).`;

issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
return issueBody;
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/javascript/checkDeployBlockers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ class GithubUtils {
// eslint-disable-next-line max-len
issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`;
// eslint-disable-next-line max-len
issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] I checked [Firebase Crashlytics](https://console.firebase.google.com/u/0/project/expensify-chat/crashlytics/app/android:com.expensify.chat/issues?state=open&time=last-seven-days&tag=all) and verified that this release does not introduce any new crashes.`;
issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] I checked [Firebase Crashlytics](https://console.firebase.google.com/u/0/project/expensify-chat/crashlytics/app/android:com.expensify.chat/issues?state=open&time=last-seven-days&tag=all) and verified that this release does not introduce any new crashes. More detailed instructions on this verification can be found [here](https://stackoverflowteams.com/c/expensify/questions/15095/15096).`;

issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
return issueBody;
Expand Down
46 changes: 39 additions & 7 deletions .github/actions/javascript/createOrUpdateStagingDeploy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ module.exports = run;

const _ = __nccwpck_require__(3571);
const {spawn} = __nccwpck_require__(3129);
const sanitizeStringForJSONParse = __nccwpck_require__(9338);

/**
* Get merge logs between two refs (inclusive) as a JavaScript object.
Expand Down Expand Up @@ -229,14 +230,12 @@ function getMergeLogsAsJSON(fromRef, toRef) {
spawnedProcess.on('error', err => reject(err));
})
.then((stdout) => {
// Remove any double-quotes from commit subjects
let sanitizedOutput = stdout.replace(/(?<="subject": ").*(?="})/g, subject => subject.replace(/"/g, "'"));
// Sanitize just the text within commit subjects as that's the only potentially un-parseable text.
const sanitizedOutput = stdout.replace(/(?<="subject": ").*?(?="})/g, subject => sanitizeStringForJSONParse(subject));

// Also remove any newlines
sanitizedOutput = sanitizedOutput.replace(/(\r\n|\n|\r)/gm, '');
// Then remove newlines, format as JSON and convert to a proper JS object
const json = `[${sanitizedOutput}]`.replace(/(\r\n|\n|\r)/gm, '').replace('},]', '}]');

// Then format as JSON and convert to a proper JS object
const json = `[${sanitizedOutput}]`.replace('},]', '}]');
return JSON.parse(json);
});
}
Expand Down Expand Up @@ -645,7 +644,7 @@ class GithubUtils {
// eslint-disable-next-line max-len
issueBody += `\r\n- [${isTimingDashboardChecked ? 'x' : ' '}] I checked the [App Timing Dashboard](https://graphs.expensify.com/grafana/d/yj2EobAGz/app-timing?orgId=1) and verified this release does not cause a noticeable performance regression.`;
// eslint-disable-next-line max-len
issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] I checked [Firebase Crashlytics](https://console.firebase.google.com/u/0/project/expensify-chat/crashlytics/app/android:com.expensify.chat/issues?state=open&time=last-seven-days&tag=all) and verified that this release does not introduce any new crashes.`;
issueBody += `\r\n- [${isFirebaseChecked ? 'x' : ' '}] I checked [Firebase Crashlytics](https://console.firebase.google.com/u/0/project/expensify-chat/crashlytics/app/android:com.expensify.chat/issues?state=open&time=last-seven-days&tag=all) and verified that this release does not introduce any new crashes. More detailed instructions on this verification can be found [here](https://stackoverflowteams.com/c/expensify/questions/15095/15096).`;

issueBody += '\r\n\r\ncc @Expensify/applauseleads\r\n';
return issueBody;
Expand Down Expand Up @@ -860,6 +859,39 @@ module.exports.ISSUE_OR_PULL_REQUEST_REGEX = ISSUE_OR_PULL_REQUEST_REGEX;
module.exports.POLL_RATE = POLL_RATE;


/***/ }),

/***/ 9338:
/***/ ((module) => {

const replacer = str => ({
'\\': '\\\\',
'\t': '\\t',
'\n': '\\n',
'\r': '\\r',
'\f': '\\f',
'"': '\\"',
}[str]);

/**
* Replace any characters in the string that will break JSON.parse for our Git Log output
*
* Solution partly taken from SO user Gabriel Rodríguez Flores 🙇
* https://stackoverflow.com/questions/52789718/how-to-remove-special-characters-before-json-parse-while-file-reading
*
* @param {String} inputString
* @returns {String}
*/
module.exports = function (inputString) {
if (typeof inputString !== 'string') {
throw new TypeError('Input must me of type String');
}

// Replace any newlines and escape backslashes
return inputString.replace(/\\|\t|\n|\r|\f|"/g, replacer);
};


/***/ }),

/***/ 7351:
Expand Down
Loading

0 comments on commit b703eac

Please sign in to comment.