Requesting team as reviewer doesn't respect auto assignment upon PR creation
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 38/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- github, github-actions, javascript
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 5k
- Forks
- 586
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de actions/github-script
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 48/100
actions/github-script#728 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 52/100
actions/github-script#727 · 1 reação ·
-
{ Aberta
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 10/100
actions/github-script#724 ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
actions/github-script#723 · 1 comentário ·
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 55/100
actions/github-script#714 · 1 comentário · 4 reações ·
Todas as issues de actions/github-script
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
bug v2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
modelcontextprotocol/inspector#2458 · 1 comentário ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
carbon-design-system/ibm-products#9907 ·