aboutsummaryrefslogtreecommitdiffstats
path: root/models/branches_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Move some code into models/git (#19879)Lunny Xiao2022-06-121-161/+0
| | | | | | | | | | | | | | | | | | | * Move access and repo permission to models/perm/access * fix test * Move some git related files into sub package models/git * Fix build * fix git test * move lfs to sub package * move more git related functions to models/git * Move functions sequence * Some improvements per @KN4CK3R and @delvh
* more context for models (#19511)65432022-04-281-3/+7
| | | | | make more usage of context, to have more db transaction in one session (make diff of #9307 smaller)
* Move repository model into models/repo (#17933)Lunny Xiao2021-12-101-16/+17
| | | | | | | | | | | | | | | * Some refactors related repository model * Move more methods out of repository * Move repository into models/repo * Fix test * Fix test * some improvements * Remove unnecessary function
* A better go code formatter, and now `make fmt` can run in Windows (#17684)wxiaoguang2021-11-171-0/+1
| | | | * go build / format tools * re-format imports
* Decouple unit test, remove intermediate `unittestbridge` package (#17662)wxiaoguang2021-11-161-20/+19
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Decouple unit test code from business code (#17623)wxiaoguang2021-11-121-8/+9
|
* Only allow returned deleted branche to be on repo (#17570)Gusted2021-11-081-0/+25
| | | | | | | - This will only allow `GetDeletedBranchByID` to return deletedBranch which are on the repo, and thus don't return a deletedBranch from another repo. - This just should prevent possible bugs in the futher when a code is passing the wrong ID into this function.
* Add a simple way to rename branch like gh (#15870)a10121127962021-10-081-0/+49
| | | | | | | | | | - Update default branch if needed - Update protected branch if needed - Update all not merged pull request base branch name - Rename git branch - Record this rename work and auto redirect for old branch on ui Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: delvh <dev.lh@web.de>
* Move db related basic functions to models/db (#17075)Lunny Xiao2021-09-191-16/+17
| | | | | | | | | | | | | | | | | | | | | | | | | * Move db related basic functions to models/db * Fix lint * Fix lint * Fix test * Fix lint * Fix lint * revert unnecessary change * Fix test * Fix wrong replace string * Use *Context * Correct committer spelling and fix wrong replaced words Co-authored-by: zeripath <art27@cantab.net>
* Add deleted_branch table fixture (#2832)Lauris BH2017-11-041-23/+14
| | | | | | | | * Add deleted_branch table fixture * Fix deleted branches tests * Remove unneeded global variable
* Add branch overiew page (#2108)Bwko2017-10-261-0/+89
* Add branch overiew page * fix changed method name on sub menu * remove unused code