github / github/issue-labeler

Workflow with pull_request_target is not working

オープン
#101 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
237
フォーク
55
PR マージ指標
30日以内にマージされた PR はありません

説明

I try to use `pull_request_target` (for fork PRs) to add label to the PR, but I get always

```
Run github/issue-labeler@v3.4
Configuration file (path: .github/labeler.yml) does not exist locally, fetching via the API
Could not add label(s) bugfix to issue #746
Error: AggregateError
```

With `pull_request` trigger it's working for my own PRs, but not for the for PR.
I think it's a permissions problem, but I don't understand what I need to change.

```
name: 'Build'

on:
pull_request_target:
branches:
- main
push:
branches:
- main

permissions:
issues: write
contents: read

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: github/issue-labeler@v3.4
if: github.event_name == 'pull_request_target'
with:
configuration-path: .github/labeler.yml
include-title: 1
include-body: 0
enable-versioned-regex: 0
repo-token: ${{ secrets.GITHUB_TOKEN }}
```

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。