Skip to content

Commit

Permalink
Merge pull request #1720 from Expensify/Rory-TagApplauseLeads
Browse files Browse the repository at this point in the history
  • Loading branch information
deetergp authored Mar 11, 2021
2 parents 6e86f75 + 932feda commit 7aa83e7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .github/actions/markPullRequestsAsDeployed/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ class GithubUtils {
});
}

issueBody += '\r\ncc @Expensify/applauseleads\r\n';

return issueBody;
})
// eslint-disable-next-line no-console
Expand Down
2 changes: 2 additions & 0 deletions .github/libs/GithubUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ class GithubUtils {
});
}

issueBody += '\r\ncc @Expensify/applauseleads\r\n';

return issueBody;
})
// eslint-disable-next-line no-console
Expand Down
18 changes: 10 additions & 8 deletions tests/unit/GithubUtilsTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ describe('GithubUtils', () => {
repo: GithubUtils.EXPENSIFY_CASH_REPO,
issue_number: 29,
// eslint-disable-next-line max-len
body: '**Release Version:** `1.0.1-48`\r\n**Compare Changes:** https://github.com/Expensify/Expensify.cash/compare/1.0.1-0...1.0.1-48\r\n**This release contains changes from the following pull requests:**\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/21\r\n- [x] https://github.com/Expensify/Expensify.cash/pull/22\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/23\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/24\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/25\r\n\r\n**Deploy Blockers:**\r\n- [ ] https://github.com/Expensify/Expensify.cash/issues/1\r\n- [x] https://github.com/Expensify/Expensify.cash/issues/2\r\n- [ ] https://github.com/Expensify/Expensify.cash/issues/3\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/1234\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/4321\r\n',
body: '**Release Version:** `1.0.1-48`\r\n**Compare Changes:** https://github.com/Expensify/Expensify.cash/compare/1.0.1-0...1.0.1-48\r\n**This release contains changes from the following pull requests:**\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/21\r\n- [x] https://github.com/Expensify/Expensify.cash/pull/22\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/23\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/24\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/25\r\n\r\n**Deploy Blockers:**\r\n- [ ] https://github.com/Expensify/Expensify.cash/issues/1\r\n- [x] https://github.com/Expensify/Expensify.cash/issues/2\r\n- [ ] https://github.com/Expensify/Expensify.cash/issues/3\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/1234\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/4321\r\n\r\ncc @Expensify/applauseleads\r\n',
});
});
});
Expand Down Expand Up @@ -271,7 +271,7 @@ describe('GithubUtils', () => {
assignee: 'applausebot',
title,
// eslint-disable-next-line max-len
body: `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/Expensify.cash/compare/1.0.2...1.0.2-12\r\n**This release contains changes from the following pull requests:**\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/1\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/2\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/3\r\n`,
body: `**Release Version:** \`${tag}\`\r\n**Compare Changes:** https://github.com/Expensify/Expensify.cash/compare/1.0.2...1.0.2-12\r\n**This release contains changes from the following pull requests:**\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/1\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/2\r\n- [ ] https://github.com/Expensify/Expensify.cash/pull/3\r\n\r\ncc @Expensify/applauseleads\r\n`,
});
})
));
Expand Down Expand Up @@ -309,19 +309,21 @@ describe('GithubUtils', () => {
const openCheckbox = '- [ ]';
const closedCheckbox = '- [x]';

const ccApplauseLeads = '\r\ncc @Expensify/applauseleads\r\n';

test('Test no verified PRs', () => (
githubUtils.generateStagingDeployCashBody(tag, basePRList)
.then((issueBody) => {
// eslint-disable-next-line max-len
expect(issueBody).toBe(`${baseExpectedOutput}${openCheckbox} ${basePRList[3]}\r\n${openCheckbox} ${basePRList[0]}\r\n${openCheckbox} ${basePRList[1]}\r\n`);
expect(issueBody).toBe(`${baseExpectedOutput}${openCheckbox} ${basePRList[3]}\r\n${openCheckbox} ${basePRList[0]}\r\n${openCheckbox} ${basePRList[1]}\r\n${ccApplauseLeads}`);
})
));

test('Test some verified PRs', () => (
githubUtils.generateStagingDeployCashBody(tag, basePRList, [basePRList[0]])
.then((issueBody) => {
// eslint-disable-next-line max-len
expect(issueBody).toBe(`${baseExpectedOutput}${openCheckbox} ${basePRList[3]}\r\n${closedCheckbox} ${basePRList[0]}\r\n${openCheckbox} ${basePRList[1]}\r\n`);
expect(issueBody).toBe(`${baseExpectedOutput}${openCheckbox} ${basePRList[3]}\r\n${closedCheckbox} ${basePRList[0]}\r\n${openCheckbox} ${basePRList[1]}\r\n${ccApplauseLeads}`);
})
));

Expand All @@ -330,7 +332,7 @@ describe('GithubUtils', () => {
test('Test all verified PRs', () => (
githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList)
.then((issueBody) => {
expect(issueBody).toBe(allVerifiedExpectedOutput);
expect(issueBody).toBe(`${allVerifiedExpectedOutput}${ccApplauseLeads}`);
})
));

Expand All @@ -339,7 +341,7 @@ describe('GithubUtils', () => {
githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList, baseDeployBlockerList)
.then((issueBody) => {
// eslint-disable-next-line max-len
expect(issueBody).toBe(`${allVerifiedExpectedOutput}${deployBlockerHeader}${openCheckbox} ${baseDeployBlockerList[0]}\r\n${openCheckbox} ${baseDeployBlockerList[1]}\r\n`);
expect(issueBody).toBe(`${allVerifiedExpectedOutput}${deployBlockerHeader}${openCheckbox} ${baseDeployBlockerList[0]}\r\n${openCheckbox} ${baseDeployBlockerList[1]}\r\n${ccApplauseLeads}`);
})
));

Expand All @@ -348,7 +350,7 @@ describe('GithubUtils', () => {
githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList, baseDeployBlockerList, [baseDeployBlockerList[0]])
.then((issueBody) => {
// eslint-disable-next-line max-len
expect(issueBody).toBe(`${allVerifiedExpectedOutput}${deployBlockerHeader}${closedCheckbox} ${baseDeployBlockerList[0]}\r\n${openCheckbox} ${baseDeployBlockerList[1]}\r\n`);
expect(issueBody).toBe(`${allVerifiedExpectedOutput}${deployBlockerHeader}${closedCheckbox} ${baseDeployBlockerList[0]}\r\n${openCheckbox} ${baseDeployBlockerList[1]}\r\n${ccApplauseLeads}`);
})
));

Expand All @@ -357,7 +359,7 @@ describe('GithubUtils', () => {
githubUtils.generateStagingDeployCashBody(tag, basePRList, basePRList, baseDeployBlockerList, baseDeployBlockerList)
.then((issueBody) => {
// eslint-disable-next-line max-len
expect(issueBody).toBe(`${allVerifiedExpectedOutput}${deployBlockerHeader}${closedCheckbox} ${baseDeployBlockerList[0]}\r\n${closedCheckbox} ${baseDeployBlockerList[1]}\r\n`);
expect(issueBody).toBe(`${allVerifiedExpectedOutput}${deployBlockerHeader}${closedCheckbox} ${baseDeployBlockerList[0]}\r\n${closedCheckbox} ${baseDeployBlockerList[1]}\r\n${ccApplauseLeads}`);
})
));
});
Expand Down

0 comments on commit 7aa83e7

Please sign in to comment.