mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-27 02:10:40 +00:00
models: break out of loop (#12386)
This commit is contained in:
parent
11dcc17763
commit
e4d6f2e9e5
1 changed files with 2 additions and 1 deletions
|
@ -27,12 +27,13 @@ func (pr *PullRequest) SignMerge(u *User, tmpBasePath, baseCommit, headCommit st
|
||||||
var gitRepo *git.Repository
|
var gitRepo *git.Repository
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
Loop:
|
||||||
for _, rule := range rules {
|
for _, rule := range rules {
|
||||||
switch rule {
|
switch rule {
|
||||||
case never:
|
case never:
|
||||||
return false, "", &ErrWontSign{never}
|
return false, "", &ErrWontSign{never}
|
||||||
case always:
|
case always:
|
||||||
break
|
break Loop
|
||||||
case pubkey:
|
case pubkey:
|
||||||
keys, err := ListGPGKeys(u.ID, ListOptions{})
|
keys, err := ListGPGKeys(u.ID, ListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue