summaryrefslogtreecommitdiffstats
path: root/modules/structs/repo_branch.go
Commit message (Collapse)AuthorAgeFilesLines
* Supports wildcard protected branch (#20825)Lunny Xiao2023-01-161-0/+4
| | | | | | | | | | | | | | | | | This PR introduce glob match for protected branch name. The separator is `/` and you can use `*` matching non-separator chars and use `**` across separator. It also supports input an exist or non-exist branch name as matching condition and branch name condition has high priority than glob rule. Should fix #2529 and #15705 screenshots <img width="1160" alt="image" src="https://user-images.githubusercontent.com/81045/205651179-ebb5492a-4ade-4bb4-a13c-965e8c927063.png"> Co-authored-by: zeripath <art27@cantab.net>
* Implement FSFE REUSE for golang files (#21840)flynnnnnnnnnn2022-11-271-2/+1
| | | | | | | | | Change all license headers to comply with REUSE specification. Fix #16132 Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github> Co-authored-by: John Olheiser <john.olheiser@gmail.com>
* Support unprotected file patterns (#16395)Jimmy Praet2021-09-111-0/+3
| | | | | | | Fixes #16381 Note that changes to unprotected files via the web editor still cannot be pushed directly to the protected branch. I could easily add such support for edits and deletes if needed. But for adding, uploading or renaming unprotected files, it is not trivial. * Extract & Move GetAffectedFiles to modules/git
* Add block on official review requests branch protection (#13705)a10121127962020-11-281-59/+62
| | | | | Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Prevent merge of outdated PRs on protected branches (#11012)65432020-04-161-0/+3
| | | | | | | | | | | | | | | | * Block PR on Outdated Branch * finalize * cleanup * fix typo and sentences thanks @guillep2k Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Allow to set protected file patterns that can not be changed under no ↵Lauris BH2020-03-271-0/+3
| | | | | conditions (#10806) Co-Authored-By: zeripath <art27@cantab.net>
* Add API branch protection endpoint (#9311)David Svantesson2020-02-121-8/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add API branch protection endpoint * lint * Change to use team names instead of ids. * Status codes. * fix * Fix * Add new branch protection options (BlockOnRejectedReviews, DismissStaleApprovals, RequireSignedCommits) * Do xorm query directly * fix xorm GetUserNamesByIDs * Add some tests * Improved GetTeamNamesByID * http status created for CreateBranchProtection * Correct status code in integration test Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
* Update branch API endpoint to show effective branch protection. (#9031)David Svantesson2019-11-161-2/+8
| | | | | | * Add API endpoint for displaying effective branch protection. * Add status checks.
* Move sdk structs to modules/structs (#6905)Lunny Xiao2019-05-111-0/+11
* move sdk structs to moduels/structs * fix tests * fix fmt * fix swagger * fix vendor