[API] orgEditTeam make Fields optional (#9556)
* API: orgEditTeam make Fields optional * add TestCase * Update integrations/api_team_test.go * suggestions from lafriks use len() to check if string is empty Co-Authored-By: Lauris BH <lauris@nix.lv> * change ... * use Where not ID to get mssql * add return and code format * fix test * fix test ... null pointer exept * update specific colums * only specific colums too Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
71fe018977
commit
1080c768d3
4 changed files with 55 additions and 26 deletions
|
@ -35,12 +35,12 @@ type CreateTeamOption struct {
|
|||
// EditTeamOption options for editing a team
|
||||
type EditTeamOption struct {
|
||||
// required: true
|
||||
Name string `json:"name" binding:"Required;AlphaDashDot;MaxSize(30)"`
|
||||
Description string `json:"description" binding:"MaxSize(255)"`
|
||||
IncludesAllRepositories bool `json:"includes_all_repositories"`
|
||||
Name string `json:"name" binding:"AlphaDashDot;MaxSize(30)"`
|
||||
Description *string `json:"description" binding:"MaxSize(255)"`
|
||||
IncludesAllRepositories *bool `json:"includes_all_repositories"`
|
||||
// enum: read,write,admin
|
||||
Permission string `json:"permission"`
|
||||
// example: ["repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.ext_wiki"]
|
||||
Units []string `json:"units"`
|
||||
CanCreateOrgRepo bool `json:"can_create_org_repo"`
|
||||
CanCreateOrgRepo *bool `json:"can_create_org_repo"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue