Skip to content

Commit 025ab41

Browse files
authored
Auto-generate labels for labeler (#5265)
1 parent 8f304ae commit 025ab41

File tree

2 files changed

+24
-307
lines changed

2 files changed

+24
-307
lines changed

.github/labeler.yml

Lines changed: 0 additions & 306 deletions
This file was deleted.

.github/workflows/pr-labeler.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: "Pull Request Labeler"
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types:
66
- opened
77
- synchronize
@@ -10,11 +10,34 @@ jobs:
1010
labeler:
1111
permissions:
1212
contents: read
13+
issues: write
1314
pull-requests: write
1415
runs-on: ubuntu-latest
1516
steps:
1617
- uses: actions/checkout@v6
1718

19+
- name: Read repo config
20+
uses: pietrobolcato/[email protected]
21+
id: repo-config
22+
with:
23+
config: repo-config.yml
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: "${{ steps.repo-config.outputs['python-version'] }}"
29+
30+
- name: Run Poetry Image
31+
uses: abatilo/actions-poetry@v3
32+
with:
33+
poetry-version: "${{ steps.repo-config.outputs['poetry-version'] }}"
34+
35+
- name: Install Dependencies
36+
run: poetry install
37+
38+
- name: Create labels
39+
run: poetry run python scripts/set_up_labeler.py
40+
1841
- uses: actions/labeler@v6
1942
with:
2043
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)