-
Notifications
You must be signed in to change notification settings - Fork 14
Add ability to handle comments that ask for review #68
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
Conversation
@@ -191,6 +193,8 @@ trait GithubApiActions extends GithubJsonProtocol with core.HttpClient { | |||
def pullRequestCommits(nb: Int) = p[List[Commit]] (Get(api("pulls" / nb / "commits") | |||
withQuery Map("per_page" -> "100"))) | |||
def deletePRComment(id: String) = px (Delete(api("pulls" / "comments" / id))) | |||
def requestReview(nb: Int, reviewers: Reviewers) = px (Post(api("pulls" / nb / "requested_reviewers"), reviewers)~> | |||
addHeader("Accept", "application/vnd.github.black-cat-preview+json")) |
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.
curious what this is about
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.
It's because the PR review API is in Early Access period see here
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.
ah, thanks. I'd suggest commenting this and including the link, since otherwise it will be mysterious to any future maintainer
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.
I opened #71 for this
interesting... looks plausible... README.md would need an update... have you been able to test this? |
nice to see some PRs coming in in this repo, btw. welcome |
Yes I tested it in my fork of Scala |
thought: what happens if the requested reviewer doesn't actually have write access to the repo...? |
Well the api request fails for sure, and a message is logged in the console about the user not being a collaborator. I'm not sure if it has any further side-effects. I don't think it would have. I will try it out again soon and I'll get back to you. |
Should I make it post a comment or something in that case? |
hmmm... I suppose it's fine if it silently fails (except for the log message). |
Awesome, thank you!! Yes, let's try this out. |
(note that I still don't know how to deploy a new Scabot, because scala/scala-jenkins-infra#54, and I don't think the backup method is documented anywhere) |
The travis job for the merge commit of this PR seems to have pushed to prod. Checking if post-receive hooks worked (will continue over at the infra ticket). |
It seems to have worked at scala/scala#5662! I couldn't trigger a review at scala/scala#5677 myself by commenting. Not sure what's going on, as I've broken logging :-( while trying to get push-to-deploy? Will get back to this asap |
@adriaanm I think it is not possible for the commiter to be a reviewer |
ah, the PR author. I review-requested myself just now at scala/scala#5677 and it worked fine. |
Ah good point hehe! 👍
…On Thu, Feb 9, 2017 at 13:23 Seth Tisue ***@***.***> wrote:
ah, the PR author.
I review-requested myself just now at scala/scala#5677
<scala/scala#5677> and it worked fine.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#68 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAFjy5-DUtHGU7ly0p6FRHcLSLoUv6rfks5ra4O_gaJpZM4LyEz4>
.
|
Address #16