mirror of
https://gitea.com/gitea/tea.git
synced 2024-11-25 03:51:36 +01:00
fix tea pr create
within same repo (#248)
Merge branch 'master' into fix-pulls-create-same-repo fix pr head detection for PR within same repo regression introduced by #202 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Norwin Roosen <git@nroo.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/248 Reviewed-by: 6543 <6543@noreply.gitea.io> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-Authored-By: Norwin <noerw@noreply.gitea.io> Co-Committed-By: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
parent
48c1c50796
commit
33468630e6
@ -108,7 +108,11 @@ func runPullsCreate(ctx *cli.Context) error {
|
||||
log.Fatal(err)
|
||||
}
|
||||
owner, _ := utils.GetOwnerAndRepo(strings.TrimLeft(url.Path, "/"), "")
|
||||
if owner != repo.Owner.UserName {
|
||||
head = fmt.Sprintf("%s:%s", owner, branchName)
|
||||
} else {
|
||||
head = branchName
|
||||
}
|
||||
}
|
||||
|
||||
title := ctx.String("title")
|
||||
|
Loading…
Reference in New Issue
Block a user