forked from kevadesu/forgejo
Add API branch protection endpoint (#9311)
* 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>
This commit is contained in:
parent
908f8952be
commit
9ff4e1d2d9
10 changed files with 1352 additions and 28 deletions
|
@ -36,6 +36,20 @@ type swaggerResponseBranchList struct {
|
|||
Body []api.Branch `json:"body"`
|
||||
}
|
||||
|
||||
// BranchProtection
|
||||
// swagger:response BranchProtection
|
||||
type swaggerResponseBranchProtection struct {
|
||||
// in:body
|
||||
Body api.BranchProtection `json:"body"`
|
||||
}
|
||||
|
||||
// BranchProtectionList
|
||||
// swagger:response BranchProtectionList
|
||||
type swaggerResponseBranchProtectionList struct {
|
||||
// in:body
|
||||
Body []api.BranchProtection `json:"body"`
|
||||
}
|
||||
|
||||
// TagList
|
||||
// swagger:response TagList
|
||||
type swaggerResponseTagList struct {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue