swagger: '2.0' info: description: This documentation describes the Forgejo API. title: Forgejo activitypub repository API license: name: This file is distributed under the MIT license for the purpose of interoperability url: http://opensource.org/licenses/MIT version: 16.0.0-dev-465-4b83448b7d+gitea-1.22.0 basePath: /api/v1 schemes: - https - http consumes: - application/json - text/plain produces: - application/json - text/html security: - BasicAuth: [] - AuthorizationHeaderToken: [] - SudoParam: [] - SudoHeader: [] - TOTPHeader: [] tags: - name: repository paths: /repos/migrate: post: consumes: - application/json produces: - application/json tags: - repository summary: Migrate a remote git repository operationId: repoMigrate parameters: - name: body in: body schema: $ref: '#/definitions/MigrateRepoOptions' responses: '201': $ref: '#/responses/Repository' '403': $ref: '#/responses/forbidden' '409': description: The repository with the same name already exists. '413': $ref: '#/responses/quotaExceeded' '422': $ref: '#/responses/validationError' /repos/search: get: produces: - application/json tags: - repository summary: Search for repositories operationId: repoSearch parameters: - type: string description: keyword name: q in: query - type: boolean description: Limit search to repositories with keyword as topic name: topic in: query - type: boolean description: include search of keyword within repository description name: includeDesc in: query - type: integer format: int64 description: search only for repos that the user with the given id owns or contributes to name: uid in: query - type: integer format: int64 description: repo owner to prioritize in the results name: priority_owner_id in: query - type: integer format: int64 description: search only for repos that belong to the given team id name: team_id in: query - type: integer format: int64 description: search only for repos that the user with the given id has starred name: starredBy in: query - type: boolean description: include private repositories this user has access to (defaults to true) name: private in: query - type: boolean description: show only public, private or all repositories (defaults to all) name: is_private in: query - type: boolean description: include template repositories this user has access to (defaults to true) name: template in: query - type: boolean description: show only archived, non-archived or all repositories (defaults to all) name: archived in: query - type: string description: type of repository to search for. Supported values are "fork", "source", "mirror" and "collaborative" name: mode in: query - type: boolean description: if `uid` is given, search only for repos that the user owns name: exclusive in: query - enum: - alpha - created - updated - size - git_size - lfs_size - id - stars - forks type: string description: sort repos by attribute. Supported values are "alpha", "created", "updated", "size", "git_size", "lfs_size", "stars", "forks" and "id". Default is "alpha" name: sort in: query - enum: - asc - desc type: string description: sort order, either "asc" (ascending) or "desc" (descending). Default is "asc", ignored if "sort" is not specified. name: order in: query - 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': $ref: '#/responses/SearchResults' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}: get: produces: - application/json tags: - repository summary: Get a repository operationId: repoGet 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/Repository' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - repository summary: Delete a repository operationId: repoDelete parameters: - type: string description: owner of the repo to delete name: owner in: path required: true - type: string description: name of the repo to delete name: repo in: path required: true responses: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' patch: produces: - application/json tags: - repository summary: Edit a repository's properties. Only fields that are set will be changed. operationId: repoEdit parameters: - type: string description: owner of the repo to edit name: owner in: path required: true - type: string description: name of the repo to edit name: repo in: path required: true - description: Properties of a repo that you can edit name: body in: body schema: $ref: '#/definitions/EditRepoOption' responses: '200': $ref: '#/responses/Repository' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/actions/artifacts: get: produces: - application/json tags: - repository summary: List a repository's artifacts operationId: ListActionArtifacts 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: filter by artifact name name: name in: query - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results, default maximum page size is 50 name: limit in: query responses: '200': $ref: '#/responses/ActionArtifactList' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' /repos/{owner}/{repo}/actions/artifacts/{artifact_id}: get: produces: - application/json tags: - repository summary: Get an artifact by ID operationId: GetActionArtifact 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: integer format: int64 description: ID of the artifact name: artifact_id in: path required: true responses: '200': $ref: '#/responses/ActionArtifact' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' delete: description: 'Marks the artifact for deletion. Storage space will be reclaimed asynchronously by a background job. ' tags: - repository summary: Mark an artifact for deletion operationId: DeleteActionArtifact 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: integer format: int64 description: ID of the artifact name: artifact_id in: path required: true responses: '204': description: artifact marked for deletion '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/zip: get: produces: - application/zip tags: - repository summary: Download an artifact operationId: DownloadActionArtifact 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: integer format: int64 description: ID of the artifact name: artifact_id in: path required: true responses: '200': description: the artifact archive '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/actions/jobs/{job_id}/logs: get: description: 'Returns the plaintext log for the job. By default the log for the most recent attempt is returned (ActionRunJob.TaskID tracks the latest task). Pass `?attempt=N` to fetch the log for a specific historical attempt; the value matches the `attempt` field returned by the job listing endpoints. ' produces: - text/plain tags: - repository summary: Download the plaintext logs of an action job operationId: repoGetActionJobLogs 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: integer format: int64 description: ID of the workflow job name: job_id in: path required: true - type: integer format: int64 description: 1-based attempt number matching the value of `attempt` in the job listing; omit to fetch the latest attempt of the job name: attempt in: query responses: '200': description: Plaintext log content schema: type: string '206': description: Partial log content (Range request) schema: type: string '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/actions/runners: get: produces: - application/json tags: - repository summary: Get runners belonging to the repository operationId: getRepoRunners 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: boolean description: whether to include all visible runners (true) or only those that are directly owned by the repository (false) name: visible in: query - 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': $ref: '#/responses/ActionRunnerList' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' post: consumes: - application/json produces: - application/json tags: - repository summary: Register a new repository-level runner operationId: registerRepoRunner 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/RegisterRunnerOptions' responses: '201': $ref: '#/responses/RegisterRunnerResponse' '400': $ref: '#/responses/error' '401': $ref: '#/responses/unauthorized' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/actions/runners/jobs: get: produces: - application/json tags: - repository summary: Search for repository's action jobs according filter conditions operationId: repoSearchRunJobs 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: a comma separated list of run job labels to search for name: labels in: query responses: '200': $ref: '#/responses/RunJobList' '403': $ref: '#/responses/forbidden' /repos/{owner}/{repo}/actions/runners/registration-token: get: description: 'This operation has been deprecated in Forgejo 15. Use the web UI or [`/repos/{owner}/{repo}/actions/runners`](#/repository/registerRepoRunner) instead. ' produces: - application/json tags: - repository summary: Get a repository's runner registration token operationId: repoGetRunnerRegistrationToken deprecated: true 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/RegistrationToken' /repos/{owner}/{repo}/actions/runners/{runner_id}: get: produces: - application/json tags: - repository summary: Get a particular runner that belongs to the repository operationId: getRepoRunner 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: ID of the runner name: runner_id in: path required: true responses: '200': $ref: '#/responses/ActionRunner' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - repository summary: Delete a particular runner that belongs to a repository operationId: deleteRepoRunner 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: ID of the runner name: runner_id in: path required: true responses: '204': description: runner has been deleted '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/actions/runs: get: produces: - application/json tags: - repository summary: List a repository's action runs operationId: ListActionRuns 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: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results, default maximum page size is 50 name: limit in: query - type: array items: type: string description: Returns workflow run triggered by the specified events. For example, `push`, `pull_request` or `workflow_dispatch`. name: event in: query - type: array items: enum: - unknown - waiting - running - success - failure - cancelled - skipped - blocked type: string description: 'Returns workflow runs with the check run status or conclusion that is specified. For example, a conclusion can be success or a status can be in_progress. Only Forgejo Actions can set a status of waiting, pending, or requested. ' name: status in: query - type: integer format: int64 description: 'Returns the workflow run associated with the run number. ' name: run_number in: query - type: string description: Only returns workflow runs that are associated with the specified head_sha. name: head_sha in: query - type: string description: Only return workflow runs that involve the given Git reference, for example, `refs/heads/main`. name: ref in: query - type: string description: Only return workflow runs that involve the given workflow ID. name: workflow_id in: query responses: '200': $ref: '#/responses/ActionRunList' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' /repos/{owner}/{repo}/actions/runs/{run_id}: get: produces: - application/json tags: - repository summary: Get an action run operationId: ActionRun 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: integer format: int64 description: id of the action run name: run_id in: path required: true responses: '200': $ref: '#/responses/ActionRun' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' delete: description: 'Remove a particular workflow run. The workflow run must have completed (succeeded, failed, cancelled) for the operation to succeed. Otherwise, an error is returned. ' produces: - application/json tags: - repository summary: Delete a completed workflow run. operationId: DeleteActionRun 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: integer format: int64 description: id of the action run name: run_id in: path required: true responses: '204': description: Workflow run has been removed '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts: get: produces: - application/json tags: - repository summary: List artifacts of a workflow run operationId: ListActionRunArtifacts 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: integer format: int64 description: ID of the workflow run name: run_id in: path required: true - type: string description: filter by artifact name name: name in: query - type: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results, default maximum page size is 50 name: limit in: query responses: '200': $ref: '#/responses/ActionArtifactList' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/actions/runs/{run_id}/cancel: post: description: 'Cancel a particular workflow run. Pending or running jobs of the run are cancelled. A run that has already finished, whether cancelled, failed, skipped or succeeded, is left unchanged. In both cases the endpoint responds with HTTP 204. ' produces: - application/json tags: - repository summary: Cancel a pending or running workflow run. operationId: CancelActionRun 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: integer format: int64 description: ID of the workflow run name: run_id in: path required: true responses: '204': description: Workflow run has been cancelled '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/actions/runs/{run_id}/jobs: get: produces: - application/json tags: - repository summary: List jobs of a workflow run operationId: ListActionRunJobs 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: integer format: int64 description: ID of the workflow run name: run_id in: path required: true responses: '200': $ref: '#/responses/ActionRunJobList' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/actions/runs/{run_id}/logs: get: produces: - application/zip tags: - repository summary: Download a ZIP of plaintext logs for every job in an action run operationId: repoGetActionRunLogs 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: integer format: int64 description: 'ID of the workflow run. The ZIP contains the latest attempt of each job in the run, with each entry named `{job-name}-{job-id}-attempt-{N}.log` (the job ID prevents collisions when two jobs share a name; the attempt number records which run the log came from). The run itself has no attempt number — jobs are re-run independently, so use the per-job logs endpoint with `?attempt` to fetch a specific historical attempt of one job. ' name: run_id in: path required: true responses: '200': description: ZIP archive of per-job log files schema: type: string format: binary '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/actions/secrets: get: produces: - application/json tags: - repository summary: List an repo's actions secrets operationId: repoListActionsSecrets parameters: - type: string description: owner of the repository name: owner in: path required: true - type: string description: name of the repository name: repo in: path 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': $ref: '#/responses/SecretList' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/actions/secrets/{secretname}: put: consumes: - application/json produces: - application/json tags: - repository summary: Create or Update a secret value in a repository operationId: updateRepoSecret parameters: - type: string description: owner of the repository name: owner in: path required: true - type: string description: name of the repository name: repo in: path required: true - type: string description: name of the secret name: secretname in: path required: true - name: body in: body schema: $ref: '#/definitions/CreateOrUpdateSecretOption' responses: '201': description: response when creating a secret '204': description: response when updating a secret '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' delete: consumes: - application/json produces: - application/json tags: - repository summary: Delete a secret in a repository operationId: deleteRepoSecret parameters: - type: string description: owner of the repository name: owner in: path required: true - type: string description: name of the repository name: repo in: path required: true - type: string description: name of the secret name: secretname in: path required: true responses: '204': description: delete one secret of the organization '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/actions/tasks: get: produces: - application/json tags: - repository summary: List a repository's action tasks operationId: ListActionTasks 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: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results, default maximum page size is 50 name: limit in: query - type: array items: enum: - unknown - waiting - running - success - failure - cancelled - skipped - blocked type: string description: "Returns workflow tasks with the check run status or conclusion that is specified.\n For example, a conclusion can be success or a status can be in_progress.\n" name: status in: query responses: '200': $ref: '#/responses/TasksList' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '409': $ref: '#/responses/conflict' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/actions/variables: get: produces: - application/json tags: - repository summary: Get repo-level variables list operationId: getRepoVariablesList parameters: - type: string description: name of the owner name: owner in: path required: true - type: string description: name of the repository name: repo in: path 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': $ref: '#/responses/VariableList' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/actions/variables/{variablename}: get: produces: - application/json tags: - repository summary: Get a repo-level variable operationId: getRepoVariable parameters: - type: string description: name of the owner name: owner in: path required: true - type: string description: name of the repository name: repo in: path required: true - type: string description: name of the variable name: variablename in: path required: true responses: '200': $ref: '#/responses/ActionVariable' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' put: produces: - application/json tags: - repository summary: Update a repo-level variable operationId: updateRepoVariable parameters: - type: string description: name of the owner name: owner in: path required: true - type: string description: name of the repository name: repo in: path required: true - type: string description: name of the variable name: variablename in: path required: true - name: body in: body schema: $ref: '#/definitions/UpdateVariableOption' responses: '201': description: response when updating a repo-level variable '204': description: response when updating a repo-level variable '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' post: produces: - application/json tags: - repository summary: Create a repo-level variable operationId: createRepoVariable parameters: - type: string description: name of the owner name: owner in: path required: true - type: string description: name of the repository name: repo in: path required: true - type: string description: name of the variable name: variablename in: path required: true - name: body in: body schema: $ref: '#/definitions/CreateVariableOption' responses: '201': description: response when creating a repo-level variable '204': description: response when creating a repo-level variable '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - repository summary: Delete a repo-level variable operationId: deleteRepoVariable parameters: - type: string description: name of the owner name: owner in: path required: true - type: string description: name of the repository name: repo in: path required: true - type: string description: name of the variable name: variablename in: path required: true responses: '204': description: response when deleting a variable '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/actions/workflows/{workflowfilename}/dispatches: post: consumes: - application/json tags: - repository summary: Dispatches a workflow operationId: DispatchWorkflow 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: name of the workflow name: workflowfilename in: path required: true - name: body in: body schema: $ref: '#/definitions/DispatchWorkflowOption' responses: '201': $ref: '#/responses/DispatchWorkflowRun' '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/activities/feeds: get: produces: - application/json tags: - repository summary: List a repository's activity feeds operationId: repoListActivityFeeds 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 format: date description: the date of the activities to be found name: date in: query - 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': $ref: '#/responses/ActivityFeedsList' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/archive/{archive}: get: produces: - application/octet-stream - application/zip - application/gzip tags: - repository summary: Get an archive of a repository operationId: repoGetArchive 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: the git reference for download with attached archive format (e.g. master.zip) name: archive in: path required: true responses: '200': description: success '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/assignees: get: produces: - application/json tags: - repository summary: Return all users that have write access and can be assigned to issues operationId: repoGetAssignees 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/UserList' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/avatar: post: produces: - application/json tags: - repository summary: Update a repository's avatar operationId: repoUpdateAvatar 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/UpdateRepoAvatarOption' responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - repository summary: Delete a repository's avatar operationId: repoDeleteAvatar 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: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/branch_protections: get: produces: - application/json tags: - repository summary: List branch protections for a repository operationId: repoListBranchProtection 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/BranchProtectionList' post: consumes: - application/json produces: - application/json tags: - repository summary: Create a branch protections for a repository operationId: repoCreateBranchProtection 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/CreateBranchProtectionOption' responses: '201': $ref: '#/responses/BranchProtection' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' '423': $ref: '#/responses/repoArchivedError' /repos/{owner}/{repo}/branch_protections/{name}: get: produces: - application/json tags: - repository summary: Get a specific branch protection for the repository operationId: repoGetBranchProtection 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: name of protected branch name: name in: path required: true responses: '200': $ref: '#/responses/BranchProtection' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - repository summary: Delete a specific branch protection for the repository operationId: repoDeleteBranchProtection 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: name of protected branch name: name in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' patch: consumes: - application/json produces: - application/json tags: - repository summary: Edit a branch protections for a repository. Only fields that are set will be changed operationId: repoEditBranchProtection 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: name of protected branch name: name in: path required: true - name: body in: body schema: $ref: '#/definitions/EditBranchProtectionOption' responses: '200': $ref: '#/responses/BranchProtection' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' '423': $ref: '#/responses/repoArchivedError' /repos/{owner}/{repo}/branches: get: produces: - application/json tags: - repository summary: List a repository's branches operationId: repoListBranches 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: 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': $ref: '#/responses/BranchList' post: consumes: - application/json produces: - application/json tags: - repository summary: Create a branch operationId: repoCreateBranch 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/CreateBranchRepoOption' responses: '201': $ref: '#/responses/Branch' '403': description: The branch is archived or a mirror. '404': description: The old branch does not exist. '409': description: The branch with the same name already exists. '413': $ref: '#/responses/quotaExceeded' '423': $ref: '#/responses/repoArchivedError' /repos/{owner}/{repo}/branches/{branch}: get: produces: - application/json tags: - repository summary: Retrieve a specific branch from a repository, including its effective branch protection operationId: repoGetBranch 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: branch to get name: branch in: path required: true responses: '200': $ref: '#/responses/Branch' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - repository summary: Delete a specific branch from a repository operationId: repoDeleteBranch 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: branch to delete name: branch in: path required: true responses: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' '423': $ref: '#/responses/repoArchivedError' patch: consumes: - application/json produces: - application/json tags: - repository summary: Update a branch operationId: repoUpdateBranch 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: name of the branch name: branch in: path required: true - name: body in: body schema: $ref: '#/definitions/UpdateBranchRepoOption' responses: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/collaborators: get: produces: - application/json tags: - repository summary: List a repository's collaborators operationId: repoListCollaborators 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: 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': $ref: '#/responses/UserList' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/collaborators/{collaborator}: get: description: If the user is a collaborator, return 204. If the user is not a collaborator, return 404. produces: - application/json tags: - repository summary: Check if a user is a collaborator of a repository operationId: repoCheckCollaborator 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: username of the collaborator name: collaborator in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' put: produces: - application/json tags: - repository summary: Add a collaborator to a repository operationId: repoAddCollaborator 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: username of the collaborator to add name: collaborator in: path required: true - name: body in: body schema: $ref: '#/definitions/AddCollaboratorOption' responses: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' delete: produces: - application/json tags: - repository summary: Delete a collaborator from a repository operationId: repoDeleteCollaborator 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: username of the collaborator to delete name: collaborator in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/collaborators/{collaborator}/permission: get: produces: - application/json tags: - repository summary: Get repository permissions for a user operationId: repoGetRepoPermissions 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: username of the collaborator name: collaborator in: path required: true responses: '200': $ref: '#/responses/RepoCollaboratorPermission' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/commits: get: produces: - application/json tags: - repository summary: Get a list of all commits from a repository operationId: repoGetAllCommits 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: SHA or branch to start listing commits from (usually 'master') name: sha in: query - type: string description: filepath of a file/dir name: path in: query - type: boolean description: include diff stats for every commit (disable for speedup, default 'true') name: stat in: query - type: boolean description: include verification for every commit (disable for speedup, default 'true') name: verification in: query - type: boolean description: include a list of affected files for every commit (disable for speedup, default 'true') name: files in: query - 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 - type: string description: commits that match the given specifier will not be listed. name: not in: query responses: '200': $ref: '#/responses/CommitList' '404': $ref: '#/responses/notFound' '409': $ref: '#/responses/EmptyRepository' /repos/{owner}/{repo}/commits/{ref}/status: get: produces: - application/json tags: - repository summary: Get a commit's combined status, by branch/tag/commit reference operationId: repoGetCombinedStatusByRef 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: name of branch/tag/commit name: ref in: path 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': $ref: '#/responses/CombinedStatus' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/commits/{ref}/statuses: get: produces: - application/json tags: - repository summary: Get a commit's statuses, by branch/tag/commit reference operationId: repoListStatusesByRef 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: name of branch/tag/commit name: ref in: path required: true - enum: - oldest - recentupdate - leastupdate - leastindex - highestindex type: string description: type of sort name: sort in: query - enum: - pending - success - error - failure - warning type: string description: type of state name: state in: query - 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': $ref: '#/responses/CommitStatusList' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/commits/{sha}/pull: get: produces: - application/json tags: - repository summary: Get the pull request of the commit operationId: repoGetCommitPullRequest 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: SHA of the commit to get name: sha in: path required: true responses: '200': $ref: '#/responses/PullRequest' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/compare/{basehead}: get: produces: - application/json tags: - repository summary: Get commit comparison information operationId: repoCompareDiff 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: compare two branches or commits name: basehead in: path required: true responses: '200': $ref: '#/responses/Compare' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/contents: get: produces: - application/json tags: - repository summary: Gets the metadata of all the entries of the root dir operationId: repoGetContentsList 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: The name of the commit/branch/tag. Default the repository’s default branch (usually master) name: ref in: query responses: '200': $ref: '#/responses/ContentsListResponse' '404': $ref: '#/responses/notFound' post: consumes: - application/json produces: - application/json tags: - repository summary: Modify multiple files in a repository operationId: repoChangeFiles 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 required: true schema: $ref: '#/definitions/ChangeFilesOptions' responses: '201': $ref: '#/responses/FilesResponse' '403': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' '409': $ref: '#/responses/conflict' '413': $ref: '#/responses/quotaExceeded' '422': $ref: '#/responses/error' '423': $ref: '#/responses/repoArchivedError' /repos/{owner}/{repo}/contents/{filepath}: get: produces: - application/json tags: - repository summary: Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir operationId: repoGetContents 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: path of the dir, file, symlink or submodule in the repo name: filepath in: path required: true - type: string description: The name of the commit/branch/tag. Default the repository’s default branch (usually master) name: ref in: query responses: '200': $ref: '#/responses/ContentsResponse' '404': $ref: '#/responses/notFound' put: consumes: - application/json produces: - application/json tags: - repository summary: Update a file in a repository operationId: repoUpdateFile 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: path of the file to update name: filepath in: path required: true - name: body in: body required: true schema: $ref: '#/definitions/UpdateFileOptions' responses: '200': $ref: '#/responses/FileResponse' '403': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' '409': $ref: '#/responses/conflict' '413': $ref: '#/responses/quotaExceeded' '422': $ref: '#/responses/error' '423': $ref: '#/responses/repoArchivedError' post: consumes: - application/json produces: - application/json tags: - repository summary: Create a file in a repository operationId: repoCreateFile 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: path of the file to create name: filepath in: path required: true - name: body in: body required: true schema: $ref: '#/definitions/CreateFileOptions' responses: '201': $ref: '#/responses/FileResponse' '403': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' '409': $ref: '#/responses/conflict' '413': $ref: '#/responses/quotaExceeded' '422': $ref: '#/responses/error' '423': $ref: '#/responses/repoArchivedError' delete: consumes: - application/json produces: - application/json tags: - repository summary: Delete a file in a repository operationId: repoDeleteFile 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: path of the file to delete name: filepath in: path required: true - name: body in: body required: true schema: $ref: '#/definitions/DeleteFileOptions' responses: '200': $ref: '#/responses/FileDeleteResponse' '400': $ref: '#/responses/error' '403': $ref: '#/responses/error' '404': $ref: '#/responses/error' '413': $ref: '#/responses/quotaExceeded' '423': $ref: '#/responses/repoArchivedError' /repos/{owner}/{repo}/convert: post: produces: - application/json tags: - repository summary: Convert a mirror repo to a normal repo. operationId: repoConvert parameters: - type: string description: owner of the repo to convert name: owner in: path required: true - type: string description: name of the repo to convert name: repo in: path required: true responses: '200': $ref: '#/responses/Repository' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/diffpatch: post: consumes: - application/json produces: - application/json tags: - repository summary: Apply diff patch to repository operationId: repoApplyDiffPatch 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 required: true schema: $ref: '#/definitions/UpdateFileOptions' responses: '200': $ref: '#/responses/FileResponse' '404': $ref: '#/responses/notFound' '413': $ref: '#/responses/quotaExceeded' '423': $ref: '#/responses/repoArchivedError' /repos/{owner}/{repo}/editorconfig/{filepath}: get: produces: - application/json tags: - repository summary: Get the EditorConfig definitions of a file in a repository operationId: repoGetEditorConfig 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: filepath of file to get name: filepath in: path required: true - type: string description: The name of the commit/branch/tag. Default the repository’s default branch (usually master) name: ref in: query responses: '200': description: definitions schema: type: object additionalProperties: type: string '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/flags: get: produces: - application/json tags: - repository summary: List a repository's flags operationId: repoListFlags 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/StringSlice' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' put: produces: - application/json tags: - repository summary: Replace all flags of a repository operationId: repoReplaceAllFlags 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/ReplaceFlagsOption' responses: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - repository summary: Remove all flags from a repository operationId: repoDeleteAllFlags 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: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/flags/{flag}: get: produces: - application/json tags: - repository summary: Check if a repository has a given flag operationId: repoCheckFlag 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: name of the flag name: flag in: path required: true responses: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' put: produces: - application/json tags: - repository summary: Add a flag to a repository operationId: repoAddFlag 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: name of the flag name: flag in: path required: true responses: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - repository summary: Remove a flag from a repository operationId: repoDeleteFlag 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: name of the flag name: flag in: path required: true responses: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/forks: get: produces: - application/json tags: - repository summary: List a repository's forks operationId: listForks 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: 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': $ref: '#/responses/RepositoryList' '404': $ref: '#/responses/notFound' post: produces: - application/json tags: - repository summary: Fork a repository operationId: createFork parameters: - type: string description: owner of the repo to fork name: owner in: path required: true - type: string description: name of the repo to fork name: repo in: path required: true - name: body in: body schema: $ref: '#/definitions/CreateForkOption' responses: '202': $ref: '#/responses/Repository' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '409': description: The repository with the same name already exists. '413': $ref: '#/responses/quotaExceeded' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/git/blobs: get: produces: - application/json tags: - repository summary: Gets multiple blobs of a repository. operationId: GetBlobs 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: a comma separated list of blob-sha (mind the overall URL-length limit of ~2,083 chars) name: shas in: query required: true responses: '200': $ref: '#/responses/GitBlobList' '400': $ref: '#/responses/error' /repos/{owner}/{repo}/git/blobs/{sha}: get: produces: - application/json tags: - repository summary: Gets the blob of a repository. operationId: GetBlob 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: sha of the blob to retrieve name: sha in: path required: true responses: '200': $ref: '#/responses/GitBlob' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/git/commits/{sha}: get: produces: - application/json tags: - repository summary: Get a single commit from a repository operationId: repoGetSingleCommit 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: a git ref or commit sha name: sha in: path required: true - type: boolean description: include diff stats for every commit (disable for speedup, default 'true') name: stat in: query - type: boolean description: include verification for every commit (disable for speedup, default 'true') name: verification in: query - type: boolean description: include a list of affected files for every commit (disable for speedup, default 'true') name: files in: query responses: '200': $ref: '#/responses/Commit' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/git/commits/{sha}.{diffType}: get: produces: - text/plain tags: - repository summary: Get a commit's diff or patch operationId: repoDownloadCommitDiffOrPatch 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: SHA of the commit to get name: sha in: path required: true - enum: - diff - patch type: string description: whether the output is diff or patch name: diffType in: path required: true responses: '200': $ref: '#/responses/string' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/git/notes/{sha}: get: produces: - application/json tags: - repository summary: Get a note corresponding to a single commit from a repository operationId: repoGetNote 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: a git ref or commit sha name: sha in: path required: true - type: boolean description: include verification for every commit (disable for speedup, default 'true') name: verification in: query - type: boolean description: include a list of affected files for every commit (disable for speedup, default 'true') name: files in: query responses: '200': $ref: '#/responses/Note' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' post: produces: - application/json tags: - repository summary: Set a note corresponding to a single commit from a repository operationId: repoSetNote 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: a git ref or commit sha name: sha in: path required: true - name: body in: body schema: $ref: '#/definitions/NoteOptions' responses: '200': $ref: '#/responses/Note' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' delete: produces: - application/json tags: - repository summary: Removes a note corresponding to a single commit from a repository operationId: repoRemoveNote 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: a git ref or commit sha name: sha in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/git/refs: get: produces: - application/json tags: - repository summary: Get specified ref or filtered repository's refs operationId: repoListAllGitRefs 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/ReferenceList' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/git/refs/{ref}: get: produces: - application/json tags: - repository summary: Get specified ref or filtered repository's refs operationId: repoListGitRefs 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: part or full name of the ref name: ref in: path required: true responses: '200': $ref: '#/responses/ReferenceList' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/git/tags/{sha}: get: produces: - application/json tags: - repository summary: Gets the tag object of an annotated tag (not lightweight tags) operationId: GetAnnotatedTag 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: sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. name: sha in: path required: true responses: '200': $ref: '#/responses/AnnotatedTag' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/git/trees/{sha}: get: produces: - application/json tags: - repository summary: Gets the tree of a repository. operationId: GetTree 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: sha of the commit name: sha in: path required: true - type: boolean description: show all directories and files name: recursive in: query - type: integer description: page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page name: page in: query - type: integer description: number of items per page name: per_page in: query responses: '200': $ref: '#/responses/GitTreeResponse' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/hooks: get: produces: - application/json tags: - repository summary: List the hooks in a repository operationId: repoListHooks 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: 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': $ref: '#/responses/HookList' '404': $ref: '#/responses/notFound' post: consumes: - application/json produces: - application/json tags: - repository summary: Create a hook operationId: repoCreateHook 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/CreateHookOption' responses: '201': $ref: '#/responses/Hook' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/hooks/git: get: produces: - application/json tags: - repository summary: List the Git hooks in a repository operationId: repoListGitHooks 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/GitHookList' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/hooks/git/{id}: get: produces: - application/json tags: - repository summary: Get a Git hook operationId: repoGetGitHook 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: id of the hook to get name: id in: path required: true responses: '200': $ref: '#/responses/GitHook' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - repository summary: Delete a Git hook in a repository operationId: repoDeleteGitHook 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: id of the hook to get name: id in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' patch: produces: - application/json tags: - repository summary: Edit a Git hook in a repository operationId: repoEditGitHook 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: id of the hook to get name: id in: path required: true - name: body in: body schema: $ref: '#/definitions/EditGitHookOption' responses: '200': $ref: '#/responses/GitHook' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/hooks/{id}: get: produces: - application/json tags: - repository summary: Get a hook operationId: repoGetHook 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: integer format: int64 description: id of the hook to get name: id in: path required: true responses: '200': $ref: '#/responses/Hook' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - repository summary: Delete a hook in a repository operationId: repoDeleteHook 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: integer format: int64 description: id of the hook to delete name: id in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' patch: produces: - application/json tags: - repository summary: Edit a hook in a repository operationId: repoEditHook 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: integer format: int64 description: index of the hook name: id in: path required: true - name: body in: body schema: $ref: '#/definitions/EditHookOption' responses: '200': $ref: '#/responses/Hook' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/hooks/{id}/tests: post: produces: - application/json tags: - repository summary: Test a push webhook operationId: repoTestHook 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: integer format: int64 description: id of the hook to test name: id in: path required: true - type: string description: The name of the commit/branch/tag, indicates which commit will be loaded to the webhook payload. name: ref in: query responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/issue_config: get: produces: - application/json tags: - repository summary: Returns the issue config for a repo operationId: repoGetIssueConfig 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/RepoIssueConfig' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/issue_config/validate: get: produces: - application/json tags: - repository summary: Returns the validation information for a issue config operationId: repoValidateIssueConfig 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/RepoIssueConfigValidation' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/issue_templates: get: produces: - application/json tags: - repository summary: Get available issue templates for a repository operationId: repoGetIssueTemplates 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/IssueTemplates' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/issues/pinned: get: produces: - application/json tags: - repository summary: List a repo's pinned issues operationId: repoListPinnedIssues 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/IssueListWithoutPagination' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/keys: get: produces: - application/json tags: - repository summary: List a repository's keys operationId: repoListKeys 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: integer description: the key_id to search for name: key_id in: query - type: string description: fingerprint of the key name: fingerprint in: query - 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': $ref: '#/responses/DeployKeyList' '404': $ref: '#/responses/notFound' post: consumes: - application/json produces: - application/json tags: - repository summary: Add a key to a repository operationId: repoCreateKey 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/CreateKeyOption' responses: '201': $ref: '#/responses/DeployKey' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/keys/{id}: get: produces: - application/json tags: - repository summary: Get a repository's key by id operationId: repoGetKey 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: integer format: int64 description: id of the key to get name: id in: path required: true responses: '200': $ref: '#/responses/DeployKey' '404': $ref: '#/responses/notFound' delete: tags: - repository summary: Delete a key from a repository operationId: repoDeleteKey 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: integer format: int64 description: id of the key to delete name: id in: path required: true responses: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/languages: get: produces: - application/json tags: - repository summary: Get languages and number of bytes of code written operationId: repoGetLanguages 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/LanguageStatistics' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/media/{filepath}: get: produces: - application/octet-stream tags: - repository summary: Get a file or it's LFS object from a repository operationId: repoGetRawFileOrLFS 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: filepath of the file to get name: filepath in: path required: true - type: string description: The name of the commit/branch/tag. Default the repository’s default branch (usually master) name: ref in: query responses: '200': description: Returns raw file content. schema: type: file '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/mirror-sync: post: produces: - application/json tags: - repository summary: Sync a mirrored repository operationId: repoMirrorSync parameters: - type: string description: owner of the repo to sync name: owner in: path required: true - type: string description: name of the repo to sync name: repo in: path required: true responses: '200': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '413': $ref: '#/responses/quotaExceeded' /repos/{owner}/{repo}/new_pin_allowed: get: produces: - application/json tags: - repository summary: Returns if new Issue Pins are allowed operationId: repoNewPinAllowed 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/RepoNewIssuePinsAllowed' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/pulls: get: produces: - application/json tags: - repository summary: List a repo's pull requests. If a pull request is selected but fails to be retrieved for any reason, it will be a null value in the list of results. operationId: repoListPullRequests 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 - enum: - open - closed - all type: string default: open description: State of pull request name: state in: query - enum: - oldest - recentupdate - recentclose - leastupdate - mostcomment - leastcomment - priority type: string description: Type of sort name: sort in: query - type: integer format: int64 description: ID of the milestone name: milestone in: query - type: array items: type: integer format: int64 collectionFormat: multi description: Label IDs name: labels in: query - type: string description: Filter by pull request author name: poster in: query - type: string description: Filter by base branch name name: base in: query - type: string description: Filter by head branch name name: head in: query - minimum: 1 type: integer default: 1 description: Page number of results to return (1-based) name: page in: query - minimum: 0 type: integer description: Page size of results name: limit in: query responses: '200': $ref: '#/responses/PullRequestList' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' '500': $ref: '#/responses/error' post: consumes: - application/json produces: - application/json tags: - repository summary: Create a pull request operationId: repoCreatePullRequest 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/CreatePullRequestOption' responses: '201': $ref: '#/responses/PullRequest' '404': $ref: '#/responses/notFound' '409': $ref: '#/responses/error' '413': $ref: '#/responses/quotaExceeded' '422': $ref: '#/responses/validationError' '423': $ref: '#/responses/repoArchivedError' /repos/{owner}/{repo}/pulls/pinned: get: produces: - application/json tags: - repository summary: List a repo's pinned pull requests operationId: repoListPinnedPullRequests 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/PullRequestList' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/pulls/{base}/{head}: get: produces: - application/json tags: - repository summary: Get a pull request by base and head operationId: repoGetPullRequestByBaseHead 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: base of the pull request to get name: base in: path required: true - type: string description: head of the pull request to get name: head in: path required: true responses: '200': $ref: '#/responses/PullRequest' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/pulls/{index}: get: produces: - application/json tags: - repository summary: Get a pull request operationId: repoGetPullRequest 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: integer format: int64 description: index of the pull request to get name: index in: path required: true responses: '200': $ref: '#/responses/PullRequest' '404': $ref: '#/responses/notFound' patch: consumes: - application/json produces: - application/json tags: - repository summary: Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. operationId: repoEditPullRequest 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: integer format: int64 description: index of the pull request to edit name: index in: path required: true - name: body in: body schema: $ref: '#/definitions/EditPullRequestOption' responses: '201': $ref: '#/responses/PullRequest' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '409': $ref: '#/responses/error' '412': $ref: '#/responses/error' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/pulls/{index}.{diffType}: get: produces: - text/plain tags: - repository summary: Get a pull request diff or patch operationId: repoDownloadPullDiffOrPatch 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: integer format: int64 description: index of the pull request to get name: index in: path required: true - enum: - diff - patch type: string description: whether the output is diff or patch name: diffType in: path required: true - type: boolean description: whether to include binary file changes. if true, the diff is applicable with `git apply` name: binary in: query responses: '200': $ref: '#/responses/string' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/pulls/{index}/commits: get: produces: - application/json tags: - repository summary: Get commits for a pull request operationId: repoGetPullRequestCommits 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: integer format: int64 description: index of the pull request to get name: index in: path 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 - type: boolean description: include verification for every commit (disable for speedup, default 'true') name: verification in: query - type: boolean description: include a list of affected files for every commit (disable for speedup, default 'true') name: files in: query responses: '200': $ref: '#/responses/CommitList' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/pulls/{index}/files: get: produces: - application/json tags: - repository summary: Get changed files for a pull request operationId: repoGetPullRequestFiles 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: integer format: int64 description: index of the pull request to get name: index in: path required: true - type: string description: skip to given file name: skip-to in: query - enum: - ignore-all - ignore-change - ignore-eol - show-all type: string description: whitespace behavior name: whitespace in: query - 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': $ref: '#/responses/ChangedFileListWithPagination' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/pulls/{index}/merge: get: produces: - application/json tags: - repository summary: Check if a pull request has been merged operationId: repoPullRequestIsMerged 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: integer format: int64 description: index of the pull request name: index in: path required: true responses: '204': description: pull request has been merged '404': description: pull request has not been merged post: produces: - application/json tags: - repository summary: Merge a pull request operationId: repoMergePullRequest 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: integer format: int64 description: index of the pull request to merge name: index in: path required: true - name: body in: body schema: $ref: '#/definitions/MergePullRequestOption' responses: '200': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' '405': $ref: '#/responses/empty' '409': $ref: '#/responses/error' '413': $ref: '#/responses/quotaExceeded' '423': $ref: '#/responses/repoArchivedError' delete: produces: - application/json tags: - repository summary: Cancel the scheduled auto merge for the given pull request operationId: repoCancelScheduledAutoMerge 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: integer format: int64 description: index of the pull request to merge name: index in: path required: true responses: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '423': $ref: '#/responses/repoArchivedError' /repos/{owner}/{repo}/pulls/{index}/requested_reviewers: post: produces: - application/json tags: - repository summary: Create review requests for a pull request operationId: repoCreatePullReviewRequests 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: integer format: int64 description: index of the pull request name: index in: path required: true - name: body in: body required: true schema: $ref: '#/definitions/PullReviewRequestOptions' responses: '201': $ref: '#/responses/PullReviewListWithoutPagination' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' delete: produces: - application/json tags: - repository summary: Cancel review requests for a pull request operationId: repoDeletePullReviewRequests 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: integer format: int64 description: index of the pull request name: index in: path required: true - name: body in: body required: true schema: $ref: '#/definitions/PullReviewRequestOptions' responses: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/pulls/{index}/reviews: get: produces: - application/json tags: - repository summary: List all reviews for a pull request operationId: repoListPullReviews 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: integer format: int64 description: index of the pull request name: index in: path 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': $ref: '#/responses/PullReviewList' '404': $ref: '#/responses/notFound' post: produces: - application/json tags: - repository summary: Create a review to an pull request operationId: repoCreatePullReview 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: integer format: int64 description: index of the pull request name: index in: path required: true - name: body in: body required: true schema: $ref: '#/definitions/CreatePullReviewOptions' responses: '200': $ref: '#/responses/PullReview' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/pulls/{index}/reviews/{id}: get: produces: - application/json tags: - repository summary: Get a specific review for a pull request operationId: repoGetPullReview 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: integer format: int64 description: index of the pull request name: index in: path required: true - type: integer format: int64 description: id of the review name: id in: path required: true responses: '200': $ref: '#/responses/PullReview' '404': $ref: '#/responses/notFound' post: produces: - application/json tags: - repository summary: Submit a pending review to an pull request operationId: repoSubmitPullReview 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: integer format: int64 description: index of the pull request name: index in: path required: true - type: integer format: int64 description: id of the review name: id in: path required: true - name: body in: body required: true schema: $ref: '#/definitions/SubmitPullReviewOptions' responses: '200': $ref: '#/responses/PullReview' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' delete: produces: - application/json tags: - repository summary: Delete a specific review from a pull request operationId: repoDeletePullReview 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: integer format: int64 description: index of the pull request name: index in: path required: true - type: integer format: int64 description: id of the review name: id in: path required: true responses: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments: get: produces: - application/json tags: - repository summary: Get a specific review for a pull request operationId: repoGetPullReviewComments 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: integer format: int64 description: index of the pull request name: index in: path required: true - type: integer format: int64 description: id of the review name: id in: path required: true responses: '200': $ref: '#/responses/PullReviewCommentList' '404': $ref: '#/responses/notFound' post: produces: - application/json tags: - repository summary: Add a new comment to a pull request review operationId: repoCreatePullReviewComment 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: integer format: int64 description: index of the pull request name: index in: path required: true - type: integer format: int64 description: id of the review name: id in: path required: true - name: body in: body required: true schema: $ref: '#/definitions/CreatePullReviewCommentOptions' responses: '200': $ref: '#/responses/PullReviewComment' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments/{comment}: get: produces: - application/json tags: - repository summary: Get a pull review comment operationId: repoGetPullReviewComment 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: integer format: int64 description: index of the pull request name: index in: path required: true - type: integer format: int64 description: id of the review name: id in: path required: true - type: integer format: int64 description: id of the comment name: comment in: path required: true responses: '200': $ref: '#/responses/PullReviewComment' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - repository summary: Delete a pull review comment operationId: repoDeletePullReviewComment 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: integer format: int64 description: index of the pull request name: index in: path required: true - type: integer format: int64 description: id of the review name: id in: path required: true - type: integer format: int64 description: id of the comment name: comment in: path required: true responses: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals: post: produces: - application/json tags: - repository summary: Dismiss a review for a pull request operationId: repoDismissPullReview 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: integer format: int64 description: index of the pull request name: index in: path required: true - type: integer format: int64 description: id of the review name: id in: path required: true - name: body in: body required: true schema: $ref: '#/definitions/DismissPullReviewOptions' responses: '200': $ref: '#/responses/PullReview' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals: post: produces: - application/json tags: - repository summary: Cancel to dismiss a review for a pull request operationId: repoUnDismissPullReview 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: integer format: int64 description: index of the pull request name: index in: path required: true - type: integer format: int64 description: id of the review name: id in: path required: true responses: '200': $ref: '#/responses/PullReview' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/pulls/{index}/update: post: produces: - application/json tags: - repository summary: Merge PR's baseBranch into headBranch operationId: repoUpdatePullRequest 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: integer format: int64 description: index of the pull request to get name: index in: path required: true - enum: - merge - rebase type: string description: how to update pull request name: style in: query responses: '200': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '409': $ref: '#/responses/error' '413': $ref: '#/responses/quotaExceeded' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/push_mirrors: get: produces: - application/json tags: - repository summary: Get all push mirrors of the repository operationId: repoListPushMirrors 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: 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': $ref: '#/responses/PushMirrorList' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' post: consumes: - application/json produces: - application/json tags: - repository summary: Set up a new push mirror in a repository operationId: repoAddPushMirror 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/CreatePushMirrorOption' responses: '200': $ref: '#/responses/PushMirror' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '413': $ref: '#/responses/quotaExceeded' /repos/{owner}/{repo}/push_mirrors-sync: post: produces: - application/json tags: - repository summary: Sync all push mirrored repository operationId: repoPushMirrorSync parameters: - type: string description: owner of the repo to sync name: owner in: path required: true - type: string description: name of the repo to sync name: repo in: path required: true responses: '200': $ref: '#/responses/empty' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '413': $ref: '#/responses/quotaExceeded' /repos/{owner}/{repo}/push_mirrors/{name}: get: produces: - application/json tags: - repository summary: Get push mirror of the repository by remoteName operationId: repoGetPushMirrorByRemoteName 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: remote name of push mirror name: name in: path required: true responses: '200': $ref: '#/responses/PushMirror' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - repository summary: Remove a push mirror from a repository by remoteName operationId: repoDeletePushMirror 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: remote name of the pushMirror name: name in: path required: true responses: '204': $ref: '#/responses/empty' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/raw/{filepath}: get: produces: - application/octet-stream tags: - repository summary: Get a file from a repository operationId: repoGetRawFile 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: filepath of the file to get name: filepath in: path required: true - type: string description: The name of the commit/branch/tag. Default the repository’s default branch (usually master) name: ref in: query responses: '200': description: Returns raw file content. schema: type: file '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/releases: get: produces: - application/json tags: - repository summary: List a repo's releases operationId: repoListReleases 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: boolean description: filter (exclude / include) drafts, if you dont have repo write access none will show name: draft in: query - type: boolean description: filter (exclude / include) pre-releases name: pre-release in: query - type: string description: Search string name: q in: query - 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': $ref: '#/responses/ReleaseList' '404': $ref: '#/responses/notFound' post: consumes: - application/json produces: - application/json tags: - repository summary: Create a release operationId: repoCreateRelease 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/CreateReleaseOption' responses: '201': $ref: '#/responses/Release' '404': $ref: '#/responses/notFound' '409': $ref: '#/responses/error' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/releases/latest: get: produces: - application/json tags: - repository summary: Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at operationId: repoGetLatestRelease 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/Release' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/releases/tags/{tag}: get: produces: - application/json tags: - repository summary: Get a release by tag name operationId: repoGetReleaseByTag 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: tag name of the release to get name: tag in: path required: true responses: '200': $ref: '#/responses/Release' '404': $ref: '#/responses/notFound' delete: tags: - repository summary: Delete a release by tag name operationId: repoDeleteReleaseByTag 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: tag name of the release to delete name: tag in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/releases/{id}: get: produces: - application/json tags: - repository summary: Get a release operationId: repoGetRelease 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: integer format: int64 description: id of the release to get name: id in: path required: true responses: '200': $ref: '#/responses/Release' '404': $ref: '#/responses/notFound' delete: tags: - repository summary: Delete a release operationId: repoDeleteRelease 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: integer format: int64 description: id of the release to delete name: id in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' patch: consumes: - application/json produces: - application/json tags: - repository summary: Update a release operationId: repoEditRelease 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: integer format: int64 description: id of the release to edit name: id in: path required: true - name: body in: body schema: $ref: '#/definitions/EditReleaseOption' responses: '200': $ref: '#/responses/Release' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/releases/{id}/assets: get: produces: - application/json tags: - repository summary: List release's attachments operationId: repoListReleaseAttachments 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: integer format: int64 description: id of the release name: id in: path required: true responses: '200': $ref: '#/responses/AttachmentList' '404': $ref: '#/responses/notFound' post: consumes: - multipart/form-data - application/octet-stream produces: - application/json tags: - repository summary: Create a release attachment operationId: repoCreateReleaseAttachment 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: integer format: int64 description: id of the release name: id in: path required: true - type: string description: name of the attachment name: name in: query - type: file description: attachment to upload (this parameter is incompatible with `external_url`) name: attachment in: formData - type: string description: url to external asset (this parameter is incompatible with `attachment`) name: external_url in: formData responses: '201': $ref: '#/responses/Attachment' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' '413': $ref: '#/responses/quotaExceeded' /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}: get: produces: - application/json tags: - repository summary: Get a release attachment operationId: repoGetReleaseAttachment 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: integer format: int64 description: id of the release name: id in: path required: true - type: integer format: int64 description: id of the attachment to get name: attachment_id in: path required: true responses: '200': $ref: '#/responses/Attachment' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - repository summary: Delete a release attachment operationId: repoDeleteReleaseAttachment 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: integer format: int64 description: id of the release name: id in: path required: true - type: integer format: int64 description: id of the attachment to delete name: attachment_id in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' patch: consumes: - application/json produces: - application/json tags: - repository summary: Edit a release attachment operationId: repoEditReleaseAttachment 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: integer format: int64 description: id of the release name: id in: path required: true - type: integer format: int64 description: id of the attachment to edit name: attachment_id in: path required: true - name: body in: body schema: $ref: '#/definitions/EditAttachmentOptions' responses: '201': $ref: '#/responses/Attachment' '404': $ref: '#/responses/notFound' '413': $ref: '#/responses/quotaExceeded' /repos/{owner}/{repo}/reviewers: get: produces: - application/json tags: - repository summary: Return all users that can be requested to review in this repo operationId: repoGetReviewers 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/UserList' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/signing-key.gpg: get: produces: - text/plain tags: - repository summary: Get signing-key.gpg for given repository operationId: repoSigningKey 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': description: GPG armored public key schema: type: string /repos/{owner}/{repo}/stargazers: get: produces: - application/json tags: - repository summary: List a repo's stargazers operationId: repoListStargazers 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: 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': $ref: '#/responses/UserList' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/statuses/{sha}: get: produces: - application/json tags: - repository summary: Get a commit's statuses operationId: repoListStatuses 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: sha of the commit name: sha in: path required: true - enum: - oldest - recentupdate - leastupdate - leastindex - highestindex type: string description: type of sort name: sort in: query - enum: - pending - success - error - failure - warning type: string description: type of state name: state in: query - 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': $ref: '#/responses/CommitStatusList' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' post: produces: - application/json tags: - repository summary: Create a commit status operationId: repoCreateStatus 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: sha of the commit name: sha in: path required: true - name: body in: body schema: $ref: '#/definitions/CreateStatusOption' responses: '201': $ref: '#/responses/CommitStatus' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/subscribers: get: produces: - application/json tags: - repository summary: List a repo's watchers operationId: repoListSubscribers 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: 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': $ref: '#/responses/UserList' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/subscription: get: tags: - repository summary: Check if the current user is watching a repo operationId: userCurrentCheckSubscription 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/WatchInfo' '404': description: User is not watching this repo or repo do not exist put: tags: - repository summary: Watch a repo operationId: userCurrentPutSubscription 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/WatchInfo' '404': $ref: '#/responses/notFound' delete: tags: - repository summary: Unwatch a repo operationId: userCurrentDeleteSubscription 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: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/sync_fork: get: produces: - application/json tags: - repository summary: Gets information about syncing the fork default branch with the base branch operationId: repoSyncForkDefaultInfo 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/SyncForkInfo' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' post: produces: - application/json tags: - repository summary: Syncs the default branch of a fork with the base branch operationId: repoSyncForkDefault 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: '204': $ref: '#/responses/empty' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/sync_fork/{branch}: get: produces: - application/json tags: - repository summary: Gets information about syncing a fork branch with the base branch operationId: repoSyncForkBranchInfo 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: The branch name: branch in: path required: true responses: '200': $ref: '#/responses/SyncForkInfo' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' post: produces: - application/json tags: - repository summary: Syncs a fork branch with the base branch operationId: repoSyncForkBranch 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: The branch name: branch in: path required: true responses: '204': $ref: '#/responses/empty' '400': $ref: '#/responses/error' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/tag_protections: get: produces: - application/json tags: - repository summary: List tag protections for a repository operationId: repoListTagProtection 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/TagProtectionList' post: consumes: - application/json produces: - application/json tags: - repository summary: Create a tag protections for a repository operationId: repoCreateTagProtection 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/CreateTagProtectionOption' responses: '201': $ref: '#/responses/TagProtection' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' '423': $ref: '#/responses/repoArchivedError' /repos/{owner}/{repo}/tag_protections/{id}: get: produces: - application/json tags: - repository summary: Get a specific tag protection for the repository operationId: repoGetTagProtection 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: integer format: int64 description: id of the tag protect to get name: id in: path required: true responses: '200': $ref: '#/responses/TagProtection' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - repository summary: Delete a specific tag protection for the repository operationId: repoDeleteTagProtection 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: integer format: int64 description: id of protected tag name: id in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' patch: consumes: - application/json produces: - application/json tags: - repository summary: Edit a tag protections for a repository. Only fields that are set will be changed operationId: repoEditTagProtection 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: integer format: int64 description: id of protected tag name: id in: path required: true - name: body in: body schema: $ref: '#/definitions/EditTagProtectionOption' responses: '200': $ref: '#/responses/TagProtection' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' '423': $ref: '#/responses/repoArchivedError' /repos/{owner}/{repo}/tags: get: produces: - application/json tags: - repository summary: List a repository's tags operationId: repoListTags 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: integer description: page number of results to return (1-based) name: page in: query - type: integer description: page size of results, default maximum page size is 50 name: limit in: query responses: '200': $ref: '#/responses/TagList' '404': $ref: '#/responses/notFound' post: produces: - application/json tags: - repository summary: Create a new git tag in a repository operationId: repoCreateTag 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/CreateTagOption' responses: '201': $ref: '#/responses/Tag' '404': $ref: '#/responses/notFound' '405': $ref: '#/responses/empty' '409': $ref: '#/responses/conflict' '413': $ref: '#/responses/quotaExceeded' '422': $ref: '#/responses/validationError' '423': $ref: '#/responses/repoArchivedError' /repos/{owner}/{repo}/tags/{tag}: get: produces: - application/json tags: - repository summary: Get the tag of a repository by tag name operationId: repoGetTag 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: name of tag name: tag in: path required: true responses: '200': $ref: '#/responses/Tag' '404': $ref: '#/responses/notFound' delete: produces: - application/json tags: - repository summary: Delete a repository's tag by name operationId: repoDeleteTag 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: name of tag to delete name: tag in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' '405': $ref: '#/responses/empty' '409': $ref: '#/responses/conflict' '422': $ref: '#/responses/validationError' '423': $ref: '#/responses/repoArchivedError' /repos/{owner}/{repo}/teams: get: produces: - application/json tags: - repository summary: List a repository's teams operationId: repoListTeams 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/TeamListWithoutPagination' '404': $ref: '#/responses/notFound' '405': $ref: '#/responses/error' /repos/{owner}/{repo}/teams/{team}: get: produces: - application/json tags: - repository summary: Check if a team is assigned to a repository operationId: repoCheckTeam 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: team name name: team in: path required: true responses: '200': $ref: '#/responses/Team' '404': $ref: '#/responses/notFound' '405': $ref: '#/responses/error' put: produces: - application/json tags: - repository summary: Add a team to a repository operationId: repoAddTeam 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: team name name: team in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' '405': $ref: '#/responses/error' '422': $ref: '#/responses/validationError' delete: produces: - application/json tags: - repository summary: Delete a team from a repository operationId: repoDeleteTeam 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: team name name: team in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' '405': $ref: '#/responses/error' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/times: get: produces: - application/json tags: - repository summary: List a repo's tracked times operationId: repoTrackedTimes 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: optional filter by user (available for issue managers) name: user in: query - type: string format: date-time description: Only show times updated after the given time. This is a timestamp in RFC 3339 format name: since in: query - type: string format: date-time description: Only show times updated before the given time. This is a timestamp in RFC 3339 format name: before in: query - 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': $ref: '#/responses/TrackedTimeList' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/times/{user}: get: produces: - application/json tags: - repository summary: List a user's tracked times in a repo operationId: userTrackedTimes deprecated: true 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: username of user name: user in: path required: true responses: '200': $ref: '#/responses/TrackedTimeListWithoutPagination' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/topics: get: produces: - application/json tags: - repository summary: Get list of topics that a repository has operationId: repoListTopics 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: 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': $ref: '#/responses/TopicNames' '404': $ref: '#/responses/notFound' put: produces: - application/json tags: - repository summary: Replace list of topics for a repository operationId: repoUpdateTopics 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/RepoTopicOptions' responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/invalidTopicsError' /repos/{owner}/{repo}/topics/{topic}: put: produces: - application/json tags: - repository summary: Add a topic to a repository operationId: repoAddTopic 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: name of the topic to add name: topic in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/invalidTopicsError' delete: produces: - application/json tags: - repository summary: Delete a topic from a repository operationId: repoDeleteTopic 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: name of the topic to delete name: topic in: path required: true responses: '204': $ref: '#/responses/empty' '404': $ref: '#/responses/notFound' '422': $ref: '#/responses/invalidTopicsError' /repos/{owner}/{repo}/transfer: post: produces: - application/json tags: - repository summary: Transfer a repo ownership operationId: repoTransfer parameters: - type: string description: owner of the repo to transfer name: owner in: path required: true - type: string description: name of the repo to transfer name: repo in: path required: true - description: Transfer Options name: body in: body required: true schema: $ref: '#/definitions/TransferRepoOption' responses: '202': $ref: '#/responses/Repository' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '413': $ref: '#/responses/quotaExceeded' '422': $ref: '#/responses/validationError' /repos/{owner}/{repo}/transfer/accept: post: produces: - application/json tags: - repository summary: Accept a repo transfer operationId: acceptRepoTransfer parameters: - type: string description: owner of the repo to transfer name: owner in: path required: true - type: string description: name of the repo to transfer name: repo in: path required: true responses: '202': $ref: '#/responses/Repository' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '413': $ref: '#/responses/quotaExceeded' /repos/{owner}/{repo}/transfer/reject: post: produces: - application/json tags: - repository summary: Reject a repo transfer operationId: rejectRepoTransfer parameters: - type: string description: owner of the repo to transfer name: owner in: path required: true - type: string description: name of the repo to transfer name: repo in: path required: true responses: '200': $ref: '#/responses/Repository' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/wiki/new: post: consumes: - application/json tags: - repository summary: Create a wiki page operationId: repoCreateWikiPage 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/CreateWikiPageOptions' responses: '201': $ref: '#/responses/WikiPage' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '413': $ref: '#/responses/quotaExceeded' '423': $ref: '#/responses/repoArchivedError' /repos/{owner}/{repo}/wiki/page/{pageName}: get: produces: - application/json tags: - repository summary: Get a wiki page operationId: repoGetWikiPage 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: name of the page name: pageName in: path required: true responses: '200': $ref: '#/responses/WikiPage' '404': $ref: '#/responses/notFound' delete: tags: - repository summary: Delete a wiki page operationId: repoDeleteWikiPage 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: name of the page name: pageName in: path required: true responses: '204': $ref: '#/responses/empty' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '423': $ref: '#/responses/repoArchivedError' patch: consumes: - application/json tags: - repository summary: Edit a wiki page operationId: repoEditWikiPage 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: name of the page name: pageName in: path required: true - name: body in: body schema: $ref: '#/definitions/CreateWikiPageOptions' responses: '200': $ref: '#/responses/WikiPage' '400': $ref: '#/responses/error' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '413': $ref: '#/responses/quotaExceeded' '423': $ref: '#/responses/repoArchivedError' /repos/{owner}/{repo}/wiki/pages: get: produces: - application/json tags: - repository summary: Get all wiki pages operationId: repoGetWikiPages 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: 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': $ref: '#/responses/WikiPageList' '404': $ref: '#/responses/notFound' /repos/{owner}/{repo}/wiki/revisions/{pageName}: get: produces: - application/json tags: - repository summary: Get revisions of a wiki page operationId: repoGetWikiPageRevisions 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: name of the page name: pageName in: path required: true - type: integer description: page number of results to return (1-based) name: page in: query responses: '200': $ref: '#/responses/WikiCommitList' '404': $ref: '#/responses/notFound' /repos/{template_owner}/{template_repo}/generate: post: consumes: - application/json produces: - application/json tags: - repository summary: Create a repository using a template operationId: generateRepo parameters: - type: string description: name of the template repository owner name: template_owner in: path required: true - type: string description: name of the template repository name: template_repo in: path required: true - name: body in: body schema: $ref: '#/definitions/GenerateRepoOption' responses: '201': $ref: '#/responses/Repository' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' '409': description: The repository with the same name already exists. '413': $ref: '#/responses/quotaExceeded' '422': $ref: '#/responses/validationError' /repositories/{id}: get: produces: - application/json tags: - repository summary: Get a repository by id operationId: repoGetByID parameters: - type: integer format: int64 description: id of the repo to get name: id in: path required: true responses: '200': $ref: '#/responses/Repository' '404': $ref: '#/responses/notFound' /topics/search: get: produces: - application/json tags: - repository summary: Search for topics by keyword operationId: topicSearch parameters: - type: string description: keyword to search for 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 of a successful search schema: type: object title: TopicSearchResults properties: topics: type: array items: $ref: '#/definitions/TopicResponse' '403': $ref: '#/responses/forbidden' '404': $ref: '#/responses/notFound' /user/repos: post: consumes: - application/json produces: - application/json tags: - repository summary: Create a repository operationId: createCurrentUserRepo parameters: - name: body in: body schema: $ref: '#/definitions/CreateRepoOption' responses: '201': $ref: '#/responses/Repository' '400': $ref: '#/responses/error' '401': $ref: '#/responses/unauthorized' '403': $ref: '#/responses/forbidden' '409': description: The repository with the same name already exists. '413': $ref: '#/responses/quotaExceeded' '422': $ref: '#/responses/validationError' definitions: Team: description: Team represents a team in an organization type: object properties: can_create_org_repo: type: boolean x-go-name: CanCreateOrgRepo description: type: string x-go-name: Description id: type: integer format: int64 x-go-name: ID includes_all_repositories: type: boolean x-go-name: IncludesAllRepositories name: type: string x-go-name: Name organization: $ref: '#/definitions/Organization' permission: type: string enum: - none - read - write - admin - owner x-go-name: Permission units: type: array items: type: string x-go-name: Units example: - repo.code - repo.issues - repo.ext_issues - repo.wiki - repo.pulls - repo.releases - repo.projects - repo.ext_wiki units_map: type: object additionalProperties: type: string x-go-name: UnitsMap example: repo.actions: none repo.code: read repo.ext_issues: none repo.ext_wiki: none repo.issues: write repo.packages: none repo.projects: none repo.pulls: owner repo.releases: none repo.wiki: admin x-go-package: forgejo.org/modules/structs ChangeFilesOptions: description: 'ChangeFilesOptions options for creating, updating or deleting multiple files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)' type: object required: - files properties: author: $ref: '#/definitions/Identity' branch: description: branch (optional) to base this file from. if not given, the default branch is used type: string x-go-name: BranchName committer: $ref: '#/definitions/Identity' dates: $ref: '#/definitions/CommitDateOptions' files: description: list of file operations type: array items: $ref: '#/definitions/ChangeFileOperation' x-go-name: Files force_overwrite_new_branch: description: (optional) will do a force-push if the new branch already exists type: boolean x-go-name: ForceOverwriteNewBranch message: description: message (optional) for the commit of this file. if not supplied, a default message will be used type: string x-go-name: Message new_branch: description: new_branch (optional) will make a new branch from `branch` before creating the file type: string x-go-name: NewBranchName signoff: description: Add a Signed-off-by trailer by the committer at the end of the commit log message. type: boolean x-go-name: Signoff x-go-package: forgejo.org/modules/structs CommitMeta: type: object title: CommitMeta contains meta information of a commit in terms of API. properties: created: type: string format: date-time x-go-name: Created sha: type: string x-go-name: SHA url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs APIUnauthorizedError: type: object properties: message: type: string x-go-name: Message url: type: string x-go-name: URL x-go-package: forgejo.org/services/context Commit: type: object title: Commit contains information generated from a Git commit. properties: author: $ref: '#/definitions/User' commit: $ref: '#/definitions/RepoCommit' committer: $ref: '#/definitions/User' created: type: string format: date-time x-go-name: Created files: type: array items: $ref: '#/definitions/CommitAffectedFiles' x-go-name: Files html_url: type: string x-go-name: HTMLURL parents: type: array items: $ref: '#/definitions/CommitMeta' x-go-name: Parents sha: type: string x-go-name: SHA stats: $ref: '#/definitions/CommitStats' url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs APIValidationError: type: object properties: message: type: string x-go-name: Message url: type: string x-go-name: URL x-go-package: forgejo.org/services/context TopicName: description: TopicName a list of repo topic names type: object properties: topics: type: array items: type: string x-go-name: TopicNames x-go-package: forgejo.org/modules/structs CreateStatusOption: description: CreateStatusOption holds the information needed to create a new CommitStatus for a Commit type: object properties: context: type: string x-go-name: Context description: type: string x-go-name: Description state: $ref: '#/definitions/CommitStatusState' target_url: type: string x-go-name: TargetURL x-go-package: forgejo.org/modules/structs Release: description: Release represents a repository release type: object properties: archive_download_count: $ref: '#/definitions/TagArchiveDownloadCount' assets: type: array items: $ref: '#/definitions/Attachment' x-go-name: Attachments author: $ref: '#/definitions/User' body: type: string x-go-name: Note created_at: type: string format: date-time x-go-name: CreatedAt draft: type: boolean x-go-name: IsDraft hide_archive_links: type: boolean x-go-name: HideArchiveLinks html_url: type: string x-go-name: HTMLURL id: type: integer format: int64 x-go-name: ID name: type: string x-go-name: Title prerelease: type: boolean x-go-name: IsPrerelease published_at: type: string format: date-time x-go-name: PublishedAt tag_name: type: string x-go-name: TagName tarball_url: type: string x-go-name: TarURL target_commitish: type: string x-go-name: Target upload_url: type: string x-go-name: UploadURL url: type: string x-go-name: URL zipball_url: type: string x-go-name: ZipURL x-go-package: forgejo.org/modules/structs EditAttachmentOptions: description: EditAttachmentOptions options for editing attachments type: object properties: browser_download_url: description: (Can only be set if existing attachment is of external type) type: string x-go-name: DownloadURL name: type: string x-go-name: Name x-go-package: forgejo.org/modules/structs Issue: description: Issue represents an issue in a repository type: object properties: assets: type: array items: $ref: '#/definitions/Attachment' x-go-name: Attachments assignee: $ref: '#/definitions/User' assignees: type: array items: $ref: '#/definitions/User' x-go-name: Assignees body: type: string x-go-name: Body closed_at: type: string format: date-time x-go-name: Closed comments: type: integer format: int64 x-go-name: Comments created_at: type: string format: date-time x-go-name: Created due_date: type: string format: date-time x-go-name: Deadline html_url: type: string x-go-name: HTMLURL id: type: integer format: int64 x-go-name: ID is_locked: type: boolean x-go-name: IsLocked labels: type: array items: $ref: '#/definitions/Label' x-go-name: Labels milestone: $ref: '#/definitions/Milestone' number: type: integer format: int64 x-go-name: Index original_author: type: string x-go-name: OriginalAuthor original_author_id: type: integer format: int64 x-go-name: OriginalAuthorID pin_order: type: integer format: int64 x-go-name: PinOrder pull_request: $ref: '#/definitions/PullRequestMeta' ref: type: string x-go-name: Ref repository: $ref: '#/definitions/RepositoryMeta' state: $ref: '#/definitions/StateType' title: type: string x-go-name: Title updated_at: type: string format: date-time x-go-name: Updated url: type: string x-go-name: URL user: $ref: '#/definitions/User' x-go-package: forgejo.org/modules/structs EditGitHookOption: description: EditGitHookOption options when modifying one Git hook type: object properties: content: type: string x-go-name: Content x-go-package: forgejo.org/modules/structs ExternalWiki: description: ExternalWiki represents setting for external wiki type: object properties: external_wiki_url: description: URL of external wiki. type: string x-go-name: ExternalWikiURL x-go-package: forgejo.org/modules/structs PushMirror: description: PushMirror represents information of a push mirror type: object properties: branch_filter: type: string x-go-name: BranchFilter created: type: string format: date-time x-go-name: CreatedUnix interval: type: string x-go-name: Interval last_error: type: string x-go-name: LastError last_update: type: string format: date-time x-go-name: LastUpdateUnix public_key: type: string x-go-name: PublicKey remote_address: type: string x-go-name: RemoteAddress remote_name: type: string x-go-name: RemoteName repo_name: type: string x-go-name: RepoName sync_on_commit: type: boolean x-go-name: SyncOnCommit x-go-package: forgejo.org/modules/structs UpdateRepoAvatarOption: description: UpdateRepoAvatarUserOption options when updating the repo avatar type: object properties: image: description: image must be base64 encoded type: string x-go-name: Image x-go-package: forgejo.org/modules/structs FileCommitResponse: type: object title: FileCommitResponse contains information generated from a Git commit for a repo's file. properties: author: $ref: '#/definitions/CommitUser' committer: $ref: '#/definitions/CommitUser' created: type: string format: date-time x-go-name: Created html_url: type: string x-go-name: HTMLURL message: type: string x-go-name: Message parents: type: array items: $ref: '#/definitions/CommitMeta' x-go-name: Parents sha: type: string x-go-name: SHA tree: $ref: '#/definitions/CommitMeta' url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs TagArchiveDownloadCount: description: TagArchiveDownloadCount counts how many times a archive was downloaded type: object properties: tar_gz: type: integer format: int64 x-go-name: TarGz zip: type: integer format: int64 x-go-name: Zip x-go-package: forgejo.org/modules/structs InternalTracker: description: InternalTracker represents settings for internal tracker type: object properties: allow_only_contributors_to_track_time: description: Let only contributors track time (Built-in issue tracker) type: boolean x-go-name: AllowOnlyContributorsToTrackTime enable_issue_dependencies: description: Enable dependencies for issues and pull requests (Built-in issue tracker) type: boolean x-go-name: EnableIssueDependencies enable_time_tracker: description: Enable time tracking (Built-in issue tracker) type: boolean x-go-name: EnableTimeTracker x-go-package: forgejo.org/modules/structs CommitStatus: description: CommitStatus holds a single status of a single Commit type: object properties: context: type: string x-go-name: Context created_at: type: string format: date-time x-go-name: Created creator: $ref: '#/definitions/User' description: type: string x-go-name: Description id: type: integer format: int64 x-go-name: ID status: $ref: '#/definitions/CommitStatusState' target_url: type: string x-go-name: TargetURL updated_at: type: string format: date-time x-go-name: Updated url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs CreateOrUpdateSecretOption: type: object title: CreateOrUpdateSecretOption defines the properties of the secret to create or update. required: - data properties: data: description: 'Data of the secret. Special characters will be retained. Line endings will be normalized to LF to match the behaviour of browsers. Encode the data with Base64 if line endings should be retained.' type: string x-go-name: Data x-go-package: forgejo.org/modules/structs SyncForkInfo: description: SyncForkInfo information about syncing a fork type: object properties: allowed: type: boolean x-go-name: Allowed base_commit: type: string x-go-name: BaseCommit commits_behind: type: integer format: int64 x-go-name: CommitsBehind fork_commit: type: string x-go-name: ForkCommit x-go-package: forgejo.org/modules/structs PullReview: description: PullReview represents a pull request review type: object properties: body: type: string x-go-name: Body comments_count: type: integer format: int64 x-go-name: CodeCommentsCount commit_id: type: string x-go-name: CommitID dismissed: type: boolean x-go-name: Dismissed html_url: type: string x-go-name: HTMLURL id: type: integer format: int64 x-go-name: ID official: type: boolean x-go-name: Official pull_request_url: type: string x-go-name: HTMLPullURL stale: type: boolean x-go-name: Stale state: $ref: '#/definitions/ReviewStateType' submitted_at: type: string format: date-time x-go-name: Submitted team: $ref: '#/definitions/Team' updated_at: type: string format: date-time x-go-name: Updated user: $ref: '#/definitions/User' x-go-package: forgejo.org/modules/structs ActionTask: description: ActionTask represents a ActionTask type: object properties: created_at: type: string format: date-time x-go-name: CreatedAt display_title: type: string x-go-name: DisplayTitle event: type: string x-go-name: Event head_branch: type: string x-go-name: HeadBranch head_sha: type: string x-go-name: HeadSHA id: type: integer format: int64 x-go-name: ID name: type: string x-go-name: Name run_number: type: integer format: int64 x-go-name: RunNumber run_started_at: type: string format: date-time x-go-name: RunStartedAt status: type: string x-go-name: Status updated_at: type: string format: date-time x-go-name: UpdatedAt url: type: string x-go-name: URL workflow_id: type: string x-go-name: WorkflowID x-go-package: forgejo.org/modules/structs CommitStatusState: description: 'CommitStatusState holds the state of a CommitStatus It can be "pending", "success", "error", "failure", "warning", or "skipped"' type: string x-go-package: forgejo.org/modules/structs ActionArtifact: description: ActionArtifact represents an artifact of a workflow run type: object properties: archive_download_url: description: the URL to download the artifact zip archive type: string x-go-name: ArchiveDownloadURL created_at: type: string format: date-time x-go-name: CreatedAt expired: description: whether the artifact has expired type: boolean x-go-name: Expired expires_at: type: string format: date-time x-go-name: ExpiresAt id: description: the artifact's ID type: integer format: int64 x-go-name: ID name: description: the artifact's name type: string x-go-name: Name run_id: description: the ID of the workflow run that produced this artifact type: integer format: int64 x-go-name: RunID size_in_bytes: description: the total size of the artifact in bytes type: integer format: int64 x-go-name: SizeInBytes updated_at: type: string format: date-time x-go-name: UpdatedAt x-go-package: forgejo.org/modules/structs WikiCommit: description: WikiCommit page commit/revision type: object properties: author: $ref: '#/definitions/CommitUser' commiter: $ref: '#/definitions/CommitUser' message: type: string x-go-name: Message sha: type: string x-go-name: ID x-go-package: forgejo.org/modules/structs DispatchWorkflowRun: description: DispatchWorkflowRun represents a workflow run type: object properties: id: description: the workflow run id type: integer format: int64 x-go-name: ID jobs: description: the jobs name type: array items: type: string x-go-name: Jobs run_number: description: a unique number for each run of a repository type: integer format: int64 x-go-name: RunNumber x-go-package: forgejo.org/modules/structs CreateHookOption: description: CreateHookOption options when create a hook type: object required: - type - config properties: active: type: boolean default: false x-go-name: Active authorization_header: type: string x-go-name: AuthorizationHeader branch_filter: type: string x-go-name: BranchFilter config: $ref: '#/definitions/CreateHookOptionConfig' events: type: array items: type: string x-go-name: Events type: type: string enum: - forgejo - dingtalk - discord - gitea - gogs - msteams - slack - telegram - feishu - wechatwork - packagist x-go-name: Type x-go-package: forgejo.org/modules/structs ChangedFile: description: ChangedFile store information about files affected by the pull request type: object properties: additions: type: integer format: int64 x-go-name: Additions changes: type: integer format: int64 x-go-name: Changes contents_url: type: string x-go-name: ContentsURL deletions: type: integer format: int64 x-go-name: Deletions filename: type: string x-go-name: Filename html_url: type: string x-go-name: HTMLURL previous_filename: type: string x-go-name: PreviousFilename raw_url: type: string x-go-name: RawURL status: type: string x-go-name: Status x-go-package: forgejo.org/modules/structs IssueFormFieldType: type: string title: IssueFormFieldType defines issue form field type, can be "markdown", "textarea", "input", "dropdown" or "checkboxes" x-go-package: forgejo.org/modules/structs CreateHookOptionConfig: description: 'CreateHookOptionConfig has all config options in it required are "content_type" and "url" Required' type: object additionalProperties: type: string x-go-package: forgejo.org/modules/structs WatchInfo: description: WatchInfo represents an API watch status of one repository type: object properties: created_at: type: string format: date-time x-go-name: CreatedAt ignored: type: boolean x-go-name: Ignored reason: x-go-name: Reason repository_url: type: string x-go-name: RepositoryURL subscribed: type: boolean x-go-name: Subscribed url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs PRBranchInfo: description: PRBranchInfo information about a branch type: object properties: label: type: string x-go-name: Name ref: type: string x-go-name: Ref repo: $ref: '#/definitions/Repository' repo_id: type: integer format: int64 x-go-name: RepoID sha: type: string x-go-name: Sha x-go-package: forgejo.org/modules/structs FilesResponse: description: FilesResponse contains information about multiple files from a repo type: object properties: commit: $ref: '#/definitions/FileCommitResponse' files: type: array items: $ref: '#/definitions/ContentsResponse' x-go-name: Files verification: $ref: '#/definitions/PayloadCommitVerification' x-go-package: forgejo.org/modules/structs EditTagProtectionOption: description: EditTagProtectionOption options for editing a tag protection type: object properties: name_pattern: type: string x-go-name: NamePattern whitelist_teams: type: array items: type: string x-go-name: WhitelistTeams whitelist_usernames: type: array items: type: string x-go-name: WhitelistUsernames x-go-package: forgejo.org/modules/structs PullReviewRequestOptions: description: PullReviewRequestOptions are options to add or remove pull review requests type: object properties: reviewers: type: array items: type: string x-go-name: Reviewers team_reviewers: type: array items: type: string x-go-name: TeamReviewers x-go-package: forgejo.org/modules/structs CreateKeyOption: description: CreateKeyOption options when creating a key type: object required: - title - key properties: key: description: An armored SSH key to add type: string uniqueItems: true x-go-name: Key read_only: description: Describe if the key has only read access or read/write type: boolean x-go-name: ReadOnly title: description: Title of the key to add type: string uniqueItems: true x-go-name: Title x-go-package: forgejo.org/modules/structs PullRequestMeta: description: PullRequestMeta PR info if an issue is a PR type: object properties: draft: type: boolean x-go-name: IsWorkInProgress html_url: type: string x-go-name: HTMLURL merged: type: boolean x-go-name: HasMerged merged_at: type: string format: date-time x-go-name: Merged x-go-package: forgejo.org/modules/structs CreateTagProtectionOption: description: CreateTagProtectionOption options for creating a tag protection type: object properties: name_pattern: type: string x-go-name: NamePattern whitelist_teams: type: array items: type: string x-go-name: WhitelistTeams whitelist_usernames: type: array items: type: string x-go-name: WhitelistUsernames x-go-package: forgejo.org/modules/structs AddCollaboratorOption: description: AddCollaboratorOption options when adding a user as a collaborator of a repository type: object properties: permission: type: string enum: - read - write - admin x-go-name: Permission x-go-package: forgejo.org/modules/structs Repository: description: Repository represents a repository type: object properties: allow_fast_forward_only_merge: type: boolean x-go-name: AllowFastForwardOnly allow_merge_commits: type: boolean x-go-name: AllowMerge allow_rebase: type: boolean x-go-name: AllowRebase allow_rebase_explicit: type: boolean x-go-name: AllowRebaseMerge allow_rebase_update: type: boolean x-go-name: AllowRebaseUpdate allow_squash_merge: type: boolean x-go-name: AllowSquash archived: type: boolean x-go-name: Archived archived_at: type: string format: date-time x-go-name: ArchivedAt avatar_url: type: string x-go-name: AvatarURL clone_url: type: string x-go-name: CloneURL created_at: type: string format: date-time x-go-name: Created default_allow_maintainer_edit: type: boolean x-go-name: DefaultAllowMaintainerEdit default_branch: type: string x-go-name: DefaultBranch default_delete_branch_after_merge: type: boolean x-go-name: DefaultDeleteBranchAfterMerge default_merge_style: type: string x-go-name: DefaultMergeStyle default_update_style: type: string x-go-name: DefaultUpdateStyle description: type: string x-go-name: Description empty: type: boolean x-go-name: Empty external_tracker: $ref: '#/definitions/ExternalTracker' external_wiki: $ref: '#/definitions/ExternalWiki' fork: type: boolean x-go-name: Fork forks_count: type: integer format: int64 x-go-name: Forks full_name: type: string x-go-name: FullName globally_editable_wiki: type: boolean x-go-name: GloballyEditableWiki has_actions: type: boolean x-go-name: HasActions has_issues: type: boolean x-go-name: HasIssues has_packages: type: boolean x-go-name: HasPackages has_projects: type: boolean x-go-name: HasProjects has_pull_requests: type: boolean x-go-name: HasPullRequests has_releases: type: boolean x-go-name: HasReleases has_wiki: description: is the wiki enabled type: boolean x-go-name: HasWiki has_wiki_contents: description: have wiki pages ever been created type: boolean x-go-name: HasWikiContents html_url: type: string x-go-name: HTMLURL id: type: integer format: int64 x-go-name: ID ignore_whitespace_conflicts: type: boolean x-go-name: IgnoreWhitespaceConflicts internal: type: boolean x-go-name: Internal internal_tracker: $ref: '#/definitions/InternalTracker' language: type: string x-go-name: Language languages_url: type: string x-go-name: LanguagesURL link: type: string x-go-name: Link mirror: type: boolean x-go-name: Mirror mirror_interval: type: string x-go-name: MirrorInterval mirror_updated: type: string format: date-time x-go-name: MirrorUpdated name: type: string x-go-name: Name object_format_name: description: ObjectFormatName of the underlying git repository type: string enum: - sha1 - sha256 x-go-name: ObjectFormatName open_issues_count: type: integer format: int64 x-go-name: OpenIssues open_pr_counter: type: integer format: int64 x-go-name: OpenPulls original_url: type: string x-go-name: OriginalURL owner: $ref: '#/definitions/User' parent: $ref: '#/definitions/Repository' permissions: $ref: '#/definitions/Permission' private: type: boolean x-go-name: Private release_counter: type: integer format: int64 x-go-name: Releases repo_transfer: $ref: '#/definitions/RepoTransfer' size: type: integer format: int64 x-go-name: Size ssh_url: type: string x-go-name: SSHURL stars_count: type: integer format: int64 x-go-name: Stars template: type: boolean x-go-name: Template topics: type: array items: type: string x-go-name: Topics updated_at: type: string format: date-time x-go-name: Updated url: type: string x-go-name: URL watchers_count: type: integer format: int64 x-go-name: Watchers website: type: string x-go-name: Website wiki_branch: type: string x-go-name: WikiBranch wiki_clone_url: type: string x-go-name: WikiCloneURL wiki_ssh_url: type: string x-go-name: WikiSSHURL x-go-package: forgejo.org/modules/structs IssueTemplateLabels: type: array items: type: string x-go-package: forgejo.org/modules/structs CreatePullRequestOption: description: CreatePullRequestOption options when creating a pull request type: object properties: assignee: type: string x-go-name: Assignee assignees: type: array items: type: string x-go-name: Assignees base: type: string x-go-name: Base body: type: string x-go-name: Body due_date: type: string format: date-time x-go-name: Deadline head: type: string x-go-name: Head labels: type: array items: type: integer format: int64 x-go-name: Labels milestone: type: integer format: int64 x-go-name: Milestone title: type: string x-go-name: Title x-go-package: forgejo.org/modules/structs User: description: User represents a user type: object properties: active: description: Is user active type: boolean x-go-name: IsActive avatar_url: description: URL to the user's avatar type: string x-go-name: AvatarURL created: type: string format: date-time x-go-name: Created description: description: the user's description type: string x-go-name: Description email: type: string format: email x-go-name: Email followers_count: description: user counts type: integer format: int64 x-go-name: Followers following_count: type: integer format: int64 x-go-name: Following full_name: description: the user's full name type: string x-go-name: FullName html_url: description: URL to the user's profile page type: string x-go-name: HTMLURL id: description: the user's id type: integer format: int64 x-go-name: ID is_admin: description: Is the user an administrator type: boolean x-go-name: IsAdmin language: description: User locale type: string x-go-name: Language last_login: type: string format: date-time x-go-name: LastLogin location: description: the user's location type: string x-go-name: Location login: description: the user's username type: string x-go-name: UserName login_name: description: the user's authentication sign-in name. type: string default: empty x-go-name: LoginName prohibit_login: description: Is user login prohibited type: boolean x-go-name: ProhibitLogin pronouns: description: the user's pronouns type: string x-go-name: Pronouns restricted: description: Is user restricted type: boolean x-go-name: Restricted source_id: description: The ID of the user's Authentication Source type: integer format: int64 x-go-name: SourceID starred_repos_count: type: integer format: int64 x-go-name: StarredRepos visibility: description: 'User visibility level option: public, limited, private' type: string x-go-name: Visibility website: description: the user's website type: string x-go-name: Website x-go-package: forgejo.org/modules/structs CreateWikiPageOptions: description: CreateWikiPageOptions form for creating wiki type: object properties: content_base64: description: content must be base64 encoded type: string x-go-name: ContentBase64 message: description: optional commit message summarizing the change type: string x-go-name: Message title: description: page title. leave empty to keep unchanged type: string x-go-name: Title x-go-package: forgejo.org/modules/structs ReviewStateType: description: ReviewStateType review state type type: string x-go-package: forgejo.org/modules/structs Activity: type: object properties: act_user: $ref: '#/definitions/User' act_user_id: type: integer format: int64 x-go-name: ActUserID comment: $ref: '#/definitions/Comment' comment_id: type: integer format: int64 x-go-name: CommentID content: type: string x-go-name: Content created: type: string format: date-time x-go-name: Created id: type: integer format: int64 x-go-name: ID is_private: type: boolean x-go-name: IsPrivate op_type: description: the type of action type: string enum: - create_repo - rename_repo - star_repo - watch_repo - commit_repo - create_issue - create_pull_request - transfer_repo - push_tag - comment_issue - merge_pull_request - close_issue - reopen_issue - close_pull_request - reopen_pull_request - delete_tag - delete_branch - mirror_sync_push - mirror_sync_create - mirror_sync_delete - approve_pull_request - reject_pull_request - comment_pull - publish_release - pull_review_dismissed - pull_request_ready_for_review - auto_merge_pull_request x-go-name: OpType ref_name: type: string x-go-name: RefName repo: $ref: '#/definitions/Repository' repo_id: type: integer format: int64 x-go-name: RepoID user_id: type: integer format: int64 x-go-name: UserID x-go-package: forgejo.org/modules/structs DeleteFileOptions: description: 'DeleteFileOptions options for deleting files (used for other File structs below) Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)' type: object required: - sha properties: author: $ref: '#/definitions/Identity' branch: description: branch (optional) to base this file from. if not given, the default branch is used type: string x-go-name: BranchName committer: $ref: '#/definitions/Identity' dates: $ref: '#/definitions/CommitDateOptions' force_overwrite_new_branch: description: (optional) will do a force-push if the new branch already exists type: boolean x-go-name: ForceOverwriteNewBranch message: description: message (optional) for the commit of this file. if not supplied, a default message will be used type: string x-go-name: Message new_branch: description: new_branch (optional) will make a new branch from `branch` before creating the file type: string x-go-name: NewBranchName sha: description: sha is the SHA for the file that already exists type: string x-go-name: SHA signoff: description: Add a Signed-off-by trailer by the committer at the end of the commit log message. type: boolean x-go-name: Signoff x-go-package: forgejo.org/modules/structs WikiPageMetaData: description: WikiPageMetaData wiki page meta information type: object properties: html_url: type: string x-go-name: HTMLURL last_commit: $ref: '#/definitions/WikiCommit' sub_url: type: string x-go-name: SubURL title: type: string x-go-name: Title x-go-package: forgejo.org/modules/structs APINotFound: type: object properties: errors: type: array items: type: string x-go-name: Errors message: type: string x-go-name: Message url: type: string x-go-name: URL x-go-package: forgejo.org/services/context ActionRunner: description: ActionRunner represents a runner type: object properties: description: description: Description provides optional details about this runner. type: string x-go-name: Description ephemeral: description: Indicates if runner is ephemeral runner type: boolean x-go-name: Ephemeral id: description: ID uniquely identifies this runner. type: integer format: int64 x-go-name: ID labels: description: Labels is a list of labels attached to this runner. type: array items: type: string x-go-name: Labels name: description: Name of the runner; not unique. type: string x-go-name: Name owner_id: description: 'OwnerID is the identifier of the user or organization this runner belongs to. O if the runner is owned by a repository.' type: integer format: int64 x-go-name: OwnerID repo_id: description: 'RepoID is the identifier of the repository this runner belongs to. 0 if the runner belongs to a user or organization.' type: integer format: int64 x-go-name: RepoID status: description: Status indicates whether this runner is offline, or active, for example. type: string enum: - offline - idle - active x-go-name: Status uuid: description: UUID uniquely identifies this runner. type: string x-go-name: UUID version: description: Version is the self-reported version string of Forgejo Runner. type: string x-go-name: Version x-go-package: forgejo.org/modules/structs RepoTopicOptions: description: RepoTopicOptions a collection of repo topic names type: object properties: topics: description: list of topic names type: array items: type: string x-go-name: Topics x-go-package: forgejo.org/modules/structs GitTreeResponse: description: GitTreeResponse returns a git tree type: object properties: page: type: integer format: int64 x-go-name: Page sha: type: string x-go-name: SHA total_count: type: integer format: int64 x-go-name: TotalCount tree: type: array items: $ref: '#/definitions/GitEntry' x-go-name: Entries truncated: type: boolean x-go-name: Truncated url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs EditRepoOption: description: EditRepoOption options when editing a repository's properties type: object properties: allow_fast_forward_only_merge: description: either `true` to allow fast-forward-only merging pull requests, or `false` to prevent fast-forward-only merging. type: boolean x-go-name: AllowFastForwardOnly allow_manual_merge: description: either `true` to allow mark pr as merged manually, or `false` to prevent it. type: boolean x-go-name: AllowManualMerge allow_merge_commits: description: either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. type: boolean x-go-name: AllowMerge allow_rebase: description: either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. type: boolean x-go-name: AllowRebase allow_rebase_explicit: description: either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. type: boolean x-go-name: AllowRebaseMerge allow_rebase_update: description: either `true` to allow updating pull request branch by rebase, or `false` to prevent it. type: boolean x-go-name: AllowRebaseUpdate allow_squash_merge: description: either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. type: boolean x-go-name: AllowSquash archived: description: set to `true` to archive this repository. type: boolean x-go-name: Archived autodetect_manual_merge: description: 'either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur.' type: boolean x-go-name: AutodetectManualMerge default_allow_maintainer_edit: description: set to `true` to allow edits from maintainers by default type: boolean x-go-name: DefaultAllowMaintainerEdit default_branch: description: sets the default branch for this repository. type: string x-go-name: DefaultBranch default_delete_branch_after_merge: description: set to `true` to delete pr branch after merge by default type: boolean x-go-name: DefaultDeleteBranchAfterMerge default_merge_style: description: 'set to a merge style to be used by this repository: "merge", "rebase", "rebase-merge", "squash", "fast-forward-only", "manually-merged", or "rebase-update-only".' type: string x-go-name: DefaultMergeStyle default_update_style: description: 'set to a update style to be used by this repository: "rebase" or "merge"' type: string x-go-name: DefaultUpdateStyle description: description: a short description of the repository. type: string x-go-name: Description enable_prune: description: enable prune - remove obsolete remote-tracking references when mirroring type: boolean x-go-name: EnablePrune external_tracker: $ref: '#/definitions/ExternalTracker' external_wiki: $ref: '#/definitions/ExternalWiki' globally_editable_wiki: description: set the globally editable state of the wiki type: boolean x-go-name: GloballyEditableWiki has_actions: description: either `true` to enable actions unit, or `false` to disable them. type: boolean x-go-name: HasActions has_issues: description: either `true` to enable issues for this repository or `false` to disable them. type: boolean x-go-name: HasIssues has_packages: description: either `true` to enable packages unit, or `false` to disable them. type: boolean x-go-name: HasPackages has_projects: description: either `true` to enable project unit, or `false` to disable them. type: boolean x-go-name: HasProjects has_pull_requests: description: either `true` to allow pull requests, or `false` to prevent pull request. type: boolean x-go-name: HasPullRequests has_releases: description: either `true` to enable releases unit, or `false` to disable them. type: boolean x-go-name: HasReleases has_wiki: description: either `true` to enable the wiki for this repository or `false` to disable it. type: boolean x-go-name: HasWiki ignore_whitespace_conflicts: description: either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. type: boolean x-go-name: IgnoreWhitespaceConflicts internal_tracker: $ref: '#/definitions/InternalTracker' mirror_interval: description: set to a string like `8h30m0s` to set the mirror interval time type: string x-go-name: MirrorInterval name: description: name of the repository type: string uniqueItems: true x-go-name: Name private: description: 'either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private.' type: boolean x-go-name: Private template: description: either `true` to make this repository a template or `false` to make it a normal repository type: boolean x-go-name: Template website: description: a URL with more information about the repository. type: string x-go-name: Website wiki_branch: description: sets the branch used for this repository's wiki. type: string x-go-name: WikiBranch x-go-package: forgejo.org/modules/structs FileLinksResponse: description: FileLinksResponse contains the links for a repo's file type: object properties: git: type: string x-go-name: GitURL html: type: string x-go-name: HTMLURL self: type: string x-go-name: Self x-go-package: forgejo.org/modules/structs RepoCommit: type: object title: RepoCommit contains information of a commit in the context of a repository. properties: author: $ref: '#/definitions/CommitUser' committer: $ref: '#/definitions/CommitUser' message: type: string x-go-name: Message tree: $ref: '#/definitions/CommitMeta' url: type: string x-go-name: URL verification: $ref: '#/definitions/PayloadCommitVerification' x-go-package: forgejo.org/modules/structs GitObject: type: object title: GitObject represents a Git object. properties: sha: type: string x-go-name: SHA type: type: string x-go-name: Type url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs ActionRun: description: ActionRun represents an action run type: object properties: ScheduleID: description: the cron id for the schedule trigger type: integer format: int64 approved_by: description: who approved this action run type: integer format: int64 x-go-name: ApprovedBy commit_sha: description: the commit sha the action run ran on type: string x-go-name: CommitSHA created: description: when the action run was created type: string format: date-time x-go-name: Created duration: $ref: '#/definitions/Duration' event: description: the webhook event that causes the workflow to run type: string x-go-name: Event event_payload: description: the payload of the webhook event that causes the workflow to run type: string x-go-name: EventPayload html_url: description: the url of this action run type: string x-go-name: HTMLURL id: description: the action run id type: integer format: int64 x-go-name: ID index_in_repo: description: a unique number for each run of a repository type: integer format: int64 x-go-name: Index is_fork_pull_request: description: If this is triggered by a PR from a forked repository or an untrusted user, we need to check if it is approved and limit permissions when running the workflow. type: boolean x-go-name: IsForkPullRequest is_ref_deleted: description: has the commit/tag/… the action run ran on been deleted type: boolean x-go-name: IsRefDeleted need_approval: description: may need approval if it's a fork pull request type: boolean x-go-name: NeedApproval prettyref: description: the commit/tag/… the action run ran on type: string x-go-name: PrettyRef repository: $ref: '#/definitions/Repository' started: description: when the action run was started type: string format: date-time x-go-name: Started status: description: the current status of this run type: string x-go-name: Status stopped: description: when the action run was stopped type: string format: date-time x-go-name: Stopped title: description: the action run's title type: string x-go-name: Title trigger_event: description: the trigger event defined in the `on` configuration of the triggered workflow type: string x-go-name: TriggerEvent trigger_user: $ref: '#/definitions/User' updated: description: when the action run was last updated type: string format: date-time x-go-name: Updated workflow_id: description: the name of workflow file type: string x-go-name: WorkflowID x-go-package: forgejo.org/modules/structs RegisterRunnerOptions: type: object title: RegisterRunnerOptions declares the accepted options for registering runners. required: - name properties: description: description: Description of the runner to register. type: string x-go-name: Description ephemeral: description: Register as ephemeral runner https://forgejo.org/docs/latest/admin/actions/security/#ephemeral-runner type: boolean x-go-name: Ephemeral name: description: Name of the runner to register. The name of the runner does not have to be unique. type: string x-go-name: Name x-go-package: forgejo.org/modules/structs CreateVariableOption: type: object title: CreateVariableOption defines the properties of the variable to create. required: - value properties: value: description: 'Value of the variable to create. Special characters will be retained. Line endings will be normalized to LF to match the behaviour of browsers. Encode the data with Base64 if line endings should be retained.' type: string x-go-name: Value x-go-package: forgejo.org/modules/structs NoteOptions: type: object properties: message: type: string x-go-name: Message x-go-package: forgejo.org/modules/structs CreateBranchRepoOption: description: CreateBranchRepoOption options when creating a branch in a repository type: object required: - new_branch_name properties: new_branch_name: description: Name of the branch to create type: string uniqueItems: true x-go-name: BranchName old_branch_name: description: 'Deprecated: true Name of the old branch to create from' type: string uniqueItems: true x-go-name: OldBranchName old_ref_name: description: Name of the old branch/tag/commit to create from type: string uniqueItems: true x-go-name: OldRefName x-go-package: forgejo.org/modules/structs ContentsResponse: description: ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content type: object properties: _links: $ref: '#/definitions/FileLinksResponse' content: description: '`content` is populated when `type` is `file`, otherwise null' type: string x-go-name: Content download_url: type: string x-go-name: DownloadURL encoding: description: '`encoding` is populated when `type` is `file`, otherwise null' type: string x-go-name: Encoding git_url: type: string x-go-name: GitURL html_url: type: string x-go-name: HTMLURL last_commit_sha: type: string x-go-name: LastCommitSHA last_commit_when: type: string format: date-time x-go-name: LastCommitWhen name: type: string x-go-name: Name path: type: string x-go-name: Path sha: type: string x-go-name: SHA size: type: integer format: int64 x-go-name: Size submodule_git_url: description: '`submodule_git_url` is populated when `type` is `submodule`, otherwise null' type: string x-go-name: SubmoduleGitURL target: description: '`target` is populated when `type` is `symlink`, otherwise null' type: string x-go-name: Target type: description: '`type` will be `file`, `dir`, `symlink`, or `submodule`' type: string x-go-name: Type url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs DeployKey: description: DeployKey a deploy key type: object properties: created_at: type: string format: date-time x-go-name: Created fingerprint: type: string x-go-name: Fingerprint id: type: integer format: int64 x-go-name: ID key: type: string x-go-name: Key key_id: type: integer format: int64 x-go-name: KeyID read_only: type: boolean x-go-name: ReadOnly repository: $ref: '#/definitions/Repository' title: type: string x-go-name: Title url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs WikiCommitList: description: WikiCommitList commit/revision list type: object properties: commits: type: array items: $ref: '#/definitions/WikiCommit' x-go-name: WikiCommits count: type: integer format: int64 x-go-name: Count x-go-package: forgejo.org/modules/structs GitBlob: description: GitBlob represents a git blob type: object properties: content: type: string x-go-name: Content encoding: type: string x-go-name: Encoding sha: type: string x-go-name: SHA size: type: integer format: int64 x-go-name: Size url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs ListActionRunResponse: description: ListActionRunResponse return a list of ActionRun type: object properties: total_count: type: integer format: int64 x-go-name: TotalCount workflow_runs: type: array items: $ref: '#/definitions/ActionRun' x-go-name: Entries x-go-package: forgejo.org/modules/structs Hook: description: Hook a hook is a web hook when one repository changed type: object properties: active: type: boolean x-go-name: Active authorization_header: type: string x-go-name: AuthorizationHeader branch_filter: type: string x-go-name: BranchFilter config: description: 'Deprecated: use Metadata instead' type: object additionalProperties: type: string x-go-name: Config content_type: type: string x-go-name: ContentType created_at: type: string format: date-time x-go-name: Created events: type: array items: type: string x-go-name: Events id: type: integer format: int64 x-go-name: ID metadata: x-go-name: Metadata type: type: string x-go-name: Type updated_at: type: string format: date-time x-go-name: Updated url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs GitEntry: description: GitEntry represents a git tree type: object properties: mode: type: string x-go-name: Mode path: type: string x-go-name: Path sha: type: string x-go-name: SHA size: type: integer format: int64 x-go-name: Size type: type: string x-go-name: Type url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs FileResponse: description: FileResponse contains information about a repo's file type: object properties: commit: $ref: '#/definitions/FileCommitResponse' content: $ref: '#/definitions/ContentsResponse' verification: $ref: '#/definitions/PayloadCommitVerification' x-go-package: forgejo.org/modules/structs DispatchWorkflowOption: description: DispatchWorkflowOption options when dispatching a workflow type: object required: - ref properties: inputs: description: Input keys and values configured in the workflow file. type: object additionalProperties: type: string x-go-name: Inputs ref: description: Git reference for the workflow type: string x-go-name: Ref return_run_info: description: Flag to return the run info type: boolean default: false x-go-name: ReturnRunInfo x-go-package: forgejo.org/modules/structs TopicResponse: description: TopicResponse for returning topics type: object properties: created: type: string format: date-time x-go-name: Created id: type: integer format: int64 x-go-name: ID repo_count: type: integer format: int64 x-go-name: RepoCount topic_name: type: string x-go-name: Name updated: type: string format: date-time x-go-name: Updated x-go-package: forgejo.org/modules/structs CommitStats: description: CommitStats is statistics for a RepoCommit type: object properties: additions: type: integer format: int64 x-go-name: Additions deletions: type: integer format: int64 x-go-name: Deletions total: type: integer format: int64 x-go-name: Total x-go-package: forgejo.org/modules/structs GenerateRepoOption: description: GenerateRepoOption options when creating repository using a template type: object required: - owner - name properties: avatar: description: include avatar of the template repo type: boolean x-go-name: Avatar default_branch: description: Default branch of the new repository type: string x-go-name: DefaultBranch description: description: Description of the repository to create type: string x-go-name: Description git_content: description: include git content of default branch in template repo type: boolean x-go-name: GitContent git_hooks: description: include git hooks in template repo type: boolean x-go-name: GitHooks labels: description: include labels in template repo type: boolean x-go-name: Labels name: description: Name of the repository to create type: string uniqueItems: true x-go-name: Name owner: description: The organization or person who will own the new repository type: string x-go-name: Owner private: description: Whether the repository is private type: boolean x-go-name: Private protected_branch: description: include protected branches in template repo type: boolean x-go-name: ProtectedBranch topics: description: include topics in template repo type: boolean x-go-name: Topics webhooks: description: include webhooks in template repo type: boolean x-go-name: Webhooks x-go-package: forgejo.org/modules/structs APIRepoArchivedError: type: object properties: message: type: string x-go-name: Message url: type: string x-go-name: URL x-go-package: forgejo.org/services/context RegistrationToken: description: RegistrationToken is a string used to register a runner with a server type: object properties: token: type: string x-go-name: Token x-go-package: forgejo.org/routers/api/v1/shared EditHookOption: description: EditHookOption options when modify one hook type: object properties: active: type: boolean x-go-name: Active authorization_header: type: string x-go-name: AuthorizationHeader branch_filter: type: string x-go-name: BranchFilter config: type: object additionalProperties: type: string x-go-name: Config events: type: array items: type: string x-go-name: Events x-go-package: forgejo.org/modules/structs CreatePullReviewCommentOptions: $ref: '#/definitions/CreatePullReviewComment' Branch: description: Branch represents a repository branch type: object properties: commit: $ref: '#/definitions/PayloadCommit' effective_branch_protection_name: type: string x-go-name: EffectiveBranchProtectionName enable_status_check: type: boolean x-go-name: EnableStatusCheck name: type: string x-go-name: Name protected: type: boolean x-go-name: Protected required_approvals: type: integer format: int64 x-go-name: RequiredApprovals status_check_contexts: type: array items: type: string x-go-name: StatusCheckContexts user_can_merge: type: boolean x-go-name: UserCanMerge user_can_push: type: boolean x-go-name: UserCanPush x-go-package: forgejo.org/modules/structs ChangeFileOperation: description: ChangeFileOperation for creating, updating or deleting a file type: object required: - operation - path properties: content: description: new or updated file content, must be base64 encoded type: string x-go-name: ContentBase64 from_path: description: old path of the file to move type: string x-go-name: FromPath operation: description: indicates what to do with the file type: string enum: - create - update - delete x-go-name: Operation path: description: path to the existing or new file type: string x-go-name: Path sha: description: sha is the SHA for the file that already exists, required for update or delete type: string x-go-name: SHA x-go-package: forgejo.org/modules/structs TagProtection: description: TagProtection represents a tag protection 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 updated_at: type: string format: date-time x-go-name: Updated whitelist_teams: type: array items: type: string x-go-name: WhitelistTeams whitelist_usernames: type: array items: type: string x-go-name: WhitelistUsernames x-go-package: forgejo.org/modules/structs WikiPage: description: WikiPage a wiki page type: object properties: commit_count: type: integer format: int64 x-go-name: CommitCount content_base64: description: Page content, base64 encoded type: string x-go-name: ContentBase64 footer: type: string x-go-name: Footer html_url: type: string x-go-name: HTMLURL last_commit: $ref: '#/definitions/WikiCommit' sidebar: type: string x-go-name: Sidebar sub_url: type: string x-go-name: SubURL title: type: string x-go-name: Title x-go-package: forgejo.org/modules/structs UpdateBranchRepoOption: description: UpdateBranchRepoOption options when updating a branch in a repository type: object required: - name properties: name: description: New branch name type: string uniqueItems: true x-go-name: Name x-go-package: forgejo.org/modules/structs Organization: description: Organization represents an organization type: object properties: avatar_url: type: string x-go-name: AvatarURL created: type: string format: date-time x-go-name: Created description: type: string x-go-name: Description email: type: string x-go-name: Email full_name: type: string x-go-name: FullName id: type: integer format: int64 x-go-name: ID location: type: string x-go-name: Location name: type: string x-go-name: Name repo_admin_change_team_access: type: boolean x-go-name: RepoAdminChangeTeamAccess username: description: deprecated type: string x-go-name: UserName visibility: type: string x-go-name: Visibility website: type: string x-go-name: Website x-go-package: forgejo.org/modules/structs APIInvalidTopicsError: type: object properties: invalidTopics: type: array items: type: string x-go-name: InvalidTopics message: type: string x-go-name: Message x-go-package: forgejo.org/services/context IssueConfigValidation: type: object properties: message: type: string x-go-name: Message valid: type: boolean x-go-name: Valid x-go-package: forgejo.org/modules/structs DismissPullReviewOptions: description: DismissPullReviewOptions are options to dismiss a pull review type: object properties: message: type: string x-go-name: Message priors: type: boolean x-go-name: Priors x-go-package: forgejo.org/modules/structs UpdateFileOptions: description: 'UpdateFileOptions options for updating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)' type: object required: - sha - content properties: author: $ref: '#/definitions/Identity' branch: description: branch (optional) to base this file from. if not given, the default branch is used type: string x-go-name: BranchName committer: $ref: '#/definitions/Identity' content: description: content must be base64 encoded type: string x-go-name: ContentBase64 dates: $ref: '#/definitions/CommitDateOptions' force_overwrite_new_branch: description: (optional) will do a force-push if the new branch already exists type: boolean x-go-name: ForceOverwriteNewBranch from_path: description: from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL type: string x-go-name: FromPath message: description: message (optional) for the commit of this file. if not supplied, a default message will be used type: string x-go-name: Message new_branch: description: new_branch (optional) will make a new branch from `branch` before creating the file type: string x-go-name: NewBranchName sha: description: sha is the SHA for the file that already exists type: string x-go-name: SHA signoff: description: Add a Signed-off-by trailer by the committer at the end of the commit log message. type: boolean x-go-name: Signoff x-go-package: forgejo.org/modules/structs PullRequest: description: PullRequest represents a pull request type: object properties: additions: type: integer format: int64 x-go-name: Additions allow_maintainer_edit: type: boolean x-go-name: AllowMaintainerEdit assignee: $ref: '#/definitions/User' assignees: type: array items: $ref: '#/definitions/User' x-go-name: Assignees base: $ref: '#/definitions/PRBranchInfo' body: type: string x-go-name: Body changed_files: type: integer format: int64 x-go-name: ChangedFiles closed_at: type: string format: date-time x-go-name: Closed comments: type: integer format: int64 x-go-name: Comments created_at: type: string format: date-time x-go-name: Created deletions: type: integer format: int64 x-go-name: Deletions diff_url: type: string x-go-name: DiffURL draft: type: boolean x-go-name: Draft due_date: type: string format: date-time x-go-name: Deadline flow: type: integer format: int64 x-go-name: Flow head: $ref: '#/definitions/PRBranchInfo' html_url: type: string x-go-name: HTMLURL id: type: integer format: int64 x-go-name: ID is_locked: type: boolean x-go-name: IsLocked labels: type: array items: $ref: '#/definitions/Label' x-go-name: Labels merge_base: type: string x-go-name: MergeBase merge_commit_sha: type: string x-go-name: MergedCommitID mergeable: type: boolean x-go-name: Mergeable merged: type: boolean x-go-name: HasMerged merged_at: type: string format: date-time x-go-name: Merged merged_by: $ref: '#/definitions/User' milestone: $ref: '#/definitions/Milestone' number: type: integer format: int64 x-go-name: Index patch_url: type: string x-go-name: PatchURL pin_order: type: integer format: int64 x-go-name: PinOrder requested_reviewers: type: array items: $ref: '#/definitions/User' x-go-name: RequestedReviewers requested_reviewers_teams: type: array items: $ref: '#/definitions/Team' x-go-name: RequestedReviewersTeams review_comments: description: number of review comments made on the diff of a PR review (not including comments on commits or issues in a PR) type: integer format: int64 x-go-name: ReviewComments state: $ref: '#/definitions/StateType' title: type: string x-go-name: Title updated_at: type: string format: date-time x-go-name: Updated url: type: string x-go-name: URL user: $ref: '#/definitions/User' x-go-package: forgejo.org/modules/structs NewIssuePinsAllowed: description: NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed type: object properties: issues: type: boolean x-go-name: Issues pull_requests: type: boolean x-go-name: PullRequests x-go-package: forgejo.org/modules/structs Reference: type: object title: Reference represents a Git reference. properties: object: $ref: '#/definitions/GitObject' ref: type: string x-go-name: Ref url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs Duration: description: 'A Duration represents the elapsed time between two instants as an int64 nanosecond count. The representation limits the largest representable duration to approximately 290 years.' type: integer format: int64 x-go-package: time MergePullRequestOption: description: MergePullRequestForm form for merging Pull Request type: object required: - Do properties: Do: type: string enum: - merge - rebase - rebase-merge - squash - fast-forward-only - manually-merged MergeCommitID: type: string MergeMessageField: type: string MergeTitleField: type: string delete_branch_after_merge: type: boolean x-go-name: DeleteBranchAfterMerge force_merge: type: boolean x-go-name: ForceMerge head_commit_id: type: string x-go-name: HeadCommitID merge_when_checks_succeed: type: boolean x-go-name: MergeWhenChecksSucceed x-go-name: MergePullRequestForm x-go-package: forgejo.org/services/forms CreateForkOption: description: CreateForkOption options for creating a fork type: object properties: name: description: name of the forked repository type: string x-go-name: Name organization: description: organization name, if forking into an organization type: string x-go-name: Organization x-go-package: forgejo.org/modules/structs CreateBranchProtectionOption: description: CreateBranchProtectionOption options for creating a branch protection type: object properties: apply_to_admins: type: boolean x-go-name: ApplyToAdmins approvals_whitelist_teams: type: array items: type: string x-go-name: ApprovalsWhitelistTeams approvals_whitelist_username: type: array items: type: string x-go-name: ApprovalsWhitelistUsernames 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 branch_name: description: 'Deprecated: true' type: string x-go-name: BranchName dismiss_stale_approvals: type: boolean x-go-name: DismissStaleApprovals enable_approvals_whitelist: type: boolean x-go-name: EnableApprovalsWhitelist 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 ignore_stale_approvals: type: boolean x-go-name: IgnoreStaleApprovals merge_whitelist_teams: type: array items: type: string x-go-name: MergeWhitelistTeams merge_whitelist_usernames: type: array items: type: string x-go-name: MergeWhitelistUsernames protected_file_patterns: type: string x-go-name: ProtectedFilePatterns push_whitelist_deploy_keys: type: boolean x-go-name: PushWhitelistDeployKeys push_whitelist_teams: type: array items: type: string x-go-name: PushWhitelistTeams push_whitelist_usernames: type: array items: type: string x-go-name: PushWhitelistUsernames 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: forgejo.org/modules/structs AnnotatedTagObject: description: AnnotatedTagObject contains meta information of the tag object type: object properties: sha: type: string x-go-name: SHA type: type: string x-go-name: Type url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs RepositoryMeta: description: RepositoryMeta basic repository information type: object properties: full_name: type: string x-go-name: FullName id: type: integer format: int64 x-go-name: ID name: type: string x-go-name: Name owner: type: string x-go-name: Owner x-go-package: forgejo.org/modules/structs Attachment: description: Attachment a generic attachment type: object properties: browser_download_url: type: string x-go-name: DownloadURL created_at: type: string format: date-time x-go-name: Created download_count: type: integer format: int64 x-go-name: DownloadCount id: type: integer format: int64 x-go-name: ID name: type: string x-go-name: Name size: type: integer format: int64 x-go-name: Size type: type: string enum: - attachment - external x-go-name: Type uuid: type: string x-go-name: UUID x-go-package: forgejo.org/modules/structs TransferRepoOption: description: TransferRepoOption options when transfer a repository's ownership type: object required: - new_owner properties: new_owner: type: string x-go-name: NewOwner team_ids: description: ID of the team or teams to add to the repository. Teams can only be added to organization-owned repositories. type: array items: type: integer format: int64 x-go-name: TeamIDs x-go-package: forgejo.org/modules/structs RepoCollaboratorPermission: description: RepoCollaboratorPermission to get repository permission for a collaborator type: object properties: permission: type: string x-go-name: Permission role_name: type: string x-go-name: RoleName user: $ref: '#/definitions/User' x-go-package: forgejo.org/modules/structs CombinedStatus: description: CombinedStatus holds the combined state of several statuses for a single commit type: object properties: commit_url: type: string x-go-name: CommitURL repository: $ref: '#/definitions/Repository' sha: type: string x-go-name: SHA state: $ref: '#/definitions/CommitStatusState' statuses: type: array items: $ref: '#/definitions/CommitStatus' x-go-name: Statuses total_count: type: integer format: int64 x-go-name: TotalCount url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs PayloadUser: description: PayloadUser represents the author or committer of a commit type: object properties: email: type: string format: email x-go-name: Email name: description: Full name of the commit author type: string x-go-name: Name username: type: string x-go-name: UserName x-go-package: forgejo.org/modules/structs CreateRepoOption: description: CreateRepoOption options when creating repository type: object required: - name properties: auto_init: description: Whether the repository should be auto-initialized? type: boolean x-go-name: AutoInit default_branch: description: DefaultBranch of the repository (used when initializes and in template) type: string x-go-name: DefaultBranch description: description: Description of the repository to create type: string x-go-name: Description gitignores: description: Gitignores to use type: string x-go-name: Gitignores issue_labels: description: Label-Set to use type: string x-go-name: IssueLabels license: description: License to use type: string x-go-name: License name: description: Name of the repository to create type: string uniqueItems: true x-go-name: Name object_format_name: description: ObjectFormatName of the underlying git repository type: string enum: - sha1 - sha256 x-go-name: ObjectFormatName private: description: Whether the repository is private type: boolean x-go-name: Private readme: description: Readme of the repository to create type: string x-go-name: Readme template: description: Whether the repository is template type: boolean x-go-name: Template trust_model: description: TrustModel of the repository type: string enum: - default - collaborator - committer - collaboratorcommitter x-go-name: TrustModel x-go-package: forgejo.org/modules/structs CreateFileOptions: description: 'CreateFileOptions options for creating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)' type: object required: - content properties: author: $ref: '#/definitions/Identity' branch: description: branch (optional) to base this file from. if not given, the default branch is used type: string x-go-name: BranchName committer: $ref: '#/definitions/Identity' content: description: content must be base64 encoded type: string x-go-name: ContentBase64 dates: $ref: '#/definitions/CommitDateOptions' force_overwrite_new_branch: description: (optional) will do a force-push if the new branch already exists type: boolean x-go-name: ForceOverwriteNewBranch message: description: message (optional) for the commit of this file. if not supplied, a default message will be used type: string x-go-name: Message new_branch: description: new_branch (optional) will make a new branch from `branch` before creating the file type: string x-go-name: NewBranchName signoff: description: Add a Signed-off-by trailer by the committer at the end of the commit log message. type: boolean x-go-name: Signoff x-go-package: forgejo.org/modules/structs SubmitPullReviewOptions: description: SubmitPullReviewOptions are options to submit a pending pull review type: object properties: body: type: string x-go-name: Body event: $ref: '#/definitions/ReviewStateType' x-go-package: forgejo.org/modules/structs EditPullRequestOption: description: EditPullRequestOption options when modify pull request type: object properties: allow_maintainer_edit: type: boolean x-go-name: AllowMaintainerEdit assignee: type: string x-go-name: Assignee assignees: type: array items: type: string x-go-name: Assignees base: type: string x-go-name: Base body: type: string x-go-name: Body due_date: type: string format: date-time x-go-name: Deadline labels: type: array items: type: integer format: int64 x-go-name: Labels milestone: type: integer format: int64 x-go-name: Milestone state: type: string x-go-name: State title: type: string x-go-name: Title unset_due_date: type: boolean x-go-name: RemoveDeadline x-go-package: forgejo.org/modules/structs Secret: description: Secret represents a secret type: object properties: created_at: type: string format: date-time x-go-name: Created name: description: the secret's name type: string x-go-name: Name x-go-package: forgejo.org/modules/structs ActionTaskResponse: description: ActionTaskResponse returns a ActionTask type: object properties: total_count: type: integer format: int64 x-go-name: TotalCount workflow_runs: type: array items: $ref: '#/definitions/ActionTask' x-go-name: Entries x-go-package: forgejo.org/modules/structs RepoTransfer: description: RepoTransfer represents a pending repo transfer type: object properties: doer: $ref: '#/definitions/User' recipient: $ref: '#/definitions/User' teams: type: array items: $ref: '#/definitions/Team' x-go-name: Teams x-go-package: forgejo.org/modules/structs StateType: description: StateType issue state type type: string x-go-package: forgejo.org/modules/structs Identity: description: Identity for a person's identity like an author or committer type: object properties: email: type: string format: email x-go-name: Email name: type: string x-go-name: Name x-go-package: forgejo.org/modules/structs MigrateRepoOptions: description: 'MigrateRepoOptions options for migrating repository''s this is used to interact with api v1' type: object required: - clone_addr - repo_name properties: auth_password: type: string x-go-name: AuthPassword auth_token: type: string x-go-name: AuthToken auth_username: type: string x-go-name: AuthUsername clone_addr: type: string x-go-name: CloneAddr description: type: string x-go-name: Description issues: type: boolean x-go-name: Issues labels: type: boolean x-go-name: Labels lfs: type: boolean x-go-name: LFS lfs_endpoint: type: string x-go-name: LFSEndpoint milestones: type: boolean x-go-name: Milestones mirror: type: boolean x-go-name: Mirror mirror_interval: type: string x-go-name: MirrorInterval private: type: boolean x-go-name: Private pull_requests: type: boolean x-go-name: PullRequests releases: type: boolean x-go-name: Releases repo_name: type: string x-go-name: RepoName repo_owner: description: Name of User or Organisation who will own Repo after migration type: string x-go-name: RepoOwner service: type: string enum: - git - github - gitea - gitlab - gogs - onedev - gitbucket - codebase x-go-name: Service uid: description: deprecated (only for backwards compatibility) type: integer format: int64 x-go-name: RepoOwnerID wiki: type: boolean x-go-name: Wiki x-go-package: forgejo.org/modules/structs FileDeleteResponse: description: FileDeleteResponse contains information about a repo's file that was deleted type: object properties: commit: $ref: '#/definitions/FileCommitResponse' content: x-go-name: Content verification: $ref: '#/definitions/PayloadCommitVerification' x-go-package: forgejo.org/modules/structs CommitUser: type: object title: CommitUser contains information of a user in the context of a commit. properties: date: type: string x-go-name: Date email: type: string format: email x-go-name: Email name: type: string x-go-name: Name x-go-package: forgejo.org/modules/structs IssueTemplate: description: IssueTemplate represents an issue template for a repository type: object properties: about: type: string x-go-name: About body: type: array items: $ref: '#/definitions/IssueFormField' x-go-name: Fields content: type: string x-go-name: Content file_name: type: string x-go-name: FileName labels: $ref: '#/definitions/IssueTemplateLabels' name: type: string x-go-name: Name ref: type: string x-go-name: Ref title: type: string x-go-name: Title x-go-package: forgejo.org/modules/structs SearchResults: description: SearchResults results of a successful search type: object properties: data: type: array items: $ref: '#/definitions/Repository' x-go-name: Data ok: type: boolean x-go-name: OK x-go-package: forgejo.org/modules/structs BranchProtection: description: BranchProtection represents a branch protection for a repository type: object properties: apply_to_admins: type: boolean x-go-name: ApplyToAdmins approvals_whitelist_teams: type: array items: type: string x-go-name: ApprovalsWhitelistTeams approvals_whitelist_username: type: array items: type: string x-go-name: ApprovalsWhitelistUsernames 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 branch_name: description: 'Deprecated: true' type: string x-go-name: BranchName created_at: type: string format: date-time x-go-name: Created dismiss_stale_approvals: type: boolean x-go-name: DismissStaleApprovals enable_approvals_whitelist: type: boolean x-go-name: EnableApprovalsWhitelist 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 ignore_stale_approvals: type: boolean x-go-name: IgnoreStaleApprovals merge_whitelist_teams: type: array items: type: string x-go-name: MergeWhitelistTeams merge_whitelist_usernames: type: array items: type: string x-go-name: MergeWhitelistUsernames protected_file_patterns: type: string x-go-name: ProtectedFilePatterns push_whitelist_deploy_keys: type: boolean x-go-name: PushWhitelistDeployKeys push_whitelist_teams: type: array items: type: string x-go-name: PushWhitelistTeams push_whitelist_usernames: type: array items: type: string x-go-name: PushWhitelistUsernames 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: forgejo.org/modules/structs Permission: description: Permission represents a set of permissions type: object properties: admin: type: boolean x-go-name: Admin pull: type: boolean x-go-name: Pull push: type: boolean x-go-name: Push x-go-package: forgejo.org/modules/structs Note: description: Note contains information related to a git note type: object properties: commit: $ref: '#/definitions/Commit' message: type: string x-go-name: Message x-go-package: forgejo.org/modules/structs APIForbiddenError: type: object properties: message: type: string x-go-name: Message url: type: string x-go-name: URL x-go-package: forgejo.org/services/context Compare: type: object title: Compare represents a comparison between two commits. properties: commits: type: array items: $ref: '#/definitions/Commit' x-go-name: Commits files: type: array items: $ref: '#/definitions/CommitAffectedFiles' x-go-name: Files total_commits: type: integer format: int64 x-go-name: TotalCommits x-go-package: forgejo.org/modules/structs CreateReleaseOption: description: CreateReleaseOption options when creating a release type: object required: - tag_name properties: body: type: string x-go-name: Note draft: type: boolean x-go-name: IsDraft hide_archive_links: type: boolean x-go-name: HideArchiveLinks name: type: string x-go-name: Title prerelease: type: boolean x-go-name: IsPrerelease tag_name: type: string x-go-name: TagName target_commitish: type: string x-go-name: Target x-go-package: forgejo.org/modules/structs ActionRunJob: description: ActionRunJob represents a job of a run type: object properties: attempt: description: How many times the job has been attempted including the current attempt. type: integer format: int64 x-go-name: Attempt handle: description: Opaque identifier that uniquely identifies a single attempt of a job. type: string x-go-name: Handle id: description: Identifier of this job. type: integer format: int64 x-go-name: ID name: description: the action run job name type: string x-go-name: Name needs: description: the action run job needed ids type: array items: type: string x-go-name: Needs owner_id: description: the owner id type: integer format: int64 x-go-name: OwnerID repo_id: description: the repository id type: integer format: int64 x-go-name: RepoID run_id: description: Identifier of the workflow run this job belongs to. type: integer format: int64 x-go-name: RunID runs_on: description: the action run job labels to run on type: array items: type: string x-go-name: RunsOn status: description: the action run job status type: string x-go-name: Status task_id: description: the action run job latest task id type: integer format: int64 x-go-name: TaskID x-go-package: forgejo.org/modules/structs IssueFormFieldVisible: description: IssueFormFieldVisible defines issue form field visible type: string x-go-package: forgejo.org/modules/structs GitHook: description: GitHook represents a Git repository hook type: object properties: content: type: string x-go-name: Content is_active: type: boolean x-go-name: IsActive name: type: string x-go-name: Name x-go-package: forgejo.org/modules/structs TrackedTime: description: TrackedTime worked time for an issue / pr type: object properties: created: type: string format: date-time x-go-name: Created id: type: integer format: int64 x-go-name: ID issue: $ref: '#/definitions/Issue' issue_id: description: deprecated (only for backwards compatibility) type: integer format: int64 x-go-name: IssueID time: description: Time in seconds type: integer format: int64 x-go-name: Time user_id: description: deprecated (only for backwards compatibility) type: integer format: int64 x-go-name: UserID user_name: type: string x-go-name: UserName x-go-package: forgejo.org/modules/structs CreatePullReviewOptions: description: CreatePullReviewOptions are options to create a pull review type: object properties: body: type: string x-go-name: Body comments: type: array items: $ref: '#/definitions/CreatePullReviewComment' x-go-name: Comments commit_id: type: string x-go-name: CommitID event: $ref: '#/definitions/ReviewStateType' x-go-package: forgejo.org/modules/structs ReplaceFlagsOption: description: ReplaceFlagsOption options when replacing the flags of a repository type: object properties: flags: type: array items: type: string x-go-name: Flags x-go-package: forgejo.org/modules/structs CreatePushMirrorOption: type: object title: CreatePushMirrorOption represents need information to create a push mirror of a repository. properties: branch_filter: type: string x-go-name: BranchFilter interval: type: string x-go-name: Interval remote_address: type: string x-go-name: RemoteAddress remote_password: type: string x-go-name: RemotePassword remote_username: type: string x-go-name: RemoteUsername sync_on_commit: type: boolean x-go-name: SyncOnCommit use_ssh: type: boolean x-go-name: UseSSH x-go-package: forgejo.org/modules/structs ActionVariable: description: ActionVariable return value of the query API type: object properties: data: description: the value of the variable type: string x-go-name: Data name: description: the name of the variable type: string x-go-name: Name owner_id: description: the owner to which the variable belongs type: integer format: int64 x-go-name: OwnerID repo_id: description: the repository to which the variable belongs type: integer format: int64 x-go-name: RepoID x-go-package: forgejo.org/modules/structs CreateTagOption: description: CreateTagOption options when creating a tag type: object required: - tag_name properties: message: type: string x-go-name: Message tag_name: type: string x-go-name: TagName target: type: string x-go-name: Target x-go-package: forgejo.org/modules/structs CreatePullReviewComment: description: CreatePullReviewComment represent a review comment for creation api type: object properties: body: type: string x-go-name: Body extra_lines_count: description: number of additional lines after the commented line (0 = single line comment) type: integer format: int64 x-go-name: ExtraLinesCount new_position: description: if comment to new file line or 0 type: integer format: int64 x-go-name: NewLineNum old_position: description: if comment to old file line or 0 type: integer format: int64 x-go-name: OldLineNum path: description: the tree path type: string x-go-name: Path x-go-package: forgejo.org/modules/structs IssueConfigContactLink: type: object properties: about: type: string x-go-name: About name: type: string x-go-name: Name url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs AnnotatedTag: description: AnnotatedTag represents an annotated tag type: object properties: archive_download_count: $ref: '#/definitions/TagArchiveDownloadCount' message: type: string x-go-name: Message object: $ref: '#/definitions/AnnotatedTagObject' sha: type: string x-go-name: SHA tag: type: string x-go-name: Tag tagger: $ref: '#/definitions/CommitUser' url: type: string x-go-name: URL verification: $ref: '#/definitions/PayloadCommitVerification' x-go-package: forgejo.org/modules/structs CommitAffectedFiles: description: CommitAffectedFiles store information about files affected by the commit type: object properties: filename: type: string x-go-name: Filename status: type: string x-go-name: Status x-go-package: forgejo.org/modules/structs RegisterRunnerResponse: type: object title: RegisterRunnerResponse contains the details of the just registered runner. properties: id: type: integer format: int64 x-go-name: ID token: type: string x-go-name: Token uuid: type: string x-go-name: UUID x-go-package: forgejo.org/modules/structs IssueFormField: description: IssueFormField represents a form field type: object properties: attributes: type: object additionalProperties: {} x-go-name: Attributes id: type: string x-go-name: ID type: $ref: '#/definitions/IssueFormFieldType' validations: type: object additionalProperties: {} x-go-name: Validations visible: type: array items: $ref: '#/definitions/IssueFormFieldVisible' x-go-name: Visible x-go-package: forgejo.org/modules/structs Label: description: Label a label to an issue or a pr type: object properties: color: type: string x-go-name: Color example: 00aabb description: type: string x-go-name: Description exclusive: type: boolean x-go-name: Exclusive example: false id: type: integer format: int64 x-go-name: ID is_archived: type: boolean x-go-name: IsArchived example: false name: type: string x-go-name: Name url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs EditBranchProtectionOption: description: EditBranchProtectionOption options for editing a branch protection type: object properties: apply_to_admins: type: boolean x-go-name: ApplyToAdmins approvals_whitelist_teams: type: array items: type: string x-go-name: ApprovalsWhitelistTeams approvals_whitelist_username: type: array items: type: string x-go-name: ApprovalsWhitelistUsernames 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 dismiss_stale_approvals: type: boolean x-go-name: DismissStaleApprovals enable_approvals_whitelist: type: boolean x-go-name: EnableApprovalsWhitelist 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 ignore_stale_approvals: type: boolean x-go-name: IgnoreStaleApprovals merge_whitelist_teams: type: array items: type: string x-go-name: MergeWhitelistTeams merge_whitelist_usernames: type: array items: type: string x-go-name: MergeWhitelistUsernames protected_file_patterns: type: string x-go-name: ProtectedFilePatterns push_whitelist_deploy_keys: type: boolean x-go-name: PushWhitelistDeployKeys push_whitelist_teams: type: array items: type: string x-go-name: PushWhitelistTeams push_whitelist_usernames: type: array items: type: string x-go-name: PushWhitelistUsernames 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: forgejo.org/modules/structs ExternalTracker: description: ExternalTracker represents settings for external tracker type: object properties: external_tracker_format: description: External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. type: string x-go-name: ExternalTrackerFormat external_tracker_regexp_pattern: description: External Issue Tracker issue regular expression type: string x-go-name: ExternalTrackerRegexpPattern external_tracker_style: description: External Issue Tracker Number Format, either `numeric`, `alphanumeric`, or `regexp` type: string x-go-name: ExternalTrackerStyle external_tracker_url: description: URL of external issue tracker. type: string x-go-name: ExternalTrackerURL x-go-package: forgejo.org/modules/structs EditReleaseOption: description: EditReleaseOption options when editing a release type: object properties: body: type: string x-go-name: Note draft: type: boolean x-go-name: IsDraft hide_archive_links: type: boolean x-go-name: HideArchiveLinks name: type: string x-go-name: Title prerelease: type: boolean x-go-name: IsPrerelease tag_name: type: string x-go-name: TagName target_commitish: type: string x-go-name: Target x-go-package: forgejo.org/modules/structs Tag: description: Tag represents a repository tag type: object properties: archive_download_count: $ref: '#/definitions/TagArchiveDownloadCount' commit: $ref: '#/definitions/CommitMeta' id: type: string x-go-name: ID message: type: string x-go-name: Message name: type: string x-go-name: Name tarball_url: type: string x-go-name: TarballURL zipball_url: type: string x-go-name: ZipballURL x-go-package: forgejo.org/modules/structs PullReviewComment: description: PullReviewComment represents a comment on a pull request review type: object properties: body: type: string x-go-name: Body commit_id: type: string x-go-name: CommitID created_at: type: string format: date-time x-go-name: Created diff_hunk: type: string x-go-name: DiffHunk extra_lines_count: description: number of additional lines after the commented line (0 = single line comment) type: integer format: int64 x-go-name: ExtraLinesCount html_url: type: string x-go-name: HTMLURL id: type: integer format: int64 x-go-name: ID original_commit_id: type: string x-go-name: OrigCommitID original_position: type: integer format: uint64 x-go-name: OldLineNum path: type: string x-go-name: Path position: type: integer format: uint64 x-go-name: LineNum pull_request_review_id: type: integer format: int64 x-go-name: ReviewID pull_request_url: type: string x-go-name: HTMLPullURL resolver: $ref: '#/definitions/User' updated_at: type: string format: date-time x-go-name: Updated user: $ref: '#/definitions/User' x-go-package: forgejo.org/modules/structs Comment: description: Comment represents a comment on a commit or issue type: object properties: assets: description: The attachments to the comment type: array items: $ref: '#/definitions/Attachment' x-go-name: Attachments body: description: The body of the comment type: string x-go-name: Body created_at: description: The time of the comment's creation type: string format: date-time x-go-name: Created html_url: description: The HTML URL of the comment type: string x-go-name: HTMLURL id: description: The identifier of the comment type: integer format: int64 x-go-name: ID issue_url: description: The HTML URL of the issue if the comment is posted on an issue, else empty string type: string x-go-name: IssueURL original_author: description: The original author that posted the comment if it was not posted locally, else empty string type: string x-go-name: OriginalAuthor original_author_id: description: The ID of the original author that posted the comment if it was not posted locally, else 0 type: integer format: int64 x-go-name: OriginalAuthorID pull_request_url: description: The HTML URL of the pull request if the comment is posted on a pull request, else empty string type: string x-go-name: PRURL updated_at: description: The time of the comment's update type: string format: date-time x-go-name: Updated user: $ref: '#/definitions/User' x-go-package: forgejo.org/modules/structs IssueConfig: type: object properties: blank_issues_enabled: type: boolean x-go-name: BlankIssuesEnabled contact_links: type: array items: $ref: '#/definitions/IssueConfigContactLink' x-go-name: ContactLinks x-go-package: forgejo.org/modules/structs UpdateVariableOption: type: object title: UpdateVariableOption defines the properties of the variable to update. required: - value properties: name: description: 'New name for the variable. If the field is empty, the variable name won''t be updated. Forgejo will convert it to uppercase.' type: string x-go-name: Name value: description: 'Value of the variable to update. Special characters will be retained. Line endings will be normalized to LF to match the behaviour of browsers. Encode the data with Base64 if line endings should be retained.' type: string x-go-name: Value x-go-package: forgejo.org/modules/structs APIError: description: APIError is an api error with a message type: object properties: message: type: string x-go-name: Message url: type: string x-go-name: URL x-go-package: forgejo.org/modules/structs PayloadCommitVerification: description: PayloadCommitVerification represents the GPG verification of a commit type: object properties: payload: type: string x-go-name: Payload reason: type: string x-go-name: Reason signature: type: string x-go-name: Signature signer: $ref: '#/definitions/PayloadUser' verified: type: boolean x-go-name: Verified x-go-package: forgejo.org/modules/structs PayloadCommit: description: PayloadCommit represents a commit type: object properties: added: type: array items: type: string x-go-name: Added author: $ref: '#/definitions/PayloadUser' committer: $ref: '#/definitions/PayloadUser' id: description: sha1 hash of the commit type: string x-go-name: ID message: type: string x-go-name: Message modified: type: array items: type: string x-go-name: Modified removed: type: array items: type: string x-go-name: Removed timestamp: type: string format: date-time x-go-name: Timestamp url: type: string x-go-name: URL verification: $ref: '#/definitions/PayloadCommitVerification' x-go-package: forgejo.org/modules/structs Milestone: description: Milestone milestone is a collection of issues on one repository type: object properties: closed_at: type: string format: date-time x-go-name: Closed closed_issues: type: integer format: int64 x-go-name: ClosedIssues created_at: type: string format: date-time x-go-name: Created description: type: string x-go-name: Description due_on: type: string format: date-time x-go-name: Deadline id: type: integer format: int64 x-go-name: ID open_issues: type: integer format: int64 x-go-name: OpenIssues state: $ref: '#/definitions/StateType' title: type: string x-go-name: Title updated_at: type: string format: date-time x-go-name: Updated x-go-package: forgejo.org/modules/structs CommitDateOptions: description: CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE type: object properties: author: type: string format: date-time x-go-name: Author committer: type: string format: date-time x-go-name: Committer x-go-package: forgejo.org/modules/structs responses: CommitStatus: description: CommitStatus schema: $ref: '#/definitions/CommitStatus' CombinedStatus: description: CombinedStatus schema: $ref: '#/definitions/CombinedStatus' conflict: description: APIConflict is a conflict empty response VariableList: description: VariableList schema: type: array items: $ref: '#/definitions/ActionVariable' headers: X-Total-Count: type: integer format: int64 description: The total number of variables PushMirrorList: description: PushMirrorList schema: type: array items: $ref: '#/definitions/PushMirror' headers: X-Total-Count: type: integer format: int64 description: The total number of push mirrors quotaExceeded: description: QuotaExceeded headers: message: type: string user_id: type: integer format: int64 username: type: string PullReviewList: description: PullReviewList schema: type: array items: $ref: '#/definitions/PullReview' headers: X-Total-Count: type: integer format: int64 description: The total number of pull reviews WikiPageList: description: WikiPageList schema: type: array items: $ref: '#/definitions/WikiPageMetaData' headers: X-Total-Count: type: integer format: int64 description: The total number of wiki pages GitBlobList: description: GitBlobList schema: type: array items: $ref: '#/definitions/GitBlob' ReleaseList: description: ReleaseList schema: type: array items: $ref: '#/definitions/Release' headers: X-Total-Count: type: integer format: int64 description: The total number of releases BranchList: description: BranchList schema: type: array items: $ref: '#/definitions/Branch' headers: X-Total-Count: type: integer format: int64 description: The total number of branches ActionRunnerList: description: ActionRunnerList is a list of Forgejo Action runners schema: type: array items: $ref: '#/definitions/ActionRunner' headers: Link: type: string description: Links to other pages, if any X-Total-Count: type: integer format: int64 description: Total number of runners matching the search criteria (excluding page and limit) LanguageStatistics: description: LanguageStatistics schema: type: object additionalProperties: type: integer format: int64 TagProtection: description: TagProtection schema: $ref: '#/definitions/TagProtection' GitHook: description: GitHook schema: $ref: '#/definitions/GitHook' RepositoryList: description: RepositoryList schema: type: array items: $ref: '#/definitions/Repository' headers: X-Total-Count: type: integer format: int64 description: The total number of repositories TrackedTimeListWithoutPagination: description: TrackedTimeListWithoutPagination - Tracked times for a specific user (no pagination headers) schema: type: array items: $ref: '#/definitions/TrackedTime' GitTreeResponse: description: GitTreeResponse schema: $ref: '#/definitions/GitTreeResponse' ActionRunList: description: ActionRunList schema: $ref: '#/definitions/ListActionRunResponse' DispatchWorkflowRun: description: DispatchWorkflowRun is a Workflow Run after dispatching schema: $ref: '#/definitions/DispatchWorkflowRun' ActivityFeedsList: description: ActivityFeedsList schema: type: array items: $ref: '#/definitions/Activity' headers: X-Total-Count: type: integer format: int64 description: The total number of activity feeds DeployKey: description: DeployKey schema: $ref: '#/definitions/DeployKey' RegisterRunnerResponse: description: RegisterRunnerResponse contains the details of the just registered runner. schema: $ref: '#/definitions/RegisterRunnerResponse' Branch: description: Branch schema: $ref: '#/definitions/Branch' string: description: APIString is a string response schema: type: string repoArchivedError: description: APIRepoArchivedError is an error that is raised when an archived repo should be modified schema: $ref: '#/definitions/APIRepoArchivedError' Tag: description: Tag schema: $ref: '#/definitions/Tag' ContentsListResponse: description: ContentsListResponse schema: type: array items: $ref: '#/definitions/ContentsResponse' UserList: description: UserList schema: type: array items: $ref: '#/definitions/User' TeamListWithoutPagination: description: TeamListWithoutPagination - Teams without pagination headers schema: type: array items: $ref: '#/definitions/Team' GitBlob: description: GitBlob schema: $ref: '#/definitions/GitBlob' ActionArtifactList: description: ActionArtifactList schema: type: array items: $ref: '#/definitions/ActionArtifact' WikiPage: description: WikiPage schema: $ref: '#/definitions/WikiPage' Compare: description: '' schema: $ref: '#/definitions/Compare' PushMirror: description: PushMirror schema: $ref: '#/definitions/PushMirror' Hook: description: Hook schema: $ref: '#/definitions/Hook' TrackedTimeList: description: TrackedTimeList schema: type: array items: $ref: '#/definitions/TrackedTime' headers: X-Total-Count: type: integer format: int64 description: The total number of tracked times SecretList: description: SecretList schema: type: array items: $ref: '#/definitions/Secret' headers: X-Total-Count: type: integer format: int64 description: The total number of secrets validationError: description: APIValidationError is error format response related to input validation schema: $ref: '#/definitions/APIValidationError' BranchProtection: description: BranchProtection schema: $ref: '#/definitions/BranchProtection' FilesResponse: description: FilesResponse schema: $ref: '#/definitions/FilesResponse' FileDeleteResponse: description: FileDeleteResponse schema: $ref: '#/definitions/FileDeleteResponse' RepoCollaboratorPermission: description: RepoCollaboratorPermission schema: $ref: '#/definitions/RepoCollaboratorPermission' Commit: description: Commit schema: $ref: '#/definitions/Commit' PullReviewListWithoutPagination: description: PullReviewListWithoutPagination - Review requests without pagination headers schema: type: array items: $ref: '#/definitions/PullReview' ActionRunJobList: description: ActionRunJobList schema: type: array items: $ref: '#/definitions/ActionRunJob' PullRequest: description: PullRequest schema: $ref: '#/definitions/PullRequest' CommitStatusList: description: CommitStatusList schema: type: array items: $ref: '#/definitions/CommitStatus' headers: X-Total-Count: type: integer format: int64 description: The total number of commit statuses AttachmentList: description: AttachmentList schema: type: array items: $ref: '#/definitions/Attachment' HookList: description: HookList schema: type: array items: $ref: '#/definitions/Hook' headers: X-Total-Count: type: integer format: int64 description: The total number of hooks ChangedFileListWithPagination: description: ChangedFileListWithPagination schema: type: array items: $ref: '#/definitions/ChangedFile' headers: X-HasMore: type: boolean description: True if there is another page X-Page: type: integer format: int64 description: The current page X-PageCount: type: integer format: int64 description: Total number of pages X-PerPage: type: integer format: int64 description: Commits per page empty: description: APIEmpty is an empty response ActionVariable: description: ActionVariable schema: $ref: '#/definitions/ActionVariable' IssueTemplates: description: IssueTemplates schema: type: array items: $ref: '#/definitions/IssueTemplate' RunJobList: description: RunJobList is a list of action run jobs schema: type: array items: $ref: '#/definitions/ActionRunJob' FileResponse: description: FileResponse schema: $ref: '#/definitions/FileResponse' Team: description: Team schema: $ref: '#/definitions/Team' SearchResults: description: SearchResults schema: $ref: '#/definitions/SearchResults' TagList: description: TagList schema: type: array items: $ref: '#/definitions/Tag' headers: X-Total-Count: type: integer format: int64 description: The total number of tags ReferenceList: description: ReferenceList schema: type: array items: $ref: '#/definitions/Reference' PullRequestList: description: PullRequestList schema: type: array items: $ref: '#/definitions/PullRequest' IssueListWithoutPagination: description: IssueListWithoutPagination - Issues without pagination headers (used for pinned issues, dependencies, etc.) schema: type: array items: $ref: '#/definitions/Issue' StringSlice: description: StringSlice schema: type: array items: type: string PullReviewCommentList: description: PullCommentList schema: type: array items: $ref: '#/definitions/PullReviewComment' WikiCommitList: description: WikiCommitList schema: $ref: '#/definitions/WikiCommitList' headers: X-Total-Count: type: integer format: int64 description: The total number of wiki commits TagProtectionList: description: TagProtectionList schema: type: array items: $ref: '#/definitions/TagProtection' RegistrationToken: description: RegistrationToken is a string used to register a runner with a server schema: $ref: '#/definitions/RegistrationToken' DeployKeyList: description: DeployKeyList schema: type: array items: $ref: '#/definitions/DeployKey' headers: X-Total-Count: type: integer format: int64 description: The total number of deploy keys notFound: description: APINotFound is a not found error response schema: $ref: '#/definitions/APINotFound' Attachment: description: Attachment schema: $ref: '#/definitions/Attachment' unauthorized: description: APIUnauthorizedError is a unauthorized error response schema: $ref: '#/definitions/APIUnauthorizedError' WatchInfo: description: WatchInfo schema: $ref: '#/definitions/WatchInfo' Repository: description: Repository schema: $ref: '#/definitions/Repository' ActionArtifact: description: ActionArtifact schema: $ref: '#/definitions/ActionArtifact' GitHookList: description: GitHookList schema: type: array items: $ref: '#/definitions/GitHook' RepoIssueConfigValidation: description: RepoIssueConfigValidation schema: $ref: '#/definitions/IssueConfigValidation' CommitList: description: CommitList schema: type: array items: $ref: '#/definitions/Commit' TopicNames: description: TopicNames schema: $ref: '#/definitions/TopicName' AnnotatedTag: description: AnnotatedTag schema: $ref: '#/definitions/AnnotatedTag' error: description: APIError is error format response schema: $ref: '#/definitions/APIError' forbidden: description: APIForbiddenError is a forbidden error response schema: $ref: '#/definitions/APIForbiddenError' Note: description: Note schema: $ref: '#/definitions/Note' ContentsResponse: description: ContentsResponse schema: $ref: '#/definitions/ContentsResponse' PullReviewComment: description: PullComment schema: $ref: '#/definitions/PullReviewComment' ActionRun: description: ActionRun schema: $ref: '#/definitions/ActionRun' RepoIssueConfig: description: RepoIssueConfig schema: $ref: '#/definitions/IssueConfig' invalidTopicsError: description: APIInvalidTopicsError is error format response to invalid topics schema: $ref: '#/definitions/APIInvalidTopicsError' SyncForkInfo: description: SyncForkInfo schema: $ref: '#/definitions/SyncForkInfo' TasksList: description: TasksList schema: $ref: '#/definitions/ActionTaskResponse' EmptyRepository: description: EmptyRepository schema: $ref: '#/definitions/APIError' ActionRunner: description: ActionRunner represents a runner schema: $ref: '#/definitions/ActionRunner' BranchProtectionList: description: BranchProtectionList schema: type: array items: $ref: '#/definitions/BranchProtection' RepoNewIssuePinsAllowed: description: RepoNewIssuePinsAllowed schema: $ref: '#/definitions/NewIssuePinsAllowed' PullReview: description: PullReview schema: $ref: '#/definitions/PullReview' Release: description: Release schema: $ref: '#/definitions/Release' securityDefinitions: AuthorizationHeaderToken: description: API tokens must be prepended with "token" followed by a space. type: apiKey name: Authorization in: header BasicAuth: type: basic SudoHeader: description: Sudo API request as the user provided as the key. Admin privileges are required. type: apiKey name: Sudo in: header SudoParam: description: Sudo API request as the user provided as the key. Admin privileges are required. type: apiKey name: sudo in: query TOTPHeader: description: Must be used in combination with BasicAuth if two-factor authentication is enabled. type: apiKey name: X-FORGEJO-OTP in: header