-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for review requests in pull-request command #1453
Conversation
e8e71df
to
0fad519
Compare
Thanks @tomasv ! |
Thanks for this! However, the title is a bit misleading as this adds support for only adding reviewers, not submitting reviews. I think it should be renamed similar to the issue it closes. |
This allows us to access extra functionality around PR reviews.
Previously, only the first value was shown.
I've pushed some cleanups to this. Instead of setting a changed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mislav looks good to me.
From the previous PR attempt I assumed it was important to have a different Accept header just for this one request, but if that assumption is not valid then this is much simpler. :)
Hmm, I've just tested sending the 2 header values to GitHub API, but it doesn't recognize it:
It's possible that GitHub API doesn't deal well with multiple values of |
@mislav is that an accurate representation of header values? The final raw request header as I understand should look like this: |
@tomasv Specifying a header twice or specifying it once with two values separated by a comma should be equivalent. But, I'm just checking the implementation of this in the GitHub API, and it looks like we only take the 1st value of In the meantime, I'll try switching back to a custom |
The GitHub API currently doesn't recognize multiple values of `Accept` header, so ensure that `black-cat-preview` is the main one when requesting reviewers.
Thank you for adding this! Will it be included in 2.3.0? |
Yes, and I'll try to make a prerelease soon including this. |
hey, Is it currently working? |
@AlexVKO You can try this functionality out if you build hub from the master branch. It's not yet released. |
Fixes #1358
I took the code from #1422 and attempted to complete it. I hope @ConradIrwin does not mind. 👼
I'm not sure what the cleanest way of overriding
Accept
for one request would be. Most options involve adding theapiPayloadVersion
argument to a lot of function signatures and passing it through. Can this be improved?