Skip to content

Commit 7a819ac

Browse files
committed
Add auto-label workflow for area:python-functions
1 parent 04f2cbc commit 7a819ac

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Auto-label area
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
permissions:
8+
issues: write
9+
10+
jobs:
11+
add-area-label:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Add area label
15+
uses: actions/github-script@v7
16+
with:
17+
script: |
18+
const AREA_LABEL = "area:python-functions";
19+
const labels = context.payload.issue.labels.map(l => l.name);
20+
await github.rest.issues.addLabels({
21+
owner: context.repo.owner,
22+
repo: context.repo.repo,
23+
issue_number: context.payload.issue.number,
24+
labels: [AREA_LABEL],
25+
});
26+
}

0 commit comments

Comments
 (0)