diff options
author | zeripath <art27@cantab.net> | 2021-09-05 10:30:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-05 10:30:40 +0100 |
commit | eb0330a3fe3983c9c5863f2efb2129e691818926 (patch) | |
tree | b98c3eff94794b6cf9e4081c12df85f86f18467b /routers/api | |
parent | 4c7a70b348426a66290f2b227693fc32049651b0 (diff) | |
download | gitea-eb0330a3fe3983c9c5863f2efb2129e691818926.tar.gz gitea-eb0330a3fe3983c9c5863f2efb2129e691818926.zip |
Ensure that rebase conflicts are handled in updates (#16952)
PR #16125 did not update the error handlers to handle conflict errors relating
to rebases. This PR adds them.
Fix #16922
Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers/api')
-rw-r--r-- | routers/api/v1/repo/pull.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index e493e720fb..dee9a94bca 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -1136,6 +1136,9 @@ func UpdatePullRequest(ctx *context.APIContext) { if models.IsErrMergeConflicts(err) { ctx.Error(http.StatusConflict, "Update", "merge failed because of conflict") return + } else if models.IsErrRebaseConflicts(err) { + ctx.Error(http.StatusConflict, "Update", "rebase failed because of conflict") + return } ctx.Error(http.StatusInternalServerError, "pull_service.Update", err) return |