Requesting team as reviewer doesn't respect auto assignment upon PR creation
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 38/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- github, github-actions, javascript
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 5k
- Forks
- 586
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus actions/github-script
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
actions/github-script#728 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 52/100
actions/github-script#727 · 1 Reaktion ·
-
{ Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 10/100
actions/github-script#724 ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
actions/github-script#723 · 1 Kommentar ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
actions/github-script#714 · 1 Kommentar · 4 Reaktionen ·
Alle Issues in actions/github-script
Ähnliche Issues
-
blocklist removal
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
MetaMask/eth-phishing-detect#296544 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
pastelsky/bundlephobia#1122 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
category/development priority/P2 scope/file-operations scope/testing type/enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Enatega Customer and Rider app: Add-ons price is not visible to customer after order is placed. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100