Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
645775992 committed Nov 14, 2023
1 parent 479fc0e commit 8b9ff4d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions fix/gitlab_fix_main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ func (t *FixParams) GitlabFix() (PrUrl string, preview []Preview, err error) {
if err != nil {
return
}
exist, existErr := CheckBranchExist(ctx, repoPath, t.Branch)
if existErr != nil && existErr.Error() != "无法获得检测分支" {
err = existErr
return
}
if exist {
defBranch = t.Branch
if defBranch != t.Branch {
exist, existErr := CheckBranchExist(ctx, repoPath, t.Branch)
if existErr != nil && existErr.Error() != "无法获得检测分支" {
err = existErr
return
}
if exist {
defBranch = t.Branch
}
}
// 设置git邮箱和用户名
_, err = RunGitCommand(ctx, repoPath, "git", "config", "user.email", t.UserEmail)
Expand Down

0 comments on commit 8b9ff4d

Please sign in to comment.