diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 8d0dc882bb59..e085ab4dae57 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -35,7 +35,7 @@ For example: -#### 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 @@ -85,7 +85,7 @@ This is a checklist for PR authors & reviewers. Please make sure to complete all

PR Reviewer Checklist

-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
- [ ] I have verified the author checklist is complete (all boxes are checked off). diff --git a/.github/actions/javascript/contributorChecklist/contributorChecklist.js b/.github/actions/javascript/contributorChecklist/contributorChecklist.js index 552e1c374071..9093e3d3197d 100644 --- a/.github/actions/javascript/contributorChecklist/contributorChecklist.js +++ b/.github/actions/javascript/contributorChecklist/contributorChecklist.js @@ -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 @@ -50,7 +50,7 @@ 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 @@ -97,8 +97,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 = []; @@ -135,34 +135,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 🎉`); }); diff --git a/.github/actions/javascript/contributorChecklist/index.js b/.github/actions/javascript/contributorChecklist/index.js index 28a984ad8987..e55b85a2df97 100644 --- a/.github/actions/javascript/contributorChecklist/index.js +++ b/.github/actions/javascript/contributorChecklist/index.js @@ -14,7 +14,7 @@ const _ = __nccwpck_require__(3571); const GitHubUtils = __nccwpck_require__(7999); /* 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 @@ -60,7 +60,7 @@ 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 @@ -107,8 +107,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 = []; @@ -145,36 +145,36 @@ 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 🎉`); }); diff --git a/.github/workflows/contributorChecklists.yml b/.github/workflows/contributorChecklists.yml index 338ec6ba1e55..632fd5355d92 100644 --- a/.github/workflows/contributorChecklists.yml +++ b/.github/workflows/contributorChecklists.yml @@ -1,4 +1,4 @@ -name: Contributor Checklist +name: PR Author Checklist on: pull_request diff --git a/.github/workflows/contributorPlusChecklists.yml b/.github/workflows/contributorPlusChecklists.yml index 76dda02da067..46dc8ae5a733 100644 --- a/.github/workflows/contributorPlusChecklists.yml +++ b/.github/workflows/contributorPlusChecklists.yml @@ -1,4 +1,4 @@ -name: Contributor+ Checklist +name: PR Reviewer Checklist on: pull_request_review @@ -11,4 +11,4 @@ jobs: uses: Expensify/App/.github/actions/javascript/contributorChecklist@main with: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CHECKLIST: 'contributorPlus' + CHECKLIST: 'reviewer'