Backport #12386 Co-authored-by: Lars Lehtonen <lars.lehtonen@gmail.com>
This commit is contained in:
parent
ee5e5a5093
commit
1f85815a3b
|
@ -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 New Issue