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

bot template
old-commit-hash: 1bf8e04f54
This commit is contained in:
Justin Newberry
2024-01-16 21:02:26 -05:00
committed by GitHub
parent 055746bc1e
commit 46dc9366e1

View File

@@ -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,