We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5edbcbe commit 6bc20afCopy full SHA for 6bc20af
.github/workflows/label-opened-issues.yml
@@ -12,9 +12,18 @@ jobs:
12
- uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
13
with:
14
script: |
15
- github.rest.issues.addLabels({
+ const issue = await github.rest.issues.get({
16
issue_number: context.issue.number,
17
owner: context.repo.owner,
18
repo: context.repo.repo,
19
- labels: ["status: new"]
20
- })
+ });
+ const originalLabels = issue.data.labels.map(l => l.name);
21
+ const statusLabels = originalLabels.filter(l => l.startsWith("status: "));
22
+ if (statusLabels.length === 0) {
23
+ github.rest.issues.addLabels({
24
+ issue_number: context.issue.number,
25
+ owner: context.repo.owner,
26
+ repo: context.repo.repo,
27
+ labels: ["status: new"]
28
+ })
29
+ }
0 commit comments