diff --git a/.github/workflows/auto_pr_review.yaml b/.github/workflows/auto_pr_review.yaml index 17c83de89d..0f82eaa789 100644 --- a/.github/workflows/auto_pr_review.yaml +++ b/.github/workflows/auto_pr_review.yaml @@ -89,12 +89,6 @@ jobs: return subset.every((item) => superset.includes(item)); }; - // Add an 'in-bot-review' label while this PR is under review - github.rest.issues.addLabels({ - ...body_data, - labels: ["in-bot-review"], - }); - // Get filenames of all currently checked-in PR templates const template_contents = await github.rest.repos.getContent({ owner: context.repo.owner, @@ -175,6 +169,12 @@ jobs: if (!template_found) { var comment_already_sent = false; + // Add an 'in-bot-review' label since this PR doesn't have the template + github.rest.issues.addLabels({ + ...body_data, + labels: ["in-bot-review"], + }); + if (existing_comments.length < 1) { github.rest.issues.createComment({ ...body_data,