Skip to content

Commit

Permalink
avoid using '!'
Browse files Browse the repository at this point in the history
Signed-off-by: nnnkkk7 <[email protected]>
  • Loading branch information
nnnkkk7 committed Jan 31, 2024
1 parent 239600e commit bbe6f49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/app/piped/eventwatcher/eventwatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -791,8 +791,8 @@ func parseCommitMsg(msg string, args argsTemplate) string {
// makeBranchName generates a new branch name in the format {eventName}-{uuid} if newBranch is true.
// If newBranch is false, the function returns the existing branch name.
func makeBranchName(newBranch bool, eventName, branch string) string {
if !newBranch {
return branch
if newBranch {
fmt.Sprintf("%s-%s", eventName, uuid.New().String())
}
return fmt.Sprintf("%s-%s", eventName, uuid.New().String())
return branch
}

0 comments on commit bbe6f49

Please sign in to comment.