Lunny Xiao
5abe1c52de
Display pull request head branch even the branch deleted or repository deleted ( #10413 )
* Display pull request head branch even the branch deleted or repository deleted
* Merge getHeadRepo/loadHeadRepo and getBaseRepo/loadBaseRepo on pull and fill repo when pr.Issue.Repo is available
* retrieve sha from pull head when pull request branch deleted and fix tests
* Fix test
* Ensure MustHeadRepoName returns empty string if no head repo
Co-authored-by: zeripath <art27@cantab.net>
4 years ago
SpaWn2KiLl
1f01f53c53
API add/generalize pagination ( #9452 )
* paginate results
* fixed deadlock
* prevented breaking change
* updated swagger
* go fmt
* fixed find topic
* go mod tidy
* go mod vendor with go1.13.5
* fixed repo find topics
* fixed unit test
* added Limit method to Engine struct; use engine variable when provided; fixed gitignore
* use ItemsPerPage for default pagesize; fix GetWatchers, getOrgUsersByOrgID and GetStargazers; fix GetAllCommits headers; reverted some changed behaviors
* set Page value on Home route
* improved memory allocations
* fixed response headers
* removed logfiles
* fixed import order
* import order
* improved swagger
* added function to get models.ListOptions from context
* removed pagesize diff on unit test
* fixed imports
* removed unnecessary struct field
* fixed go fmt
* scoped PR
* code improvements
* code improvements
* go mod tidy
* fixed import order
* fixed commit statuses session
* fixed files headers
* fixed headers; added pagination for notifications
* go mod tidy
* go fmt
* removed Private from user search options; added setting.UI.IssuePagingNum as default valeu on repo's issues list
* Apply suggestions from code review
Co-Authored-By: 6543 <6543@obermui.de>
Co-Authored-By: zeripath <art27@cantab.net>
* fixed build error
* CI.restart()
* fixed merge conflicts resolve
* fixed conflicts resolve
* improved FindTrackedTimesOptions.ToOptions() method
* added backwards compatibility on ListReleases request; fixed issue tracked time ToSession
* fixed build error; fixed swagger template
* fixed swagger template
* fixed ListReleases backwards compatibility
* added page to user search route
Co-authored-by: techknowlogick <matti@mdranta.net>
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: zeripath <art27@cantab.net>
4 years ago
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>
4 years ago
Lunny Xiao
384c2b342e
Move pull request api convert to convert package ( #9664 )
* Move pull request api convert to convert package
* Rename ToPullRequest to ToAPIPullRequest
4 years ago
Lunny Xiao
8878cfa4a1
Fix lint ( #9688 )
4 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 )
7 years ago
Lunny Xiao
bb5a6b7a07
fix xorm NewSession uncorrected usages ( #774 )
7 years ago
Ethan Koenig
8093b3372e
Less boilerplate in models/ unit tests ( #725 )
7 years ago
Ethan Koenig
973282dae2
Better coverage in pull_test ( #615 )
7 years ago
Ethan Koenig
72bfabfada
Unit tests for models/pull.go
8 years ago