mirror of
1
Fork 0
forgejo/services/pull
zeripath 875c5e1305 Only check for conflicts/merging if the PR has not been merged in the interim (#10132)
* Only check for merging if the PR has not been merged in the interim

* fixup! Only check for merging if the PR has not been merged in the interim

* Try to fix test failure

* Use PR2 not PR1 in tests as PR1 merges automatically

* return already merged error

* enforce locking

* enforce locking - fix-test

* enforce locking - fix-testx2

* enforce locking - fix-testx3

* move pullrequest checking to after merge

This might improve the chance that the race does not affect us but does not prevent it.

* Remove minor race with getting merge commit id

* fixup

* move check pr after merge

* Remove unnecessary prepareTestEnv - onGiteaRun does this for us

* Add information about when merging occuring

* fix fmt

* More logging

* Attempt to fix mysql

* Try MySQL fix again

* try again

* Try again?!

* Try again?!

* Sigh

* remove the count - perhaps that will help

* next remove the update id

* next remove the update id - make it updated_unix instead

* On failure to merge ensure that the pr is rechecked for conflict errors

* On failure to merge ensure that the pr is rechecked for conflict errors

* Update models/pull.go

* Update models/pull.go

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

* Apply suggestions from code review

Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>

Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-02-10 01:09:31 +02:00
..
check.go Only check for conflicts/merging if the PR has not been merged in the interim (#10132) 2020-02-10 01:09:31 +02:00
check_test.go Only check for conflicts/merging if the PR has not been merged in the interim (#10132) 2020-02-10 01:09:31 +02:00
commit_status.go Fix wrong hint when status checking is running on pull request view (#9886) 2020-01-22 11:46:04 +08:00
lfs.go Add basic repository lfs management (#7199) 2019-10-28 18:31:55 +00:00
main_test.go Move some pull request functions from models to services (#9266) 2019-12-06 21:44:10 -05:00
merge.go Only check for conflicts/merging if the PR has not been merged in the interim (#10132) 2020-02-10 01:09:31 +02:00
patch.go Add require signed commit for protected branch (#9708) 2020-01-15 09:32:57 +01:00
pull.go Fix IsErrPullClosed (#10093) 2020-02-01 11:24:26 +00:00
pull_test.go Move PushToBaseRepo from models to services/pull (#9352) 2019-12-15 04:28:51 +01:00
review.go Some refactor on git diff and ignore getting commit information failed on migrating pull request review comments (#9996) 2020-01-28 08:02:03 +00:00
temp_repo.go Remove SavePatch and generate patches on the fly (#9302) 2019-12-13 23:21:06 +01:00
update.go Only check for conflicts/merging if the PR has not been merged in the interim (#10132) 2020-02-10 01:09:31 +02:00