aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorLars Lehtonen <lars.lehtonen@gmail.com>2020-07-31 06:26:47 -0700
committerGitHub <noreply@github.com>2020-07-31 21:26:47 +0800
commite4d6f2e9e5a11824998794c3e1ab16e9ca97a381 (patch)
tree316bee2cf4e98cedf15bf5b30771e6601c5f4bca /models
parent11dcc177637a234fd624db5d766746dea992bcd4 (diff)
downloadgitea-e4d6f2e9e5a11824998794c3e1ab16e9ca97a381.tar.gz
gitea-e4d6f2e9e5a11824998794c3e1ab16e9ca97a381.zip
models: break out of loop (#12386)
Diffstat (limited to 'models')
-rw-r--r--models/pull_sign.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/models/pull_sign.go b/models/pull_sign.go
index 91b8defa53..ab61232d65 100644
--- a/models/pull_sign.go
+++ b/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 {