]> source.dussan.org Git - gitea.git/commit
Set correct PR status on 3way on conflict checking (#19457)
authorGusted <williamzijl7@hotmail.com>
Thu, 21 Apr 2022 21:55:45 +0000 (21:55 +0000)
committerGitHub <noreply@github.com>
Thu, 21 Apr 2022 21:55:45 +0000 (22:55 +0100)
commitebe569a268bbe71bf2bc30cd2829227700688b57
treee4ba88d01dbaaee73135b8f61f52ae78487c0383
parent3ec1b6c2238c9eb46709091567eb2564aec86d99
Set correct PR status on 3way on conflict checking (#19457)

* Set correct PR status on 3way on conflict checking

- When 3-way merge is enabled for conflict checking, it has a new
interesting behavior that it doesn't return any error when it found a
conflict, so we change the condition to not check for the error, but
instead check if conflictedfiles is populated, this fixes a issue
whereby PR status wasn't correctly on conflicted PR's.
- Refactor the mergeable property(which was incorrectly set and lead me this
bug) to be more maintainable.
- Add a dedicated test for conflicting checking, so it should prevent
future issues with this.

* Fix linter
integrations/pull_merge_test.go
models/pull.go
modules/convert/pull.go
services/pull/patch.go