Commit Graph

14 Commits (db26f0aca9f6eb93b294175088a16403be890eb7)

Author SHA1 Message Date
Lunny Xiao ce2d488c94 Move PushToBaseRepo from models to services/pull ()
zeripath 74179d1b5e Remove SavePatch and generate patches on the fly ()
* Save patches to temporary files

* Remove SavePatch and generate patches on the fly

* Use ioutil.TempDir

* fixup! Use ioutil.TempDir

* fixup! fixup! Use ioutil.TempDir

* RemoveAll LocalCopyPath() in initIntergrationTest

* Default to status checking on PR creation

* Remove unnecessary set to StatusChecking

* Protect against unable to load repo

* Handle conflicts

* Restore original conflict setting

* In TestPullRequests update status to StatusChecking before running TestPatch
Lunny Xiao 82e0383d21 Move some pull request functions from models to services ()
* Move some pull request functions from models to services

* Fix test
Lunny Xiao 945f121262
Fix bug on pull requests when transfer head repository ()
* fix bug on pull requests when transfer head repository

* add migration and fix lint

* fix tests and add a cache check on LoadBaseRepo
quantonganh ff85a6331e only return head: null if source branch was deleted ()
* only return head: null if source branch was deleted

* add URL into GetPullRequest

* TestPullRequest_APIFormat

* log error if it is not Err(Branch)NotExist
kolaente f9ec2f89f2 Add golangci ()
Julien Tant 7781e8cef2 Disable merging a WIP Pull request ()
* prevent pull request to be merged when PR is a WIP

* add tests

* add helper to prepend WIP: in PR title

* move default wip prefixes into settings

* use configurable WIP prefixes in javascript and default to first one in templates

* add documentation

* add unit test on pull model

Signed-off-by: Julien Tant <julien@craftyx.fr>
Ethan Koenig b496e3e1cc Fix unit test race condition ()
Morlinest 8e61823ec4 Fix tests code to prevent some runtime errors ()
* Fix tests code to prevent some runtime errors

* Reduce nesting
Ethan Koenig ceae143e78 Consistency checks for unit tests ()
Lunny Xiao bb5a6b7a07 fix xorm NewSession uncorrected usages ()
Ethan Koenig 8093b3372e Less boilerplate in models/ unit tests ()
Ethan Koenig 973282dae2 Better coverage in pull_test ()
Ethan Koenig 72bfabfada Unit tests for models/pull.go