models: break out of loop (#12386)

tokarchuk/v1.17
Lars Lehtonen 4 years ago committed by GitHub
parent 11dcc17763
commit e4d6f2e9e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      models/pull_sign.go

@ -27,12 +27,13 @@ func (pr *PullRequest) SignMerge(u *User, tmpBasePath, baseCommit, headCommit st
var gitRepo *git.Repository
var err error
Loop:
for _, rule := range rules {
switch rule {
case never:
return false, "", &ErrWontSign{never}
case always:
break
break Loop
case pubkey:
keys, err := ListGPGKeys(u.ID, ListOptions{})
if err != nil {

Loading…
Cancel
Save