mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 21:14:01 +08:00
CI: only apply bot-review label when it doesn't pass (#31028)
bot template
old-commit-hash: 1bf8e04f54
This commit is contained in:
12
.github/workflows/auto_pr_review.yaml
vendored
12
.github/workflows/auto_pr_review.yaml
vendored
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user