From 6afeb9643e7e7e5ab2282026986d1c5e992503a6 Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 30 Aug 2021 11:56:04 -0600 Subject: [PATCH 1/2] Revert regex changes for :ship-it: comment --- .github/actions/checkDeployBlockers/checkDeployBlockers.js | 2 +- tests/unit/checkDeployBlockersTest.js | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/actions/checkDeployBlockers/checkDeployBlockers.js b/.github/actions/checkDeployBlockers/checkDeployBlockers.js index 154fe67d26c0..000ea410b94d 100644 --- a/.github/actions/checkDeployBlockers/checkDeployBlockers.js +++ b/.github/actions/checkDeployBlockers/checkDeployBlockers.js @@ -49,7 +49,7 @@ const run = function () { console.log('Verifying that the last comment is the :shipit: seal of approval'); const lastComment = comments.data.pop(); - const shipItRegex = /:shipit:/g; + const shipItRegex = /^:shipit:/g; if (_.isNull(shipItRegex.exec(lastComment.body))) { console.log('The last comment on the issue was not :shipit'); core.setOutput('HAS_DEPLOY_BLOCKERS', true); diff --git a/tests/unit/checkDeployBlockersTest.js b/tests/unit/checkDeployBlockersTest.js index 283d1b1b941f..d439c5ec99b2 100644 --- a/tests/unit/checkDeployBlockersTest.js +++ b/tests/unit/checkDeployBlockersTest.js @@ -96,7 +96,6 @@ describe('checkDeployBlockers', () => { mockGetIssue.mockResolvedValue(checkedBoxesNoShipitIssue); // eslint-disable-next-line max-len baseComments.data.push({body: 'This issue either has unchecked QA steps or has not yet been stamped with a :shipit: comment. Reopening!'}); - baseComments.data.push({body: 'This is another comment!'}); mockListComments.mockResolvedValue(baseComments); return run().then(() => { expect(mockSetOutput).toHaveBeenCalledWith('HAS_DEPLOY_BLOCKERS', true); From dce2f14d45debb4844b9c86a0ad029f37871837a Mon Sep 17 00:00:00 2001 From: andrew Date: Mon, 30 Aug 2021 11:56:56 -0600 Subject: [PATCH 2/2] Rebuild actions --- .github/actions/checkDeployBlockers/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/checkDeployBlockers/index.js b/.github/actions/checkDeployBlockers/index.js index e2723503561d..e06f8cbebd0a 100644 --- a/.github/actions/checkDeployBlockers/index.js +++ b/.github/actions/checkDeployBlockers/index.js @@ -59,7 +59,7 @@ const run = function () { console.log('Verifying that the last comment is the :shipit: seal of approval'); const lastComment = comments.data.pop(); - const shipItRegex = /:shipit:/g; + const shipItRegex = /^:shipit:/g; if (_.isNull(shipItRegex.exec(lastComment.body))) { console.log('The last comment on the issue was not :shipit'); core.setOutput('HAS_DEPLOY_BLOCKERS', true);