Skip to content

Commit bbe9ebd

Browse files
committed
update with main, resolve conflicts
2 parents cdd8e31 + 18c8f9a commit bbe9ebd

File tree

817 files changed

+22795
-29302
lines changed

Some content is hidden

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

817 files changed

+22795
-29302
lines changed

.eslintrc.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
extends: ['expensify', 'plugin:storybook/recommended', 'plugin:react-hooks/recommended'],
2+
extends: ['expensify', 'plugin:storybook/recommended', 'plugin:react-hooks/recommended', 'prettier'],
33
plugins: ['react-hooks'],
44
parser: 'babel-eslint',
55
ignorePatterns: ['!.*', 'src/vendor', '.github/actions/**/index.js', 'desktop/dist/*.js', 'dist/*.js', 'node_modules/.bin/**', '.git/**'],
@@ -9,15 +9,7 @@ module.exports = {
99
settings: {
1010
'import/resolver': {
1111
node: {
12-
extensions: [
13-
'.js',
14-
'.website.js',
15-
'.desktop.js',
16-
'.native.js',
17-
'.ios.js',
18-
'.android.js',
19-
'.config.js',
20-
],
12+
extensions: ['.js', '.website.js', '.desktop.js', '.native.js', '.ios.js', '.android.js', '.config.js'],
2113
},
2214
},
2315
},

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

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,22 @@ const issue = github.context.payload.issue ? github.context.payload.issue.number
1313
*/
1414
function getNumberOfItemsFromAuthorChecklist() {
1515
return new Promise((resolve, reject) => {
16-
https.get(pathToAuthorChecklist, (res) => {
17-
let fileContents = '';
18-
res.on('data', (chunk) => {
19-
fileContents += chunk;
20-
});
21-
res.on('end', () => {
22-
// Currently, both the author and reviewer checklists are in the PR template file, so we need to do a little bit of parsing the PR description to get just the author
23-
// checklist.
24-
const contentAfterStartOfAuthorChecklist = fileContents.split(authorChecklistStartsWith).pop();
25-
const contentBeforeStartOfReviewerChecklist = contentAfterStartOfAuthorChecklist.split(reviewerChecklistStartsWith).shift();
16+
https
17+
.get(pathToAuthorChecklist, (res) => {
18+
let fileContents = '';
19+
res.on('data', (chunk) => {
20+
fileContents += chunk;
21+
});
22+
res.on('end', () => {
23+
// Currently, both the author and reviewer checklists are in the PR template file, so we need to do a little bit of parsing the PR description to get just the author
24+
// checklist.
25+
const contentAfterStartOfAuthorChecklist = fileContents.split(authorChecklistStartsWith).pop();
26+
const contentBeforeStartOfReviewerChecklist = contentAfterStartOfAuthorChecklist.split(reviewerChecklistStartsWith).shift();
2627

27-
const numberOfChecklistItems = (contentBeforeStartOfReviewerChecklist.match(/\[ \]/g) || []).length;
28-
resolve(numberOfChecklistItems);
29-
});
30-
})
28+
const numberOfChecklistItems = (contentBeforeStartOfReviewerChecklist.match(/\[ \]/g) || []).length;
29+
resolve(numberOfChecklistItems);
30+
});
31+
})
3132
.on('error', reject);
3233
});
3334
}
@@ -36,29 +37,26 @@ function getNumberOfItemsFromAuthorChecklist() {
3637
* @param {Number} numberOfChecklistItems
3738
*/
3839
function checkIssueForCompletedChecklist(numberOfChecklistItems) {
39-
GitHubUtils.getPullRequestBody(issue)
40-
.then((pullRequestBody) => {
41-
const contentAfterStartOfAuthorChecklist = pullRequestBody.split(authorChecklistStartsWith).pop();
42-
const contentOfAuthorChecklist = contentAfterStartOfAuthorChecklist.split(reviewerChecklistStartsWith).shift();
40+
GitHubUtils.getPullRequestBody(issue).then((pullRequestBody) => {
41+
const contentAfterStartOfAuthorChecklist = pullRequestBody.split(authorChecklistStartsWith).pop();
42+
const contentOfAuthorChecklist = contentAfterStartOfAuthorChecklist.split(reviewerChecklistStartsWith).shift();
4343

44-
const numberOfFinishedChecklistItems = (contentOfAuthorChecklist.match(/- \[x\]/gi) || []).length;
45-
const numberOfUnfinishedChecklistItems = (contentOfAuthorChecklist.match(/- \[ \]/g) || []).length;
44+
const numberOfFinishedChecklistItems = (contentOfAuthorChecklist.match(/- \[x\]/gi) || []).length;
45+
const numberOfUnfinishedChecklistItems = (contentOfAuthorChecklist.match(/- \[ \]/g) || []).length;
4646

47-
const maxCompletedItems = numberOfChecklistItems + 2;
48-
const minCompletedItems = numberOfChecklistItems - 2;
47+
const maxCompletedItems = numberOfChecklistItems + 2;
48+
const minCompletedItems = numberOfChecklistItems - 2;
4949

50-
console.log(`You completed ${numberOfFinishedChecklistItems} out of ${numberOfChecklistItems} checklist items with ${numberOfUnfinishedChecklistItems} unfinished items`);
50+
console.log(`You completed ${numberOfFinishedChecklistItems} out of ${numberOfChecklistItems} checklist items with ${numberOfUnfinishedChecklistItems} unfinished items`);
5151

52-
if (numberOfFinishedChecklistItems >= minCompletedItems
53-
&& numberOfFinishedChecklistItems <= maxCompletedItems
54-
&& numberOfUnfinishedChecklistItems === 0) {
55-
console.log('PR Author checklist is complete 🎉');
56-
return;
57-
}
52+
if (numberOfFinishedChecklistItems >= minCompletedItems && numberOfFinishedChecklistItems <= maxCompletedItems && numberOfUnfinishedChecklistItems === 0) {
53+
console.log('PR Author checklist is complete 🎉');
54+
return;
55+
}
5856

59-
console.log(`Make sure you are using the most up to date checklist found here: ${pathToAuthorChecklist}`);
60-
core.setFailed('PR Author Checklist is not completely filled out. Please check every box to verify you\'ve thought about the item.');
61-
});
57+
console.log(`Make sure you are using the most up to date checklist found here: ${pathToAuthorChecklist}`);
58+
core.setFailed("PR Author Checklist is not completely filled out. Please check every box to verify you've thought about the item.");
59+
});
6260
}
6361

6462
getNumberOfItemsFromAuthorChecklist()

0 commit comments

Comments
 (0)