CI: only apply bot-review label when it doesn't pass (#31028)

bot template
old-commit-hash: 1bf8e04f54
chrysler-long2
Justin Newberry 1 year ago committed by GitHub
parent 055746bc1e
commit 46dc9366e1
  1. 12
      .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,

Loading…
Cancel
Save