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
{{ message }}
Repository navigation
allow to assign Copilot as reviewer using gh cli #10598
Reacted by Ivan Blinkov, Konrad Strozanski, Robert Fletcher, Dan Hughes, Peter Dave Hello, Michael Mandel, reubinoff-prime, Arkadii, Bryant Casteel, Roberto Jiménez Sánchez and 29 more
Hey @linnefromice, unfortunately this isn't possible at the moment because the API doesn't really support it. There is an internal issue about making this possible. I will leave this open and blocked for the meantime, and update it when I know more.
Reacted by linnefromice, Bryant Casteel, Will Dean, Engine194, Benjamin Gross, Gonzalo D'Elia and Elanor
Hey folks, right now you can do something like this:
gh alias set save-me-copilot 'api --method POST /repos/$1/pulls/$2/requested_reviewers -f "reviewers[]=copilot-pull-request-reviewer[bot]"'
gh save-me-copilot github/github-mcp-server 412
And it will request copilot as a reviewer. This is not built into the CLI yet directly because the code review team are looking at the API they want to provide as a first class piece of work, and this is kinda a bit janky putting the bot name in there, but it does work, and I have no reason to believe it will stop working.
Hope this helps.
Reacted by Kynan Ware, Peter Dave Hello, Marcin Orlowski, Manny Resurreccion, Sina Zel taat, sshetko, Ken Crowell, Pablo Francisco Pérez Hidalgo and Christian Lück
Reacted by Jonatan, Kareem Abdelkader, Rory, Ken Crowell, Pablo Francisco Pérez Hidalgo and Elanor
I only use a subset of the commands offered by GH CLI but I would say that we would need at least something flag for creating a PR and then command for just that so that you can review or assign the PR.
I am not sure if it should be part of copilot or on the pr subcommands.
I think it would also be fine with the name used for the reviewer or assignee as people normally look at the users in the PR to know what to put on those flags:
Nice! Thank you William! I was trying many different ways to try and automate getting Copilot added via gh CLI several weeks ago, but had no success - thank you! 🙏
✨ a (super simple/trivial) gh extension:
I created a (super simple/trivial) gh extension that wraps the command you shared; installation and usage below:
Open to any and all feedback, suggestions, and contributions/PRs from folks! 🙏
Note: I was really hoping to be able to make a gh extension that'd allow invoking my extension via something like gh pr copilot ..., but I didn't see if that was possible at all. If that is possible somehow, please let me know! 🙏
Usability / UX in gh-proper CLI
I did hunt around a bit to try and see what command(s) seemed most natural to add Copilot to a PR, and nothing felt super 'natural' to me. However, I will say that the current way in gh CLI to add a reviewer is gh pr edit [<url> | <number>] --add-reviewer ChrisCarini, so I naturally tried using copilot-pull-request-reviewer[bot], but I'm sure as you're aware, that did not work. Maybe a natural extension off of "what's already there" would be gh pr edit [<url> | <number>] --add-copilot.
v2.73.0 added support for --add-assignee @copilot.
For consistency, I believe the solution for this issue should be adding --add-reviewer @copilot support for gh pr create/edit.
Reacted by Roberto Jiménez Sánchez, Kynan Ware, Andrei Băncioiu, Jonatan, azul, Kristian Thy, Marcin Orlowski, Auryn, Leonard Brünings, Jeremie Henri and 7 more
Hey @linnefromice, unfortunately this isn't possible at the moment because the API doesn't really support it. There is an internal issue about making this possible. I will leave this open and blocked for the meantime, and update it when I know more.
Hey @linnefromice, unfortunately this isn't possible at the moment because the API doesn't really support it. There is an internal issue about making this possible. I will leave this open and blocked for the meantime, and update it when I know more.
Hey @linnefromice, unfortunately this isn't possible at the moment because the API doesn't really support it. There is an internal issue about making this possible. I will leave this open and blocked for the meantime, and update it when I know more.
Activity
williammartin commentedon Mar 17, 2025
Hey @linnefromice, unfortunately this isn't possible at the moment because the API doesn't really support it. There is an internal issue about making this possible. I will leave this open and blocked for the meantime, and update it when I know more.
ChrisCarini commentedon Apr 17, 2025
Hi @williammartin - any updates here at all?
MissingRoberto commentedon May 20, 2025
@williammartin 😉 😉
williammartin commentedon May 20, 2025
Hey folks, right now you can do something like this:
And it will request copilot as a reviewer. This is not built into the CLI yet directly because the code review team are looking at the API they want to provide as a first class piece of work, and this is kinda a bit janky putting the bot name in there, but it does work, and I have no reason to believe it will stop working.
Hope this helps.
MissingRoberto commentedon May 21, 2025
a bit clunky for now as you must know / type the PR number and repo but works :)
Thank you for finding a workaround @williammartin !
williammartin commentedon May 21, 2025
What UX would you like to see as first class support in the CLI?
MissingRoberto commentedon May 21, 2025
I only use a subset of the commands offered by GH CLI but I would say that we would need at least something flag for creating a PR and then command for just that so that you can review or assign the PR.
I am not sure if it should be part of
copilotor on theprsubcommands.or
I think it would also be fine with the name used for the
reviewerorassigneeas people normally look at the users in the PR to know what to put on those flags:ChrisCarini commentedon May 21, 2025
Nice! Thank you William! I was trying many different ways to try and automate getting Copilot added via
ghCLI several weeks ago, but had no success - thank you! 🙏✨ a (super simple/trivial)
ghextension:I created a (super simple/trivial)
ghextension that wraps the command you shared; installation and usage below:Open to any and all feedback, suggestions, and contributions/PRs from folks! 🙏
Note: I was really hoping to be able to make a
ghextension that'd allow invoking my extension via something likegh pr copilot ..., but I didn't see if that was possible at all. If that is possible somehow, please let me know! 🙏Usability / UX in
gh-proper CLII did hunt around a bit to try and see what command(s) seemed most natural to add Copilot to a PR, and nothing felt super 'natural' to me. However, I will say that the current way in
ghCLI to add a reviewer isgh pr edit [<url> | <number>] --add-reviewer ChrisCarini, so I naturally tried usingcopilot-pull-request-reviewer[bot], but I'm sure as you're aware, that did not work. Maybe a natural extension off of "what's already there" would begh pr edit [<url> | <number>] --add-copilot.takaram commentedon May 26, 2025
v2.73.0 added support for
--add-assignee @copilot.For consistency, I believe the solution for this issue should be adding
--add-reviewer @copilotsupport forgh pr create/edit.dnv-ericliu commentedon Jul 17, 2025
It seems not working in github workflow 😓
ChrisCarini commentedon Jul 17, 2025
Did you try changing the token permissions? For the
gh-CLI extension I mentioned above, you need to use a token with the correct permissions: https://github.com/ChrisCarini/gh-copilot-review?tab=readme-ov-file#token-permissions - perhaps that's similar for whatever workflow you are trying? 🤷dnv-ericliu commentedon Aug 1, 2025
I got it work with
gh apiand PATpioterj commentedon Mar 11, 2026
Looks like this just got addressed in https://github.com/cli/cli/releases/tag/v2.88.0. 🎉
BagToad commentedon Mar 11, 2026
Thank you @pioterj! Yes, this is now available. There's also a blog about it here: https://github.blog/changelog/2026-03-11-request-copilot-code-review-from-github-cli/