Add API to get merged PR of a commit (#29243)

Adds a new API `/repos/{owner}/{repo}/commits/{sha}/pull` that allows
you to get the merged PR associated to a commit.

---------

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
qwerty287 2024-02-24 09:18:39 +01:00 committed by GitHub
parent 6e5966597c
commit 0a426cc575
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 128 additions and 0 deletions

View file

@ -1235,6 +1235,7 @@ func Routes() *web.Route {
m.Group("/{ref}", func() {
m.Get("/status", repo.GetCombinedCommitStatusByRef)
m.Get("/statuses", repo.GetCommitStatusesByRef)
m.Get("/pull", repo.GetCommitPullRequest)
}, context.ReferencesGitRepo())
}, reqRepoReader(unit.TypeCode))
m.Group("/git", func() {