diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ece384d81..ccb77732ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -63,6 +63,10 @@ - Cherry-pick upstream v1.26.4: walk git log context error handling — regression fix (#38185) ### Fixed +- Fork server binary now compiles: `routers/api/v1/api.go` called `organization.HasOrgOrUserVisible`, which had been renamed to `IsOwnerVisibleToDoer`; the one missed call site broke `go build` of the entire `routers/api/v1` package (CI's Lint & Validate does not run a full build, so it went unnoticed) (#735) +- Dev deploy workflow: the build/deploy step referenced runner-side values as `\$TAG` / `\$REGISTRY_TOKEN` inside an unquoted SSH heredoc, deferring expansion to the remote shell where those names are unset — the Docker tag collapsed to an empty `mokogitea:` and every dev deploy failed with `invalid reference format`. Runner values are now injected via an ssh env-prefix and the heredoc is quoted so each `$var` expands in exactly one place (#737) +- Repaired unit-test compile and `go vet` failures: `CryptoRandomInt/String/Bytes` now return two values (updated `modules/util/util_test.go`), removed a redundant `&&` condition in `issue_comment.go`, and cleaned up isolated integration-test compile errors (#736) +- Removed a stray `package-lock.json` (13.9k lines) that a `git add -A` had accidentally swept into the org-push-policy branch (#734) - Org-level branch protection now **layers** with per-repo rules instead of being ignored whenever a repo rule exists. When both an org rule and a repo rule match a branch, the effective rule is the most-restrictive (fail-closed) combination — the org rule is a mandatory floor a repo cannot weaken: allow flags AND'd, gate/require/block flags OR'd, required approvals max'd, status checks and protected-file patterns unioned, whitelists intersected. Previously a repo rule shadowed the org rule entirely at the enforcement choke point (`GetFirstMatchProtectedBranchRule`), letting a repo opt out of org protection (#727) - Org Teams page: list now renders — the handler wrote `ctx.Data["OrgListTeams"]` but the template reads `.Teams`, so the page showed header/nav but no teams (#720) - Issue type: now editable after creation for users with issue write permission — the sidebar gated editing on a `FieldEditFlags` data key that was never populated (always read-only); now uses `HasIssuesOrPullsWritePermission` like the priority field (#721) diff --git a/README.md b/README.md index 1aba6495e5..a33161e715 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MokoGitea -Custom Gitea fork with enhanced wiki system, DLID licensing, issue statuses, cascade merge, security scanning, org metadata, CI standardization, and project board API. +Custom Gitea fork with enhanced wiki system, DLID licensing, issue statuses, cascade merge, security scanning, org-level governance, org metadata, CI standardization, and project board API. ![Language](https://img.shields.io/badge/Go-00ADD8?style=flat-square&logo=go&logoColor=white) ![License](https://img.shields.io/badge/license-GPL--3.0--or--later-green?style=flat-square) @@ -17,6 +17,7 @@ Custom Gitea fork with enhanced wiki system, DLID licensing, issue statuses, cas - **Default Org Teams** -- auto-create Developers, Reviewers, and CI/CD teams on org creation - **Org Metadata** -- per-repo metadata API (public GET, admin PUT), platform detection for versioning - **Branch Protection** -- delete allowlist for protected branches (per-user/team/deploy-key) +- **Org Governance** -- organization-wide rules that layer onto every repository: branch protection as a most-restrictive floor a repo cannot weaken, tag protection (team allowlist), push policy (branch/tag naming, mandatory secret-block, max file size, blocked paths), repository defaults (force-private, PR merge settings), and member email-domain allowlists - **Project Board API** -- REST endpoints for project columns and cards - **CI Infrastructure** -- reusable workflows, centralized ci-issue-reporter, standardized MOKOGITEA_TOKEN naming - **Dev Deploy Gate** -- builds deploy to dev environment first, production checks dev health diff --git a/routers/api/v1/org/email_domain.go b/routers/api/v1/org/email_domain.go index ade4f8bf05..92eeba1241 100644 --- a/routers/api/v1/org/email_domain.go +++ b/routers/api/v1/org/email_domain.go @@ -24,6 +24,23 @@ func toAPIOrgEmailDomainPolicy(policy *git_model.OrgEmailDomainPolicy, orgID int // GetOrgEmailDomainPolicy get the organization's email domain policy func GetOrgEmailDomainPolicy(ctx *context.APIContext) { + // swagger:operation GET /orgs/{org}/email_domain_policy organization orgGetEmailDomainPolicy + // --- + // summary: Get the organization's email domain policy + // produces: + // - application/json + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // responses: + // "200": + // "$ref": "#/responses/OrgEmailDomainPolicy" + // "404": + // "$ref": "#/responses/notFound" + orgID := ctx.Org.Organization.ID policy, err := git_model.GetOrgEmailDomainPolicy(ctx, orgID) if err != nil { @@ -35,6 +52,31 @@ func GetOrgEmailDomainPolicy(ctx *context.APIContext) { // EditOrgEmailDomainPolicy create or update the organization's email domain policy func EditOrgEmailDomainPolicy(ctx *context.APIContext) { + // swagger:operation PATCH /orgs/{org}/email_domain_policy organization orgEditEmailDomainPolicy + // --- + // summary: Create or update the organization's email domain policy. Only fields that are set will be changed + // consumes: + // - application/json + // produces: + // - application/json + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // - name: body + // in: body + // schema: + // "$ref": "#/definitions/EditOrgEmailDomainPolicyOption" + // responses: + // "200": + // "$ref": "#/responses/OrgEmailDomainPolicy" + // "404": + // "$ref": "#/responses/notFound" + // "422": + // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.EditOrgEmailDomainPolicyOption) orgID := ctx.Org.Organization.ID @@ -59,6 +101,21 @@ func EditOrgEmailDomainPolicy(ctx *context.APIContext) { // DeleteOrgEmailDomainPolicy remove the organization's email domain policy func DeleteOrgEmailDomainPolicy(ctx *context.APIContext) { + // swagger:operation DELETE /orgs/{org}/email_domain_policy organization orgDeleteEmailDomainPolicy + // --- + // summary: Remove the organization's email domain policy + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // responses: + // "204": + // "$ref": "#/responses/empty" + // "404": + // "$ref": "#/responses/notFound" + if err := git_model.DeleteOrgEmailDomainPolicy(ctx, ctx.Org.Organization.ID); err != nil { ctx.APIErrorInternal(err) return diff --git a/routers/api/v1/org/push_policy.go b/routers/api/v1/org/push_policy.go index 6a8f0df2eb..8f13bcc935 100644 --- a/routers/api/v1/org/push_policy.go +++ b/routers/api/v1/org/push_policy.go @@ -32,6 +32,23 @@ func toAPIOrgPushPolicy(policy *git_model.OrgPushPolicy, orgID int64) *api.OrgPu // GetOrgPushPolicy get the organization's push policy func GetOrgPushPolicy(ctx *context.APIContext) { + // swagger:operation GET /orgs/{org}/push_policy organization orgGetPushPolicy + // --- + // summary: Get the organization's push policy + // produces: + // - application/json + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // responses: + // "200": + // "$ref": "#/responses/OrgPushPolicy" + // "404": + // "$ref": "#/responses/notFound" + orgID := ctx.Org.Organization.ID policy, err := git_model.GetOrgPushPolicy(ctx, orgID) if err != nil { @@ -43,6 +60,31 @@ func GetOrgPushPolicy(ctx *context.APIContext) { // EditOrgPushPolicy create or update the organization's push policy func EditOrgPushPolicy(ctx *context.APIContext) { + // swagger:operation PATCH /orgs/{org}/push_policy organization orgEditPushPolicy + // --- + // summary: Create or update the organization's push policy. Only fields that are set will be changed + // consumes: + // - application/json + // produces: + // - application/json + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // - name: body + // in: body + // schema: + // "$ref": "#/definitions/EditOrgPushPolicyOption" + // responses: + // "200": + // "$ref": "#/responses/OrgPushPolicy" + // "404": + // "$ref": "#/responses/notFound" + // "422": + // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.EditOrgPushPolicyOption) orgID := ctx.Org.Organization.ID @@ -80,6 +122,21 @@ func EditOrgPushPolicy(ctx *context.APIContext) { // DeleteOrgPushPolicy remove the organization's push policy func DeleteOrgPushPolicy(ctx *context.APIContext) { + // swagger:operation DELETE /orgs/{org}/push_policy organization orgDeletePushPolicy + // --- + // summary: Remove the organization's push policy + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // responses: + // "204": + // "$ref": "#/responses/empty" + // "404": + // "$ref": "#/responses/notFound" + if err := git_model.DeleteOrgPushPolicy(ctx, ctx.Org.Organization.ID); err != nil { ctx.APIErrorInternal(err) return diff --git a/routers/api/v1/org/repo_defaults.go b/routers/api/v1/org/repo_defaults.go index 74019f37c7..02ac671472 100644 --- a/routers/api/v1/org/repo_defaults.go +++ b/routers/api/v1/org/repo_defaults.go @@ -42,6 +42,23 @@ func toAPIOrgRepoDefaults(d *git_model.OrgRepoDefaults, orgID int64) *api.OrgRep // GetOrgRepoDefaults get the organization's default repository settings func GetOrgRepoDefaults(ctx *context.APIContext) { + // swagger:operation GET /orgs/{org}/repo_defaults organization orgGetRepoDefaults + // --- + // summary: Get the organization's default repository settings + // produces: + // - application/json + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // responses: + // "200": + // "$ref": "#/responses/OrgRepoDefaults" + // "404": + // "$ref": "#/responses/notFound" + orgID := ctx.Org.Organization.ID defaults, err := git_model.GetOrgRepoDefaults(ctx, orgID) if err != nil { @@ -53,6 +70,31 @@ func GetOrgRepoDefaults(ctx *context.APIContext) { // EditOrgRepoDefaults create or update the organization's default repository settings func EditOrgRepoDefaults(ctx *context.APIContext) { + // swagger:operation PATCH /orgs/{org}/repo_defaults organization orgEditRepoDefaults + // --- + // summary: Create or update the organization's default repository settings. Only fields that are set will be changed + // consumes: + // - application/json + // produces: + // - application/json + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // - name: body + // in: body + // schema: + // "$ref": "#/definitions/EditOrgRepoDefaultsOption" + // responses: + // "200": + // "$ref": "#/responses/OrgRepoDefaults" + // "404": + // "$ref": "#/responses/notFound" + // "422": + // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.EditOrgRepoDefaultsOption) orgID := ctx.Org.Organization.ID @@ -109,6 +151,21 @@ func EditOrgRepoDefaults(ctx *context.APIContext) { // DeleteOrgRepoDefaults remove the organization's default repository settings func DeleteOrgRepoDefaults(ctx *context.APIContext) { + // swagger:operation DELETE /orgs/{org}/repo_defaults organization orgDeleteRepoDefaults + // --- + // summary: Remove the organization's default repository settings + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // responses: + // "204": + // "$ref": "#/responses/empty" + // "404": + // "$ref": "#/responses/notFound" + if err := git_model.DeleteOrgRepoDefaults(ctx, ctx.Org.Organization.ID); err != nil { ctx.APIErrorInternal(err) return diff --git a/routers/api/v1/org/tag_protection.go b/routers/api/v1/org/tag_protection.go index 9288ac0804..abec3e8caf 100644 --- a/routers/api/v1/org/tag_protection.go +++ b/routers/api/v1/org/tag_protection.go @@ -41,6 +41,23 @@ func toAPIOrgTagProtection(ctx *context.APIContext, rule *git_model.OrgProtected // ListOrgTagProtections list org-level tag protection rules func ListOrgTagProtections(ctx *context.APIContext) { + // swagger:operation GET /orgs/{org}/tag_protections organization orgListTagProtections + // --- + // summary: List an organization's tag protection rules + // produces: + // - application/json + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // responses: + // "200": + // "$ref": "#/responses/OrgTagProtectionList" + // "404": + // "$ref": "#/responses/notFound" + rules, err := git_model.FindOrgProtectedTags(ctx, ctx.Org.Organization.ID) if err != nil { ctx.APIErrorInternal(err) @@ -55,6 +72,29 @@ func ListOrgTagProtections(ctx *context.APIContext) { // GetOrgTagProtection get a specific org-level tag protection rule func GetOrgTagProtection(ctx *context.APIContext) { + // swagger:operation GET /orgs/{org}/tag_protections/{id} organization orgGetTagProtection + // --- + // summary: Get a specific org-level tag protection rule + // produces: + // - application/json + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // - name: id + // in: path + // description: id of the tag protection rule + // type: integer + // format: int64 + // required: true + // responses: + // "200": + // "$ref": "#/responses/OrgTagProtection" + // "404": + // "$ref": "#/responses/notFound" + rule, err := git_model.GetOrgProtectedTagByID(ctx, ctx.Org.Organization.ID, ctx.PathParamInt64("id")) if err != nil { ctx.APIErrorInternal(err) @@ -69,6 +109,33 @@ func GetOrgTagProtection(ctx *context.APIContext) { // CreateOrgTagProtection create an org-level tag protection rule func CreateOrgTagProtection(ctx *context.APIContext) { + // swagger:operation POST /orgs/{org}/tag_protections organization orgCreateTagProtection + // --- + // summary: Create an org-level tag protection rule + // consumes: + // - application/json + // produces: + // - application/json + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // - name: body + // in: body + // schema: + // "$ref": "#/definitions/CreateOrgTagProtectionOption" + // responses: + // "201": + // "$ref": "#/responses/OrgTagProtection" + // "403": + // "$ref": "#/responses/forbidden" + // "404": + // "$ref": "#/responses/notFound" + // "422": + // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.CreateOrgTagProtectionOption) orgID := ctx.Org.Organization.ID @@ -101,6 +168,37 @@ func CreateOrgTagProtection(ctx *context.APIContext) { // EditOrgTagProtection edit an org-level tag protection rule func EditOrgTagProtection(ctx *context.APIContext) { + // swagger:operation PATCH /orgs/{org}/tag_protections/{id} organization orgEditTagProtection + // --- + // summary: Edit an org-level tag protection rule. Only fields that are set will be changed + // consumes: + // - application/json + // produces: + // - application/json + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // - name: id + // in: path + // description: id of the tag protection rule + // type: integer + // format: int64 + // required: true + // - name: body + // in: body + // schema: + // "$ref": "#/definitions/EditOrgTagProtectionOption" + // responses: + // "200": + // "$ref": "#/responses/OrgTagProtection" + // "404": + // "$ref": "#/responses/notFound" + // "422": + // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.EditOrgTagProtectionOption) orgID := ctx.Org.Organization.ID @@ -134,6 +232,27 @@ func EditOrgTagProtection(ctx *context.APIContext) { // DeleteOrgTagProtection delete an org-level tag protection rule func DeleteOrgTagProtection(ctx *context.APIContext) { + // swagger:operation DELETE /orgs/{org}/tag_protections/{id} organization orgDeleteTagProtection + // --- + // summary: Delete an org-level tag protection rule + // parameters: + // - name: org + // in: path + // description: name of the organization + // type: string + // required: true + // - name: id + // in: path + // description: id of the tag protection rule + // type: integer + // format: int64 + // required: true + // responses: + // "204": + // "$ref": "#/responses/empty" + // "404": + // "$ref": "#/responses/notFound" + orgID := ctx.Org.Organization.ID rule, err := git_model.GetOrgProtectedTagByID(ctx, orgID, ctx.PathParamInt64("id")) if err != nil { diff --git a/routers/api/v1/repo/manifest.go b/routers/api/v1/repo/manifest.go index 36b7b87bf3..642eb76d5b 100644 --- a/routers/api/v1/repo/manifest.go +++ b/routers/api/v1/repo/manifest.go @@ -30,7 +30,7 @@ type apiMetadata struct { TargetVersion string `json:"target_version"` PHPMinimum string `json:"php_minimum"` Language string `json:"language"` - ExtensionType string `json:"extension_type"` + ExtensionType string `json:"extension_type"` EntryPoint string `json:"entry_point"` // deploy @@ -44,6 +44,13 @@ type apiMetadata struct { HealthURL string `json:"health_url,omitempty"` } +// Manifest +// swagger:response Manifest +type swaggerResponseManifest struct { + // in:body + Body apiMetadata `json:"body"` +} + // GetRepoMetadata returns the manifest settings for a repository. func GetRepoMetadata(ctx *context.APIContext) { // swagger:operation GET /repos/{owner}/{repo}/manifest repository repoGetManifest @@ -51,6 +58,17 @@ func GetRepoMetadata(ctx *context.APIContext) { // summary: Get repo manifest settings // produces: // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true // responses: // "200": // "$ref": "#/responses/Manifest" @@ -71,9 +89,9 @@ func GetRepoMetadata(ctx *context.APIContext) { return } ctx.JSON(http.StatusOK, &apiMetadata{ - Name: m.Name, - Org: m.Org, - Description: m.Description, + Name: m.Name, + Org: m.Org, + Description: m.Description, LicenseSPDX: m.LicenseSPDX, LicenseName: m.LicenseName, @@ -89,7 +107,7 @@ func GetRepoMetadata(ctx *context.APIContext) { TargetVersion: m.TargetVersion, PHPMinimum: m.PHPMinimum, Language: m.Language, - ExtensionType: m.ExtensionType, + ExtensionType: m.ExtensionType, EntryPoint: m.EntryPoint, DeployHost: m.DeployHost, DeployPort: m.DeployPort, @@ -111,9 +129,21 @@ func UpdateRepoMetadata(ctx *context.APIContext) { // - application/json // produces: // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true // responses: // "200": // "$ref": "#/responses/Manifest" + // Decode into a map to detect which fields were actually sent. var raw map[string]any if err := json.NewDecoder(ctx.Req.Body).Decode(&raw); err != nil { @@ -173,9 +203,9 @@ func UpdateRepoMetadata(ctx *context.APIContext) { } ctx.JSON(http.StatusOK, &apiMetadata{ - Name: m.Name, - Org: m.Org, - Description: m.Description, + Name: m.Name, + Org: m.Org, + Description: m.Description, LicenseSPDX: m.LicenseSPDX, LicenseName: m.LicenseName, @@ -191,7 +221,7 @@ func UpdateRepoMetadata(ctx *context.APIContext) { TargetVersion: m.TargetVersion, PHPMinimum: m.PHPMinimum, Language: m.Language, - ExtensionType: m.ExtensionType, + ExtensionType: m.ExtensionType, EntryPoint: m.EntryPoint, DeployHost: m.DeployHost, DeployPort: m.DeployPort, diff --git a/routers/api/v1/swagger/options.go b/routers/api/v1/swagger/options.go index 176ab4656e..2c54ba24d8 100644 --- a/routers/api/v1/swagger/options.go +++ b/routers/api/v1/swagger/options.go @@ -159,6 +159,44 @@ type swaggerParameterBodies struct { // in:body UpdateBranchProtectionPriories api.UpdateBranchProtectionPriories + // in:body + CreateOrgBranchProtectionOption api.CreateOrgBranchProtectionOption + // in:body + EditOrgBranchProtectionOption api.EditOrgBranchProtectionOption + + // in:body + CreateOrgTagProtectionOption api.CreateOrgTagProtectionOption + // in:body + EditOrgTagProtectionOption api.EditOrgTagProtectionOption + + // in:body + EditOrgPushPolicyOption api.EditOrgPushPolicyOption + + // in:body + EditOrgRepoDefaultsOption api.EditOrgRepoDefaultsOption + + // in:body + EditOrgEmailDomainPolicyOption api.EditOrgEmailDomainPolicyOption + + // in:body + EditAccessTokenOption api.EditAccessTokenOption + + // in:body + IssueBulkAssigneesOption api.IssueBulkAssigneesOption + // in:body + IssueBulkLabelsOption api.IssueBulkLabelsOption + // in:body + IssueBulkMilestoneOption api.IssueBulkMilestoneOption + // in:body + IssueBulkStateOption api.IssueBulkStateOption + + // in:body + IssuePriorityDef api.IssuePriorityDef + // in:body + IssueStatusDef api.IssueStatusDef + // in:body + IssueTypeDef api.IssueTypeDef + // in:body CreateOAuth2ApplicationOptions api.CreateOAuth2ApplicationOptions diff --git a/routers/api/v1/swagger/org.go b/routers/api/v1/swagger/org.go index 8379dd24cc..f3accaff57 100644 --- a/routers/api/v1/swagger/org.go +++ b/routers/api/v1/swagger/org.go @@ -41,3 +41,52 @@ type swaggerResponseOrganizationPermissions struct { // in:body Body api.OrganizationPermissions `json:"body"` } + +// OrgBranchProtection +// swagger:response OrgBranchProtection +type swaggerResponseOrgBranchProtection struct { + // in:body + Body api.OrgBranchProtection `json:"body"` +} + +// OrgBranchProtectionList +// swagger:response OrgBranchProtectionList +type swaggerResponseOrgBranchProtectionList struct { + // in:body + Body []*api.OrgBranchProtection `json:"body"` +} + +// OrgTagProtection +// swagger:response OrgTagProtection +type swaggerResponseOrgTagProtection struct { + // in:body + Body api.OrgTagProtection `json:"body"` +} + +// OrgTagProtectionList +// swagger:response OrgTagProtectionList +type swaggerResponseOrgTagProtectionList struct { + // in:body + Body []*api.OrgTagProtection `json:"body"` +} + +// OrgPushPolicy +// swagger:response OrgPushPolicy +type swaggerResponseOrgPushPolicy struct { + // in:body + Body api.OrgPushPolicy `json:"body"` +} + +// OrgRepoDefaults +// swagger:response OrgRepoDefaults +type swaggerResponseOrgRepoDefaults struct { + // in:body + Body api.OrgRepoDefaults `json:"body"` +} + +// OrgEmailDomainPolicy +// swagger:response OrgEmailDomainPolicy +type swaggerResponseOrgEmailDomainPolicy struct { + // in:body + Body api.OrgEmailDomainPolicy `json:"body"` +} diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl index e096ed8bc4..d56889a7fa 100644 --- a/templates/swagger/v1_json.tmpl +++ b/templates/swagger/v1_json.tmpl @@ -11,8 +11,8 @@ ], "swagger": "2.0", "info": { - "description": "This documentation describes the {{.SwaggerAppName}} API.", - "title": "{{.SwaggerAppName}} API", + "description": "This documentation describes the Gitea API.", + "title": "Gitea API", "license": { "name": "MIT", "url": "http://opensource.org/licenses/MIT" @@ -2858,6 +2858,285 @@ } } }, + "/orgs/{org}/branch_protections": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's branch protection rules", + "operationId": "orgListBranchProtections", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrgBranchProtectionList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create an org-level branch protection rule", + "operationId": "orgCreateBranchProtection", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateOrgBranchProtectionOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/OrgBranchProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}/branch_protections/{name}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get a specific org-level branch protection rule", + "operationId": "orgGetBranchProtection", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the branch protection rule", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrgBranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "organization" + ], + "summary": "Delete an org-level branch protection rule", + "operationId": "orgDeleteBranchProtection", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the branch protection rule", + "name": "name", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Edit an org-level branch protection rule. Only fields that are set will be changed", + "operationId": "orgEditBranchProtection", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the branch protection rule", + "name": "name", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditOrgBranchProtectionOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrgBranchProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}/email_domain_policy": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get the organization's email domain policy", + "operationId": "orgGetEmailDomainPolicy", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrgEmailDomainPolicy" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "organization" + ], + "summary": "Remove the organization's email domain policy", + "operationId": "orgDeleteEmailDomainPolicy", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create or update the organization's email domain policy. Only fields that are set will be changed", + "operationId": "orgEditEmailDomainPolicy", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditOrgEmailDomainPolicyOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrgEmailDomainPolicy" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, "/orgs/{org}/hooks": { "get": { "produces": [ @@ -3054,6 +3333,203 @@ } } }, + "/orgs/{org}/issue-priorities": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's issue priority definitions", + "operationId": "orgListIssuePriorities", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "IssuePriorityDefList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/IssuePriorityDef" + } + } + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/issue-statuses": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's issue status definitions", + "operationId": "orgListIssueStatuses", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "IssueStatusDefList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/IssueStatusDef" + } + } + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/issue-statuses/copy/{source_org}": { + "post": { + "tags": [ + "organization" + ], + "summary": "Copy issue statuses from another organization", + "operationId": "orgCopyIssueStatuses", + "parameters": [ + { + "type": "string", + "description": "target organization name", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "source organization name to copy from", + "name": "source_org", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "StatusesCopied" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/issue-statuses/presets": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List available issue status presets", + "operationId": "orgListIssueStatusPresets", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "StatusPresetList" + } + } + } + }, + "/orgs/{org}/issue-statuses/presets/{preset}": { + "post": { + "tags": [ + "organization" + ], + "summary": "Apply a status preset to an organization", + "operationId": "orgApplyIssueStatusPreset", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "preset name", + "name": "preset", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "StatusPresetApplied" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/orgs/{org}/issue-types": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's issue type definitions", + "operationId": "orgListIssueTypes", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "IssueTypeDefList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/IssueTypeDef" + } + } + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, "/orgs/{org}/labels": { "get": { "produces": [ @@ -3511,6 +3987,99 @@ } } }, + "/orgs/{org}/push_policy": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get the organization's push policy", + "operationId": "orgGetPushPolicy", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrgPushPolicy" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "organization" + ], + "summary": "Remove the organization's push policy", + "operationId": "orgDeletePushPolicy", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create or update the organization's push policy. Only fields that are set will be changed", + "operationId": "orgEditPushPolicy", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditOrgPushPolicyOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrgPushPolicy" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, "/orgs/{org}/rename": { "post": { "produces": [ @@ -3551,6 +4120,99 @@ } } }, + "/orgs/{org}/repo_defaults": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get the organization's default repository settings", + "operationId": "orgGetRepoDefaults", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrgRepoDefaults" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "organization" + ], + "summary": "Remove the organization's default repository settings", + "operationId": "orgDeleteRepoDefaults", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create or update the organization's default repository settings. Only fields that are set will be changed", + "operationId": "orgEditRepoDefaults", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditOrgRepoDefaultsOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrgRepoDefaults" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, "/orgs/{org}/repos": { "get": { "produces": [ @@ -3668,6 +4330,195 @@ } } }, + "/orgs/{org}/tag_protections": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List an organization's tag protection rules", + "operationId": "orgListTagProtections", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrgTagProtectionList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create an org-level tag protection rule", + "operationId": "orgCreateTagProtection", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateOrgTagProtectionOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/OrgTagProtection" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/orgs/{org}/tag_protections/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Get a specific org-level tag protection rule", + "operationId": "orgGetTagProtection", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the tag protection rule", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrgTagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "delete": { + "tags": [ + "organization" + ], + "summary": "Delete an org-level tag protection rule", + "operationId": "orgDeleteTagProtection", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the tag protection rule", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Edit an org-level tag protection rule. Only fields that are set will be changed", + "operationId": "orgEditTagProtection", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the tag protection rule", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditOrgTagProtectionOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrgTagProtection" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, "/orgs/{org}/teams": { "get": { "produces": [ @@ -9776,6 +10627,205 @@ } } }, + "/repos/{owner}/{repo}/issues/bulk/assignees": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Set assignees on multiple issues", + "operationId": "issueBulkSetAssignees", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueBulkAssigneesOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueBulkResult" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/bulk/labels": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Add, remove, or replace labels on multiple issues", + "operationId": "issueBulkSetLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueBulkLabelsOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueBulkResult" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/bulk/milestone": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Assign a milestone to multiple issues", + "operationId": "issueBulkSetMilestone", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueBulkMilestoneOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueBulkResult" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, + "/repos/{owner}/{repo}/issues/bulk/state": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Close or reopen multiple issues", + "operationId": "issueBulkSetState", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/IssueBulkStateOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/IssueBulkResult" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, "/repos/{owner}/{repo}/issues/comments": { "get": { "produces": [ @@ -13382,6 +14432,76 @@ } } }, + "/repos/{owner}/{repo}/manifest": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get repo manifest settings", + "operationId": "repoGetManifest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Manifest" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update repo manifest settings", + "operationId": "repoUpdateManifest", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Manifest" + } + } + } + }, "/repos/{owner}/{repo}/media/{filepath}": { "get": { "produces": [ @@ -18159,6 +19279,61 @@ } } }, + "/repos/{owner}/{repo}/wiki/search": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Search wiki pages", + "operationId": "repoSearchWikiPages", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "search query", + "name": "q", + "in": "query", + "required": true + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "description": "SearchResults" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, "/repos/{template_owner}/{template_repo}/generate": { "post": { "consumes": [ @@ -21460,6 +22635,59 @@ } } }, + "/users/{username}/tokens/{id}": { + "patch": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "user" + ], + "summary": "Update an access token's scopes", + "operationId": "userUpdateAccessToken", + "parameters": [ + { + "type": "string", + "description": "username of the user whose token is to be updated", + "name": "username", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the token to update", + "name": "id", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditAccessTokenOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/AccessToken" + }, + "400": { + "$ref": "#/responses/error" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, "/users/{username}/tokens/{token}": { "delete": { "produces": [ @@ -22611,6 +23839,28 @@ "format": "date-time", "x-go-name": "Created" }, + "delete_allowlist_actions_user": { + "type": "boolean", + "x-go-name": "DeleteAllowlistActionsUser" + }, + "delete_allowlist_deploy_keys": { + "type": "boolean", + "x-go-name": "DeleteAllowlistDeployKeys" + }, + "delete_allowlist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "DeleteAllowlistTeams" + }, + "delete_allowlist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "DeleteAllowlistUsernames" + }, "dismiss_stale_approvals": { "type": "boolean", "x-go-name": "DismissStaleApprovals" @@ -22619,6 +23869,14 @@ "type": "boolean", "x-go-name": "EnableApprovalsWhitelist" }, + "enable_delete": { + "type": "boolean", + "x-go-name": "EnableDelete" + }, + "enable_delete_allowlist": { + "type": "boolean", + "x-go-name": "EnableDeleteAllowlist" + }, "enable_force_push": { "type": "boolean", "x-go-name": "EnableForcePush" @@ -22643,6 +23901,10 @@ "type": "boolean", "x-go-name": "EnableStatusCheck" }, + "force_push_allowlist_actions_user": { + "type": "boolean", + "x-go-name": "ForcePushAllowlistActionsUser" + }, "force_push_allowlist_deploy_keys": { "type": "boolean", "x-go-name": "ForcePushAllowlistDeployKeys" @@ -22665,6 +23927,15 @@ "type": "boolean", "x-go-name": "IgnoreStaleApprovals" }, + "inherited_from": { + "description": "InheritedFrom indicates where this rule originates (\"org\" if inherited from org-level rules, empty if repo-level)", + "type": "string", + "x-go-name": "InheritedFrom" + }, + "merge_whitelist_actions_user": { + "type": "boolean", + "x-go-name": "MergeWhitelistActionsUser" + }, "merge_whitelist_teams": { "type": "array", "items": { @@ -22689,6 +23960,10 @@ "type": "string", "x-go-name": "ProtectedFilePatterns" }, + "push_whitelist_actions_user": { + "type": "boolean", + "x-go-name": "PushWhitelistActionsUser" + }, "push_whitelist_deploy_keys": { "type": "boolean", "x-go-name": "PushWhitelistDeployKeys" @@ -23462,6 +24737,28 @@ "type": "string", "x-go-name": "BranchName" }, + "delete_allowlist_actions_user": { + "type": "boolean", + "x-go-name": "DeleteAllowlistActionsUser" + }, + "delete_allowlist_deploy_keys": { + "type": "boolean", + "x-go-name": "DeleteAllowlistDeployKeys" + }, + "delete_allowlist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "DeleteAllowlistTeams" + }, + "delete_allowlist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "DeleteAllowlistUsernames" + }, "dismiss_stale_approvals": { "type": "boolean", "x-go-name": "DismissStaleApprovals" @@ -23470,6 +24767,14 @@ "type": "boolean", "x-go-name": "EnableApprovalsWhitelist" }, + "enable_delete": { + "type": "boolean", + "x-go-name": "EnableDelete" + }, + "enable_delete_allowlist": { + "type": "boolean", + "x-go-name": "EnableDeleteAllowlist" + }, "enable_force_push": { "type": "boolean", "x-go-name": "EnableForcePush" @@ -23494,6 +24799,10 @@ "type": "boolean", "x-go-name": "EnableStatusCheck" }, + "force_push_allowlist_actions_user": { + "type": "boolean", + "x-go-name": "ForcePushAllowlistActionsUser" + }, "force_push_allowlist_deploy_keys": { "type": "boolean", "x-go-name": "ForcePushAllowlistDeployKeys" @@ -23516,6 +24825,10 @@ "type": "boolean", "x-go-name": "IgnoreStaleApprovals" }, + "merge_whitelist_actions_user": { + "type": "boolean", + "x-go-name": "MergeWhitelistActionsUser" + }, "merge_whitelist_teams": { "type": "array", "items": { @@ -23539,6 +24852,10 @@ "type": "string", "x-go-name": "ProtectedFilePatterns" }, + "push_whitelist_actions_user": { + "type": "boolean", + "x-go-name": "PushWhitelistActionsUser" + }, "push_whitelist_deploy_keys": { "type": "boolean", "x-go-name": "PushWhitelistDeployKeys" @@ -23821,6 +25138,14 @@ "type": "boolean", "x-go-name": "Closed" }, + "custom_fields": { + "description": "custom field values keyed by field name", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "CustomFields" + }, "due_date": { "type": "string", "format": "date-time", @@ -23841,6 +25166,11 @@ "format": "int64", "x-go-name": "Milestone" }, + "priority_id": { + "type": "integer", + "format": "int64", + "x-go-name": "PriorityID" + }, "projects": { "description": "list of project ids", "type": "array", @@ -23854,9 +25184,20 @@ "type": "string", "x-go-name": "Ref" }, + "status_id": { + "description": "org-level issue metadata IDs (auto-assigned from org defaults when 0)", + "type": "integer", + "format": "int64", + "x-go-name": "StatusID" + }, "title": { "type": "string", "x-go-name": "Title" + }, + "type_id": { + "type": "integer", + "format": "int64", + "x-go-name": "TypeID" } }, "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" @@ -24004,6 +25345,141 @@ }, "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "CreateOrgBranchProtectionOption": { + "description": "CreateOrgBranchProtectionOption options for creating an org-level branch protection", + "type": "object", + "properties": { + "approvals_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ApprovalsWhitelistTeams" + }, + "block_admin_merge_override": { + "type": "boolean", + "x-go-name": "BlockAdminMergeOverride" + }, + "block_on_official_review_requests": { + "type": "boolean", + "x-go-name": "BlockOnOfficialReviewRequests" + }, + "block_on_outdated_branch": { + "type": "boolean", + "x-go-name": "BlockOnOutdatedBranch" + }, + "block_on_rejected_reviews": { + "type": "boolean", + "x-go-name": "BlockOnRejectedReviews" + }, + "delete_allowlist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "DeleteAllowlistTeams" + }, + "dismiss_stale_approvals": { + "type": "boolean", + "x-go-name": "DismissStaleApprovals" + }, + "enable_approvals_whitelist": { + "type": "boolean", + "x-go-name": "EnableApprovalsWhitelist" + }, + "enable_delete": { + "type": "boolean", + "x-go-name": "EnableDelete" + }, + "enable_delete_allowlist": { + "type": "boolean", + "x-go-name": "EnableDeleteAllowlist" + }, + "enable_force_push": { + "type": "boolean", + "x-go-name": "EnableForcePush" + }, + "enable_force_push_allowlist": { + "type": "boolean", + "x-go-name": "EnableForcePushAllowlist" + }, + "enable_merge_whitelist": { + "type": "boolean", + "x-go-name": "EnableMergeWhitelist" + }, + "enable_push": { + "type": "boolean", + "x-go-name": "EnablePush" + }, + "enable_push_whitelist": { + "type": "boolean", + "x-go-name": "EnablePushWhitelist" + }, + "enable_status_check": { + "type": "boolean", + "x-go-name": "EnableStatusCheck" + }, + "force_push_allowlist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ForcePushAllowlistTeams" + }, + "ignore_stale_approvals": { + "type": "boolean", + "x-go-name": "IgnoreStaleApprovals" + }, + "merge_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "MergeWhitelistTeams" + }, + "priority": { + "type": "integer", + "format": "int64", + "x-go-name": "Priority" + }, + "protected_file_patterns": { + "type": "string", + "x-go-name": "ProtectedFilePatterns" + }, + "push_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "PushWhitelistTeams" + }, + "require_signed_commits": { + "type": "boolean", + "x-go-name": "RequireSignedCommits" + }, + "required_approvals": { + "type": "integer", + "format": "int64", + "x-go-name": "RequiredApprovals" + }, + "rule_name": { + "type": "string", + "x-go-name": "RuleName" + }, + "status_check_contexts": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "StatusCheckContexts" + }, + "unprotected_file_patterns": { + "type": "string", + "x-go-name": "UnprotectedFilePatterns" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "CreateOrgOption": { "description": "CreateOrgOption options for creating an organization", "type": "object", @@ -24060,6 +25536,24 @@ }, "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "CreateOrgTagProtectionOption": { + "description": "CreateOrgTagProtectionOption options for creating an org-level tag protection", + "type": "object", + "properties": { + "name_pattern": { + "type": "string", + "x-go-name": "NamePattern" + }, + "whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistTeams" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "CreatePullRequestOption": { "description": "CreatePullRequestOption options when creating a pull request", "type": "object", @@ -24809,6 +26303,30 @@ }, "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "EditAccessTokenOption": { + "description": "EditAccessTokenOption options when editing access token scopes", + "type": "object", + "properties": { + "name": { + "description": "The new name for the token (optional)", + "type": "string", + "x-go-name": "Name" + }, + "scopes": { + "description": "The new scopes for the token", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Scopes", + "example": [ + "read:repository", + "write:issue" + ] + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "EditActionRunnerOption": { "type": "object", "title": "EditActionRunnerOption represents the editable fields for a runner.", @@ -24869,6 +26387,28 @@ "type": "boolean", "x-go-name": "BlockOnRejectedReviews" }, + "delete_allowlist_actions_user": { + "type": "boolean", + "x-go-name": "DeleteAllowlistActionsUser" + }, + "delete_allowlist_deploy_keys": { + "type": "boolean", + "x-go-name": "DeleteAllowlistDeployKeys" + }, + "delete_allowlist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "DeleteAllowlistTeams" + }, + "delete_allowlist_usernames": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "DeleteAllowlistUsernames" + }, "dismiss_stale_approvals": { "type": "boolean", "x-go-name": "DismissStaleApprovals" @@ -24877,6 +26417,14 @@ "type": "boolean", "x-go-name": "EnableApprovalsWhitelist" }, + "enable_delete": { + "type": "boolean", + "x-go-name": "EnableDelete" + }, + "enable_delete_allowlist": { + "type": "boolean", + "x-go-name": "EnableDeleteAllowlist" + }, "enable_force_push": { "type": "boolean", "x-go-name": "EnableForcePush" @@ -24901,6 +26449,10 @@ "type": "boolean", "x-go-name": "EnableStatusCheck" }, + "force_push_allowlist_actions_user": { + "type": "boolean", + "x-go-name": "ForcePushAllowlistActionsUser" + }, "force_push_allowlist_deploy_keys": { "type": "boolean", "x-go-name": "ForcePushAllowlistDeployKeys" @@ -24923,6 +26475,10 @@ "type": "boolean", "x-go-name": "IgnoreStaleApprovals" }, + "merge_whitelist_actions_user": { + "type": "boolean", + "x-go-name": "MergeWhitelistActionsUser" + }, "merge_whitelist_teams": { "type": "array", "items": { @@ -24946,6 +26502,10 @@ "type": "string", "x-go-name": "ProtectedFilePatterns" }, + "push_whitelist_actions_user": { + "type": "boolean", + "x-go-name": "PushWhitelistActionsUser" + }, "push_whitelist_deploy_keys": { "type": "boolean", "x-go-name": "PushWhitelistDeployKeys" @@ -25107,6 +26667,11 @@ "format": "int64", "x-go-name": "Milestone" }, + "priority_id": { + "type": "integer", + "format": "int64", + "x-go-name": "PriorityID" + }, "projects": { "description": "list of project ids to set (replaces existing projects)", "type": "array", @@ -25124,10 +26689,21 @@ "type": "string", "x-go-name": "State" }, + "status_id": { + "description": "org-level issue metadata IDs", + "type": "integer", + "format": "int64", + "x-go-name": "StatusID" + }, "title": { "type": "string", "x-go-name": "Title" }, + "type_id": { + "type": "integer", + "format": "int64", + "x-go-name": "TypeID" + }, "unset_due_date": { "type": "boolean", "x-go-name": "RemoveDeadline" @@ -25199,6 +26775,148 @@ }, "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "EditOrgBranchProtectionOption": { + "description": "EditOrgBranchProtectionOption options for editing an org-level branch protection", + "type": "object", + "properties": { + "approvals_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ApprovalsWhitelistTeams" + }, + "block_admin_merge_override": { + "type": "boolean", + "x-go-name": "BlockAdminMergeOverride" + }, + "block_on_official_review_requests": { + "type": "boolean", + "x-go-name": "BlockOnOfficialReviewRequests" + }, + "block_on_outdated_branch": { + "type": "boolean", + "x-go-name": "BlockOnOutdatedBranch" + }, + "block_on_rejected_reviews": { + "type": "boolean", + "x-go-name": "BlockOnRejectedReviews" + }, + "delete_allowlist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "DeleteAllowlistTeams" + }, + "dismiss_stale_approvals": { + "type": "boolean", + "x-go-name": "DismissStaleApprovals" + }, + "enable_approvals_whitelist": { + "type": "boolean", + "x-go-name": "EnableApprovalsWhitelist" + }, + "enable_delete": { + "type": "boolean", + "x-go-name": "EnableDelete" + }, + "enable_delete_allowlist": { + "type": "boolean", + "x-go-name": "EnableDeleteAllowlist" + }, + "enable_force_push": { + "type": "boolean", + "x-go-name": "EnableForcePush" + }, + "enable_force_push_allowlist": { + "type": "boolean", + "x-go-name": "EnableForcePushAllowlist" + }, + "enable_merge_whitelist": { + "type": "boolean", + "x-go-name": "EnableMergeWhitelist" + }, + "enable_push": { + "type": "boolean", + "x-go-name": "EnablePush" + }, + "enable_push_whitelist": { + "type": "boolean", + "x-go-name": "EnablePushWhitelist" + }, + "enable_status_check": { + "type": "boolean", + "x-go-name": "EnableStatusCheck" + }, + "force_push_allowlist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ForcePushAllowlistTeams" + }, + "ignore_stale_approvals": { + "type": "boolean", + "x-go-name": "IgnoreStaleApprovals" + }, + "merge_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "MergeWhitelistTeams" + }, + "priority": { + "type": "integer", + "format": "int64", + "x-go-name": "Priority" + }, + "protected_file_patterns": { + "type": "string", + "x-go-name": "ProtectedFilePatterns" + }, + "push_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "PushWhitelistTeams" + }, + "require_signed_commits": { + "type": "boolean", + "x-go-name": "RequireSignedCommits" + }, + "required_approvals": { + "type": "integer", + "format": "int64", + "x-go-name": "RequiredApprovals" + }, + "status_check_contexts": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "StatusCheckContexts" + }, + "unprotected_file_patterns": { + "type": "string", + "x-go-name": "UnprotectedFilePatterns" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "EditOrgEmailDomainPolicyOption": { + "description": "EditOrgEmailDomainPolicyOption options for editing an org's email domain policy", + "type": "object", + "properties": { + "allowed_domains": { + "type": "string", + "x-go-name": "AllowedDomains" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "EditOrgOption": { "description": "EditOrgOption options for editing an organization", "type": "object", @@ -25247,6 +26965,95 @@ }, "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "EditOrgPushPolicyOption": { + "description": "EditOrgPushPolicyOption options for editing an organization's push policy. Only\nfields that are set will be changed.", + "type": "object", + "properties": { + "blocked_file_patterns": { + "type": "string", + "x-go-name": "BlockedFilePatterns" + }, + "branch_name_pattern": { + "type": "string", + "x-go-name": "BranchNamePattern" + }, + "max_file_size": { + "type": "integer", + "format": "int64", + "x-go-name": "MaxFileSize" + }, + "require_secret_block": { + "type": "boolean", + "x-go-name": "RequireSecretBlock" + }, + "tag_name_pattern": { + "type": "string", + "x-go-name": "TagNamePattern" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "EditOrgRepoDefaultsOption": { + "description": "EditOrgRepoDefaultsOption options for editing an org's repo defaults. Only fields\nthat are set will be changed.", + "type": "object", + "properties": { + "allow_fast_forward_only": { + "type": "boolean", + "x-go-name": "AllowFastForwardOnly" + }, + "allow_merge": { + "type": "boolean", + "x-go-name": "AllowMerge" + }, + "allow_rebase": { + "type": "boolean", + "x-go-name": "AllowRebase" + }, + "allow_rebase_merge": { + "type": "boolean", + "x-go-name": "AllowRebaseMerge" + }, + "allow_squash": { + "type": "boolean", + "x-go-name": "AllowSquash" + }, + "apply_pr_defaults": { + "type": "boolean", + "x-go-name": "ApplyPRDefaults" + }, + "default_merge_style": { + "type": "string", + "x-go-name": "DefaultMergeStyle" + }, + "delete_branch_after_merge": { + "type": "boolean", + "x-go-name": "DeleteBranchAfterMerge" + }, + "force_private": { + "type": "boolean", + "x-go-name": "ForcePrivate" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "EditOrgTagProtectionOption": { + "description": "EditOrgTagProtectionOption options for editing an org-level tag protection", + "type": "object", + "properties": { + "name_pattern": { + "type": "string", + "x-go-name": "NamePattern" + }, + "whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistTeams" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "EditPullRequestOption": { "description": "EditPullRequestOption options when modify pull request", "type": "object", @@ -26655,6 +28462,15 @@ "format": "int64", "x-go-name": "PinOrder" }, + "priority_id": { + "type": "integer", + "format": "int64", + "x-go-name": "PriorityID" + }, + "priority_name": { + "type": "string", + "x-go-name": "PriorityName" + }, "projects": { "type": "array", "items": { @@ -26681,6 +28497,16 @@ "x-go-enum-desc": "open StateOpen StateOpen pr is opened\nclosed StateClosed StateClosed pr is closed", "x-go-name": "State" }, + "status_id": { + "description": "Issue metadata (org-level definitions)", + "type": "integer", + "format": "int64", + "x-go-name": "StatusID" + }, + "status_name": { + "type": "string", + "x-go-name": "StatusName" + }, "time_estimate": { "type": "integer", "format": "int64", @@ -26690,6 +28516,15 @@ "type": "string", "x-go-name": "Title" }, + "type_id": { + "type": "integer", + "format": "int64", + "x-go-name": "TypeID" + }, + "type_name": { + "type": "string", + "x-go-name": "TypeName" + }, "updated_at": { "type": "string", "format": "date-time", @@ -26705,6 +28540,139 @@ }, "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "IssueBulkAssigneesOption": { + "description": "IssueBulkAssigneesOption options for bulk assignee operations on issues", + "type": "object", + "required": [ + "issues", + "assignees" + ], + "properties": { + "assignees": { + "description": "list of assignee usernames to add or set", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Assignees" + }, + "issues": { + "description": "issue indexes to operate on", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Issues" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "IssueBulkLabelsOption": { + "description": "IssueBulkLabelsOption options for bulk label operations on issues", + "type": "object", + "required": [ + "issues", + "labels" + ], + "properties": { + "action": { + "description": "action to perform: \"add\" (default), \"remove\", or \"replace\"", + "type": "string", + "x-go-name": "Action" + }, + "issues": { + "description": "issue indexes to operate on", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Issues" + }, + "labels": { + "description": "Labels can be a list of integers representing label IDs\nor a list of strings representing label names", + "type": "array", + "items": {}, + "x-go-name": "Labels" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "IssueBulkMilestoneOption": { + "description": "IssueBulkMilestoneOption options for bulk milestone assignment on issues", + "type": "object", + "required": [ + "issues", + "milestone_id" + ], + "properties": { + "issues": { + "description": "issue indexes to operate on", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Issues" + }, + "milestone_id": { + "description": "milestone id to assign, 0 to remove milestone", + "type": "integer", + "format": "int64", + "x-go-name": "MilestoneID" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "IssueBulkResult": { + "description": "IssueBulkResult represents the result of a bulk issue operation", + "type": "object", + "properties": { + "failure_count": { + "description": "count of issues that failed to update", + "type": "integer", + "format": "int64", + "x-go-name": "FailureCount" + }, + "failures": { + "description": "details of failures, keyed by issue index", + "x-go-name": "Failures" + }, + "success_count": { + "description": "count of successfully updated issues", + "type": "integer", + "format": "int64", + "x-go-name": "SuccessCount" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "IssueBulkStateOption": { + "description": "IssueBulkStateOption options for bulk state changes on issues", + "type": "object", + "required": [ + "issues", + "state" + ], + "properties": { + "issues": { + "description": "issue indexes to operate on", + "type": "array", + "items": { + "type": "integer", + "format": "int64" + }, + "x-go-name": "Issues" + }, + "state": { + "description": "new state for the issues, \"open\" or \"closed\"", + "type": "string", + "x-go-name": "State" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "IssueConfig": { "type": "object", "properties": { @@ -26845,6 +28813,76 @@ }, "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "IssuePriorityDef": { + "description": "IssuePriorityDef represents an org-level issue priority definition", + "type": "object", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "is_default": { + "type": "boolean", + "x-go-name": "IsDefault" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "sort_order": { + "type": "integer", + "format": "int64", + "x-go-name": "SortOrder" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "IssueStatusDef": { + "description": "IssueStatusDef represents an org-level issue status definition", + "type": "object", + "properties": { + "closes_issue": { + "type": "boolean", + "x-go-name": "ClosesIssue" + }, + "color": { + "type": "string", + "x-go-name": "Color" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "is_required": { + "type": "boolean", + "x-go-name": "IsRequired" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "sort_order": { + "type": "integer", + "format": "int64", + "x-go-name": "SortOrder" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "IssueTemplate": { "description": "IssueTemplate represents an issue template for a repository", "type": "object", @@ -26867,6 +28905,13 @@ "type": "string", "x-go-name": "Content" }, + "custom_fields": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "CustomFields" + }, "file_name": { "type": "string", "x-go-name": "FileName" @@ -26896,6 +28941,39 @@ }, "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "IssueTypeDef": { + "description": "IssueTypeDef represents an org-level issue type definition", + "type": "object", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "is_default": { + "type": "boolean", + "x-go-name": "IsDefault" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "sort_order": { + "type": "integer", + "format": "int64", + "x-go-name": "SortOrder" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "Label": { "description": "Label a label to an issue or a pr", "type": "object", @@ -27660,6 +29738,306 @@ }, "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "OrgBranchProtection": { + "description": "OrgBranchProtection represents an org-level branch protection ruleset", + "type": "object", + "properties": { + "approvals_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ApprovalsWhitelistTeams" + }, + "block_admin_merge_override": { + "type": "boolean", + "x-go-name": "BlockAdminMergeOverride" + }, + "block_on_official_review_requests": { + "type": "boolean", + "x-go-name": "BlockOnOfficialReviewRequests" + }, + "block_on_outdated_branch": { + "type": "boolean", + "x-go-name": "BlockOnOutdatedBranch" + }, + "block_on_rejected_reviews": { + "type": "boolean", + "x-go-name": "BlockOnRejectedReviews" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "delete_allowlist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "DeleteAllowlistTeams" + }, + "dismiss_stale_approvals": { + "type": "boolean", + "x-go-name": "DismissStaleApprovals" + }, + "enable_approvals_whitelist": { + "type": "boolean", + "x-go-name": "EnableApprovalsWhitelist" + }, + "enable_delete": { + "type": "boolean", + "x-go-name": "EnableDelete" + }, + "enable_delete_allowlist": { + "type": "boolean", + "x-go-name": "EnableDeleteAllowlist" + }, + "enable_force_push": { + "type": "boolean", + "x-go-name": "EnableForcePush" + }, + "enable_force_push_allowlist": { + "type": "boolean", + "x-go-name": "EnableForcePushAllowlist" + }, + "enable_merge_whitelist": { + "type": "boolean", + "x-go-name": "EnableMergeWhitelist" + }, + "enable_push": { + "type": "boolean", + "x-go-name": "EnablePush" + }, + "enable_push_whitelist": { + "type": "boolean", + "x-go-name": "EnablePushWhitelist" + }, + "enable_status_check": { + "type": "boolean", + "x-go-name": "EnableStatusCheck" + }, + "force_push_allowlist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "ForcePushAllowlistTeams" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "ignore_stale_approvals": { + "type": "boolean", + "x-go-name": "IgnoreStaleApprovals" + }, + "merge_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "MergeWhitelistTeams" + }, + "org_id": { + "type": "integer", + "format": "int64", + "x-go-name": "OrgID" + }, + "priority": { + "type": "integer", + "format": "int64", + "x-go-name": "Priority" + }, + "protected_file_patterns": { + "type": "string", + "x-go-name": "ProtectedFilePatterns" + }, + "push_whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "PushWhitelistTeams" + }, + "require_signed_commits": { + "type": "boolean", + "x-go-name": "RequireSignedCommits" + }, + "required_approvals": { + "type": "integer", + "format": "int64", + "x-go-name": "RequiredApprovals" + }, + "rule_name": { + "type": "string", + "x-go-name": "RuleName" + }, + "status_check_contexts": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "StatusCheckContexts" + }, + "unprotected_file_patterns": { + "type": "string", + "x-go-name": "UnprotectedFilePatterns" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "OrgEmailDomainPolicy": { + "description": "OrgEmailDomainPolicy represents an organization's email domain policy", + "type": "object", + "properties": { + "allowed_domains": { + "type": "string", + "x-go-name": "AllowedDomains" + }, + "org_id": { + "type": "integer", + "format": "int64", + "x-go-name": "OrgID" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "OrgPushPolicy": { + "description": "OrgPushPolicy represents an organization's push policy (one per org)", + "type": "object", + "properties": { + "blocked_file_patterns": { + "type": "string", + "x-go-name": "BlockedFilePatterns" + }, + "branch_name_pattern": { + "type": "string", + "x-go-name": "BranchNamePattern" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "max_file_size": { + "type": "integer", + "format": "int64", + "x-go-name": "MaxFileSize" + }, + "org_id": { + "type": "integer", + "format": "int64", + "x-go-name": "OrgID" + }, + "require_secret_block": { + "type": "boolean", + "x-go-name": "RequireSecretBlock" + }, + "tag_name_pattern": { + "type": "string", + "x-go-name": "TagNamePattern" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "OrgRepoDefaults": { + "description": "OrgRepoDefaults represents an organization's default repository settings", + "type": "object", + "properties": { + "allow_fast_forward_only": { + "type": "boolean", + "x-go-name": "AllowFastForwardOnly" + }, + "allow_merge": { + "type": "boolean", + "x-go-name": "AllowMerge" + }, + "allow_rebase": { + "type": "boolean", + "x-go-name": "AllowRebase" + }, + "allow_rebase_merge": { + "type": "boolean", + "x-go-name": "AllowRebaseMerge" + }, + "allow_squash": { + "type": "boolean", + "x-go-name": "AllowSquash" + }, + "apply_pr_defaults": { + "type": "boolean", + "x-go-name": "ApplyPRDefaults" + }, + "default_merge_style": { + "type": "string", + "x-go-name": "DefaultMergeStyle" + }, + "delete_branch_after_merge": { + "type": "boolean", + "x-go-name": "DeleteBranchAfterMerge" + }, + "force_private": { + "type": "boolean", + "x-go-name": "ForcePrivate" + }, + "org_id": { + "type": "integer", + "format": "int64", + "x-go-name": "OrgID" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "OrgTagProtection": { + "description": "OrgTagProtection represents an org-level tag protection rule", + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "name_pattern": { + "type": "string", + "x-go-name": "NamePattern" + }, + "org_id": { + "type": "integer", + "format": "int64", + "x-go-name": "OrgID" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "whitelist_teams": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "WhitelistTeams" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "Organization": { "description": "Organization represents an organization", "type": "object", @@ -30266,6 +32644,122 @@ } }, "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "apiMetadata": { + "type": "object", + "title": "apiMetadata is the JSON representation of a repo manifest.", + "properties": { + "container_name": { + "type": "string", + "x-go-name": "ContainerName" + }, + "deploy_host": { + "description": "deploy", + "type": "string", + "x-go-name": "DeployHost" + }, + "deploy_path": { + "type": "string", + "x-go-name": "DeployPath" + }, + "deploy_port": { + "type": "string", + "x-go-name": "DeployPort" + }, + "deploy_user": { + "type": "string", + "x-go-name": "DeployUser" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "display_name": { + "type": "string", + "x-go-name": "DisplayName" + }, + "docker_image": { + "type": "string", + "x-go-name": "DockerImage" + }, + "docker_registry": { + "type": "string", + "x-go-name": "DockerRegistry" + }, + "element_name": { + "type": "string", + "x-go-name": "ElementName" + }, + "entry_point": { + "type": "string", + "x-go-name": "EntryPoint" + }, + "extension_type": { + "type": "string", + "x-go-name": "ExtensionType" + }, + "health_url": { + "type": "string", + "x-go-name": "HealthURL" + }, + "info_url": { + "type": "string", + "x-go-name": "InfoURL" + }, + "language": { + "type": "string", + "x-go-name": "Language" + }, + "license_name": { + "type": "string", + "x-go-name": "LicenseName" + }, + "license_spdx": { + "type": "string", + "x-go-name": "LicenseSPDX" + }, + "maintainer": { + "type": "string", + "x-go-name": "Maintainer" + }, + "maintainer_url": { + "type": "string", + "x-go-name": "MaintainerURL" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "org": { + "type": "string", + "x-go-name": "Org" + }, + "php_minimum": { + "type": "string", + "x-go-name": "PHPMinimum" + }, + "platform": { + "type": "string", + "x-go-name": "Platform" + }, + "standards_source": { + "type": "string", + "x-go-name": "StandardsSource" + }, + "standards_version": { + "type": "string", + "x-go-name": "StandardsVersion" + }, + "target_version": { + "type": "string", + "x-go-name": "TargetVersion" + }, + "version_prefix": { + "type": "string", + "x-go-name": "VersionPrefix" + } + }, + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/routers/api/v1/repo" } }, "responses": { @@ -30681,6 +33175,12 @@ "$ref": "#/definitions/Issue" } }, + "IssueBulkResult": { + "description": "IssueBulkResult", + "schema": { + "$ref": "#/definitions/IssueBulkResult" + } + }, "IssueDeadline": { "description": "IssueDeadline", "schema": { @@ -30772,6 +33272,12 @@ } } }, + "Manifest": { + "description": "Manifest", + "schema": { + "$ref": "#/definitions/apiMetadata" + } + }, "MarkdownRender": { "description": "MarkdownRender is a rendered markdown document", "schema": { @@ -30859,6 +33365,54 @@ } } }, + "OrgBranchProtection": { + "description": "OrgBranchProtection", + "schema": { + "$ref": "#/definitions/OrgBranchProtection" + } + }, + "OrgBranchProtectionList": { + "description": "OrgBranchProtectionList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/OrgBranchProtection" + } + } + }, + "OrgEmailDomainPolicy": { + "description": "OrgEmailDomainPolicy", + "schema": { + "$ref": "#/definitions/OrgEmailDomainPolicy" + } + }, + "OrgPushPolicy": { + "description": "OrgPushPolicy", + "schema": { + "$ref": "#/definitions/OrgPushPolicy" + } + }, + "OrgRepoDefaults": { + "description": "OrgRepoDefaults", + "schema": { + "$ref": "#/definitions/OrgRepoDefaults" + } + }, + "OrgTagProtection": { + "description": "OrgTagProtection", + "schema": { + "$ref": "#/definitions/OrgTagProtection" + } + }, + "OrgTagProtectionList": { + "description": "OrgTagProtectionList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/OrgTagProtection" + } + } + }, "Organization": { "description": "Organization", "schema": { diff --git a/templates/swagger/v1_openapi3_json.tmpl b/templates/swagger/v1_openapi3_json.tmpl index 971a9c847a..d8603921a0 100644 --- a/templates/swagger/v1_openapi3_json.tmpl +++ b/templates/swagger/v1_openapi3_json.tmpl @@ -637,6 +637,16 @@ }, "description": "Issue" }, + "IssueBulkResult": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssueBulkResult" + } + } + }, + "description": "IssueBulkResult" + }, "IssueDeadline": { "content": { "application/json": { @@ -772,6 +782,16 @@ }, "description": "LicensesList" }, + "Manifest": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/apiMetadata" + } + } + }, + "description": "Manifest" + }, "MarkdownRender": { "content": { "application/json": { @@ -911,6 +931,82 @@ }, "description": "OAuth2ApplicationList represents a list of OAuth2 applications." }, + "OrgBranchProtection": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgBranchProtection" + } + } + }, + "description": "OrgBranchProtection" + }, + "OrgBranchProtectionList": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/OrgBranchProtection" + }, + "type": "array" + } + } + }, + "description": "OrgBranchProtectionList" + }, + "OrgEmailDomainPolicy": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgEmailDomainPolicy" + } + } + }, + "description": "OrgEmailDomainPolicy" + }, + "OrgPushPolicy": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgPushPolicy" + } + } + }, + "description": "OrgPushPolicy" + }, + "OrgRepoDefaults": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgRepoDefaults" + } + } + }, + "description": "OrgRepoDefaults" + }, + "OrgTagProtection": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgTagProtection" + } + } + }, + "description": "OrgTagProtection" + }, + "OrgTagProtectionList": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/OrgTagProtection" + }, + "type": "array" + } + } + }, + "description": "OrgTagProtectionList" + }, "Organization": { "content": { "application/json": { @@ -2855,6 +2951,28 @@ "type": "string", "x-go-name": "Created" }, + "delete_allowlist_actions_user": { + "type": "boolean", + "x-go-name": "DeleteAllowlistActionsUser" + }, + "delete_allowlist_deploy_keys": { + "type": "boolean", + "x-go-name": "DeleteAllowlistDeployKeys" + }, + "delete_allowlist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "DeleteAllowlistTeams" + }, + "delete_allowlist_usernames": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "DeleteAllowlistUsernames" + }, "dismiss_stale_approvals": { "type": "boolean", "x-go-name": "DismissStaleApprovals" @@ -2863,6 +2981,14 @@ "type": "boolean", "x-go-name": "EnableApprovalsWhitelist" }, + "enable_delete": { + "type": "boolean", + "x-go-name": "EnableDelete" + }, + "enable_delete_allowlist": { + "type": "boolean", + "x-go-name": "EnableDeleteAllowlist" + }, "enable_force_push": { "type": "boolean", "x-go-name": "EnableForcePush" @@ -2887,6 +3013,10 @@ "type": "boolean", "x-go-name": "EnableStatusCheck" }, + "force_push_allowlist_actions_user": { + "type": "boolean", + "x-go-name": "ForcePushAllowlistActionsUser" + }, "force_push_allowlist_deploy_keys": { "type": "boolean", "x-go-name": "ForcePushAllowlistDeployKeys" @@ -2909,6 +3039,15 @@ "type": "boolean", "x-go-name": "IgnoreStaleApprovals" }, + "inherited_from": { + "description": "InheritedFrom indicates where this rule originates (\"org\" if inherited from org-level rules, empty if repo-level)", + "type": "string", + "x-go-name": "InheritedFrom" + }, + "merge_whitelist_actions_user": { + "type": "boolean", + "x-go-name": "MergeWhitelistActionsUser" + }, "merge_whitelist_teams": { "items": { "type": "string" @@ -2933,6 +3072,10 @@ "type": "string", "x-go-name": "ProtectedFilePatterns" }, + "push_whitelist_actions_user": { + "type": "boolean", + "x-go-name": "PushWhitelistActionsUser" + }, "push_whitelist_deploy_keys": { "type": "boolean", "x-go-name": "PushWhitelistDeployKeys" @@ -3724,6 +3867,28 @@ "type": "string", "x-go-name": "BranchName" }, + "delete_allowlist_actions_user": { + "type": "boolean", + "x-go-name": "DeleteAllowlistActionsUser" + }, + "delete_allowlist_deploy_keys": { + "type": "boolean", + "x-go-name": "DeleteAllowlistDeployKeys" + }, + "delete_allowlist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "DeleteAllowlistTeams" + }, + "delete_allowlist_usernames": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "DeleteAllowlistUsernames" + }, "dismiss_stale_approvals": { "type": "boolean", "x-go-name": "DismissStaleApprovals" @@ -3732,6 +3897,14 @@ "type": "boolean", "x-go-name": "EnableApprovalsWhitelist" }, + "enable_delete": { + "type": "boolean", + "x-go-name": "EnableDelete" + }, + "enable_delete_allowlist": { + "type": "boolean", + "x-go-name": "EnableDeleteAllowlist" + }, "enable_force_push": { "type": "boolean", "x-go-name": "EnableForcePush" @@ -3756,6 +3929,10 @@ "type": "boolean", "x-go-name": "EnableStatusCheck" }, + "force_push_allowlist_actions_user": { + "type": "boolean", + "x-go-name": "ForcePushAllowlistActionsUser" + }, "force_push_allowlist_deploy_keys": { "type": "boolean", "x-go-name": "ForcePushAllowlistDeployKeys" @@ -3778,6 +3955,10 @@ "type": "boolean", "x-go-name": "IgnoreStaleApprovals" }, + "merge_whitelist_actions_user": { + "type": "boolean", + "x-go-name": "MergeWhitelistActionsUser" + }, "merge_whitelist_teams": { "items": { "type": "string" @@ -3801,6 +3982,10 @@ "type": "string", "x-go-name": "ProtectedFilePatterns" }, + "push_whitelist_actions_user": { + "type": "boolean", + "x-go-name": "PushWhitelistActionsUser" + }, "push_whitelist_deploy_keys": { "type": "boolean", "x-go-name": "PushWhitelistDeployKeys" @@ -4082,6 +4267,14 @@ "type": "boolean", "x-go-name": "Closed" }, + "custom_fields": { + "additionalProperties": { + "type": "string" + }, + "description": "custom field values keyed by field name", + "type": "object", + "x-go-name": "CustomFields" + }, "due_date": { "format": "date-time", "type": "string", @@ -4102,6 +4295,11 @@ "type": "integer", "x-go-name": "Milestone" }, + "priority_id": { + "format": "int64", + "type": "integer", + "x-go-name": "PriorityID" + }, "projects": { "description": "list of project ids", "items": { @@ -4115,9 +4313,20 @@ "type": "string", "x-go-name": "Ref" }, + "status_id": { + "description": "org-level issue metadata IDs (auto-assigned from org defaults when 0)", + "format": "int64", + "type": "integer", + "x-go-name": "StatusID" + }, "title": { "type": "string", "x-go-name": "Title" + }, + "type_id": { + "format": "int64", + "type": "integer", + "x-go-name": "TypeID" } }, "required": [ @@ -4264,6 +4473,141 @@ "type": "object", "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "CreateOrgBranchProtectionOption": { + "description": "CreateOrgBranchProtectionOption options for creating an org-level branch protection", + "properties": { + "approvals_whitelist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "ApprovalsWhitelistTeams" + }, + "block_admin_merge_override": { + "type": "boolean", + "x-go-name": "BlockAdminMergeOverride" + }, + "block_on_official_review_requests": { + "type": "boolean", + "x-go-name": "BlockOnOfficialReviewRequests" + }, + "block_on_outdated_branch": { + "type": "boolean", + "x-go-name": "BlockOnOutdatedBranch" + }, + "block_on_rejected_reviews": { + "type": "boolean", + "x-go-name": "BlockOnRejectedReviews" + }, + "delete_allowlist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "DeleteAllowlistTeams" + }, + "dismiss_stale_approvals": { + "type": "boolean", + "x-go-name": "DismissStaleApprovals" + }, + "enable_approvals_whitelist": { + "type": "boolean", + "x-go-name": "EnableApprovalsWhitelist" + }, + "enable_delete": { + "type": "boolean", + "x-go-name": "EnableDelete" + }, + "enable_delete_allowlist": { + "type": "boolean", + "x-go-name": "EnableDeleteAllowlist" + }, + "enable_force_push": { + "type": "boolean", + "x-go-name": "EnableForcePush" + }, + "enable_force_push_allowlist": { + "type": "boolean", + "x-go-name": "EnableForcePushAllowlist" + }, + "enable_merge_whitelist": { + "type": "boolean", + "x-go-name": "EnableMergeWhitelist" + }, + "enable_push": { + "type": "boolean", + "x-go-name": "EnablePush" + }, + "enable_push_whitelist": { + "type": "boolean", + "x-go-name": "EnablePushWhitelist" + }, + "enable_status_check": { + "type": "boolean", + "x-go-name": "EnableStatusCheck" + }, + "force_push_allowlist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "ForcePushAllowlistTeams" + }, + "ignore_stale_approvals": { + "type": "boolean", + "x-go-name": "IgnoreStaleApprovals" + }, + "merge_whitelist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "MergeWhitelistTeams" + }, + "priority": { + "format": "int64", + "type": "integer", + "x-go-name": "Priority" + }, + "protected_file_patterns": { + "type": "string", + "x-go-name": "ProtectedFilePatterns" + }, + "push_whitelist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "PushWhitelistTeams" + }, + "require_signed_commits": { + "type": "boolean", + "x-go-name": "RequireSignedCommits" + }, + "required_approvals": { + "format": "int64", + "type": "integer", + "x-go-name": "RequiredApprovals" + }, + "rule_name": { + "type": "string", + "x-go-name": "RuleName" + }, + "status_check_contexts": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "StatusCheckContexts" + }, + "unprotected_file_patterns": { + "type": "string", + "x-go-name": "UnprotectedFilePatterns" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "CreateOrgOption": { "description": "CreateOrgOption options for creating an organization", "properties": { @@ -4317,6 +4661,24 @@ "type": "object", "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "CreateOrgTagProtectionOption": { + "description": "CreateOrgTagProtectionOption options for creating an org-level tag protection", + "properties": { + "name_pattern": { + "type": "string", + "x-go-name": "NamePattern" + }, + "whitelist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "WhitelistTeams" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "CreatePullRequestOption": { "description": "CreatePullRequestOption options when creating a pull request", "properties": { @@ -5041,6 +5403,30 @@ "type": "object", "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "EditAccessTokenOption": { + "description": "EditAccessTokenOption options when editing access token scopes", + "properties": { + "name": { + "description": "The new name for the token (optional)", + "type": "string", + "x-go-name": "Name" + }, + "scopes": { + "description": "The new scopes for the token", + "example": [ + "read:repository", + "write:issue" + ], + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "Scopes" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "EditActionRunnerOption": { "properties": { "disabled": { @@ -5100,6 +5486,28 @@ "type": "boolean", "x-go-name": "BlockOnRejectedReviews" }, + "delete_allowlist_actions_user": { + "type": "boolean", + "x-go-name": "DeleteAllowlistActionsUser" + }, + "delete_allowlist_deploy_keys": { + "type": "boolean", + "x-go-name": "DeleteAllowlistDeployKeys" + }, + "delete_allowlist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "DeleteAllowlistTeams" + }, + "delete_allowlist_usernames": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "DeleteAllowlistUsernames" + }, "dismiss_stale_approvals": { "type": "boolean", "x-go-name": "DismissStaleApprovals" @@ -5108,6 +5516,14 @@ "type": "boolean", "x-go-name": "EnableApprovalsWhitelist" }, + "enable_delete": { + "type": "boolean", + "x-go-name": "EnableDelete" + }, + "enable_delete_allowlist": { + "type": "boolean", + "x-go-name": "EnableDeleteAllowlist" + }, "enable_force_push": { "type": "boolean", "x-go-name": "EnableForcePush" @@ -5132,6 +5548,10 @@ "type": "boolean", "x-go-name": "EnableStatusCheck" }, + "force_push_allowlist_actions_user": { + "type": "boolean", + "x-go-name": "ForcePushAllowlistActionsUser" + }, "force_push_allowlist_deploy_keys": { "type": "boolean", "x-go-name": "ForcePushAllowlistDeployKeys" @@ -5154,6 +5574,10 @@ "type": "boolean", "x-go-name": "IgnoreStaleApprovals" }, + "merge_whitelist_actions_user": { + "type": "boolean", + "x-go-name": "MergeWhitelistActionsUser" + }, "merge_whitelist_teams": { "items": { "type": "string" @@ -5177,6 +5601,10 @@ "type": "string", "x-go-name": "ProtectedFilePatterns" }, + "push_whitelist_actions_user": { + "type": "boolean", + "x-go-name": "PushWhitelistActionsUser" + }, "push_whitelist_deploy_keys": { "type": "boolean", "x-go-name": "PushWhitelistDeployKeys" @@ -5339,6 +5767,11 @@ "type": "integer", "x-go-name": "Milestone" }, + "priority_id": { + "format": "int64", + "type": "integer", + "x-go-name": "PriorityID" + }, "projects": { "description": "list of project ids to set (replaces existing projects)", "items": { @@ -5356,10 +5789,21 @@ "type": "string", "x-go-name": "State" }, + "status_id": { + "description": "org-level issue metadata IDs", + "format": "int64", + "type": "integer", + "x-go-name": "StatusID" + }, "title": { "type": "string", "x-go-name": "Title" }, + "type_id": { + "format": "int64", + "type": "integer", + "x-go-name": "TypeID" + }, "unset_due_date": { "type": "boolean", "x-go-name": "RemoveDeadline" @@ -5431,6 +5875,148 @@ "type": "object", "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "EditOrgBranchProtectionOption": { + "description": "EditOrgBranchProtectionOption options for editing an org-level branch protection", + "properties": { + "approvals_whitelist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "ApprovalsWhitelistTeams" + }, + "block_admin_merge_override": { + "type": "boolean", + "x-go-name": "BlockAdminMergeOverride" + }, + "block_on_official_review_requests": { + "type": "boolean", + "x-go-name": "BlockOnOfficialReviewRequests" + }, + "block_on_outdated_branch": { + "type": "boolean", + "x-go-name": "BlockOnOutdatedBranch" + }, + "block_on_rejected_reviews": { + "type": "boolean", + "x-go-name": "BlockOnRejectedReviews" + }, + "delete_allowlist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "DeleteAllowlistTeams" + }, + "dismiss_stale_approvals": { + "type": "boolean", + "x-go-name": "DismissStaleApprovals" + }, + "enable_approvals_whitelist": { + "type": "boolean", + "x-go-name": "EnableApprovalsWhitelist" + }, + "enable_delete": { + "type": "boolean", + "x-go-name": "EnableDelete" + }, + "enable_delete_allowlist": { + "type": "boolean", + "x-go-name": "EnableDeleteAllowlist" + }, + "enable_force_push": { + "type": "boolean", + "x-go-name": "EnableForcePush" + }, + "enable_force_push_allowlist": { + "type": "boolean", + "x-go-name": "EnableForcePushAllowlist" + }, + "enable_merge_whitelist": { + "type": "boolean", + "x-go-name": "EnableMergeWhitelist" + }, + "enable_push": { + "type": "boolean", + "x-go-name": "EnablePush" + }, + "enable_push_whitelist": { + "type": "boolean", + "x-go-name": "EnablePushWhitelist" + }, + "enable_status_check": { + "type": "boolean", + "x-go-name": "EnableStatusCheck" + }, + "force_push_allowlist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "ForcePushAllowlistTeams" + }, + "ignore_stale_approvals": { + "type": "boolean", + "x-go-name": "IgnoreStaleApprovals" + }, + "merge_whitelist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "MergeWhitelistTeams" + }, + "priority": { + "format": "int64", + "type": "integer", + "x-go-name": "Priority" + }, + "protected_file_patterns": { + "type": "string", + "x-go-name": "ProtectedFilePatterns" + }, + "push_whitelist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "PushWhitelistTeams" + }, + "require_signed_commits": { + "type": "boolean", + "x-go-name": "RequireSignedCommits" + }, + "required_approvals": { + "format": "int64", + "type": "integer", + "x-go-name": "RequiredApprovals" + }, + "status_check_contexts": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "StatusCheckContexts" + }, + "unprotected_file_patterns": { + "type": "string", + "x-go-name": "UnprotectedFilePatterns" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "EditOrgEmailDomainPolicyOption": { + "description": "EditOrgEmailDomainPolicyOption options for editing an org's email domain policy", + "properties": { + "allowed_domains": { + "type": "string", + "x-go-name": "AllowedDomains" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "EditOrgOption": { "description": "EditOrgOption options for editing an organization", "properties": { @@ -5476,6 +6062,95 @@ "type": "object", "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "EditOrgPushPolicyOption": { + "description": "EditOrgPushPolicyOption options for editing an organization's push policy. Only\nfields that are set will be changed.", + "properties": { + "blocked_file_patterns": { + "type": "string", + "x-go-name": "BlockedFilePatterns" + }, + "branch_name_pattern": { + "type": "string", + "x-go-name": "BranchNamePattern" + }, + "max_file_size": { + "format": "int64", + "type": "integer", + "x-go-name": "MaxFileSize" + }, + "require_secret_block": { + "type": "boolean", + "x-go-name": "RequireSecretBlock" + }, + "tag_name_pattern": { + "type": "string", + "x-go-name": "TagNamePattern" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "EditOrgRepoDefaultsOption": { + "description": "EditOrgRepoDefaultsOption options for editing an org's repo defaults. Only fields\nthat are set will be changed.", + "properties": { + "allow_fast_forward_only": { + "type": "boolean", + "x-go-name": "AllowFastForwardOnly" + }, + "allow_merge": { + "type": "boolean", + "x-go-name": "AllowMerge" + }, + "allow_rebase": { + "type": "boolean", + "x-go-name": "AllowRebase" + }, + "allow_rebase_merge": { + "type": "boolean", + "x-go-name": "AllowRebaseMerge" + }, + "allow_squash": { + "type": "boolean", + "x-go-name": "AllowSquash" + }, + "apply_pr_defaults": { + "type": "boolean", + "x-go-name": "ApplyPRDefaults" + }, + "default_merge_style": { + "type": "string", + "x-go-name": "DefaultMergeStyle" + }, + "delete_branch_after_merge": { + "type": "boolean", + "x-go-name": "DeleteBranchAfterMerge" + }, + "force_private": { + "type": "boolean", + "x-go-name": "ForcePrivate" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "EditOrgTagProtectionOption": { + "description": "EditOrgTagProtectionOption options for editing an org-level tag protection", + "properties": { + "name_pattern": { + "type": "string", + "x-go-name": "NamePattern" + }, + "whitelist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "WhitelistTeams" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "EditPullRequestOption": { "description": "EditPullRequestOption options when modify pull request", "properties": { @@ -6882,6 +7557,15 @@ "type": "integer", "x-go-name": "PinOrder" }, + "priority_id": { + "format": "int64", + "type": "integer", + "x-go-name": "PriorityID" + }, + "priority_name": { + "type": "string", + "x-go-name": "PriorityName" + }, "projects": { "items": { "$ref": "#/components/schemas/Project" @@ -6902,6 +7586,16 @@ "state": { "$ref": "#/components/schemas/StateType" }, + "status_id": { + "description": "Issue metadata (org-level definitions)", + "format": "int64", + "type": "integer", + "x-go-name": "StatusID" + }, + "status_name": { + "type": "string", + "x-go-name": "StatusName" + }, "time_estimate": { "format": "int64", "type": "integer", @@ -6911,6 +7605,15 @@ "type": "string", "x-go-name": "Title" }, + "type_id": { + "format": "int64", + "type": "integer", + "x-go-name": "TypeID" + }, + "type_name": { + "type": "string", + "x-go-name": "TypeName" + }, "updated_at": { "format": "date-time", "type": "string", @@ -6928,6 +7631,139 @@ "type": "object", "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "IssueBulkAssigneesOption": { + "description": "IssueBulkAssigneesOption options for bulk assignee operations on issues", + "properties": { + "assignees": { + "description": "list of assignee usernames to add or set", + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "Assignees" + }, + "issues": { + "description": "issue indexes to operate on", + "items": { + "format": "int64", + "type": "integer" + }, + "type": "array", + "x-go-name": "Issues" + } + }, + "required": [ + "issues", + "assignees" + ], + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "IssueBulkLabelsOption": { + "description": "IssueBulkLabelsOption options for bulk label operations on issues", + "properties": { + "action": { + "description": "action to perform: \"add\" (default), \"remove\", or \"replace\"", + "type": "string", + "x-go-name": "Action" + }, + "issues": { + "description": "issue indexes to operate on", + "items": { + "format": "int64", + "type": "integer" + }, + "type": "array", + "x-go-name": "Issues" + }, + "labels": { + "description": "Labels can be a list of integers representing label IDs\nor a list of strings representing label names", + "items": {}, + "type": "array", + "x-go-name": "Labels" + } + }, + "required": [ + "issues", + "labels" + ], + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "IssueBulkMilestoneOption": { + "description": "IssueBulkMilestoneOption options for bulk milestone assignment on issues", + "properties": { + "issues": { + "description": "issue indexes to operate on", + "items": { + "format": "int64", + "type": "integer" + }, + "type": "array", + "x-go-name": "Issues" + }, + "milestone_id": { + "description": "milestone id to assign, 0 to remove milestone", + "format": "int64", + "type": "integer", + "x-go-name": "MilestoneID" + } + }, + "required": [ + "issues", + "milestone_id" + ], + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "IssueBulkResult": { + "description": "IssueBulkResult represents the result of a bulk issue operation", + "properties": { + "failure_count": { + "description": "count of issues that failed to update", + "format": "int64", + "type": "integer", + "x-go-name": "FailureCount" + }, + "failures": { + "description": "details of failures, keyed by issue index", + "x-go-name": "Failures" + }, + "success_count": { + "description": "count of successfully updated issues", + "format": "int64", + "type": "integer", + "x-go-name": "SuccessCount" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "IssueBulkStateOption": { + "description": "IssueBulkStateOption options for bulk state changes on issues", + "properties": { + "issues": { + "description": "issue indexes to operate on", + "items": { + "format": "int64", + "type": "integer" + }, + "type": "array", + "x-go-name": "Issues" + }, + "state": { + "description": "new state for the issues, \"open\" or \"closed\"", + "type": "string", + "x-go-name": "State" + } + }, + "required": [ + "issues", + "state" + ], + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "IssueConfig": { "properties": { "blank_issues_enabled": { @@ -7069,6 +7905,76 @@ "type": "object", "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "IssuePriorityDef": { + "description": "IssuePriorityDef represents an org-level issue priority definition", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "format": "int64", + "type": "integer", + "x-go-name": "ID" + }, + "is_default": { + "type": "boolean", + "x-go-name": "IsDefault" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "sort_order": { + "format": "int64", + "type": "integer", + "x-go-name": "SortOrder" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "IssueStatusDef": { + "description": "IssueStatusDef represents an org-level issue status definition", + "properties": { + "closes_issue": { + "type": "boolean", + "x-go-name": "ClosesIssue" + }, + "color": { + "type": "string", + "x-go-name": "Color" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "format": "int64", + "type": "integer", + "x-go-name": "ID" + }, + "is_required": { + "type": "boolean", + "x-go-name": "IsRequired" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "sort_order": { + "format": "int64", + "type": "integer", + "x-go-name": "SortOrder" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "IssueTemplate": { "description": "IssueTemplate represents an issue template for a repository", "properties": { @@ -7090,6 +7996,13 @@ "type": "string", "x-go-name": "Content" }, + "custom_fields": { + "additionalProperties": { + "type": "string" + }, + "type": "object", + "x-go-name": "CustomFields" + }, "file_name": { "type": "string", "x-go-name": "FileName" @@ -7120,6 +8033,39 @@ "type": "array", "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" }, + "IssueTypeDef": { + "description": "IssueTypeDef represents an org-level issue type definition", + "properties": { + "color": { + "type": "string", + "x-go-name": "Color" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "id": { + "format": "int64", + "type": "integer", + "x-go-name": "ID" + }, + "is_default": { + "type": "boolean", + "x-go-name": "IsDefault" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "sort_order": { + "format": "int64", + "type": "integer", + "x-go-name": "SortOrder" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "Label": { "description": "Label a label to an issue or a pr", "properties": { @@ -7900,6 +8846,306 @@ ], "type": "string" }, + "OrgBranchProtection": { + "description": "OrgBranchProtection represents an org-level branch protection ruleset", + "properties": { + "approvals_whitelist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "ApprovalsWhitelistTeams" + }, + "block_admin_merge_override": { + "type": "boolean", + "x-go-name": "BlockAdminMergeOverride" + }, + "block_on_official_review_requests": { + "type": "boolean", + "x-go-name": "BlockOnOfficialReviewRequests" + }, + "block_on_outdated_branch": { + "type": "boolean", + "x-go-name": "BlockOnOutdatedBranch" + }, + "block_on_rejected_reviews": { + "type": "boolean", + "x-go-name": "BlockOnRejectedReviews" + }, + "created_at": { + "format": "date-time", + "type": "string", + "x-go-name": "Created" + }, + "delete_allowlist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "DeleteAllowlistTeams" + }, + "dismiss_stale_approvals": { + "type": "boolean", + "x-go-name": "DismissStaleApprovals" + }, + "enable_approvals_whitelist": { + "type": "boolean", + "x-go-name": "EnableApprovalsWhitelist" + }, + "enable_delete": { + "type": "boolean", + "x-go-name": "EnableDelete" + }, + "enable_delete_allowlist": { + "type": "boolean", + "x-go-name": "EnableDeleteAllowlist" + }, + "enable_force_push": { + "type": "boolean", + "x-go-name": "EnableForcePush" + }, + "enable_force_push_allowlist": { + "type": "boolean", + "x-go-name": "EnableForcePushAllowlist" + }, + "enable_merge_whitelist": { + "type": "boolean", + "x-go-name": "EnableMergeWhitelist" + }, + "enable_push": { + "type": "boolean", + "x-go-name": "EnablePush" + }, + "enable_push_whitelist": { + "type": "boolean", + "x-go-name": "EnablePushWhitelist" + }, + "enable_status_check": { + "type": "boolean", + "x-go-name": "EnableStatusCheck" + }, + "force_push_allowlist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "ForcePushAllowlistTeams" + }, + "id": { + "format": "int64", + "type": "integer", + "x-go-name": "ID" + }, + "ignore_stale_approvals": { + "type": "boolean", + "x-go-name": "IgnoreStaleApprovals" + }, + "merge_whitelist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "MergeWhitelistTeams" + }, + "org_id": { + "format": "int64", + "type": "integer", + "x-go-name": "OrgID" + }, + "priority": { + "format": "int64", + "type": "integer", + "x-go-name": "Priority" + }, + "protected_file_patterns": { + "type": "string", + "x-go-name": "ProtectedFilePatterns" + }, + "push_whitelist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "PushWhitelistTeams" + }, + "require_signed_commits": { + "type": "boolean", + "x-go-name": "RequireSignedCommits" + }, + "required_approvals": { + "format": "int64", + "type": "integer", + "x-go-name": "RequiredApprovals" + }, + "rule_name": { + "type": "string", + "x-go-name": "RuleName" + }, + "status_check_contexts": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "StatusCheckContexts" + }, + "unprotected_file_patterns": { + "type": "string", + "x-go-name": "UnprotectedFilePatterns" + }, + "updated_at": { + "format": "date-time", + "type": "string", + "x-go-name": "Updated" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "OrgEmailDomainPolicy": { + "description": "OrgEmailDomainPolicy represents an organization's email domain policy", + "properties": { + "allowed_domains": { + "type": "string", + "x-go-name": "AllowedDomains" + }, + "org_id": { + "format": "int64", + "type": "integer", + "x-go-name": "OrgID" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "OrgPushPolicy": { + "description": "OrgPushPolicy represents an organization's push policy (one per org)", + "properties": { + "blocked_file_patterns": { + "type": "string", + "x-go-name": "BlockedFilePatterns" + }, + "branch_name_pattern": { + "type": "string", + "x-go-name": "BranchNamePattern" + }, + "created_at": { + "format": "date-time", + "type": "string", + "x-go-name": "Created" + }, + "max_file_size": { + "format": "int64", + "type": "integer", + "x-go-name": "MaxFileSize" + }, + "org_id": { + "format": "int64", + "type": "integer", + "x-go-name": "OrgID" + }, + "require_secret_block": { + "type": "boolean", + "x-go-name": "RequireSecretBlock" + }, + "tag_name_pattern": { + "type": "string", + "x-go-name": "TagNamePattern" + }, + "updated_at": { + "format": "date-time", + "type": "string", + "x-go-name": "Updated" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "OrgRepoDefaults": { + "description": "OrgRepoDefaults represents an organization's default repository settings", + "properties": { + "allow_fast_forward_only": { + "type": "boolean", + "x-go-name": "AllowFastForwardOnly" + }, + "allow_merge": { + "type": "boolean", + "x-go-name": "AllowMerge" + }, + "allow_rebase": { + "type": "boolean", + "x-go-name": "AllowRebase" + }, + "allow_rebase_merge": { + "type": "boolean", + "x-go-name": "AllowRebaseMerge" + }, + "allow_squash": { + "type": "boolean", + "x-go-name": "AllowSquash" + }, + "apply_pr_defaults": { + "type": "boolean", + "x-go-name": "ApplyPRDefaults" + }, + "default_merge_style": { + "type": "string", + "x-go-name": "DefaultMergeStyle" + }, + "delete_branch_after_merge": { + "type": "boolean", + "x-go-name": "DeleteBranchAfterMerge" + }, + "force_private": { + "type": "boolean", + "x-go-name": "ForcePrivate" + }, + "org_id": { + "format": "int64", + "type": "integer", + "x-go-name": "OrgID" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "OrgTagProtection": { + "description": "OrgTagProtection represents an org-level tag protection rule", + "properties": { + "created_at": { + "format": "date-time", + "type": "string", + "x-go-name": "Created" + }, + "id": { + "format": "int64", + "type": "integer", + "x-go-name": "ID" + }, + "name_pattern": { + "type": "string", + "x-go-name": "NamePattern" + }, + "org_id": { + "format": "int64", + "type": "integer", + "x-go-name": "OrgID" + }, + "updated_at": { + "format": "date-time", + "type": "string", + "x-go-name": "Updated" + }, + "whitelist_teams": { + "items": { + "type": "string" + }, + "type": "array", + "x-go-name": "WhitelistTeams" + } + }, + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, "Organization": { "description": "Organization represents an organization", "properties": { @@ -10542,6 +11788,125 @@ }, "type": "object", "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/modules/structs" + }, + "apiMetadata": { + "properties": { + "container_name": { + "type": "string", + "x-go-name": "ContainerName" + }, + "deploy_host": { + "description": "deploy", + "type": "string", + "x-go-name": "DeployHost" + }, + "deploy_path": { + "type": "string", + "x-go-name": "DeployPath" + }, + "deploy_port": { + "type": "string", + "x-go-name": "DeployPort" + }, + "deploy_user": { + "type": "string", + "x-go-name": "DeployUser" + }, + "description": { + "type": "string", + "x-go-name": "Description" + }, + "display_name": { + "type": "string", + "x-go-name": "DisplayName" + }, + "docker_image": { + "type": "string", + "x-go-name": "DockerImage" + }, + "docker_registry": { + "type": "string", + "x-go-name": "DockerRegistry" + }, + "element_name": { + "type": "string", + "x-go-name": "ElementName" + }, + "entry_point": { + "type": "string", + "x-go-name": "EntryPoint" + }, + "extension_type": { + "type": "string", + "x-go-name": "ExtensionType" + }, + "health_url": { + "format": "uri", + "type": "string", + "x-go-name": "HealthURL" + }, + "info_url": { + "format": "uri", + "type": "string", + "x-go-name": "InfoURL" + }, + "language": { + "type": "string", + "x-go-name": "Language" + }, + "license_name": { + "type": "string", + "x-go-name": "LicenseName" + }, + "license_spdx": { + "type": "string", + "x-go-name": "LicenseSPDX" + }, + "maintainer": { + "type": "string", + "x-go-name": "Maintainer" + }, + "maintainer_url": { + "format": "uri", + "type": "string", + "x-go-name": "MaintainerURL" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "org": { + "type": "string", + "x-go-name": "Org" + }, + "php_minimum": { + "type": "string", + "x-go-name": "PHPMinimum" + }, + "platform": { + "type": "string", + "x-go-name": "Platform" + }, + "standards_source": { + "type": "string", + "x-go-name": "StandardsSource" + }, + "standards_version": { + "type": "string", + "x-go-name": "StandardsVersion" + }, + "target_version": { + "type": "string", + "x-go-name": "TargetVersion" + }, + "version_prefix": { + "type": "string", + "x-go-name": "VersionPrefix" + } + }, + "title": "apiMetadata is the JSON representation of a repo manifest.", + "type": "object", + "x-go-package": "code.mokoconsulting.tech/MokoConsulting/MokoGitea/routers/api/v1/repo" } }, "securitySchemes": { @@ -10588,12 +11953,12 @@ } }, "info": { - "description": "This documentation describes the {{.SwaggerAppName}} API.", + "description": "This documentation describes the Gitea API.", "license": { "name": "MIT", "url": "http://opensource.org/licenses/MIT" }, - "title": "{{.SwaggerAppName}} API", + "title": "Gitea API", "version": "{{.SwaggerAppVer}}" }, "openapi": "3.0.3", @@ -13484,6 +14849,289 @@ ] } }, + "/orgs/{org}/branch_protections": { + "get": { + "operationId": "orgListBranchProtections", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/OrgBranchProtectionList" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "List an organization's branch protection rules", + "tags": [ + "organization" + ] + }, + "post": { + "operationId": "orgCreateBranchProtection", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrgBranchProtectionOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "201": { + "$ref": "#/components/responses/OrgBranchProtection" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Create an org-level branch protection rule", + "tags": [ + "organization" + ] + } + }, + "/orgs/{org}/branch_protections/{name}": { + "delete": { + "operationId": "orgDeleteBranchProtection", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the branch protection rule", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/empty" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Delete an org-level branch protection rule", + "tags": [ + "organization" + ] + }, + "get": { + "operationId": "orgGetBranchProtection", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the branch protection rule", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/OrgBranchProtection" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Get a specific org-level branch protection rule", + "tags": [ + "organization" + ] + }, + "patch": { + "operationId": "orgEditBranchProtection", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the branch protection rule", + "in": "path", + "name": "name", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditOrgBranchProtectionOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "200": { + "$ref": "#/components/responses/OrgBranchProtection" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Edit an org-level branch protection rule. Only fields that are set will be changed", + "tags": [ + "organization" + ] + } + }, + "/orgs/{org}/email_domain_policy": { + "delete": { + "operationId": "orgDeleteEmailDomainPolicy", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/empty" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Remove the organization's email domain policy", + "tags": [ + "organization" + ] + }, + "get": { + "operationId": "orgGetEmailDomainPolicy", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/OrgEmailDomainPolicy" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Get the organization's email domain policy", + "tags": [ + "organization" + ] + }, + "patch": { + "operationId": "orgEditEmailDomainPolicy", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditOrgEmailDomainPolicyOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "200": { + "$ref": "#/components/responses/OrgEmailDomainPolicy" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Create or update the organization's email domain policy. Only fields that are set will be changed", + "tags": [ + "organization" + ] + } + }, "/orgs/{org}/hooks": { "get": { "operationId": "orgListHooks", @@ -13685,6 +15333,219 @@ ] } }, + "/orgs/{org}/issue-priorities": { + "get": { + "operationId": "orgListIssuePriorities", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/IssuePriorityDef" + }, + "type": "array" + } + } + }, + "description": "IssuePriorityDefList" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "List an organization's issue priority definitions", + "tags": [ + "organization" + ] + } + }, + "/orgs/{org}/issue-statuses": { + "get": { + "operationId": "orgListIssueStatuses", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/IssueStatusDef" + }, + "type": "array" + } + } + }, + "description": "IssueStatusDefList" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "List an organization's issue status definitions", + "tags": [ + "organization" + ] + } + }, + "/orgs/{org}/issue-statuses/copy/{source_org}": { + "post": { + "operationId": "orgCopyIssueStatuses", + "parameters": [ + { + "description": "target organization name", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "source organization name to copy from", + "in": "path", + "name": "source_org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "StatusesCopied" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Copy issue statuses from another organization", + "tags": [ + "organization" + ] + } + }, + "/orgs/{org}/issue-statuses/presets": { + "get": { + "operationId": "orgListIssueStatusPresets", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "StatusPresetList" + } + }, + "summary": "List available issue status presets", + "tags": [ + "organization" + ] + } + }, + "/orgs/{org}/issue-statuses/presets/{preset}": { + "post": { + "operationId": "orgApplyIssueStatusPreset", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "preset name", + "in": "path", + "name": "preset", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "description": "StatusPresetApplied" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Apply a status preset to an organization", + "tags": [ + "organization" + ] + } + }, + "/orgs/{org}/issue-types": { + "get": { + "operationId": "orgListIssueTypes", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "items": { + "$ref": "#/components/schemas/IssueTypeDef" + }, + "type": "array" + } + } + }, + "description": "IssueTypeDefList" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "List an organization's issue type definitions", + "tags": [ + "organization" + ] + } + }, "/orgs/{org}/labels": { "get": { "operationId": "orgListLabels", @@ -14167,6 +16028,99 @@ ] } }, + "/orgs/{org}/push_policy": { + "delete": { + "operationId": "orgDeletePushPolicy", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/empty" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Remove the organization's push policy", + "tags": [ + "organization" + ] + }, + "get": { + "operationId": "orgGetPushPolicy", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/OrgPushPolicy" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Get the organization's push policy", + "tags": [ + "organization" + ] + }, + "patch": { + "operationId": "orgEditPushPolicy", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditOrgPushPolicyOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "200": { + "$ref": "#/components/responses/OrgPushPolicy" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Create or update the organization's push policy. Only fields that are set will be changed", + "tags": [ + "organization" + ] + } + }, "/orgs/{org}/rename": { "post": { "operationId": "renameOrg", @@ -14209,6 +16163,99 @@ ] } }, + "/orgs/{org}/repo_defaults": { + "delete": { + "operationId": "orgDeleteRepoDefaults", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/empty" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Remove the organization's default repository settings", + "tags": [ + "organization" + ] + }, + "get": { + "operationId": "orgGetRepoDefaults", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/OrgRepoDefaults" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Get the organization's default repository settings", + "tags": [ + "organization" + ] + }, + "patch": { + "operationId": "orgEditRepoDefaults", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditOrgRepoDefaultsOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "200": { + "$ref": "#/components/responses/OrgRepoDefaults" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Create or update the organization's default repository settings. Only fields that are set will be changed", + "tags": [ + "organization" + ] + } + }, "/orgs/{org}/repos": { "delete": { "operationId": "orgDeleteRepos", @@ -14327,6 +16374,199 @@ ] } }, + "/orgs/{org}/tag_protections": { + "get": { + "operationId": "orgListTagProtections", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/OrgTagProtectionList" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "List an organization's tag protection rules", + "tags": [ + "organization" + ] + }, + "post": { + "operationId": "orgCreateTagProtection", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrgTagProtectionOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "201": { + "$ref": "#/components/responses/OrgTagProtection" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Create an org-level tag protection rule", + "tags": [ + "organization" + ] + } + }, + "/orgs/{org}/tag_protections/{id}": { + "delete": { + "operationId": "orgDeleteTagProtection", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the tag protection rule", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/empty" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Delete an org-level tag protection rule", + "tags": [ + "organization" + ] + }, + "get": { + "operationId": "orgGetTagProtection", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the tag protection rule", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/OrgTagProtection" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Get a specific org-level tag protection rule", + "tags": [ + "organization" + ] + }, + "patch": { + "operationId": "orgEditTagProtection", + "parameters": [ + { + "description": "name of the organization", + "in": "path", + "name": "org", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the tag protection rule", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditOrgTagProtectionOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "200": { + "$ref": "#/components/responses/OrgTagProtection" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Edit an org-level tag protection rule. Only fields that are set will be changed", + "tags": [ + "organization" + ] + } + }, "/orgs/{org}/teams": { "get": { "operationId": "orgListTeams", @@ -20991,6 +23231,209 @@ ] } }, + "/repos/{owner}/{repo}/issues/bulk/assignees": { + "post": { + "operationId": "issueBulkSetAssignees", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssueBulkAssigneesOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "200": { + "$ref": "#/components/responses/IssueBulkResult" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Set assignees on multiple issues", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/{repo}/issues/bulk/labels": { + "post": { + "operationId": "issueBulkSetLabels", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssueBulkLabelsOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "200": { + "$ref": "#/components/responses/IssueBulkResult" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/notFound" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Add, remove, or replace labels on multiple issues", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/{repo}/issues/bulk/milestone": { + "post": { + "operationId": "issueBulkSetMilestone", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssueBulkMilestoneOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "200": { + "$ref": "#/components/responses/IssueBulkResult" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Assign a milestone to multiple issues", + "tags": [ + "issue" + ] + } + }, + "/repos/{owner}/{repo}/issues/bulk/state": { + "post": { + "operationId": "issueBulkSetState", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/IssueBulkStateOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "200": { + "$ref": "#/components/responses/IssueBulkResult" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "422": { + "$ref": "#/components/responses/validationError" + } + }, + "summary": "Close or reopen multiple issues", + "tags": [ + "issue" + ] + } + }, "/repos/{owner}/{repo}/issues/comments": { "get": { "operationId": "issueGetRepoComments", @@ -24890,6 +27333,75 @@ ] } }, + "/repos/{owner}/{repo}/manifest": { + "get": { + "operationId": "repoGetManifest", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Manifest" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Get repo manifest settings", + "tags": [ + "repository" + ] + }, + "put": { + "operationId": "repoUpdateManifest", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/Manifest" + } + }, + "summary": "Update repo manifest settings", + "tags": [ + "repository" + ] + } + }, "/repos/{owner}/{repo}/media/{filepath}": { "get": { "operationId": "repoGetRawFileOrLFS", @@ -30115,6 +32627,68 @@ ] } }, + "/repos/{owner}/{repo}/wiki/search": { + "get": { + "operationId": "repoSearchWikiPages", + "parameters": [ + { + "description": "owner of the repo", + "in": "path", + "name": "owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "name of the repo", + "in": "path", + "name": "repo", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "search query", + "in": "query", + "name": "q", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "page number of results to return (1-based)", + "in": "query", + "name": "page", + "schema": { + "type": "integer" + } + }, + { + "description": "page size of results", + "in": "query", + "name": "limit", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "SearchResults" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Search wiki pages", + "tags": [ + "repository" + ] + } + }, "/repos/{template_owner}/{template_repo}/generate": { "post": { "operationId": "generateRepo", @@ -33463,6 +36037,60 @@ ] } }, + "/users/{username}/tokens/{id}": { + "patch": { + "operationId": "userUpdateAccessToken", + "parameters": [ + { + "description": "username of the user whose token is to be updated", + "in": "path", + "name": "username", + "required": true, + "schema": { + "type": "string" + } + }, + { + "description": "id of the token to update", + "in": "path", + "name": "id", + "required": true, + "schema": { + "format": "int64", + "type": "integer" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EditAccessTokenOption" + } + } + }, + "x-originalParamName": "body" + }, + "responses": { + "200": { + "$ref": "#/components/responses/AccessToken" + }, + "400": { + "$ref": "#/components/responses/error" + }, + "403": { + "$ref": "#/components/responses/forbidden" + }, + "404": { + "$ref": "#/components/responses/notFound" + } + }, + "summary": "Update an access token's scopes", + "tags": [ + "user" + ] + } + }, "/users/{username}/tokens/{token}": { "delete": { "operationId": "userDeleteAccessToken",