-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Add Support to preview endpoints to list branches or pull requests fo… #1186
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 to preview endpoints to list branches or pull requests fo… #1186
Conversation
a057467
to
cd62ca4
Compare
Codecov Report
@@ Coverage Diff @@
## master #1186 +/- ##
=========================================
- Coverage 70.24% 70.2% -0.04%
=========================================
Files 84 84
Lines 5878 5904 +26
=========================================
+ Hits 4129 4145 +16
- Misses 958 963 +5
- Partials 791 796 +5
Continue to review full report at Codecov.
|
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.
Looks great, @sks444 !
Just a couple minor tweaks, please, and then we can merge once we get a second LGTM.
github/repos_commits.go
Outdated
@@ -115,6 +115,13 @@ type CommitsListOptions struct { | |||
ListOptions | |||
} | |||
|
|||
// BranchCommit is the result of listing branches with commit sha. |
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.
Let's please change this to SHA
instead of sha
.
(Also, please don't use force commits just to make things easier for reviewers.)
github/repos_commits.go
Outdated
// ListBranchesHeadCommit gets all branches where the given commit SHA is the HEAD, | ||
// or latest commit for the branch. | ||
// | ||
// Github API docs: https://developer.github.com/v3/repos/commits/#list-branches-for-head-commit |
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.
Please capitalize the H
in GitHub
.
Thanks for the review @gmlewis, I have updated the PR. |
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.
Thank you, @sks444!
Awaiting second LGTM before merging.
github/repos_commits_test.go
Outdated
client, mux, _, teardown := setup() | ||
defer teardown() | ||
|
||
// given |
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.
Please don't add incomplete comment, can you please remove it?
github/pulls.go
Outdated
@@ -149,7 +149,35 @@ func (s *PullRequestsService) List(ctx context.Context, owner string, repo strin | |||
// TODO: remove custom Accept header when this API fully launches. | |||
acceptHeaders := []string{mediaTypeLabelDescriptionSearchPreview, mediaTypeLockReasonPreview, mediaTypeDraftPreview} | |||
req.Header.Set("Accept", strings.Join(acceptHeaders, ", ")) | |||
var pulls []*PullRequest |
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.
Please don't edit code which is not related to the issue 😄
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.
LGTM, just a minor change needed.
Good work @sks444 ! 🎉
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the ℹ️ Googlers: Go here for more info. |
Thanks @vaibhavsingh97, I have updated the pr according to your review. @gmlewis, There was some conflicts so I did the rebase and did the push without using |
@sks444 - sure, go ahead and do a force push since all the review feedback has already been addressed. That should hopefully clear it up. |
1fb3a7b
to
bc8872c
Compare
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
Thanks @gmlewis, it's done. |
Thank you, @sks444! Merging. |
…r a commit
Helps #1151