Lunny Xiao
e16aa269a1
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>
5 years ago
SpaWn2KiLl
539bd27f9f
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>
5 years ago
6543
faa830dac3
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>
5 years ago
Lunny Xiao
f555e0e383
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
536eca4785
Fix lint ( #9688 )
5 years ago
Lunny Xiao
500d679431
Move PushToBaseRepo from models to services/pull ( #9352 )
5 years ago
zeripath
d39cb1337f
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
3fd60bbe4c
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
b3d96bfa2a
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
f1c7de9a89
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
6 years ago
kolaente
cdba91b438
Add golangci ( #6418 )
6 years ago
Julien Tant
34a56a8d5f
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
4f58d57d84
Fix unit test race condition ( #2516 )
7 years ago
Morlinest
5b0e53b124
Fix tests code to prevent some runtime errors ( #2381 )
* Fix tests code to prevent some runtime errors
* Reduce nesting
7 years ago
Ethan Koenig
507262d3f3
Consistency checks for unit tests ( #853 )
8 years ago
Lunny Xiao
1e4337d0a2
fix xorm NewSession uncorrected usages ( #774 )
8 years ago
Ethan Koenig
d59b499b6b
Less boilerplate in models/ unit tests ( #725 )
8 years ago
Ethan Koenig
59225ffa67
Better coverage in pull_test ( #615 )
8 years ago
Ethan Koenig
a6fc1ad1af
Unit tests for models/pull.go
8 years ago