Skip to content

Commit 0c91d7f

Browse files
ci: add labeler (#153)
* ci: add labeler action * ci: add issue label template * ci: fix pr-labeler.yml * ci: update pr-labeler.yml
1 parent 14616c0 commit 0c91d7f

3 files changed

Lines changed: 62 additions & 0 deletions

File tree

.github/issue-labeler.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
bug:
2+
- '\b(bug|error|fail|crash|defect|broken)\b'
3+
- 'Bug report'
4+
5+
enhancement:
6+
- '\b(feature|request|idea|proposal|improve|add)\b'
7+
- 'Feature request'
8+
9+
question:
10+
- '\b(question|help|how to|support|query)\b'

.github/pr-labeler.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
core:
2+
- graphgen/**/*
3+
4+
examples:
5+
- examples/**/*
6+
7+
baselines:
8+
- baselines/**/*
9+
10+
documentation:
11+
- "**/*.md"
12+
13+
workflows:
14+
- .github/workflows/*.yml
15+
- .github/workflows/*.yaml
16+
17+
config:
18+
- .github/pr-labeler.yml
19+
- .github/issue-labeler.yml
20+
- .pre-commit-config.yaml
21+
- .pylintrc

.github/workflows/labeler.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Labeler
2+
on:
3+
pull_request_target:
4+
types: [opened, synchronize, reopened]
5+
issues:
6+
types: [opened]
7+
8+
permissions:
9+
contents: read
10+
pull-requests: write
11+
issues: write
12+
13+
jobs:
14+
pr-labeler:
15+
if: github.event_name == 'pull_request_target'
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/labeler@v4
19+
with:
20+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
21+
configuration-path: .github/pr-labeler.yml
22+
23+
issue-labeler:
24+
if: github.event_name == 'issues'
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: github/issue-labeler@v3.4
28+
with:
29+
repo-token: "${{ secrets.GITHUB_TOKEN }}"
30+
configuration-path: .github/issue-labeler.yml
31+
enable-versioned-regex: 0

0 commit comments

Comments
 (0)