GitHub Code Owners API

The Code Owners API from GitHub — 1 operation(s) for code owners.

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations

Specifications

Other Resources

OpenAPI Specification

github-code-owners-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.1.4
  title: github-repos-api Code Owners API
  description: 'Use the REST API to create, manage and control the workflow of public and

    private GitHub repositories.'
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  contact:
    name: Support
    url: https://support.github.com/contact
servers:
- url: '{protocol}://{hostname}'
  variables:
    hostname:
      description: Self-hosted Enterprise Server hostname
      default: api.github.com
    protocol:
      description: Self-hosted Enterprise Server protocol
      default: https
tags:
- name: Code Owners
paths:
  /repos/{owner}/{repo}/codeowners/errors:
    get:
      summary: GitHub List Codeowners Errors
      description: 'List any syntax errors that are detected in the CODEOWNERS

        file.


        For more information about the correct CODEOWNERS syntax,

        see "[About code owners](https://docs.github.com/enterprise-server@3.9/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners)."'
      tags:
      - Code Owners
      operationId: listCodeownersErrors
      externalDocs:
        description: API method documentation
        url: https://docs.github.com/enterprise-server@3.9/rest/repos/repos#list-codeowners-errors
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - name: ref
        description: 'branch, tag or commit name used to determine which version of the CODEOWNERS file to use. Default: the repository''s default branch (e.g. `main`)'
        in: query
        required: false
        schema:
          type: string
        example: main
      - in: header
        name: Authorization
        schema:
          type: string
        example: example_value
      - in: header
        name: X-GitHub-Api-Version
        schema:
          type: string
          default: '2022-11-28'
        example: example_value
      - in: header
        name: Accept
        schema:
          type: string
          default: application/vnd.github+json
        example: example_value
      responses:
        '200':
          description: Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/codeowners-errors'
              examples:
                default:
                  $ref: '#/components/examples/codeowners-errors'
        '404':
          description: Resource not found
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
        category: repos
        subcategory: repos
      security:
      - bearerHttpAuthentication: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  parameters:
    owner:
      name: owner
      description: The account owner of the repository. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
    repo:
      name: repo
      description: The name of the repository without the `.git` extension. The name is not case sensitive.
      in: path
      required: true
      schema:
        type: string
  examples:
    codeowners-errors:
      value:
        errors:
        - line: 3
          column: 1
          kind: Invalid pattern
          source: '***/*.rb @monalisa'
          suggestion: Did you mean `**/*.rb`?
          message: "Invalid pattern on line 3: Did you mean `**/*.rb`?\n\n  ***/*.rb @monalisa\n  ^"
          path: .github/CODEOWNERS
        - line: 7
          column: 7
          kind: Invalid owner
          source: '*.txt docs@'
          suggestion: Did you mean `**/*.rb`?
          message: "Invalid owner on line 7:\n\n  *.txt docs@\n        ^"
          path: .github/CODEOWNERS
  schemas:
    codeowners-errors:
      title: CODEOWNERS errors
      description: list of errors found in a repo's CODEOWNERS file
      type: object
      properties:
        errors:
          type: array
          items:
            type: object
            properties:
              line:
                description: The line number where this errors occurs.
                type: integer
                example: 7
              column:
                description: The column number where this errors occurs.
                type: integer
                example: 3
              source:
                description: The contents of the line where the error occurs.
                type: string
                example: '* user'
              kind:
                description: The type of error.
                type: string
                example: Invalid owner
              suggestion:
                description: Suggested action to fix the error. This will usually be `null`, but is provided for some common errors.
                type: string
                example: The pattern `/` will never match anything, did you mean `*` instead?
              message:
                description: human-readable description of the error, combining information from multiple fields, laid out for display in a monospaced typeface (for example, a command-line setting).
                type: string
                example: "Invalid owner on line 7:\n\n  * user\n    ^"
              path:
                description: The path of the file where the error occured.
                type: string
                example: .github/CODEOWNERS
            required:
            - line
            - column
            - kind
            - message
            - path
      required:
      - errors
  securitySchemes:
    bearerHttpAuthentication:
      description: Bearer Token
      type: http
      scheme: Bearer
externalDocs:
  description: GitHub Enterprise Developer Docs
  url: https://docs.github.com/enterprise-server@3.9/rest/