-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
x/build/maintner: store Github pull request data #21086
Comments
We need the following in the maintner model for #18517 to avoid API calls to GitHub: |
If I'm not mistaken, this is done by now. PRs are returned as part of Is there anything left to do in this issue? |
There is some data we need in order to avoid calls to the GitHub API in GerritBot. Number of commits, base ref, HEAD sha, etc. https://github.com/golang/build/blob/master/cmd/gerritbot/gerritbot.go#L575 It also doesn't support PR comments. |
Thanks for the update.
To clarify, I think you mean PR reviews and PR review comments. Normal PR comments are already supported; they're identical to issue comments in nature. |
Correct. |
Change https://golang.org/cl/144699 mentions this issue: |
Previously, maintner would track only the Events on an Issue/PullRequest, which missed out on the discussions and approvals that the review process generates. This adds a new struct GitHubReviewEvent to represent the results from the GitHub "pulls/reviews" API. This struct follows the same pattern as the GitHubIssueEvent struct. To accomplish this, a new call has been added to the sync() function: syncReviews, which follows the pattern established with syncEvents(). Finally, this adds an additonal method: ForeachReview which iterates over the GitHubReviewEvents in the given GitHubIssue serially and in chronological order. GitHub API Reference: https://developer.github.com/v3/pulls/reviews/ Updates golang/go#21086 Change-Id: I4f59e154a4e4a8a4b8f2676dea932cf44354c288 Reviewed-on: https://go-review.googlesource.com/c/144699 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
If we want this to be a tool for wider use (and I think it would be good to do that), we need to store Github pull request data for projects.
Furthermore, we currently get Git commits from Gerrit CL's, we'll need to allow people to specify Github as their primary Git upstream and fetch commits from Github instead of Gerrit, and also to read some of the metadata from Github's API that we currently parse out of the Git commits in Gerrit.
The text was updated successfully, but these errors were encountered: