1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00
This commit is contained in:
Lunny Xiao
2024-12-02 23:49:57 -08:00
parent 17956ae24a
commit f52a57dcd5

View File

@@ -75,6 +75,8 @@ func CreateBranchFromIssue(ctx *context.Context) {
case git_model.IsErrBranchNameConflict(err):
e := err.(git_model.ErrBranchNameConflict)
ctx.JSONError(ctx.Tr("repo.branch.branch_name_conflict", form.NewBranchName, e.BranchName))
case git_model.IsErrBranchNotExist(err):
ctx.JSONError(ctx.Tr("repo.branch.branch_not_exist", form.SourceBranchName))
case git.IsErrPushRejected(err):
e := err.(*git.ErrPushRejected)
if len(e.Message) == 0 {
@@ -107,6 +109,6 @@ func CreateBranchFromIssue(ctx *context.Context) {
return
}
ctx.Flash.Success(ctx.Tr("repo.issues.create_branch_from_issue_success", ctx.Repo.BranchName))
ctx.Flash.Success(ctx.Tr("repo.issues.create_branch_from_issue_success", form.NewBranchName))
ctx.JSONRedirect(issue.Link())
}