summaryrefslogtreecommitdiffstats
path: root/models/branches_test.go
Commit message (Collapse)AuthorAgeFilesLines
* 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