0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-12-26 08:44:16 +01:00

models: break out of loop (#12386)

This commit is contained in:
Lars Lehtonen 2020-07-31 06:26:47 -07:00 committed by GitHub
parent 11dcc17763
commit e4d6f2e9e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {