Add API to update pr headBranch (#12419)

* [API] Add update pr headBranch api

Signed-off-by: a1012112796 <1012112796@qq.com>
This commit is contained in:
赵智超 2020-08-05 04:55:22 +08:00 committed by GitHub
parent e61c09ed73
commit 8a6790b2aa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 159 additions and 7 deletions

View file

@ -806,6 +806,7 @@ func RegisterRoutes(m *macaron.Macaron) {
Patch(reqToken(), reqRepoWriter(models.UnitTypePullRequests), bind(api.EditPullRequestOption{}), repo.EditPullRequest)
m.Get(".diff", repo.DownloadPullDiff)
m.Get(".patch", repo.DownloadPullPatch)
m.Post("/update", reqToken(), repo.UpdatePullRequest)
m.Combo("/merge").Get(repo.IsPullRequestMerged).
Post(reqToken(), mustNotBeArchived, bind(auth.MergePullRequestForm{}), repo.MergePullRequest)
m.Group("/reviews", func() {