Skip to content

Commit

Permalink
Merge branch 'main' into arrow-feature-signed
Browse files Browse the repository at this point in the history
  • Loading branch information
JediWattson committed Oct 19, 2022
2 parents 4c76f2e + 555a679 commit 5b303d0
Show file tree
Hide file tree
Showing 203 changed files with 6,268 additions and 2,827 deletions.
46 changes: 25 additions & 21 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,22 @@

### Fixed Issues
<!---
Please replace GH_LINK with the link to the GitHub issue this Pull Request is fixing.
1. Please replace GH_LINK with a URL link to the GitHub issue this Pull Request is fixing.
2. Please replace PROPOSAL: GH_LINK_ISSUE(COMMENT) with a URL link to your GitHub comment, which contains the approved proposal (i.e. the proposal that was approved by Expensify).
Do NOT add the special GH keywords like `fixed` etc, we have our own process of managing the flow.
It MUST be an entire link to the issue; otherwise, the linking will not work as expected.
It MUST be an entire link to the github issue and your comment proposal ; otherwise, the linking will not work as expected.
Make sure this section looks similar to this (you can link multiple issues using the same formatting, just add a new line):
$ https://github.com/Expensify/App/issues/<number-of-the-issue>
$ https://github.com/Expensify/App/issues/<number-of-the-issue(comment)>
Do NOT only link the issue number like this: $ #<number-of-the-issue>
--->
$ GH_LINK
$ GH_LINK
PROPOSAL: GH_LINK_ISSUE(COMMENT)


### Tests
<!---
Expand All @@ -31,11 +36,25 @@ For example:

- [ ] Verify that no errors appear in the JS console

### QA Steps
<!---
Add a numbered list of manual tests that can be performed by our QA engineers on the staging environment to validate that your changes work on all platforms, and that there are no regressions present.
Add any additional QA steps if test steps are unique to a particular platform.
Manual test steps should be written so that the QA engineer can repeat and verify one or more expected outcomes in the staging environment.
For example:
1. Click on the text input to bring it into focus
2. Upload an image via copy paste
3. Verify a modal appears displaying a preview of that image
--->

- [ ] Verify that no errors appear in the JS console

### PR Review Checklist
<!--
This is a checklist for PR authors & reviewers. Please make sure to complete all tasks and check them off once you do, or else Expensify has the right not to merge your PR!
-->
#### Contributor (PR Author) Checklist
#### PR Author Checklist
- [ ] I linked the correct issue in the `### Fixed Issues` section above
- [ ] I wrote clear testing steps that cover the changes made in this PR
- [ ] I added steps for local testing in the `Tests` section
Expand Down Expand Up @@ -67,7 +86,6 @@ This is a checklist for PR authors & reviewers. Please make sure to complete all
- [ ] If a new component is created I verified that:
- [ ] A similar component doesn't exist in the codebase
- [ ] All props are defined accurately and each prop has a `/** comment above it */`
- [ ] Any functional components have the `displayName` property
- [ ] The file is named correctly
- [ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
- [ ] The only data being stored in the state is data necessary for rendering and nothing else
Expand All @@ -85,7 +103,7 @@ This is a checklist for PR authors & reviewers. Please make sure to complete all
<details>
<summary><h4>PR Reviewer Checklist</h4>

The Contributor+ will copy/paste it into a new comment and complete it after the author checklist is completed
The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed
</summary>

- [ ] I have verified the author checklist is complete (all boxes are checked off).
Expand All @@ -96,6 +114,7 @@ The Contributor+ will copy/paste it into a new comment and complete it after the
- [ ] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
- [ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
- [ ] I checked that screenshots or videos are included for tests on [all platforms](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#make-sure-you-can-test-on-all-platforms)
- [ ] 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 verified tests pass on **all platforms** & I tested again on:
- [ ] iOS / native
- [ ] Android / native
Expand All @@ -120,7 +139,6 @@ The Contributor+ will copy/paste it into a new comment and complete it after the
- [ ] If a new component is created I verified that:
- [ ] A similar component doesn't exist in the codebase
- [ ] All props are defined accurately and each prop has a `/** comment above it */`
- [ ] Any functional components have the `displayName` property
- [ ] The file is named correctly
- [ ] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
- [ ] The only data being stored in the state is data necessary for rendering and nothing else
Expand All @@ -137,20 +155,6 @@ The Contributor+ will copy/paste it into a new comment and complete it after the

</details>

### QA Steps
<!---
Add a numbered list of manual tests that can be performed by our QA engineers on the staging environment to validate that your changes work on all platforms, and that there are no regressions present.
Add any additional QA steps if test steps are unique to a particular platform.
Manual test steps should be written so that the QA engineer can repeat and verify one or more expected outcomes in the staging environment.
For example:
1. Click on the text input to bring it into focus
2. Upload an image via copy paste
3. Verify a modal appears displaying a preview of that image
--->

- [ ] Verify that no errors appear in the JS console

### Screenshots
<!-- Add screenshots for all platforms tested. Pull requests won't be merged unless the screenshots show the app was tested on all platforms.-->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const _ = require('underscore');
const GitHubUtils = require('../../../libs/GithubUtils');

/* eslint-disable max-len */
const completedContributorChecklist = `- [x] I linked the correct issue in the \`### Fixed Issues\` section above
const completedAuthorChecklist = `- [x] I linked the correct issue in the \`### Fixed Issues\` section above
- [x] I wrote clear testing steps that cover the changes made in this PR
- [x] I added steps for local testing in the \`Tests\` section
- [x] I added steps for Staging and/or Production testing in the \`QA steps\` section
Expand Down Expand Up @@ -35,7 +35,6 @@ const completedContributorChecklist = `- [x] I linked the correct issue in the \
- [x] If a new component is created I verified that:
- [x] A similar component doesn't exist in the codebase
- [x] All props are defined accurately and each prop has a \`/** comment above it */\`
- [x] Any functional components have the \`displayName\` property
- [x] The file is named correctly
- [x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
- [x] The only data being stored in the state is data necessary for rendering and nothing else
Expand All @@ -50,14 +49,15 @@ const completedContributorChecklist = `- [x] I linked the correct issue in the \
- [x] 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.
- [x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.`;

const completedContributorPlusChecklist = `- [x] I have verified the author checklist is complete (all boxes are checked off).
const completedReviewerChecklist = `- [x] I have verified the author checklist is complete (all boxes are checked off).
- [x] I verified the correct issue is linked in the \`### Fixed Issues\` section above
- [x] I verified testing steps are clear and they cover the changes made in this PR
- [x] I verified the steps for local testing are in the \`Tests\` section
- [x] I verified the steps for Staging and/or Production testing are in the \`QA steps\` section
- [x] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
- [x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
- [x] I checked that screenshots or videos are included for tests on [all platforms](https://github.com/Expensify/App/blob/main/contributingGuides/CONTRIBUTING.md#make-sure-you-can-test-on-all-platforms)
- [x] 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)
- [x] I verified tests pass on **all platforms** & I tested again on:
- [x] iOS / native
- [x] Android / native
Expand All @@ -82,7 +82,6 @@ const completedContributorPlusChecklist = `- [x] I have verified the author chec
- [x] If a new component is created I verified that:
- [x] A similar component doesn't exist in the codebase
- [x] All props are defined accurately and each prop has a \`/** comment above it */\`
- [x] Any functional components have the \`displayName\` property
- [x] The file is named correctly
- [x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
- [x] The only data being stored in the state is data necessary for rendering and nothing else
Expand All @@ -97,8 +96,8 @@ const completedContributorPlusChecklist = `- [x] I have verified the author chec
- [x] 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.
- [x] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.`;

// True if we are validating a contributor checklist, otherwise we are validating a contributor+ checklist
const verifyingContributorChecklist = core.getInput('CHECKLIST', {required: true}) === 'contributor';
// True if we are validating an author checklist, otherwise we are validating a reviewer checklist
const verifyingAuthorChecklist = core.getInput('CHECKLIST', {required: true}) === 'contributor';
const issue = github.context.payload.issue ? github.context.payload.issue.number : github.context.payload.pull_request.number;
const combinedData = [];

Expand Down Expand Up @@ -135,34 +134,34 @@ getPullRequestBody()
.then(() => getAllComments())
.then(comments => combinedData.push(...comments))
.then(() => {
let contributorChecklistComplete = false;
let contributorPlusChecklistComplete = false;
let authorChecklistComplete = false;
let reviewerChecklistComplete = false;

// Once we've gathered all the data, loop through each comment and look to see if it contains a completed checklist
for (let i = 0; i < combinedData.length; i++) {
const whitespace = /([\n\r])/gm;
const comment = combinedData[i].replace(whitespace, '');

if (comment.includes(completedContributorChecklist.replace(whitespace, ''))) {
contributorChecklistComplete = true;
if (comment.includes(completedAuthorChecklist.replace(whitespace, ''))) {
authorChecklistComplete = true;
}

if (comment.includes(completedContributorPlusChecklist.replace(whitespace, ''))) {
contributorPlusChecklistComplete = true;
if (comment.includes(completedReviewerChecklist.replace(whitespace, ''))) {
reviewerChecklistComplete = true;
}
}

if (verifyingContributorChecklist && !contributorChecklistComplete) {
if (verifyingAuthorChecklist && !authorChecklistComplete) {
console.log('Make sure you are using the most up to date checklist found here: https://raw.githubusercontent.com/Expensify/App/main/.github/PULL_REQUEST_TEMPLATE.md');
core.setFailed('Contributor checklist is not completely filled out. Please check every box to verify you\'ve thought about the item.');
core.setFailed('PR Author Checklist is not completely filled out. Please check every box to verify you\'ve thought about the item.');
return;
}

if (!verifyingContributorChecklist && !contributorPlusChecklistComplete) {
if (!verifyingAuthorChecklist && !reviewerChecklistComplete) {
console.log('Make sure you are using the most up to date checklist found here: https://raw.githubusercontent.com/Expensify/App/main/.github/PULL_REQUEST_TEMPLATE.md');
core.setFailed('Contributor+ checklist is not completely filled out. Please check every box to verify you\'ve thought about the item.');
core.setFailed('PR Reviewer Checklist is not completely filled out. Please check every box to verify you\'ve thought about the item.');
return;
}

console.log(`${verifyingContributorChecklist ? 'Contributor' : 'Contributor+'} checklist is complete 🎉`);
console.log(`${verifyingAuthorChecklist ? 'PR Author' : 'PR Reviewer'} checklist is complete 🎉`);
});
Loading

0 comments on commit 5b303d0

Please sign in to comment.