fix: apply configured reviewers when creating pull request via safe output#21217
Merged
fix: apply configured reviewers when creating pull request via safe output#21217
Conversation
…utput (#682) Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pelikhan
March 16, 2026 12:07
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for applying configured reviewers when creating a pull request via safe output, fixing a bug where the reviewers config was serialized but never read or acted upon.
Changes:
- Extract and apply
configReviewersfrom config increate_pull_request.cjs, with special handling for thecopilotreviewer (mapped to bot username) - Add comprehensive test coverage for the new reviewer functionality
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| actions/setup/js/create_pull_request.cjs | Add reviewer request logic after PR creation, consistent with add_reviewer.cjs patterns |
| actions/setup/js/create_pull_request.test.cjs | New test suite covering reviewer assignment scenarios |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
This was referenced Mar 16, 2026
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.
reviewersconfigured insafe-outputs.create-pull-requestwere correctly serialized intoGH_AW_SAFE_OUTPUTS_HANDLER_CONFIGby the Go compiler but silently ignored bycreate_pull_request.cjs— the handler never readconfig.reviewersor calledrequestReviewers.Changes
create_pull_request.cjsconfigReviewersfromconfig.reviewersat factory init (same pattern asenvLabels)pulls.requestReviewerswith configured reviewerscopilotreviewer separately, mapping it tocopilot-pull-request-reviewer[bot](mirrorsadd_reviewer.cjsbehavior)create_pull_request.test.cjs— new test suite covering:copilotreviewer triggers a separaterequestReviewerscall with the bot usernamerequestReviewerscall when no reviewers configuredExample config that now works end-to-end