1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-01 08:55:47 +00:00
Commit Graph

17 Commits

Author SHA1 Message Date
6543
36943e56d6 Add "Update Branch" button to Pull Requests (#9784)
* add Divergence

* add Update Button

* first working version

* re-use code

* split raw merge commands and db-change functions (notify, cache, ...)

* use rawMerge (remove redundant code)

* own function to get Diverging of PRs

* use FlashError

* correct Error Msg

* hook is triggerd ... so remove comment

* add "branch2" to "user2/repo1" because it unit-test "TestPullView_ReviewerMissed" use it but dont exist jet :/

* move GetPerm to IsUserAllowedToUpdate

* add Flash Success MSG

* imprufe code
- remove useless js chage

* fix-lint

* TEST: add PullRequest ID:5
Repo: user2/repo1
Base: branch1
Head: pr-to-update

* correct comments

* make PR5 outdated

* fix Tests

* WIP: add pull update test

* update revs

* update locales

* working TEST

* update UI

* misspell

* change style

* add 1s delay so rev exist

* move row up (before merge row)

* fix lint nit

* UI remove divider

* Update style

* nits

* do it right

* introduce IsSameRepo

* remove useless check

Co-authored-by: Lauris BH <lauris@nix.lv>
2020-01-17 08:03:40 +02:00
Lunny Xiao
384c2b342e
Move pull request api convert to convert package (#9664)
* Move pull request api convert to convert package

* Rename ToPullRequest to ToAPIPullRequest
2020-01-10 15:53:53 +08:00
Lunny Xiao
8878cfa4a1
Fix lint (#9688) 2020-01-10 13:50:23 +08:00
Lunny Xiao
ce2d488c94 Move PushToBaseRepo from models to services/pull (#9352) 2019-12-15 04:28:51 +01:00
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
2019-12-13 23:21:06 +01:00
Lunny Xiao
82e0383d21 Move some pull request functions from models to services (#9266)
* Move some pull request functions from models to services

* Fix test
2019-12-06 21:44:10 -05:00
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
2019-10-18 19:13:31 +08:00
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
2019-07-08 10:32:46 +03:00
kolaente
f9ec2f89f2 Add golangci (#6418) 2019-06-12 15:41:28 -04:00
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>
2018-08-13 22:04:39 +03:00
Ethan Koenig
b496e3e1cc Fix unit test race condition (#2516) 2017-09-15 10:54:25 +03:00
Morlinest
8e61823ec4 Fix tests code to prevent some runtime errors (#2381)
* Fix tests code to prevent some runtime errors

* Reduce nesting
2017-08-28 12:17:45 +03:00
Ethan Koenig
ceae143e78 Consistency checks for unit tests (#853) 2017-02-07 19:47:55 +08:00
Lunny Xiao
bb5a6b7a07 fix xorm NewSession uncorrected usages (#774) 2017-01-28 00:11:41 +08:00
Ethan Koenig
8093b3372e Less boilerplate in models/ unit tests (#725) 2017-01-25 10:49:51 +08:00
Ethan Koenig
973282dae2 Better coverage in pull_test (#615) 2017-01-09 11:15:07 +08:00
Ethan Koenig
72bfabfada Unit tests for models/pull.go 2017-01-06 10:08:23 -05:00