You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by chrockhill12 May 17, 2024
Config file:
reviewers:
# The default reviewers
defaults: # currently defaults to the default reviewers. Will randomly assign one of them (or 2 depending on "number of reviewers" config)
- team:mds-platform
- crockhill_sfemu
groups:
#MDS-Platforms
mds-plaform-approver:
- crockhill_sfemu
per_author:
# MDS Platforms Review Assignments
mds-plaform-approver:
- team:mds-platform
options:
ignore_draft: true
ignored_keywords:
- DO NOT REVIEW
enable_group_assignment: true
# Randomly pick reviewers up to this number.
# Do not set this option if you'd like to assign all matching reviewers.
number_of_reviewers: 1
#update
# If it's true, the last matching files-change pattern takes the most precedence (CODEOWNERS-compatible)
# last_files_match_only: false
Error with team having proper access to the repo:
Run mds-emu/[email protected]
Fetching configuration file from the source branch
Fetching changed files in the pull request
Identifying reviewers based on the changed files
A "files" key does not exist in config; returning no reviewers for changed files.
Identifying reviewers based on the author
Adding other group members to reviewers if group assignment feature is on
Group assignment feature is disabled
Randomly picking reviewers if the number of reviewers is set
Requesting review to team:mds-platform
Error: HttpError: Validation Failed: "Could not resolve to a node with the global id of 'T_kwDOBzcd9M4Adqj[8](https://github.com/mds-emu/CR-Test-Repo/actions/runs/9117703018/job/25113345970#step:2:9)'."
Error when I remove the team from access the repo:
Error: HttpError: Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the mds-emu/CR-Test-Repo repository.
```</div>
The text was updated successfully, but these errors were encountered:
It also took me quite a few runs to figure out a setup that works.
I did the following:
Create a PAT (personal access token) scoped to the repo with the following permissions:
Members: read and write, Team discussions: read and write, Metadata: read-only, Pull Requests: read and write
make sure your team name is correct
modify your action checkout the repo and use a local config as the token has no access writes otherwise (might also be controllable via another permission, but didn't dare to try)
Here is what my action ended up looking:
Hope that helps!
Plus for testing make sure you add pull_request as a trigger for your action otherwise the changes to your yml might not get picked up.
Discussed in #120
Originally posted by chrockhill12 May 17, 2024
Config file:
Error with team having proper access to the repo:
Error when I remove the team from access the repo:
The text was updated successfully, but these errors were encountered: