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/.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); 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);