16 Commits (0b3aaa61964faa85b8008b04487388cc362ab436)

Author SHA1 Message Date
Lunny Xiao 384c2b342e
Move pull request api convert to convert package (#9664)
* Move pull request api convert to convert package

* Rename ToPullRequest to ToAPIPullRequest
5 years ago
Lunny Xiao 8878cfa4a1
Fix lint (#9688) 5 years ago
Lunny Xiao ce2d488c94 Move PushToBaseRepo from models to services/pull (#9352) 5 years ago
zeripath 74179d1b5e Remove SavePatch and generate patches on the fly (#9302)
* 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
5 years ago
Lunny Xiao 82e0383d21 Move some pull request functions from models to services (#9266)
* Move some pull request functions from models to services

* Fix test
5 years ago
Lunny Xiao 945f121262
Fix bug on pull requests when transfer head repository (#8564)
* fix bug on pull requests when transfer head repository

* add migration and fix lint

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

* add URL into GetPullRequest

* TestPullRequest_APIFormat

* log error if it is not Err(Branch)NotExist
5 years ago
kolaente f9ec2f89f2 Add golangci (#6418) 5 years ago
Julien Tant 7781e8cef2 Disable merging a WIP Pull request (#4529)
* 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>
6 years ago
Ethan Koenig b496e3e1cc Fix unit test race condition (#2516) 7 years ago
Morlinest 8e61823ec4 Fix tests code to prevent some runtime errors (#2381)
* Fix tests code to prevent some runtime errors

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