From bd4212edf903a73c63a2a0dd7f58898baad1dc36 Mon Sep 17 00:00:00 2001 From: Evan Elias Date: Wed, 5 Feb 2025 16:56:48 -0500 Subject: [PATCH] docs: clarify ListPullRequestsWithCommit usage The docs for ListPullRequestsWithCommit mention use of PullRequestListOptions, but this method no longer accepts PullRequestListOptions per #2815 and #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. --- github/pulls.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/github/pulls.go b/github/pulls.go index 64480194640..f3c6e929c1c 100644 --- a/github/pulls.go +++ b/github/pulls.go @@ -169,10 +169,12 @@ func (s *PullRequestsService) List(ctx context.Context, owner string, repo strin return pulls, resp, nil } -// ListPullRequestsWithCommit returns pull requests associated with a commit SHA. +// ListPullRequestsWithCommit returns pull requests associated with a commit SHA +// or branch name. // -// The results may include open and closed pull requests. -// By default, the PullRequestListOptions State filters for "open". +// The results may include open and closed pull requests. If the commit SHA is +// not present in the repository's default branch, the result will only include +// open pull requests. // // GitHub API docs: https://docs.github.com/rest/commits/commits#list-pull-requests-associated-with-a-commit //