Workflow with pull_request_target is not working
- Lenguaje dominante
- TypeScript
- Estrellas
- 237
- Forks
- 55
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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 }}
```
Guía de contribución
Línea de trabajo
Comienza con el disparador pull_request_target y el bloque de permisos del workflow; después, inspecciona el comportamiento de github/issue-labeler@v3.4 en torno a .github/labeler.yml y repo-token. Reproduce el fallo con un pull request desde un fork y compáralo con el caso pull_request que funciona. La tarea estará terminada cuando la acción pueda añadir la etiqueta solicitada al pull request sin AggregateError.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- github-actions, typescript
- Área
- ci-cd
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100