forgejo/workflows: make autolabel workflow always use token from secrets

Using the built-in token seems to only partially work.
And in the latest Forgejo release the issue forcing the use of the
built-in token was fixed with:

https://codeberg.org/forgejo/forgejo/pulls/9025
This commit is contained in:
Timo Rothenpieler
2025-09-01 03:02:49 +02:00
parent b2910ec92e
commit 883162d5b4

View File

@@ -18,11 +18,11 @@ jobs:
if: ${{ forge.event_name == 'pull_request_target' }}
with:
configuration-path: .forgejo/labeler/labeler.yml
repo-token: ${{ forge.event_name == 'pull_request_target' && secrets.AUTOLABELER_TOKEN || forge.token }}
repo-token: ${{ secrets.AUTOLABELER_TOKEN }}
- name: Label by title-match
uses: https://github.com/actions/github-script@v7
with:
script: |
const script = require('.forgejo/labeler/labeler.js')
await script({github, context})
github-token: ${{ forge.event_name == 'pull_request_target' && secrets.AUTOLABELER_TOKEN || forge.token }}
github-token: ${{ secrets.AUTOLABELER_TOKEN }}