Repository navigation
fix: allow adding required reviewers in update_reviewers - #1688
Closed
Vasilii Boldurean (boldurean) wants to merge 1 commit into
Closed
Vasilii Boldurean (boldurean) wants to merge 1 commit into
Vasilii Boldurean (boldurean) wants to merge 1 commit into
Conversation
repo_pull_request_write update_reviewers always added reviewers as optional. Add an optional isRequired input that is passed through to createPullRequestReviewers. When omitted, behaviour is unchanged. The response now includes isRequired for each reviewer.
Author
@microsoft-github-policy-service agree |
Collaborator
|
We are closing this issue per contribution guidelines. Please create an Issue first and have it reviewed before creating a PR |
Author
Hi Dan Hellem (@danhellem), sorry missed that, will do so thanks |
Author
|
Dan Hellem (@danhellem) just seen the issue was already raised in discussions - #899 (comment) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
repo_pull_request_writewithaction: "update_reviewers"always added reviewers as optional. There was no way to add a required reviewer, which is the normal case for teams whose branch policy expects named required reviewers.This PR adds an optional
isRequiredboolean input:reviewerActionisadd, it is passed through tocreatePullRequestReviewersas{ id, isRequired }for each reviewer.{ id }as before, so existing behaviour is unchanged.isRequiredfor each reviewer, so callers can confirm the result.Example:
{ "action": "update_reviewers", "reviewerAction": "add", "isRequired": true, "repositoryId": "<repo>", "pullRequestId": 123, "reviewerIds": ["<identity id>"] }GitHub issue number
None filed.
Associated Risks
Low. The new input is optional and the request payload is identical to before when it is omitted. Not yet confirmed: whether re-adding an existing optional reviewer with
isRequired: truepromotes them to required through the batch endpoint.✅ PR Checklist
🧪 How did you test it?
isRequired: trueis sent for every reviewer and returned in the response.update_reviewerstest still passes with the unchanged{ id }payload.jest test/src/tools/repositories.test.ts: 331 passed, 100% coverage onrepositories.ts.tsc,prettier --checkandeslintare clean.