-
Notifications
You must be signed in to change notification settings - Fork 2.1k
ListPullRequestsWithCommit
has incorrect option type
#2815
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
Comments
Thank you, @bennesp ! |
Unfortunately, right now I don't think I am able to follow up on creating a PR for this, so I would rather open the issue to other contributors. If noone will pick this, then probably in the future I might have the chance to create a PR. |
This would be a great PR for any new contributor to this repo or a new Go developer. Feel free to volunteer for any issue and the issue can be assigned to you so that others don't attempt to duplicate the work. Please check out our CONTRIBUTING.md guide to get started. (In particular, please remember to Thank you! |
Hey all, I'm interested in working on this issue |
Thank you, @RickleAndMortimer ! |
I have a fix for this issue. @RickleAndMortimer Please let me know are you still working on it. I am happy to collaborate with you in fixing it. |
Hey @vgnshiyer! I'd love to chat with you about your process in fixing it. I've been struggling to work with Go for a bit now and I'm a bit busy right now so I'll let you know when we can talk more about it |
@RickleAndMortimer Sounds good. @gmlewis Can you please add me as an assignee to this issue? |
EDIT - Whups! TIL that I can assign multiple owners in GitHub. 😁 Done. |
The docs for ListPullRequestsWithCommit mention use of PullRequestListOptions, but this method no longer accepts PullRequestListOptions per google#2815 and google#2822. This commit updates the method doc comment to remove the outdated reference to PullRequestListOptions, and adds some clarifications based on the GitHub docs for the relevant API endpoint.
I am currently using
PullRequests.ListPullRequestsWithCommit
to get a PR starting from a commit hash.This function accepts a parameter "options" of type
PullRequestListOptions
.PullRequestListOptions
has theState
field along with many other fields, butState
does not seem to do anything at all to the results of the function.Example using commit sha cc8044e (PR #2814, a merged PR from this repository):
This will print
First PR: #2814
, which seems to me to be incorrect because it is a merged PR, and thus its state is "closed", not "open".This seems to be because this function uses the REST API
"repos/%v/%v/commits/%v/pulls"
under the hood, which, as stated in the documentation, being an API from the Commits API, not from the Pull Request API, it does not have astate
parameter.The text was updated successfully, but these errors were encountered: