Skip to content

Commit afdaa35

Browse files
committed
ci: add checkout step to labeler workflow and use pull_request_target
actions/labeler@v6 falls back to the API when the config file is not found locally. Adding actions/checkout ensures .github/labeler.yml is available in the workspace, removing the API fallback. Switching the trigger from pull_request to pull_request_target gives GITHUB_TOKEN write access on pull-requests for fork PRs, fixing the "Resource not accessible by integration" error that blocked label assignment.
1 parent 2b046cc commit afdaa35

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/labeler.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Auto Label PR
22

33
on:
4-
pull_request:
4+
pull_request_target:
55
types: [opened, synchronize]
66

77
permissions:
@@ -13,6 +13,7 @@ jobs:
1313
name: Auto Label
1414
runs-on: ubuntu-latest
1515
steps:
16+
- uses: actions/checkout@v6
1617
- uses: actions/labeler@v6
1718
with:
1819
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)