From 0bdeb2b3029dc46c3e409dc043d07bf36d581be5 Mon Sep 17 00:00:00 2001 From: zeripath Date: Wed, 3 Mar 2021 22:44:30 +0000 Subject: [PATCH] Add missing repo.projects unit into swagger (#14876) Fix #14875 Signed-off-by: Andrew Thornton --- modules/structs/org_team.go | 6 +++--- templates/swagger/v1_json.tmpl | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/structs/org_team.go b/modules/structs/org_team.go index a742b7b224..3b2c5e7839 100644 --- a/modules/structs/org_team.go +++ b/modules/structs/org_team.go @@ -14,7 +14,7 @@ type Team struct { IncludesAllRepositories bool `json:"includes_all_repositories"` // enum: none,read,write,admin,owner Permission string `json:"permission"` - // example: ["repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.ext_wiki"] + // example: ["repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.projects","repo.ext_wiki"] Units []string `json:"units"` CanCreateOrgRepo bool `json:"can_create_org_repo"` } @@ -27,7 +27,7 @@ type CreateTeamOption struct { 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"] + // example: ["repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.projects","repo.ext_wiki"] Units []string `json:"units"` CanCreateOrgRepo bool `json:"can_create_org_repo"` } @@ -40,7 +40,7 @@ type EditTeamOption struct { 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"] + // example: ["repo.code","repo.issues","repo.ext_issues","repo.wiki","repo.pulls","repo.releases","repo.projects","repo.ext_wiki"] Units []string `json:"units"` CanCreateOrgRepo *bool `json:"can_create_org_repo"` } diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index 4a97650e56..1b1d9e5c97 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -12968,6 +12968,7 @@ "repo.wiki", "repo.pulls", "repo.releases", + "repo.projects", "repo.ext_wiki" ] } @@ -13728,6 +13729,7 @@ "repo.wiki", "repo.pulls", "repo.releases", + "repo.projects", "repo.ext_wiki" ] } @@ -15995,6 +15997,7 @@ "repo.wiki", "repo.pulls", "repo.releases", + "repo.projects", "repo.ext_wiki" ] }