"List pull requests associated with a commit" showing Pull Requests which do not include the commit #177632
Replies: 1 comment
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Select Topic Area
Bug
Body
Hi folks! I'm seeing unexpected behaviour when using the List pull requests associated with a commit API endpoint. I have a revision
rev-1which was merged into my release branch (not the main branch). When I curlhttps://api.github.com/repos/<org>/<repo>/commits/<rev-1>/pullsI expect to see "merged and open pull requests associated with the commit". However instead I am seeing the merged pull request which introduced the commit and other pull requests which do not include the commit.I believe this is either a bug or the documentation should clarify what qualifies a Pull Request as "related" to a commit. It seems
For a more concrete example, I created a repro repo. It has three branches:
main-a1ca0ferelease-branch-121c5d8some-other-update-a3f37fdIt has two PRs: 1 (closed) and 2.
Since PR 1 introduced

121c5d8as a merge commit, PR 2 only has one commit (a3f37fd), I would expect only PR 1 to be "related" to121c5d8. However both PRs are listed as "related" to121c5d8. Correspondingly, if you follow the returned API endpoints to get the commits of the related PR, the original commit sha isn't listed.It seems that a PR may be "related" to a commit if the PR has that commit as its base? If so I think that might be surprising and unclear from the documentation, since there's no qualification of "related".
Beta Was this translation helpful? Give feedback.
All reactions