diff options
author | Ing. Jaroslav Šafka <devel@safka.org> | 2022-07-13 10:22:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-13 16:22:51 +0800 |
commit | 8420c1bf4c46a59973d30af5114216918d0f60cd (patch) | |
tree | ecbc9df280a2be760f6d37853d78c62997af5fe0 /services/pull/check.go | |
parent | b7c6ec91bac5ab0a5382f99a72753574dbc41745 (diff) | |
download | gitea-8420c1bf4c46a59973d30af5114216918d0f60cd.tar.gz gitea-8420c1bf4c46a59973d30af5114216918d0f60cd.zip |
Fix checks in PR for empty commits #19603 (#20290)
* Fixes issue #19603 (Not able to merge commit in PR when branches content is same, but different commit id)
* fill HeadCommitID in PullRequest
* compare real commits ID as check for merging
* based on @zeripath patch in #19738
Diffstat (limited to 'services/pull/check.go')
-rw-r--r-- | services/pull/check.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/services/pull/check.go b/services/pull/check.go index 6621a281fa..288f4dc0b7 100644 --- a/services/pull/check.go +++ b/services/pull/check.go @@ -89,7 +89,7 @@ func CheckPullMergable(stdCtx context.Context, doer *user_model.User, perm *acce return ErrIsWorkInProgress } - if !pr.CanAutoMerge() { + if !pr.CanAutoMerge() && !pr.IsEmpty() { return ErrNotMergableState } |