Skip to content

Commit 3133c16

Browse files
committed
Fixed github actions/labeler unexpected type for label "documentation"
Moved actions/labeler dependency from `main` to `v5`. Bump TimonVS/pr-labeler-action dependency from `v3` to `v5`. Update pr-labeler workflow config
1 parent b9d2626 commit 3133c16

File tree

2 files changed

+28
-22
lines changed

2 files changed

+28
-22
lines changed

.github/pr-labeler-file-path.yml

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
# Add documentation label to any change in documentation related files
22
documentation:
3-
- "docs/*"
4-
- "docs/**/*"
5-
- "README.md"
6-
- "**/README.md"
7-
- "CONTRIBUTING.md"
3+
- any:
4+
- changed-files:
5+
- any-glob-to-any-file: [
6+
"docs/**/*", # All files, including subfolders
7+
"README.md",
8+
"**/README.md",
9+
"CONTRIBUTING.md",
10+
]
811

912
maintenance:
10-
- ".vscode/*"
11-
- ".vscode/**/*"
12-
- ".github/*"
13-
- ".github/**/*"
14-
- ".reuse/*"
15-
- "LICENSES/*"
16-
- ".editorconfig"
17-
- ".gitignore"
18-
- "**/.gitignore"
19-
- "build.py"
20-
- "**/build.py"
13+
- any:
14+
- changed-files:
15+
- any-glob-to-any-file: [
16+
".vscode/**/*", # All files, including subfolders
17+
".github/**/*", # All files, including subfolders
18+
".reuse/*",
19+
"LICENSES/*",
20+
".editorconfig",
21+
"**/.gitignore",
22+
"build.py",
23+
]

.github/workflows/pr-labeler.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
name: pr-labeler
22

33
on:
4-
- pull_request_target
4+
pull_request_target:
5+
types: [opened]
56

67
jobs:
78
pr-labeler:
89
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read # for TimonVS/pr-labeler-action to read config file
12+
pull-requests: write # for TimonVS/pr-labeler-action to add labels in PR
913
steps:
10-
- uses: actions/labeler@main
14+
- uses: actions/labeler@v5
1115
with:
1216
repo-token: "${{ secrets.GITHUB_TOKEN }}"
1317
configuration-path: .github/pr-labeler-file-path.yml
1418
# workaround for problem: https://github.com/wesnoth/wesnoth/commit/958c82d0867568057caaf58356502ec8c87d8366
1519
sync-labels: false
16-
- uses: TimonVS/pr-labeler-action@v3
20+
- uses: TimonVS/pr-labeler-action@v5
1721
with:
18-
configuration-path: .github/pr-labeler-branch-name.yml
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}
23+
configuration-path: .github/pr-labeler-branch-prefix.yml
2124
# Evaluate: https://github.com/srvaroa/labeler

0 commit comments

Comments
 (0)