forked from forgejo/forgejo
Merge endpoints for pull diff/patch (#17104)
this merges the two API endpoints for the PR diff/patch in to one
This commit is contained in:
parent
10108b184e
commit
0fa153f421
3 changed files with 50 additions and 109 deletions
|
@ -897,8 +897,7 @@ func Routes(sessioner func(http.Handler) http.Handler) *web.Route {
|
|||
m.Group("/{index}", func() {
|
||||
m.Combo("").Get(repo.GetPullRequest).
|
||||
Patch(reqToken(), bind(api.EditPullRequestOption{}), repo.EditPullRequest)
|
||||
m.Get(".diff", repo.DownloadPullDiff)
|
||||
m.Get(".patch", repo.DownloadPullPatch)
|
||||
m.Get(".{diffType:diff|patch}", repo.DownloadPullDiffOrPatch)
|
||||
m.Post("/update", reqToken(), repo.UpdatePullRequest)
|
||||
m.Get("/commits", repo.GetPullRequestCommits)
|
||||
m.Combo("/merge").Get(repo.IsPullRequestMerged).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue