Requesting team as reviewer doesn't respect auto assignment upon PR creation
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- github, github-actions, javascript
Direzione di ricerca
Start with the workflow's github.rest.pulls.requestReviewers entry point and reproduce the behavior for pull_request opened and reopened events using the documented team auto-assignment setup. Compare the resulting reviewers and determine whether the GitHub API or event timing causes the difference; the issue is done when an opened PR assigns the configured team members rather than leaving the team as reviewer.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
My team has auto-assignment enabled. However, when requesting team as reviewer in a workflow step, it doesn't behave as documented.
When you enable auto assignment, any time your team has been requested to review a pull request, the team is removed as a reviewer and a specified subset of team members are assigned in the team's place.
github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
team_reviewers: ["awesomeTeamSlug"]
});
To Reproduce
Steps to reproduce the behavior:
- Enable auto-assignment with Round Robin strategy for your team on Github
- Create a workflow file that requests your team as reviewer when a PR is created in a repo
name: Sample workflow
on:
pull_request:
types:
- opened
- reopened
permissions:
pull-requests: write
jobs:
assign:
runs-on: ubuntu-latest
steps:
- name: Set team as reviewer
uses: actions/github-script@v6
with:
github-token: ${{inputs.custom-github-token}} # need a PAT to add team as reviewer
script: |
github.rest.pulls.requestReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
team_reviewers: ["awesomeTeamSlug"]
});
- Make any change and open a PR
- Observe that the team as an entity is assigned to the PR instead of a specified subset of team member.
Expected behavior
- "the team is removed as a reviewer and a specified subset of team members are assigned in the team's place"
Additional context
This bug/odd behavior seems to only occur when PR is initially created. If I configure the workflow to run upon PR reopened, it works as expected.
- Lingua principale
- TypeScript
- Stelle
- 5k
- Fork
- 586
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di actions/github-script
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 48/100
actions/github-script#728 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 52/100
actions/github-script#727 · 1 reazione ·
-
{ Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 10/100
actions/github-script#724 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
actions/github-script#723 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
actions/github-script#714 · 1 commento · 4 reazioni ·