Skip to content

Commit 1739448

Browse files
authored
Create remove-wfr-tag.yml
1 parent c9b0f63 commit 1739448

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Remove waiting-for-response tag
2+
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
jobs:
8+
remove-tag:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Remove waiting-for-response label if present
12+
uses: actions/github-script@v6
13+
with:
14+
script: |
15+
const issue = context.payload.issue;
16+
if (!issue) {
17+
console.log("No issue or PR found in the payload.");
18+
return;
19+
}
20+
const labels = issue.labels.map(label => label.name);
21+
if (labels.includes("waiting-for-response")) {
22+
console.log(`Removing label 'waiting-for-response' from issue/PR #${issue.number}`);
23+
await github.issues.removeLabel({
24+
owner: context.repo.owner,
25+
repo: context.repo.repo,
26+
issue_number: issue.number,
27+
name: "waiting-for-response"
28+
});
29+
} else {
30+
console.log("Label 'waiting-for-response' not found on this issue/PR.");
31+
}

0 commit comments

Comments
 (0)