{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "SerialisedGiteaConfig", "type": "object", "additionalProperties": false, "required": [ "users", "repos" ], "properties": { "users": { "type": "object", "additionalProperties": { "$ref": "#/definitions/SerialisedUserInfo" } }, "repos": { "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "$ref": "#/definitions/SerialisedRepo" } } } }, "definitions": { "SerialisedUserInfo": { "type": "object", "additionalProperties": false, "required": [ "email" ], "properties": { "isAdmin": { "type": "boolean" }, "email": { "type": "string" }, "website": { "type": [ "null", "string" ], "format": "uri" }, "visibility": { "type": [ "null", "string" ] } } }, "SerialisedRepo": { "type": "object", "additionalProperties": false, "properties": { "description": { "type": "string", "description": "The text that will accompany this repository in the Gitea UI" }, "gitHub": { "description": "If this repo is to sync from GitHub, information about the repo.", "oneOf": [ { "type": "null" }, { "$ref": "#/definitions/SerialisedGitHubRepo" } ] }, "native": { "description": "If this repo is to be created natively on Gitea, the information about the repo.", "oneOf": [ { "type": "null" }, { "$ref": "#/definitions/SerialisedNativeRepo" } ] }, "deleted": { "type": [ "boolean", "null" ], "description": "Set this to true to delete the repo. We will refuse to delete any repo that is absent from\n configuration; the workflow is to first set its `deleted` to `true` (whereupon we will delete it from Gitea) and then to delete it from configuration." } }, "oneOf": [ { "required": [ "description", "gitHub" ] }, { "required": [ "description", "native" ] } ] }, "SerialisedGitHubRepo": { "type": "object", "description": "Information about a repo that is being mirrored from GitHub.", "additionalProperties": false, "required": [ "uri" ], "properties": { "uri": { "type": "string", "description": "e.g. https://github.com/Smaug123/nix-maui" }, "mirrorInterval": { "type": "string", "description": "A Golang string, e.g. \"8h30m0s\"" } } }, "SerialisedNativeRepo": { "type": "object", "description": "Information about a repo that is to be created on Gitea without syncing from GitHub.", "additionalProperties": false, "required": [ "defaultBranch" ], "properties": { "defaultBranch": { "type": "string", "description": "The default branch name for this repository, e.g. 'main'" }, "private": { "type": "boolean", "description": "Whether this repository is a Gitea private repo" }, "ignoreWhitespaceConflicts": { "type": "boolean", "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace." }, "hasPullRequests": { "type": "boolean", "description": "either `true` to allow pull requests, or `false` to prevent pull request." }, "hasProjects": { "type": "boolean", "description": "either `true` to enable project unit, or `false` to disable them." }, "hasIssues": { "type": "boolean", "description": "either `true` to enable issues for this repository or `false` to disable them." }, "hasWiki": { "type": "boolean", "description": "either `true` to enable the wiki for this repository or `false` to disable it." }, "defaultMergeStyle": { "type": "string", "description": "set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", or \"squash\"." }, "deleteBranchAfterMerge": { "type": "boolean", "description": "set to `true` to delete pr branch after merge by default." }, "allowSquashMerge": { "type": "boolean", "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging." }, "allowRebaseUpdate": { "type": "boolean", "description": "either `true` to allow updating pull request branch by rebase, or `false` to prevent it." }, "allowRebase": { "type": "boolean", "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging." }, "allowRebaseExplicit": { "type": "boolean", "description": "either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits." }, "allowMergeCommits": { "type": "boolean", "description": "either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits." }, "mirror": { "description": "Configure a GitHub push mirror to sync this repo to", "oneOf": [ { "$ref": "#/definitions/SerialisedPushMirror" } ] }, "protectedBranches": { "type": [ "array", "null" ], "description": "Protected branch configuration", "items": { "$ref": "#/definitions/SerialisedProtectedBranch" } }, "collaborators": { "type": [ "array", "null" ], "description": "Usernames on this Gitea instance who are collaborators on this repo", "items": { "type": "string" } } } }, "SerialisedPushMirror": { "type": "object", "description": "Information about a repo that is to be created on Gitea without syncing from GitHub.", "additionalProperties": false, "required": [ "gitHubAddress" ], "properties": { "gitHubAddress": { "type": "string" } } }, "SerialisedProtectedBranch": { "type": "object", "description": "Information about a repo that is to be created on Gitea without syncing from GitHub.", "additionalProperties": false, "required": [ "branchName" ], "properties": { "branchName": { "type": "string" }, "blockOnOutdatedBranch": { "type": "boolean" }, "requiredStatusChecks": { "type": [ "array", "null" ], "description": "A list of status check patterns; merge into this branch will be blocked unless all these checks have run and passed. (Probably go with alphanumeric strings, I can't find any docs.)", "items": { "type": "string" } } } } } }