Full Code of ouropencode/OpenDocumenter for AI

master 8389fdab1341 cached
57 files
2.1 MB
547.1k tokens
13 symbols
1 requests
Download .txt
Showing preview only (2,188K chars total). Download the full file or copy to clipboard to get everything.
Repository: ouropencode/OpenDocumenter
Branch: master
Commit: 8389fdab1341
Files: 57
Total size: 2.1 MB

Directory structure:
gitextract_uoe1hdom/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   ├── dependabot.yml
│   ├── labeler.yml
│   └── workflows/
│       ├── codeql-analysis.yml
│       ├── greetings.yml
│       ├── label.yml
│       └── quisque.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE.md
├── README.md
├── SECURITY.md
├── example/
│   ├── config.json
│   ├── ghes-2.20.yml
│   └── openapi.yml
├── package.json
├── src/
│   ├── .babelrc
│   ├── .browserslistrc
│   ├── assets/
│   │   ├── highlighter-theme-dark.less
│   │   ├── highlighter-theme-light.less
│   │   ├── theme.less
│   │   └── utils.less
│   ├── components/
│   │   ├── ContactTeam.vue
│   │   ├── DocEntry.vue
│   │   ├── DocEntryTitle.vue
│   │   ├── DocFooter.vue
│   │   ├── DocHeader.vue
│   │   ├── DocLayout.vue
│   │   ├── DocSidebar.vue
│   │   ├── DocSidebarEntry.vue
│   │   ├── DocSidebarTag.vue
│   │   ├── DocTag.vue
│   │   ├── DocToolbox.vue
│   │   ├── DocToolboxDropdown.vue
│   │   ├── DocToolboxIcon.vue
│   │   ├── Endpoint.vue
│   │   ├── Example.vue
│   │   ├── Highlight.vue
│   │   ├── Markdown.vue
│   │   ├── ReqBody.vue
│   │   ├── ReqResponse.vue
│   │   ├── Shield.vue
│   │   ├── SplitSection.vue
│   │   └── StatusCode.vue
│   ├── environment.json
│   ├── index.html
│   ├── index.js
│   ├── index.vue
│   ├── plugins/
│   │   ├── codegen.js
│   │   └── envInject.js
│   ├── store.js
│   └── vue.config.js
└── src-engine/
    ├── cli.js
    └── index.js

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
 - OS: [e.g. iOS]
 - Browser [e.g. chrome, safari]
 - Version [e.g. 22]

**Smartphone (please complete the following information):**
 - Device: [e.g. iPhone6]
 - OS: [e.g. iOS8.1]
 - Browser [e.g. stock browser, safari]
 - Version [e.g. 22]

**Additional context**
Add any other context about the problem here.


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.


================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

### Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] Any dependent changes have been merged and published in downstream modules


================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "daily"
    assignees:
      - "r4wizard"
    pull-request-branch-name:
      separator: "-"


================================================
FILE: .github/labeler.yml
================================================
documentation:
  - "**/*.md"

engine:
  - "src/**/*"

template:
  - "src-nuxt/**/*"


================================================
FILE: .github/workflows/codeql-analysis.yml
================================================
name: "CodeQL"

on:
  push:
    branches: [master]
  pull_request:
    # The branches below must be a subset of the branches above
    branches: [master]
  schedule:
    - cron: '0 19 * * 2'

jobs:
  analyze:
    name: Analyze
    runs-on: ubuntu-latest

    strategy:
      fail-fast: false
      matrix:
        # Override automatic language detection by changing the below list
        # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
        language: ['javascript']
        # Learn more...
        # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

    steps:
    - name: Checkout repository
      uses: actions/checkout@v2
      with:
        # We must fetch at least the immediate parents so that if this is
        # a pull request then we can checkout the head.
        fetch-depth: 2

    # If this run was triggered by a pull request event, then checkout
    # the head of the pull request instead of the merge commit.
    - run: git checkout HEAD^2
      if: ${{ github.event_name == 'pull_request' }}

    # Initializes the CodeQL tools for scanning.
    - name: Initialize CodeQL
      uses: github/codeql-action/init@v1
      with:
         languages: ${{ matrix.language }}

    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).
    # If this step fails, then you should remove it and run the build manually (see below)
    - name: Autobuild
      uses: github/codeql-action/autobuild@v1

    # ℹ️ Command-line programs to run using the OS shell.
    # 📚 https://git.io/JvXDl

    # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
    #    and modify them (or add more) to build your code if your project
    #    uses a compiled language

    #- run: |
    #   make bootstrap
    #   make release

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v1


================================================
FILE: .github/workflows/greetings.yml
================================================
name: Greetings

on: [pull_request, issues]

jobs:
  greeting:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/first-interaction@v1
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        issue-message: 'Thank you for opening your first issue! Please ensure you''ve read the [CONTRIBUTING.md](https://github.com/ouropencode/OpenDocumenter/blob/master/CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](https://github.com/ouropencode/OpenDocumenter/blob/master/CODE_OF_CONDUCT.md) files.'
        pr-message: 'Thank you for opening your first pull request! Please ensure you''ve read the [CONTRIBUTING.md](https://github.com/ouropencode/OpenDocumenter/blob/master/CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](https://github.com/ouropencode/OpenDocumenter/blob/master/CODE_OF_CONDUCT.md) files.'


================================================
FILE: .github/workflows/label.yml
================================================
name: Labeler

on: [pull_request]

jobs:
  label:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/labeler@v2
      with:
        repo-token: "${{ secrets.GITHUB_TOKEN }}"


================================================
FILE: .github/workflows/quisque.yml
================================================
name: Quisque API Build

on:
  push:
    branches: ["master"]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Setup Node.js Environment
      uses: actions/setup-node@v2.1.1
      with:
        node-version: '>=14.6'
    - name: Checkout Git Repository
      uses: actions/checkout@master
    - name: Install Dependencies (with caching)
      uses: bahmutov/npm-install@v1
    - name: Generate Documentation
      run: npm run dev-generate
    - name: Upload Build Artifact
      uses: actions/upload-artifact@v2
      with:
        name: documentation
        path: example/docs/
        if-no-files-found: error
    - name: Deploy to GitHub Pages
      uses: crazy-max/ghaction-github-pages@v2.1.1
      with:
        target_branch: gh-pages
        build_dir: example/docs/
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


================================================
FILE: .gitignore
================================================
node_modules/
.nuxt/
dist/
docs/
tmp/
*.log
package-lock.json


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
 advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
 address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
 professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at ouropencode@shadowacre.ltd. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing

We love pull requests from everyone.

When contributing to this repository, please first discuss the change you wish to make by opening an issue. Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in all your interactions with the project.

## Development Setup

### Fork the repository
```bash
> git clone git@github.com:ouropencode/opendocumenter.git
```

### Set up your machine
```bash
> yarn install
```

### Execute
```bash
> yarn start         # run the example 'openapi.yml' in  ./example
> yarn dev           # watch the filesystem for changes and exec `yarn start`
```

## Pull Request Process
When your feature is ready to show to others, you should follow the below process to allow for an easy contribution flow.

1. Make your changes.
2. If applicable, Update the [README.md](README.md).
3. If applicable, Update the `./example/config.json` file.
4. If applicable, Update the `./example/openapi.yml` file.
5. Push to a new branch.
6. Create a [draft pull request](https://github.blog/2019-02-14-introducing-draft-pull-requests/).
7. When ready to merge, update pull request to 'Ready for Review'.
8. Wait for us, we try to comment on pull requests within a reasonable timeframe. We may suggest changes before accepting the pull request.

## Internationalization
Any contributions should consider the existing i18n support available through the `$i18n()` method. Any new strings added to the project should use this method for string internationalization. When adding a new string you will need to edit the `./src/index.js` file, and the `./example/config.json` file.

## Configuration
All configuration is handled through a `.json` file provided by the end-user. Provided throughout the project via the `$config.*` variable. When adding a new parameter you will need to edit the `./src/index.js` file, the `./src/environment.json` file, and the `./example/config.json` file.

Care should be taken when altering the `environment.json` file - the intention if to provide enough structure for the documentation to display even if no env is available to inject (this happens when running `yarn dev-nuxt`). Ideally, this means purely structural elements such as `{}` and `[]` although this isn't a hard requirement.

## Versions
For versioning we use the [Semantic Versioning](https://semver.org) versioning scheme. Versioning will be managed by the $ourOpenCode team and contributors should leave all versions at the version forked.


================================================
FILE: LICENSE.md
================================================
# Copyright (c) 2020+ OurOpenCode

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


================================================
FILE: README.md
================================================
<h1 align="center">OpenDocumenter</h1>

<p align="center">
  <img alt="Version" src="https://img.shields.io/github/package-json/v/ouropencode/OpenDocumenter" />
  <img alt="npm" src="https://img.shields.io/npm/v/opendocumenter" />
  <img alt="License" src="https://img.shields.io/github/license/ouropencode/OpenDocumenter" />
  <img alt="Dependencies" src="https://img.shields.io/librariesio/release/npm/opendocumenter" />
  <img alt="Issues" src="https://img.shields.io/github/issues/ouropencode/OpenDocumenter" />
  <img alt="Node Version" src="https://img.shields.io/node/v/opendocumenter" />
  <img alt="Build Status" src="https://github.com/ouropencode/OpenDocumenter/workflows/Quisque%20API%20Build/badge.svg" />
</p>

<p align="center">
  <a href="https://ouropencode.github.io/OpenDocumenter/" target="_blank">
    <img alt="Node Version" src="https://raw.githubusercontent.com/ouropencode/OpenDocumenter/master/example/example.gif" />
  </a>
</p>

OpenDocumenter is a automatic documentation generator for [OpenAPI v3](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md) schemas. Simply provide your schema file in JSON or YAML, then sit back and enjoy the documentation.

Powered by [nuxt.js](https://nuxtjs.org/https://nuxtjs.org/) and [swagger-parser](https://github.com/swagger-api/swagger-parser).

## Example
For a live preview of documentation generated with OpenDocumenter you can view our demo documentation "**[Quisque API](https://ouropencode.github.io/OpenDocumenter/)**". This example uses lorem-ipsum for all content to provide placeholder text used to demonstrate the form of a document without relying on meaningful content.

## Installation

```bash
> npm install -g opendocumenter
```
or
```bash
> yarn global add opendocumenter
```

## Usage
```
> opendocumenter --help

   _____             ____                            _
  |     |___ ___ ___|    \ ___ ___ _ _ _____ ___ ___| |_ ___ ___
  |  |  | . | -_|   |  |  | . |  _| | |     | -_|   |  _| -_|  _|
  |_____|  _|___|_|_|____/|___|___|___|_|_|_|___|_|_|_| |___|_|
        |_|                                                                      

  OpenDocumenter is a automatic documentation generator for OpenAPI v3 schemas.
  Simply provide your schema file in JSON or YAML, then sit back and enjoy the documentation.

  Powered by nuxt.js and swagger-parser.

  Usage:

    opendocumenter --schema=<file> --output=<dir>

  Arguments:

    --schema=<file>    (required) The OpenAPI 3 format file to generate documentation from.
    --output=<dir>     (required) The output destination directory.
    --config=<file>    A configuration file to load advanced options from.
```

## Configuration
OpenDocumenter can be configured using a `.json` file stored alongside your schema file.

### Merge From Directory
The `mergeFromDirectory` parameter allows you to specify a directory that will be copied over the base template before building. This allows customization of any part of OpenDocumenter to suit your needs.

```json
{
  "mergeFromDirectory": "./overrides"
}
```

Any part of the OpenDocumenter vue source (see: [./src](./src)) can be overridden, just ensure to follow the same directory structure!
```
overrides
 |- assets
 | '- theme.less
 '- components
   |- DocHeader.vue
   '- DocEntry.vue
```

### 'Generated Using' Footer
By default, a small 'Generated Using' message is included on the footer of the generated documentation. Although we'd love you to keep it, you can disable this by setting the `disableGeneratedUsingFooter` parameter to true.

```json
{
  "disableGeneratedUsingFooter": true
}
```

### Aborting on Invalid Schema
OpenDocumenter is capable of generating documentation for OpenAPI schemas that don't match the OpenAPI Specification entirely. When generating we attempt to validate your schema, display any validation warnings, and then continue to generate. If you would like the generation to abort when a schema is invalid you can set the `abortOnInvalidSchema` parameter to true.

```json
{
  "abortOnInvalidSchema": true
}
```

### Shields / Badges
Various shields are included in the generated documentation header, such as the API version. Additional shields can be added using the `shields` parameter. Each shield is an object containing either the `url` key, or a combination of `left`, `right` and `color`. The `translate` parameter can be used (`left`, `right`, `both`) to run the text through the internationalization handler. An optional link can provided with the `href` parameter. All shields are generated using [shields.io](https://shields.io) unless a URL is provided.

```json
{
  "shields": [
    { "url": "https://img.shields.io/badge/test-1.2.3--test-blue" },
    { "left": "test", "right": "1.2.3-test", "color": "blue" },
    {
      "left": "test",
      "right": "1.2.3-test",
      "color": "blue",
      "href": "https://www.example.com"
    }
  ]
}
```

### Build: Modern Mode
By default, the build-chain produces "Modern Mode"  output, shipping native ES2015 code to modern browsers that support it, with auto fallback to a legacy bundle. This can be turned off by setting `vueModernMode` parameter, afterwards the build-chain produces "Legacy" output for older browser compatibility.

```json
{
  "vueModernMode": false
}
```

### Build: Reporting
You can control the reporting output from the build-chain with the `vueReport` parameter. This defaults to `none` and can be set to `json`, `html` or `both`. With this enabled the build-chain will output a report file describing the webpack bundle.

```json
{
  "vueReport": "html"
}
```

### Internationalization
Most of the documentation text is taken directly from the OpenAPI schema file, however, there are various strings throughout the project that cannot be stored within the schema file. All of these strings are customizable by editing the `i18n` parameter.
```json
{
  "i18n": {
    "API_SDK_DOCUMENTATION": "API and SDK Documentation",
    "VERSION": "version",
    "NO_INDEPTH_DOCS_AVAILABLE_ENDPOINT": "No in-depth API documentation is available for this endpoint.",
    "NO_INDEPTH_DOCS_AVAILABLE_TAG": "No in-depth API documentation is available for this section.",
    "CLICK_TO_COPY": "click to copy",
    "COPIED": "copied",
    "REQUEST_BODY": "Request Body",
    "REQUEST_RESPONSES": "Request Responses",
    "DEFINITION": "Definition",
    "DEFINITIONS": "Definitions",
    "SERVER": "Server",
    "LANGUAGE": "Language",
    "GENERATED_USING": "Generated using OpenDocumenter by $ourOpenCode",
    "HAVE_ANY_QUESTIONS_CONTACT": "Have any questions? Please contact",
    "US": "us",
    "OR": "or",
    "VIA_EMAIL": "via email",
    "VIA_OUR_WEBSITE": "via our website",
    "TERMS_OF_SERVICE": "Terms of Service",
    "SEND_US_AN_EMAIL": "Send us an email",
    "VISIT_OUR_WEBSITE": "Visit our website",
    "EXTERNAL_DOCUMENTATION": "External Documentation",
    "DOCUMENTATION": "Documentation"
  }
}
```

> There is a single end-user visible string that isn't configurable in this config. The "Loading Documentation..." text in the page title, briefly shown during page load, is only configurable using the "Merge From Directory" parameter.

## License
Licensed under the MIT license. Please see [LICENSE](LICENSE) for more details.


================================================
FILE: SECURITY.md
================================================
# Security Policy

## Supported Versions
Only the latest version is supported and actively maintained while the project is pre-v1.

| Version | Supported          |
| ------- | ------------------ |
| 0.5.x   | :white_check_mark: |
| < 0.5   | :x:                |

## Reporting a vulnerability
To report any vulnerabilities please create an issue, you can expect to get an update on a reported vulnerability
within a reasonable timeframe. If you have the time you can additionally create a patch for the vulnerability and
create a pull request - this may speed up the process.


================================================
FILE: example/config.json
================================================
{
  "mergeFromDirectory": null,
  "disableGeneratedUsingFooter": false,
  "abortOnInvalidSchema": false,
  "vueModernMode": true,
  "vueReport": "none",
  "shields": [],
  "i18n": {
    "API_SDK_DOCUMENTATION": "API and SDK Documentation",
    "VERSION": "version",
    "NO_INDEPTH_DOCS_AVAILABLE_ENDPOINT": "No in-depth API documentation is available for this endpoint.",
    "NO_INDEPTH_DOCS_AVAILABLE_TAG": "No in-depth API documentation is available for this section.",
    "CLICK_TO_COPY": "click to copy",
    "COPIED": "copied",
    "REQUEST_BODY": "Request Body",
    "REQUEST_RESPONSES": "Request Responses",
    "DEFINITION": "Definition",
    "DEFINITIONS": "Definitions",
    "SERVER": "Server",
    "LANGUAGE": "Language",
    "GENERATED_USING": "Generated using OpenDocumenter by $ourOpenCode",
    "HAVE_ANY_QUESTIONS_CONTACT": "Have any questions? Please contact",
    "US": "us",
    "OR": "or",
    "VIA_EMAIL": "via email",
    "VIA_OUR_WEBSITE": "via our website",
    "TERMS_OF_SERVICE": "Terms of Service",
    "SEND_US_AN_EMAIL": "Send us an email",
    "VISIT_OUR_WEBSITE": "Visit our website",
    "EXTERNAL_DOCUMENTATION": "External Documentation",
    "DOCUMENTATION": "Documentation"
  }
}


================================================
FILE: example/ghes-2.20.yml
================================================
---
openapi: 3.0.3
info:
  version: 0.0.4
  title: GitHub v3 REST API
  description: GitHub's v3 REST API.
  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
tags:
- name: actions
  description: Endpoints to manage GitHub Actions using the REST API.
- name: activity
  description: Activity APIs provide access to notifications, subscriptions, and timelines.
- name: apps
  description: Information for integrations and installations.
- name: billing
  description: Monitor charges and usage from Actions and Packages.
- name: checks
  description: Rich interactions with checks run by your integrations.
- name: code-scanning
  description: Retrieve code scanning alerts from a repository.
- name: codes-of-conduct
  description: Insight into codes of conduct for your communities.
- name: emojis
  description: List emojis available to use on GitHub.
- name: gists
  description: View, modify your gists.
- name: git
  description: Raw Git functionality.
- name: gitignore
  description: View gitignore templates
- name: interactions
  description: Owner or admin management of users interactons.
- name: issues
  description: Interact with GitHub Issues.
- name: licenses
  description: View various OSS licenses.
- name: markdown
  description: Render Github flavored markdown
- name: meta
  description: Endpoints that give information about the API.
- name: migrations
  description: Move projects to or from GitHub.
- name: oauth-authorizations
  description: Manage access of OAuth applications
- name: orgs
  description: Interact with GitHub Orgs.
- name: projects
  description: Interact with GitHub Projects.
- name: pulls
  description: Interact with GitHub Pull Requests.
- name: rate-limit
  description: Check your current rate limit status
- name: reactions
  description: Interact with reactions to various GitHub entities.
- name: repos
  description: Interact with GitHub Repos.
- name: scim
  description: Provisioning of GitHub organization membership for SCIM-enabled providers.
- name: search
  description: Look for stuff on GitHub.
- name: teams
  description: Interact with GitHub Teams.
- name: users
  description: Interact with and view information about users and also current user.
servers:
- url: "{protocol}://{hostname}"
  variables:
    hostname:
      description: Self-hosted Enterprise Server or Enterprise Cloud hostname
      default: HOSTNAME
    protocol:
      description: Self-hosted Enterprise Server or Enterprise Cloud protocol
      default: http
externalDocs:
  description: GitHub Enterprise Developer Docs
  url: https://developer.github.com/enterprise/2.20/v3/
paths:
  "/orgs/{org}/repos":
    get:
      summary: List organization repositories
      description: Lists repositories for the specified organization.
      tags:
      - repos
      operationId: repos/list-for-org
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/#list-organization-repositories
      parameters:
      - "$ref": "#/components/parameters/org"
      - name: type
        description: 'Specifies the types of repositories you want returned. Can be
          one of `all`, `public`, `private`, `forks`, `sources`, `member`, `internal`.
          Default: `all`. If your organization is associated with an enterprise account
          using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, `type`
          can also be `internal`.'
        in: query
        required: false
        schema:
          type: string
          enum:
          - all
          - public
          - private
          - forks
          - sources
          - member
          - internal
      - name: sort
        description: Can be one of `created`, `updated`, `pushed`, `full_name`.
        in: query
        required: false
        schema:
          type: string
          enum:
          - created
          - updated
          - pushed
          - full_name
          default: created
      - name: direction
        description: 'Can be one of `asc` or `desc`. Default: when using `full_name`:
          `asc`, otherwise `desc`'
        in: query
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
      - "$ref": "#/components/parameters/per_page"
      - "$ref": "#/components/parameters/page"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/minimal-repository"
              examples:
                default:
                  "$ref": "#/components/examples/minimal-repository-items"
          headers:
            Link:
              "$ref": "#/components/headers/link"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: false
          name: nebula
          note: |-
            You can set the visibility of a repository using the new `visibility` parameter in the [Repositories API](https://developer.github.com/v3/repos/), and get a repository's visibility with a new response key. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes/).

            To access repository visibility during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.nebula-preview+json
            ```
        - required: false
          name: baptiste
          note: |-
            The `is_template` and `template_repository` keys are currently available for developer to preview. See [Create a repository using a template](https://developer.github.com/v3/repos/#create-a-repository-using-a-template) to learn how to create template repositories. To access these new response keys during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.baptiste-preview+json
            ```
    post:
      summary: Create an organization repository
      description: |-
        Creates a new repository in the specified organization. The authenticated user must be a member of the organization.

        **OAuth scope requirements**

        When using [OAuth](https://developer.github.com/enterprise/2.20/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:

        *   `public_repo` scope or `repo` scope to create a public repository
        *   `repo` scope to create a private repository
      tags:
      - repos
      operationId: repos/create-in-org
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/#create-an-organization-repository
      parameters:
      - "$ref": "#/components/parameters/org"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the repository.
                description:
                  type: string
                  description: A short description of the repository.
                homepage:
                  type: string
                  description: A URL with more information about the repository.
                private:
                  type: boolean
                  description: Either `true` to create a private repository or `false`
                    to create a public one.
                  default: false
                visibility:
                  type: string
                  description: "Can be `public` or `private`. If your organization
                    is associated with an enterprise account using GitHub Enterprise
                    Cloud or GitHub Enterprise Server 2.20+, `visibility` can also
                    be `internal`. For more information, see \"[Creating an internal
                    repository](https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-repository-visibility#about-internal-repositories)\"
                    in the GitHub Help documentation.  \nThe `visibility` parameter
                    overrides the `private` parameter when you use both parameters
                    with the `nebula-preview` preview header."
                  enum:
                  - public
                  - private
                  - visibility
                  - internal
                has_issues:
                  type: boolean
                  description: Either `true` to enable issues for this repository
                    or `false` to disable them.
                  default: true
                has_projects:
                  type: boolean
                  description: Either `true` to enable projects for this repository
                    or `false` to disable them. **Note:** If you're creating a repository
                    in an organization that has disabled repository projects, the
                    default is `false`, and if you pass `true`, the API returns an
                    error.
                  default: true
                has_wiki:
                  type: boolean
                  description: Either `true` to enable the wiki for this repository
                    or `false` to disable it.
                  default: true
                is_template:
                  type: boolean
                  description: Either `true` to make this repo available as a template
                    repository or `false` to prevent it.
                  default: false
                team_id:
                  type: integer
                  description: The id of the team that will be granted access to this
                    repository. This is only valid when creating a repository in an
                    organization.
                auto_init:
                  type: boolean
                  description: Pass `true` to create an initial commit with empty
                    README.
                  default: false
                gitignore_template:
                  type: string
                  description: Desired language or platform [.gitignore template](https://github.com/github/gitignore)
                    to apply. Use the name of the template without the extension.
                    For example, "Haskell".
                license_template:
                  type: string
                  description: Choose an [open source license template](https://choosealicense.com/)
                    that best suits your needs, and then use the [license keyword](https://help.github.com/articles/licensing-a-repository/#searching-github-by-license-type)
                    as the `license_template` string. For example, "mit" or "mpl-2.0".
                allow_squash_merge:
                  type: boolean
                  description: Either `true` to allow squash-merging pull requests,
                    or `false` to prevent squash-merging.
                  default: true
                allow_merge_commit:
                  type: boolean
                  description: Either `true` to allow merging pull requests with a
                    merge commit, or `false` to prevent merging pull requests with
                    merge commits.
                  default: true
                allow_rebase_merge:
                  type: boolean
                  description: Either `true` to allow rebase-merging pull requests,
                    or `false` to prevent rebase-merging.
                  default: true
                delete_branch_on_merge:
                  type: boolean
                  description: Either `true` to allow automatically deleting head
                    branches when pull requests are merged, or `false` to prevent
                    automatic deletion.
                  default: false
              required:
              - name
            example:
              name: Hello-World
              description: This is your first repository
              homepage: https://github.com
              private: false
              has_issues: true
              has_projects: true
              has_wiki: true
      responses:
        '201':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/repository"
              examples:
                default:
                  "$ref": "#/components/examples/repository"
          headers:
            Location:
              example: https://api.github.com/repos/octocat/Hello-World
              schema:
                type: string
        '403':
          "$ref": "#/components/responses/forbidden"
        '422':
          "$ref": "#/components/responses/validation_failed"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: false
          name: nebula
          note: |-
            You can set the visibility of a repository using the new `visibility` parameter in the [Repositories API](https://developer.github.com/v3/repos/), and get a repository's visibility with a new response key. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes/).

            To access repository visibility during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.nebula-preview+json
            ```
        - required: false
          name: baptiste
          note: |-
            The `is_template` and `template_repository` keys are currently available for developer to preview. See [Create a repository using a template](https://developer.github.com/v3/repos/#create-a-repository-using-a-template) to learn how to create template repositories. To access these new response keys during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.baptiste-preview+json
            ```
  "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams":
    delete:
      summary: Remove team access restrictions
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Removes the ability of a team to push to this branch. You can also remove push access for child teams.

        | Type    | Description                                                                                                                                         |
        | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
        | `array` | Teams that should no longer have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
      tags:
      - repos
      operationId: repos/remove-team-access-restrictions
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#remove-team-access-restrictions
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      requestBody:
        content:
          application/json:
            schema:
              type: array
              description: teams parameter
              items:
                type: string
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/team"
              examples:
                default:
                  "$ref": "#/components/examples/team-items"
        '422':
          "$ref": "#/components/responses/validation_failed"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
        requestBodyParameterName: teams
    put:
      summary: Set team access restrictions
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Replaces the list of teams that have push access to this branch. This removes all teams that previously had push access and grants push access to the new list of teams. Team restrictions include child teams.

        | Type    | Description                                                                                                                                |
        | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
        | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
      tags:
      - repos
      operationId: repos/set-team-access-restrictions
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#set-team-access-restrictions
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      requestBody:
        content:
          application/json:
            schema:
              type: array
              description: teams parameter
              items:
                type: string
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/team"
              examples:
                default:
                  "$ref": "#/components/examples/team-items"
        '422':
          "$ref": "#/components/responses/validation_failed"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
        requestBodyParameterName: teams
    post:
      summary: Add team access restrictions
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Grants the specified teams push access for this branch. You can also give push access to child teams.

        | Type    | Description                                                                                                                                |
        | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
        | `array` | The teams that can have push access. Use the team's `slug`. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
      tags:
      - repos
      operationId: repos/add-team-access-restrictions
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#add-team-access-restrictions
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      requestBody:
        content:
          application/json:
            schema:
              type: array
              description: teams parameter
              items:
                type: string
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/team"
              examples:
                default:
                  "$ref": "#/components/examples/team-items"
        '422':
          "$ref": "#/components/responses/validation_failed"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
        requestBodyParameterName: teams
    get:
      summary: Get teams with access to the protected branch
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Lists the teams who have push access to this branch. The list includes child teams.
      tags:
      - repos
      operationId: repos/get-teams-with-access-to-protected-branch
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#list-teams-with-access-to-the-protected-branch
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/team"
              examples:
                default:
                  "$ref": "#/components/examples/team-items"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head":
    get:
      summary: List branches for HEAD commit
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Returns all branches where the given commit SHA is the HEAD, or latest commit for the branch.
      tags:
      - repos
      operationId: repos/list-branches-for-head-commit
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/commits/#list-branches-for-head-commit
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/commit_sha"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/branch-short"
              examples:
                default:
                  "$ref": "#/components/examples/branch-short-items"
        '415':
          "$ref": "#/components/responses/preview_header_missing"
        '422':
          "$ref": "#/components/responses/validation_failed"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: true
          name: groot
          note: |-
            Listing branches or pull requests for a commit in the Commits API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2019-04-11-pulls-branches-for-commit/) for more details. To access the new endpoints during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.groot-preview+json
            ```
  "/repos/{owner}/{repo}/releases/assets/{asset_id}":
    patch:
      summary: Update a release asset
      description: Users with push access to the repository can edit a release asset.
      tags:
      - repos
      operationId: repos/update-release-asset
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/releases/#update-a-release-asset
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/asset_id"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The file name of the asset.
                label:
                  type: string
                  description: An alternate short description of the asset. Used in
                    place of the filename.
                state:
                  type: string
                  example: '"uploaded"'
            example:
              name: foo-1.0.0-osx.zip
              label: Mac binary
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/release-asset"
              examples:
                default:
                  "$ref": "#/components/examples/release-asset"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    get:
      summary: Get a release asset
      description: To download the asset's binary content, set the `Accept` header
        of the request to [`application/octet-stream`](https://developer.github.com/enterprise/2.20/v3/media/#media-types).
        The API will either redirect the client to the location, or stream it directly
        if possible. API clients should handle both a `200` or `302` response.
      tags:
      - repos
      operationId: repos/get-release-asset
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/releases/#get-a-release-asset
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/asset_id"
      responses:
        '200':
          description: To download the asset's binary content, set the `Accept` header
            of the request to [`application/octet-stream`](https://developer.github.com/enterprise/2.20/v3/media/#media-types).
            The API will either redirect the client to the location, or stream it
            directly if possible. API clients should handle both a `200` or `302`
            response.
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/release-asset"
              examples:
                default:
                  "$ref": "#/components/examples/release-asset"
        '404':
          "$ref": "#/components/responses/not_found"
        '415':
          "$ref": "#/components/responses/preview_header_missing"
        '302':
          "$ref": "#/components/responses/found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    delete:
      summary: Delete a release asset
      description: ''
      tags:
      - repos
      operationId: repos/delete-release-asset
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/releases/#delete-a-release-asset
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/asset_id"
      responses:
        '204':
          description: Empty response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts":
    delete:
      summary: Remove status check contexts
      description: Protected branches are available in public repositories with GitHub
        Free and GitHub Free for organizations, and in public and private repositories
        with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise
        Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products)
        in the GitHub Help documentation.
      tags:
      - repos
      operationId: repos/remove-status-check-contexts
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#remove-status-check-contexts
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      requestBody:
        content:
          application/json:
            schema:
              type: array
              description: contexts parameter
              items:
                type: string
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
              example:
              - continuous-integration/travis-ci
        '404':
          "$ref": "#/components/responses/not_found"
        '422':
          "$ref": "#/components/responses/validation_failed"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
        requestBodyParameterName: contexts
    put:
      summary: Set status check contexts
      description: Protected branches are available in public repositories with GitHub
        Free and GitHub Free for organizations, and in public and private repositories
        with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise
        Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products)
        in the GitHub Help documentation.
      tags:
      - repos
      operationId: repos/set-status-check-contexts
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#set-status-check-contexts
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      requestBody:
        content:
          application/json:
            schema:
              type: array
              description: contexts parameter
              items:
                type: string
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
              example:
              - continuous-integration/travis-ci
        '422':
          "$ref": "#/components/responses/validation_failed"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
        requestBodyParameterName: contexts
    get:
      summary: Get all status check contexts
      description: Protected branches are available in public repositories with GitHub
        Free and GitHub Free for organizations, and in public and private repositories
        with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise
        Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products)
        in the GitHub Help documentation.
      tags:
      - repos
      operationId: repos/get-all-status-check-contexts
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#get-all-status-check-contexts
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
              example:
              - continuous-integration/travis-ci
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    post:
      summary: Add status check contexts
      description: Protected branches are available in public repositories with GitHub
        Free and GitHub Free for organizations, and in public and private repositories
        with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise
        Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products)
        in the GitHub Help documentation.
      tags:
      - repos
      operationId: repos/add-status-check-contexts
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#add-status-check-contexts
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      requestBody:
        content:
          application/json:
            schema:
              type: array
              description: contexts parameter
              items:
                type: string
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
              example:
              - continuous-integration/travis-ci
              - continuous-integration/jenkins
        '422':
          "$ref": "#/components/responses/validation_failed"
        '403':
          "$ref": "#/components/responses/forbidden"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
        requestBodyParameterName: contexts
  "/repos/{owner}/{repo}/contents/{path}":
    get:
      summary: Get repository content
      description: "Gets the contents of a file or directory in a repository. Specify
        the file path or directory in `:path`. If you omit\n`:path`, you will receive
        the contents of all files in the repository.\n\nFiles and symlinks support
        [a custom media type](https://developer.github.com/enterprise/2.20/v3/repos/contents/#custom-media-types)
        for\nretrieving the raw content or rendered HTML (when supported). All content
        types support [a custom media\ntype](https://developer.github.com/enterprise/2.20/v3/repos/contents/#custom-media-types)
        to ensure the content is returned in a consistent\nobject format.\n\n**Note**:\n*
        \  To get a repository's contents recursively, you can [recursively get the
        tree](https://developer.github.com/enterprise/2.20/v3/git/trees/).\n*   This
        API has an upper limit of 1,000 files for a directory. If you need to retrieve
        more files, use the [Git Trees\nAPI](https://developer.github.com/enterprise/2.20/v3/git/trees/#get-a-tree).\n*
        \  This API supports files up to 1 megabyte in size.\n\n#### If the content
        is a directory\nThe response will be an array of objects, one object for each
        item in the directory.\nWhen listing the contents of a directory, submodules
        have their \"type\" specified as \"file\". Logically, the value\n_should_
        be \"submodule\". This behavior exists in API v3 [for backwards compatibility
        purposes](https://git.io/v1YCW).\nIn the next major version of the API, the
        type will be returned as \"submodule\".\n\n#### If the content is a symlink
        \nIf the requested `:path` points to a symlink, and the symlink's target is
        a normal file in the repository, then the\nAPI responds with the content of
        the file (in the format shown in the example. Otherwise, the API responds
        with an object \ndescribing the symlink itself.\n\n#### If the content is
        a submodule\nThe `submodule_git_url` identifies the location of the submodule
        repository, and the `sha` identifies a specific\ncommit within the submodule
        repository. Git uses the given URL when cloning the submodule repository,
        and checks out\nthe submodule at that specific commit.\n\nIf the submodule
        repository is not hosted on github.com, the Git URLs (`git_url` and `_links[\"git\"]`)
        and the\ngithub.com URLs (`html_url` and `_links[\"html\"]`) will have null
        values."
      tags:
      - repos
      operationId: repos/get-content
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/contents/#get-repository-content
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - name: path
        description: path+ parameter
        in: path
        required: true
        schema:
          type: string
      - name: ref
        description: 'The name of the commit/branch/tag. Default: the repository’s
          default branch (usually `master`)'
        in: query
        required: false
        schema:
          type: string
      responses:
        '200':
          description: response
          content:
            application/vnd.github.v3.object:
              schema:
                "$ref": "#/components/schemas/content-tree"
            application/json:
              schema:
                oneOf:
                - "$ref": "#/components/schemas/content-directory"
                - "$ref": "#/components/schemas/content-file"
                - "$ref": "#/components/schemas/content-symlink"
                - "$ref": "#/components/schemas/content-submodule"
              examples:
                response-if-content-is-a-file:
                  "$ref": "#/components/examples/content-file-response-if-content-is-a-file"
                response-if-content-is-a-directory:
                  "$ref": "#/components/examples/content-file-response-if-content-is-a-directory"
                response-if-content-is-a-symlink:
                  "$ref": "#/components/examples/content-file-response-if-content-is-a-symlink"
                response-if-content-is-a-submodule:
                  "$ref": "#/components/examples/content-file-response-if-content-is-a-submodule"
        '404':
          "$ref": "#/components/responses/not_found"
        '403':
          "$ref": "#/components/responses/forbidden"
        '302':
          "$ref": "#/components/responses/found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    put:
      summary: Create or update file contents
      description: Creates a new file or replaces an existing file in a repository.
      tags:
      - repos
      operationId: repos/create-or-update-file-contents
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/contents/#create-or-update-file-contents
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - name: path
        description: path+ parameter
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  description: The commit message.
                content:
                  type: string
                  description: The new file content, using Base64 encoding.
                sha:
                  type: string
                  description: "**Required if you are updating a file**. The blob
                    SHA of the file being replaced."
                branch:
                  type: string
                  description: 'The branch name. Default: the repository’s default
                    branch (usually `master`)'
                committer:
                  type: object
                  description: 'The person that committed the file. Default: the authenticated
                    user.'
                  properties:
                    name:
                      type: string
                      description: The name of the author or committer of the commit.
                        You'll receive a `422` status code if `name` is omitted.
                    email:
                      type: string
                      description: The email of the author or committer of the commit.
                        You'll receive a `422` status code if `email` is omitted.
                    date:
                      type: string
                      example: '"2013-01-05T13:13:22+05:00"'
                  required:
                  - name
                  - email
                author:
                  type: object
                  description: 'The author of the file. Default: The `committer` or
                    the authenticated user if you omit `committer`.'
                  properties:
                    name:
                      type: string
                      description: The name of the author or committer of the commit.
                        You'll receive a `422` status code if `name` is omitted.
                    email:
                      type: string
                      description: The email of the author or committer of the commit.
                        You'll receive a `422` status code if `email` is omitted.
                    date:
                      type: string
                      example: '"2013-01-15T17:13:22+05:00"'
                  required:
                  - name
                  - email
              required:
              - message
              - content
            examples:
              example-for-creating-a-file:
                summary: Example for creating a file
                value:
                  message: my commit message
                  committer:
                    name: Monalisa Octocat
                    email: octocat@github.com
                  content: bXkgbmV3IGZpbGUgY29udGVudHM=
              example-for-updating-a-file:
                summary: Example for updating a file
                value:
                  message: a new commit message
                  committer:
                    name: Monalisa Octocat
                    email: octocat@github.com
                  content: bXkgdXBkYXRlZCBmaWxlIGNvbnRlbnRz
                  sha: 95b966ae1c166bd92f8ae7d1c313e738c731dfc3
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/file-commit"
              examples:
                example-for-updating-a-file:
                  "$ref": "#/components/examples/file-commit-example-for-updating-a-file"
        '201':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/file-commit"
              examples:
                example-for-creating-a-file:
                  "$ref": "#/components/examples/file-commit-example-for-creating-a-file"
        '404':
          "$ref": "#/components/responses/not_found"
        '422':
          "$ref": "#/components/responses/validation_failed"
        '409':
          "$ref": "#/components/responses/conflict"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    delete:
      summary: Delete a file
      description: |-
        Deletes a file in a repository.

        You can provide an additional `committer` parameter, which is an object containing information about the committer. Or, you can provide an `author` parameter, which is an object containing information about the author.

        The `author` section is optional and is filled in with the `committer` information if omitted. If the `committer` information is omitted, the authenticated user's information is used.

        You must provide values for both `name` and `email`, whether you choose to use `author` or `committer`. Otherwise, you'll receive a `422` status code.
      tags:
      - repos
      operationId: repos/delete-file
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/contents/#delete-a-file
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - name: path
        description: path+ parameter
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  description: The commit message.
                sha:
                  type: string
                  description: The blob SHA of the file being replaced.
                branch:
                  type: string
                  description: 'The branch name. Default: the repository’s default
                    branch (usually `master`)'
                committer:
                  type: object
                  description: object containing information about the committer.
                  properties:
                    name:
                      type: string
                      description: The name of the author (or committer) of the commit
                    email:
                      type: string
                      description: The email of the author (or committer) of the commit
                author:
                  type: object
                  description: object containing information about the author.
                  properties:
                    name:
                      type: string
                      description: The name of the author (or committer) of the commit
                    email:
                      type: string
                      description: The email of the author (or committer) of the commit
              required:
              - message
              - sha
            example:
              message: my commit message
              committer:
                name: Monalisa Octocat
                email: octocat@github.com
              sha: 329688480d39049927147c162b9d2deaf885005f
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/file-commit"
              examples:
                default:
                  "$ref": "#/components/examples/file-commit"
        '422':
          "$ref": "#/components/responses/validation_failed"
        '404':
          "$ref": "#/components/responses/not_found"
        '409':
          "$ref": "#/components/responses/conflict"
        '503':
          "$ref": "#/components/responses/service_unavailable"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/topics":
    get:
      summary: Get all repository topics
      description: ''
      tags:
      - repos
      operationId: repos/get-all-topics
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/#get-all-repository-topics
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/topic"
              examples:
                default:
                  "$ref": "#/components/examples/topic"
        '415':
          "$ref": "#/components/responses/preview_header_missing"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: true
          name: mercy
          note: |-
            The `topics` property for repositories on GitHub is currently available for developers to preview. To view the `topics` property in calls that return repository results, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.mercy-preview+json
            ```
    put:
      summary: Replace all repository topics
      description: ''
      tags:
      - repos
      operationId: repos/replace-all-topics
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/#replace-all-repository-topics
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                names:
                  type: array
                  description: An array of topics to add to the repository. Pass one
                    or more topics to _replace_ the set of existing topics. Send an
                    empty array (`[]`) to clear all topics from the repository. **Note:**
                    Topic `names` cannot contain uppercase letters.
                  items:
                    type: string
              required:
              - names
            example:
              names:
              - octocat
              - atom
              - electron
              - api
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/topic"
              examples:
                default:
                  "$ref": "#/components/examples/topic"
        '415':
          "$ref": "#/components/responses/preview_header_missing"
        '404':
          "$ref": "#/components/responses/not_found"
        '422':
          "$ref": "#/components/responses/validation_failed_simple"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: true
          name: mercy
          note: |-
            The `topics` property for repositories on GitHub is currently available for developers to preview. To view the `topics` property in calls that return repository results, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.mercy-preview+json
            ```
  "/repos/{owner}/{repo}/vulnerability-alerts":
    put:
      summary: Enable vulnerability alerts
      description: Enables dependency alerts and the dependency graph for a repository.
        The authenticated user must have admin access to the repository. For more
        information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)".
      tags:
      - repos
      operationId: repos/enable-vulnerability-alerts
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/#enable-vulnerability-alerts
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      responses:
        '204':
          description: Empty response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: true
          name: dorian
          note: |-
            Enabling and disabling dependency alerts for a repository using the REST API is currently available for developers to preview. To access these new endpoints during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.dorian-preview+json
            ```
    delete:
      summary: Disable vulnerability alerts
      description: Disables dependency alerts and the dependency graph for a repository.
        The authenticated user must have admin access to the repository. For more
        information, see "[About security alerts for vulnerable dependencies](https://help.github.com/en/articles/about-security-alerts-for-vulnerable-dependencies)".
      tags:
      - repos
      operationId: repos/disable-vulnerability-alerts
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/#disable-vulnerability-alerts
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      responses:
        '204':
          description: Empty response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: true
          name: dorian
          note: |-
            Enabling and disabling dependency alerts for a repository using the REST API is currently available for developers to preview. To access these new endpoints during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.dorian-preview+json
            ```
  "/repos/{owner}/{repo}/deployments":
    post:
      summary: Create a deployment
      description: |-
        Deployments offer a few configurable parameters with certain defaults.

        The `ref` parameter can be any named branch, tag, or SHA. At GitHub Enterprise Server we often deploy branches and verify them
        before we merge a pull request.

        The `environment` parameter allows deployments to be issued to different runtime environments. Teams often have
        multiple environments for verifying their applications, such as `production`, `staging`, and `qa`. This parameter
        makes it easier to track which environments have requested deployments. The default environment is `production`.

        The `auto_merge` parameter is used to ensure that the requested ref is not behind the repository's default branch. If
        the ref _is_ behind the default branch for the repository, we will attempt to merge it for you. If the merge succeeds,
        the API will return a successful merge commit. If merge conflicts prevent the merge from succeeding, the API will
        return a failure response.

        By default, [commit statuses](https://developer.github.com/enterprise/2.20/v3/repos/statuses) for every submitted context must be in a `success`
        state. The `required_contexts` parameter allows you to specify a subset of contexts that must be `success`, or to
        specify contexts that have not yet been submitted. You are not required to use commit statuses to deploy. If you do
        not require any contexts or create any commit statuses, the deployment will always succeed.

        The `payload` parameter is available for any extra information that a deployment system might need. It is a JSON text
        field that will be passed on when a deployment event is dispatched.

        The `task` parameter is used by the deployment system to allow different execution paths. In the web world this might
        be `deploy:migrations` to run schema changes on the system. In the compiled world this could be a flag to compile an
        application with debugging enabled.

        Users with `repo` or `repo_deployment` scopes can create a deployment for a given ref.

        #### Merged branch response
        You will see this response when GitHub automatically merges the base branch into the topic branch instead of creating
        a deployment. This auto-merge happens when:
        *   Auto-merge option is enabled in the repository
        *   Topic branch does not include the latest changes on the base branch, which is `master` in the response example
        *   There are no merge conflicts

        If there are no new commits in the base branch, a new request to create a deployment should give a successful
        response.

        #### Merge conflict response
        This error happens when the `auto_merge` option is enabled and when the default branch (in this case `master`), can't
        be merged into the branch that's being deployed (in this case `topic-branch`), due to merge conflicts.

        #### Failed commit status checks
        This error happens when the `required_contexts` parameter indicates that one or more contexts need to have a `success`
        status for the commit to be deployed, but one or more of the required contexts do not have a state of `success`.
      tags:
      - repos
      operationId: repos/create-deployment
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/deployments/#create-a-deployment
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ref:
                  type: string
                  description: The ref to deploy. This can be a branch, tag, or SHA.
                task:
                  type: string
                  description: Specifies a task to execute (e.g., `deploy` or `deploy:migrations`).
                  default: deploy
                auto_merge:
                  type: boolean
                  description: Attempts to automatically merge the default branch
                    into the requested ref, if it's behind the default branch.
                  default: true
                required_contexts:
                  type: array
                  description: The [status](https://developer.github.com/enterprise/2.20/v3/repos/statuses/)
                    contexts to verify against commit status checks. If you omit this
                    parameter, GitHub verifies all unique contexts before creating
                    a deployment. To bypass checking entirely, pass an empty array.
                    Defaults to all unique contexts.
                  items:
                    type: string
                payload:
                  type: string
                  description: JSON payload with extra information about the deployment.
                  default: ''
                environment:
                  type: string
                  description: Name for the target deployment environment (e.g., `production`,
                    `staging`, `qa`).
                  default: production
                description:
                  type: string
                  description: Short description of the deployment.
                  default: ''
                  nullable: true
                transient_environment:
                  type: boolean
                  description: "Specifies if the given environment is specific to
                    the deployment and will no longer exist at some point in the future.
                    Default: `false`  \n**Note:** This parameter requires you to use
                    the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/enterprise/2.20/v3/previews/#enhanced-deployments)
                    custom media type. **Note:** This parameter requires you to use
                    the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/enterprise/2.20/v3/previews/#enhanced-deployments)
                    custom media type."
                  default: false
                production_environment:
                  type: boolean
                  description: "Specifies if the given environment is one that end-users
                    directly interact with. Default: `true` when `environment` is
                    `production` and `false` otherwise.  \n**Note:** This parameter
                    requires you to use the [`application/vnd.github.ant-man-preview+json`](https://developer.github.com/enterprise/2.20/v3/previews/#enhanced-deployments)
                    custom media type."
                created_at:
                  type: string
                  example: '"1776-07-04T00:00:00.000-07:52"'
              required:
              - ref
            examples:
              simple-example:
                summary: Simple example
                value:
                  ref: topic-branch
                  payload: '{ "deploy": "migrate" }'
                  description: Deploy request from hubot
              advanced-example:
                summary: Advanced example
                value:
                  ref: topic-branch
                  auto_merge: false
                  payload: '{ "deploy": "migrate" }'
                  description: Deploy request from hubot
                  required_contexts:
                  - ci/janky
                  - security/brakeman
      responses:
        '201':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/deployment"
              examples:
                simple-example:
                  "$ref": "#/components/examples/deployment-simple-example"
                advanced-example:
                  "$ref": "#/components/examples/deployment-advanced-example"
        '202':
          description: Merged branch response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
              examples:
                merged-branch-response:
                  value:
                    message: Auto-merged master into topic-branch on deployment.
        '409':
          description: response
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  documentation_url:
                    type: string
                    example: '"https://developer.github.com/enterprise/2.20/v3/repos/deployments/#create-a-deployment"'
              examples:
                merge-conflict-response:
                  summary: Merge conflict response
                  value:
                    message: Conflict merging master into topic-branch
                failed-commit-status-checks:
                  summary: Failed commit status checks
                  value:
                    message: 'Conflict: Commit status checks failed for topic-branch.'
        '422':
          "$ref": "#/components/responses/validation_failed"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: false
          name: ant-man
          note: |-
            The `inactive` state and the `log_url`, `environment_url`, and `auto_inactive` parameters are currently available for developers to preview. Please see the [blog post](https://developer.github.com/changes/2016-04-06-deployment-and-deployment-status-enhancements) for full details.

            To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.ant-man-preview+json
            ```
    get:
      summary: List deployments
      description: 'Simple filtering of deployments is available via query parameters:'
      tags:
      - repos
      operationId: repos/list-deployments
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/deployments/#list-deployments
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - name: sha
        description: The SHA recorded at creation time.
        in: query
        required: false
        schema:
          type: string
          default: none
      - name: ref
        description: The name of the ref. This can be a branch, tag, or SHA.
        in: query
        required: false
        schema:
          type: string
          default: none
      - name: task
        description: The name of the task for the deployment (e.g., `deploy` or `deploy:migrations`).
        in: query
        required: false
        schema:
          type: string
          default: none
      - name: environment
        description: The name of the environment that was deployed to (e.g., `staging`
          or `production`).
        in: query
        required: false
        schema:
          type: string
          default: none
      - "$ref": "#/components/parameters/per_page"
      - "$ref": "#/components/parameters/page"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/deployment"
              examples:
                default:
                  "$ref": "#/components/examples/deployment-items"
          headers:
            Link:
              "$ref": "#/components/headers/link"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: false
          name: ant-man
          note: |-
            The `inactive` state and the `log_url`, `environment_url`, and `auto_inactive` parameters are currently available for developers to preview. Please see the [blog post](https://developer.github.com/changes/2016-04-06-deployment-and-deployment-status-enhancements) for full details.

            To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.ant-man-preview+json
            ```
  "/repos/{owner}/{repo}/pages":
    delete:
      summary: Delete a GitHub Enterprise Server Pages site
      description: ''
      tags:
      - repos
      operationId: repos/delete-pages-site
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/pages/#delete-a-github-pages-site
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      responses:
        '204':
          description: Empty response
        '422':
          "$ref": "#/components/responses/validation_failed"
        '415':
          "$ref": "#/components/responses/preview_header_missing"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: true
          name: switcheroo
          note: |-
            Enabling and disabling Pages in the Pages API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2019-03-14-enabling-disabling-pages/) preview for more details. To access the new endpoints during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.switcheroo-preview+json
            ```
    post:
      summary: Create a GitHub Enterprise Server Pages site
      description: ''
      tags:
      - repos
      operationId: repos/create-pages-site
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/pages/#create-a-github-pages-site
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                source:
                  type: object
                  properties:
                    branch:
                      type: string
                      description: The repository branch used to publish your [site's
                        source files](https://help.github.com/articles/configuring-a-publishing-source-for-github-pages/).
                        Can be either `master` or `gh-pages`.
                      enum:
                      - master
                      - gh-pages
                    path:
                      type: string
                      description: The repository directory that includes the source
                        files for the Pages site. When `branch` is `master`, you can
                        change `path` to `/docs`. When `branch` is `gh-pages`, you
                        are unable to specify a `path` other than `/`.
            example:
              source:
                branch: master
                path: "/docs"
      responses:
        '201':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/page"
              examples:
                default:
                  "$ref": "#/components/examples/page"
        '422':
          "$ref": "#/components/responses/validation_failed"
        '415':
          "$ref": "#/components/responses/preview_header_missing"
        '409':
          "$ref": "#/components/responses/conflict"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: true
          name: switcheroo
          note: |-
            Enabling and disabling Pages in the Pages API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2019-03-14-enabling-disabling-pages/) preview for more details. To access the new endpoints during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.switcheroo-preview+json
            ```
    get:
      summary: Get a GitHub Enterprise Server Pages site
      description: ''
      tags:
      - repos
      operationId: repos/get-pages
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/pages/#get-a-github-pages-site
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/page"
              examples:
                default:
                  "$ref": "#/components/examples/page"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    put:
      summary: Update information about a GitHub Enterprise Server Pages site
      description: ''
      tags:
      - repos
      operationId: repos/update-information-about-pages-site
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/pages/#update-information-about-a-github-pages-site
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                cname:
                  type: string
                  description: Specify a custom domain for the repository. Sending
                    a `null` value will remove the custom domain. For more about custom
                    domains, see "[Using a custom domain with GitHub Pages](https://help.github.com/articles/using-a-custom-domain-with-github-pages/)."
                  nullable: true
                source:
                  anyOf:
                  - type: string
                    description: Update the source for the repository. Must include
                      the branch name, and may optionally specify the subdirectory
                      `/docs`. Possible values are `"gh-pages"`, `"master"`, and `"master
                      /docs"`.
                    enum:
                    - gh-pages
                    - master
                    - master /docs
                  - type: object
                    properties:
                      branch:
                        type: string
                      path:
                        type: string
            example:
              cname: octocatblog.com
              source: master /docs
      responses:
        '204':
          description: Empty response
        '422':
          "$ref": "#/components/responses/validation_failed"
        '400':
          "$ref": "#/components/responses/bad_request"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews":
    get:
      summary: Get pull request review protection
      description: Protected branches are available in public repositories with GitHub
        Free and GitHub Free for organizations, and in public and private repositories
        with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise
        Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products)
        in the GitHub Help documentation.
      tags:
      - repos
      operationId: repos/get-pull-request-review-protection
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#get-pull-request-review-protection
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '200':
          description: response
          content:
            application/vnd.github.luke-cage-preview+json:
              schema:
                "$ref": "#/components/schemas/protected-branch-pull-request-review"
              examples:
                default:
                  "$ref": "#/components/examples/protected-branch-pull-request-review"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: false
          name: luke-cage
          note: |-
            The Protected Branches API now has a setting for requiring a specified number of approving pull request reviews before merging. This feature is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-03-16-protected-branches-required-approving-reviews) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.luke-cage-preview+json
            ```
    delete:
      summary: Delete pull request review protection
      description: Protected branches are available in public repositories with GitHub
        Free and GitHub Free for organizations, and in public and private repositories
        with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise
        Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products)
        in the GitHub Help documentation.
      tags:
      - repos
      operationId: repos/delete-pull-request-review-protection
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#delete-pull-request-review-protection
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '204':
          description: No Content
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    patch:
      summary: Update pull request review protection
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.

        **Note**: Passing new arrays of `users` and `teams` replaces their previous values.
      tags:
      - repos
      operationId: repos/update-pull-request-review-protection
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#update-pull-request-review-protection
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                dismissal_restrictions:
                  type: object
                  description: Specify which users and teams can dismiss pull request
                    reviews. Pass an empty `dismissal_restrictions` object to disable.
                    User and team `dismissal_restrictions` are only available for
                    organization-owned repositories. Omit this parameter for personal
                    repositories.
                  properties:
                    users:
                      type: array
                      description: The list of user `login`s with dismissal access
                      items:
                        type: string
                    teams:
                      type: array
                      description: The list of team `slug`s with dismissal access
                      items:
                        type: string
                dismiss_stale_reviews:
                  type: boolean
                  description: Set to `true` if you want to automatically dismiss
                    approving reviews when someone pushes a new commit.
                require_code_owner_reviews:
                  type: boolean
                  description: Blocks merging pull requests until [code owners](https://help.github.com/articles/about-code-owners/)
                    have reviewed.
                required_approving_review_count:
                  type: integer
                  description: Specifies the number of reviewers required to approve
                    pull requests. Use a number between 1 and 6.
            example:
              dismissal_restrictions:
                users:
                - octocat
                teams:
                - justice-league
              dismiss_stale_reviews: true
              require_code_owner_reviews: true
              required_approving_review_count: 2
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/protected-branch-pull-request-review"
              examples:
                default:
                  "$ref": "#/components/examples/protected-branch-pull-request-review"
        '422':
          "$ref": "#/components/responses/validation_failed"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: false
          name: luke-cage
          note: |-
            The Protected Branches API now has a setting for requiring a specified number of approving pull request reviews before merging. This feature is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-03-16-protected-branches-required-approving-reviews) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.luke-cage-preview+json
            ```
  "/repos/{owner}/{repo}/commits/{ref}/statuses":
    get:
      summary: List commit statuses for a reference
      description: |-
        Users with pull access in a repository can view commit statuses for a given ref. The ref can be a SHA, a branch name, or a tag name. Statuses are returned in reverse chronological order. The first status in the list will be the latest one.

        This resource is also available via a legacy route: `GET /repos/:owner/:repo/statuses/:ref`.
      tags:
      - repos
      operationId: repos/list-commit-statuses-for-ref
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/statuses/#list-commit-statuses-for-a-reference
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - name: ref
        description: ref+ parameter
        in: path
        required: true
        schema:
          type: string
      - "$ref": "#/components/parameters/per_page"
      - "$ref": "#/components/parameters/page"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/status"
              examples:
                default:
                  "$ref": "#/components/examples/status-items"
          headers:
            Link:
              "$ref": "#/components/headers/link"
        '301':
          "$ref": "#/components/responses/moved_permanently"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/compare/{base}...{head}":
    get:
      summary: Compare two commits
      description: |-
        Both `:base` and `:head` must be branch names in `:repo`. To compare branches across other repositories in the same network as `:repo`, use the format `<USERNAME>:branch`.

        The response from the API is equivalent to running the `git log base..head` command; however, commits are returned in chronological order. Pass the appropriate [media type](https://developer.github.com/enterprise/2.20/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.

        The response also includes details on the files that were changed between the two commits. This includes the status of the change (for example, if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.

        **Working with large comparisons**

        The response will include a comparison of up to 250 commits. If you are working with a larger commit range, you can use the [List commits](https://developer.github.com/enterprise/2.20/v3/repos/commits/#list-commits) to enumerate all commits in the range.

        For comparisons with extremely large diffs, you may receive an error response indicating that the diff took too long to generate. You can typically resolve this error by using a smaller commit range.

        **Signature verification object**

        The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:

        These are the possible values for `reason` in the `verification` object:

        | Value                    | Description                                                                                                                       |
        | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------- |
        | `expired_key`            | The key that made the signature is expired.                                                                                       |
        | `not_signing_key`        | The "signing" flag is not among the usage flags in the GPG key that made the signature.                                           |
        | `gpgverify_error`        | There was an error communicating with the signature verification service.                                                         |
        | `gpgverify_unavailable`  | The signature verification service is currently unavailable.                                                                      |
        | `unsigned`               | The object does not include a signature.                                                                                          |
        | `unknown_signature_type` | A non-PGP signature was found in the commit.                                                                                      |
        | `no_user`                | No user was associated with the `committer` email address in the commit.                                                          |
        | `unverified_email`       | The `committer` email address in the commit was associated with a user, but the email address is not verified on her/his account. |
        | `bad_email`              | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature.             |
        | `unknown_key`            | The key that made the signature has not been registered with any user's account.                                                  |
        | `malformed_signature`    | There was an error parsing the signature.                                                                                         |
        | `invalid`                | The signature could not be cryptographically verified using the key whose key-id was found in the signature.                      |
        | `valid`                  | None of the above errors applied, so the signature is considered to be verified.                                                  |
      tags:
      - repos
      operationId: repos/compare-commits
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/commits/#compare-two-commits
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - name: base
        description: base parameter
        in: path
        required: true
        schema:
          type: string
      - name: head
        description: head parameter
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/commit-comparison"
              examples:
                default:
                  "$ref": "#/components/examples/commit-comparison"
        '500':
          "$ref": "#/components/responses/internal_error"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/commits/{commit_sha}/pulls":
    get:
      summary: List pull requests associated with a commit
      description: Lists all pull requests containing the provided commit SHA, which
        can be from any point in the commit history. The results will include open
        and closed pull requests. Additional preview headers may be required to see
        certain details for associated pull requests, such as whether a pull request
        is in a draft state. For more information about previews that might affect
        this endpoint, see the [List pull requests](https://developer.github.com/enterprise/2.20/v3/pulls/#list-pull-requests)
        endpoint.
      tags:
      - repos
      operationId: repos/list-pull-requests-associated-with-commit
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/commits/#list-pull-requests-associated-with-a-commit
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/commit_sha"
      - "$ref": "#/components/parameters/per_page"
      - "$ref": "#/components/parameters/page"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/pull-request-simple"
              examples:
                default:
                  "$ref": "#/components/examples/pull-request-simple-items"
          headers:
            Link:
              "$ref": "#/components/headers/link"
        '415':
          "$ref": "#/components/responses/preview_header_missing"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: true
          name: groot
          note: |-
            Listing branches or pull requests for a commit in the Commits API is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2019-04-11-pulls-branches-for-commit/) for more details. To access the new endpoints during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.groot-preview+json
            ```
  "/repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins":
    delete:
      summary: Delete admin branch protection
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Removing admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
      tags:
      - repos
      operationId: repos/delete-admin-branch-protection
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#delete-admin-branch-protection
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '204':
          description: No Content
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    get:
      summary: Get admin branch protection
      description: Protected branches are available in public repositories with GitHub
        Free and GitHub Free for organizations, and in public and private repositories
        with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise
        Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products)
        in the GitHub Help documentation.
      tags:
      - repos
      operationId: repos/get-admin-branch-protection
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#get-admin-branch-protection
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/protected-branch-admin-enforced"
              examples:
                default:
                  "$ref": "#/components/examples/protected-branch-admin-enforced-2"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    post:
      summary: Set admin branch protection
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Adding admin enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
      tags:
      - repos
      operationId: repos/set-admin-branch-protection
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#set-admin-branch-protection
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/protected-branch-admin-enforced"
              examples:
                default:
                  "$ref": "#/components/examples/protected-branch-admin-enforced-2"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}":
    get:
      summary: Get a deployment status
      description: 'Users with pull access can view a deployment status for a deployment:'
      tags:
      - repos
      operationId: repos/get-deployment-status
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/deployments/#get-a-deployment-status
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/deployment_id"
      - name: status_id
        description: status_id parameter
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/deployment-status"
              examples:
                default:
                  "$ref": "#/components/examples/deployment-status"
        '404':
          "$ref": "#/components/responses/not_found"
        '415':
          "$ref": "#/components/responses/preview_header_missing"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: false
          name: machine-man
          note: To access the API with your GitHub App, you must provide a custom
            [media type](https://developer.github.com/enterprise/2.20/v3/media) in
            the `Accept` Header for your requests. ```shell application/vnd.github.machine-man-preview+json
            ```
        - required: false
          name: flash
          note: |-
            New features in the Deployments API on GitHub are currently available during a public beta. Please see the [blog post](https://developer.github.com/changes/2018-10-16-deployments-environments-states-and-auto-inactive-updates/) for full details.

            To access the new `environment` parameter, the two new values for the `state` parameter (`in_progress` and `queued`), and use `auto_inactive` on production deployments during the public beta period, you must provide the following custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.flash-preview+json
            ```
        - required: false
          name: ant-man
          note: |-
            The `inactive` state and the `log_url`, `environment_url`, and `auto_inactive` parameters are currently available for developers to preview. Please see the [blog post](https://developer.github.com/changes/2016-04-06-deployment-and-deployment-status-enhancements) for full details.

            To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.ant-man-preview+json
            ```
  "/repos/{owner}/{repo}/branches/{branch}/protection/required_signatures":
    delete:
      summary: Delete commit signature protection
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        When authenticated with admin or owner permissions to the repository, you can use this endpoint to disable required signed commits on a branch. You must enable branch protection to require signed commits.
      tags:
      - repos
      operationId: repos/delete-commit-signature-protection
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#delete-commit-signature-protection
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '204':
          description: No Content
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: true
          name: zzzax
          note: |-
            Protected Branches API can now manage a setting for requiring signed commits. This feature is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-22-protected-branches-required-signatures) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.zzzax-preview+json
            ```
    get:
      summary: Get commit signature protection
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        When authenticated with admin or owner permissions to the repository, you can use this endpoint to check whether a branch requires signed commits. An enabled status of `true` indicates you must sign commits on this branch. For more information, see [Signing commits with GPG](https://help.github.com/articles/signing-commits-with-gpg) in GitHub Help.

        **Note**: You must enable branch protection to require signed commits.
      tags:
      - repos
      operationId: repos/get-commit-signature-protection
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#get-commit-signature-protection
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/protected-branch-admin-enforced"
              examples:
                default:
                  "$ref": "#/components/examples/protected-branch-admin-enforced"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: true
          name: zzzax
          note: |-
            Protected Branches API can now manage a setting for requiring signed commits. This feature is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-22-protected-branches-required-signatures) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.zzzax-preview+json
            ```
    post:
      summary: Create commit signature protection
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        When authenticated with admin or owner permissions to the repository, you can use this endpoint to require signed commits on a branch. You must enable branch protection to require signed commits.
      tags:
      - repos
      operationId: repos/create-commit-signature-protection
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#create-commit-signature-protection
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/protected-branch-admin-enforced"
              examples:
                default:
                  "$ref": "#/components/examples/protected-branch-admin-enforced"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: true
          name: zzzax
          note: |-
            Protected Branches API can now manage a setting for requiring signed commits. This feature is currently available for developers to preview. See the [blog post](https://developer.github.com/changes/2018-02-22-protected-branches-required-signatures) for full details. To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.zzzax-preview+json
            ```
  "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users":
    delete:
      summary: Remove user access restrictions
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Removes the ability of a user to push to this branch.

        | Type    | Description                                                                                                                                   |
        | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
        | `array` | Usernames of the people who should no longer have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
      tags:
      - repos
      operationId: repos/remove-user-access-restrictions
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#remove-user-access-restrictions
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      requestBody:
        content:
          application/json:
            schema:
              type: array
              description: users parameter
              items:
                type: string
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/simple-user"
              examples:
                default:
                  "$ref": "#/components/examples/simple-user-items"
        '422':
          "$ref": "#/components/responses/validation_failed"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
        requestBodyParameterName: users
    put:
      summary: Set user access restrictions
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Replaces the list of people that have push access to this branch. This removes all people that previously had push access and grants push access to the new list of people.

        | Type    | Description                                                                                                                   |
        | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
        | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
      tags:
      - repos
      operationId: repos/set-user-access-restrictions
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#set-user-access-restrictions
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      requestBody:
        content:
          application/json:
            schema:
              type: array
              description: users parameter
              items:
                type: string
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/simple-user"
              examples:
                default:
                  "$ref": "#/components/examples/simple-user-items"
        '422':
          "$ref": "#/components/responses/validation_failed"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
        requestBodyParameterName: users
    post:
      summary: Add user access restrictions
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Grants the specified people push access for this branch.

        | Type    | Description                                                                                                                   |
        | ------- | ----------------------------------------------------------------------------------------------------------------------------- |
        | `array` | Usernames for people who can have push access. **Note**: The list of users, apps, and teams in total is limited to 100 items. |
      tags:
      - repos
      operationId: repos/add-user-access-restrictions
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#add-user-access-restrictions
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      requestBody:
        content:
          application/json:
            schema:
              type: array
              description: users parameter
              items:
                type: string
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/simple-user"
              examples:
                default:
                  "$ref": "#/components/examples/simple-user-items"
        '422':
          "$ref": "#/components/responses/validation_failed"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
        requestBodyParameterName: users
    get:
      summary: Get users with access to the protected branch
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Lists the people who have push access to this branch.
      tags:
      - repos
      operationId: repos/get-users-with-access-to-protected-branch
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#list-users-with-access-to-the-protected-branch
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/simple-user"
              examples:
                default:
                  "$ref": "#/components/examples/simple-user-items"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/deployments/{deployment_id}":
    get:
      summary: Get a deployment
      description: ''
      tags:
      - repos
      operationId: repos/get-deployment
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/deployments/#get-a-deployment
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/deployment_id"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/deployment"
              examples:
                default:
                  "$ref": "#/components/examples/deployment"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: false
          name: machine-man
          note: To access the API with your GitHub App, you must provide a custom
            [media type](https://developer.github.com/enterprise/2.20/v3/media) in
            the `Accept` Header for your requests. ```shell application/vnd.github.machine-man-preview+json
            ```
        - required: false
          name: ant-man
          note: |-
            The `inactive` state and the `log_url`, `environment_url`, and `auto_inactive` parameters are currently available for developers to preview. Please see the [blog post](https://developer.github.com/changes/2016-04-06-deployment-and-deployment-status-enhancements) for full details.

            To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.ant-man-preview+json
            ```
  "/repositories":
    get:
      summary: List public repositories
      description: |-
        Lists all public repositories in the order that they were created.

        Note: Pagination is powered exclusively by the `since` parameter. Use the [Link header](https://developer.github.com/enterprise/2.20/v3/#link-header) to get the URL for the next page of repositories.
      tags:
      - repos
      operationId: repos/list-public
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/#list-public-repositories
      parameters:
      - "$ref": "#/components/parameters/per_page"
      - "$ref": "#/components/parameters/since"
      - name: visibility
        in: query
        required: false
        schema:
          type: string
          example: all
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/minimal-repository"
              examples:
                default:
                  "$ref": "#/components/examples/public-repository-items"
          headers:
            Link:
              example: <https://api.github.com/repositories?since=364>; rel="next"
              schema:
                type: string
        '422':
          "$ref": "#/components/responses/validation_failed"
        '304':
          "$ref": "#/components/responses/not_modified"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/branches":
    get:
      summary: List branches
      description: ''
      tags:
      - repos
      operationId: repos/list-branches
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#list-branches
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - name: protected
        description: Setting to `true` returns only protected branches. When set to
          `false`, only unprotected branches are returned. Omitting this parameter
          returns all branches.
        in: query
        required: false
        schema:
          type: boolean
      - "$ref": "#/components/parameters/per_page"
      - "$ref": "#/components/parameters/page"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/short-branch"
              examples:
                default:
                  "$ref": "#/components/examples/short-branch-items"
                with-protection:
                  "$ref": "#/components/examples/short-branch-with-protection-items"
          headers:
            Link:
              "$ref": "#/components/headers/link"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/user/repository_invitations":
    get:
      summary: List repository invitations for the authenticated user
      description: When authenticating as a user, this endpoint will list all currently
        open repository invitations for that user.
      tags:
      - repos
      operationId: repos/list-invitations-for-authenticated-user
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/invitations/#list-repository-invitations-for-the-authenticated-user
      parameters:
      - "$ref": "#/components/parameters/per_page"
      - "$ref": "#/components/parameters/page"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/repository-invitation"
              examples:
                default:
                  "$ref": "#/components/examples/repository-invitation-items"
          headers:
            Link:
              "$ref": "#/components/headers/link"
        '304':
          "$ref": "#/components/responses/not_modified"
        '404':
          "$ref": "#/components/responses/not_found"
        '403':
          "$ref": "#/components/responses/forbidden"
        '401':
          "$ref": "#/components/responses/requires_authentication"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        previews: []
  "/repos/{owner}/{repo}/branches/{branch}":
    get:
      summary: Get a branch
      description: ''
      tags:
      - repos
      operationId: repos/get-branch
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#get-a-branch
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/branch-with-protection"
              examples:
                default:
                  "$ref": "#/components/examples/branch-with-protection"
        '415':
          "$ref": "#/components/responses/preview_header_missing"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/keys":
    get:
      summary: List deploy keys
      description: ''
      tags:
      - repos
      operationId: repos/list-deploy-keys
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/keys/#list-deploy-keys
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/per_page"
      - "$ref": "#/components/parameters/page"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/deploy-key"
              examples:
                default:
                  "$ref": "#/components/examples/deploy-key-items"
          headers:
            Link:
              "$ref": "#/components/headers/link"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    post:
      summary: Create a deploy key
      description: You can create a read-only deploy key.
      tags:
      - repos
      operationId: repos/create-deploy-key
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/keys/#create-a-deploy-key
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  description: A name for the key.
                key:
                  type: string
                  description: The contents of the key.
                read_only:
                  type: boolean
                  description: "If `true`, the key will only be able to read repository
                    contents. Otherwise, the key will be able to read and write.  \n
                    \ \nDeploy keys with write access can perform the same actions
                    as an organization member with admin access, or a collaborator
                    on a personal repository. For more information, see \"[Repository
                    permission levels for an organization](https://help.github.com/articles/repository-permission-levels-for-an-organization/)\"
                    and \"[Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/).\""
              required:
              - key
            example:
              title: octocat@octomac
              key: ssh-rsa AAA...
              read_only: true
      responses:
        '201':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/deploy-key"
              examples:
                default:
                  "$ref": "#/components/examples/deploy-key"
          headers:
            Location:
              example: https://api.github.com/repos/octocat/Hello-World/keys/1
              schema:
                type: string
        '422':
          "$ref": "#/components/responses/validation_failed"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/pages/builds/{build_id}":
    get:
      summary: Get GitHub Enterprise Server Pages build
      description: ''
      tags:
      - repos
      operationId: repos/get-pages-build
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/pages/#get-github-pages-build
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - name: build_id
        description: build_id parameter
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/page-build"
              examples:
                default:
                  "$ref": "#/components/examples/page-build"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/hooks/{hook_id}":
    get:
      summary: Get a repository webhook
      description: ''
      tags:
      - repos
      operationId: repos/get-webhook
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/hooks/#get-a-repository-webhook
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/hook-id"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/hook"
              examples:
                default:
                  "$ref": "#/components/examples/hook"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    delete:
      summary: Delete a repository webhook
      description: ''
      tags:
      - repos
      operationId: repos/delete-webhook
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/hooks/#delete-a-repository-webhook
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/hook-id"
      responses:
        '204':
          description: Empty response
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    patch:
      summary: Update a repository webhook
      description: ''
      tags:
      - repos
      operationId: repos/update-webhook
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/hooks/#update-a-repository-webhook
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/hook-id"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                config:
                  type: object
                  description: Key/value pairs to provide settings for this webhook.
                    [These are defined below](https://developer.github.com/enterprise/2.20/v3/repos/hooks/#create-hook-config-params).
                  properties:
                    url:
                      type: string
                      description: The URL to which the payloads will be delivered.
                    content_type:
                      type: string
                      description: The media type used to serialize the payloads.
                        Supported values include `json` and `form`. The default is
                        `form`.
                    secret:
                      type: string
                      description: If provided, the `secret` will be used as the `key`
                        to generate the HMAC hex digest value in the [`X-Hub-Signature`](https://developer.github.com/enterprise/2.20/webhooks/event-payloads/#delivery-headers)
                        header.
                    insecure_ssl:
                      type: string
                      description: Determines whether the SSL certificate of the host
                        for `url` will be verified when delivering payloads. Supported
                        values include `0` (verification is performed) and `1` (verification
                        is not performed). The default is `0`. **We strongly recommend
                        not setting this to `1` as you are subject to man-in-the-middle
                        and other attacks.**
                    address:
                      type: string
                      example: '"bar@example.com"'
                    room:
                      type: string
                      example: '"The Serious Room"'
                  required:
                  - url
                events:
                  type: array
                  description: Determines what [events](https://developer.github.com/enterprise/2.20/webhooks/event-payloads)
                    the hook is triggered for. This replaces the entire array of events.
                  default:
                  - push
                  items:
                    type: string
                add_events:
                  type: array
                  description: Determines a list of events to be added to the list
                    of events that the Hook triggers for.
                  items:
                    type: string
                remove_events:
                  type: array
                  description: Determines a list of events to be removed from the
                    list of events that the Hook triggers for.
                  items:
                    type: string
                active:
                  type: boolean
                  description: Determines if notifications are sent when the webhook
                    is triggered. Set to `true` to send notifications.
                  default: true
            example:
              active: true
              add_events:
              - pull_request
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/hook"
              examples:
                default:
                  "$ref": "#/components/examples/hook"
        '422':
          "$ref": "#/components/responses/validation_failed"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/releases":
    get:
      summary: List releases
      description: |-
        This returns a list of releases, which does not include regular Git tags that have not been associated with a release. To get a list of Git tags, use the [Repository Tags API](https://developer.github.com/enterprise/2.20/v3/repos/#list-repository-tags).

        Information about published releases are available to everyone. Only users with push access will receive listings for draft releases.
      tags:
      - repos
      operationId: repos/list-releases
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/releases/#list-releases
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/per_page"
      - "$ref": "#/components/parameters/page"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/release"
              examples:
                default:
                  "$ref": "#/components/examples/release-items"
          headers:
            Link:
              "$ref": "#/components/headers/link"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    post:
      summary: Create a release
      description: |-
        Users with push access to the repository can create a release.

        This endpoint triggers [notifications](https://help.github.com/articles/about-notifications/). Creating content too quickly using this endpoint may result in abuse rate limiting. See "[Abuse rate limits](https://developer.github.com/enterprise/2.20/v3/#abuse-rate-limits)" and "[Dealing with abuse rate limits](https://developer.github.com/enterprise/2.20/v3/guides/best-practices-for-integrators/#dealing-with-abuse-rate-limits)" for details.
      tags:
      - repos
      operationId: repos/create-release
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/releases/#create-a-release
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tag_name:
                  type: string
                  description: The name of the tag.
                target_commitish:
                  type: string
                  description: 'Specifies the commitish value that determines where
                    the Git tag is created from. Can be any branch or commit SHA.
                    Unused if the Git tag already exists. Default: the repository''s
                    default branch (usually `master`).'
                name:
                  type: string
                  description: The name of the release.
                body:
                  type: string
                  description: Text describing the contents of the tag.
                draft:
                  type: boolean
                  description: "`true` to create a draft (unpublished) release, `false`
                    to create a published one."
                  default: false
                prerelease:
                  type: boolean
                  description: "`true` to identify the release as a prerelease. `false`
                    to identify the release as a full release."
                  default: false
              required:
              - tag_name
            example:
              tag_name: v1.0.0
              target_commitish: master
              name: v1.0.0
              body: Description of the release
              draft: false
              prerelease: false
      responses:
        '201':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/release"
              examples:
                default:
                  "$ref": "#/components/examples/release"
          headers:
            Location:
              example: https://api.github.com/repos/octocat/Hello-World/releases/1
              schema:
                type: string
        '422':
          "$ref": "#/components/responses/validation_failed"
      x-github:
        triggersNotification: true
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{template_owner}/{template_repo}/generate":
    post:
      summary: Create a repository using a template
      description: |-
        Creates a new repository using a repository template. Use the `template_owner` and `template_repo` route parameters to specify the repository to use as the template. The authenticated user must own or be a member of an organization that owns the repository. To check if a repository is available to use as a template, get the repository's information using the [Get a repository](https://developer.github.com/enterprise/2.20/v3/repos/#get-a-repository) endpoint and check that the `is_template` key is `true`.

        **OAuth scope requirements**

        When using [OAuth](https://developer.github.com/enterprise/2.20/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), authorizations must include:

        *   `public_repo` scope or `repo` scope to create a public repository
        *   `repo` scope to create a private repository
      tags:
      - repos
      operationId: repos/create-using-template
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/#create-a-repository-using-a-template
      parameters:
      - name: template_owner
        description: template_owner parameter
        in: path
        required: true
        schema:
          type: string
      - name: template_repo
        description: template_repo parameter
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                owner:
                  type: string
                  description: The organization or person who will own the new repository.
                    To create a new repository in an organization, the authenticated
                    user must be a member of the specified organization.
                name:
                  type: string
                  description: The name of the new repository.
                description:
                  type: string
                  description: A short description of the new repository.
                private:
                  type: boolean
                  description: Either `true` to create a new private repository or
                    `false` to create a new public one.
                  default: false
              required:
              - name
            example:
              owner: octocat
              name: Hello-World
              description: This is your first repository
              private: false
      responses:
        '201':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/repository"
              examples:
                default:
                  "$ref": "#/components/examples/repository-3"
          headers:
            Location:
              example: https://api.github.com/repos/octocat/Hello-World
              schema:
                type: string
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: false
        previews:
        - required: true
          name: baptiste
          note: |-
            The `is_template` and `template_repository` keys are currently available for developer to preview. See [Create a repository using a template](https://developer.github.com/v3/repos/#create-a-repository-using-a-template) to learn how to create template repositories. To access these new response keys during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.baptiste-preview+json
            ```
  "/users/{username}/repos":
    get:
      summary: List repositories for a user
      description: Lists public repositories for the specified user.
      tags:
      - repos
      operationId: repos/list-for-user
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/#list-repositories-for-a-user
      parameters:
      - "$ref": "#/components/parameters/username"
      - name: type
        description: Can be one of `all`, `owner`, `member`.
        in: query
        required: false
        schema:
          type: string
          enum:
          - all
          - owner
          - member
          default: owner
      - name: sort
        description: Can be one of `created`, `updated`, `pushed`, `full_name`.
        in: query
        required: false
        schema:
          type: string
          enum:
          - created
          - updated
          - pushed
          - full_name
          default: full_name
      - name: direction
        description: 'Can be one of `asc` or `desc`. Default: `asc` when using `full_name`,
          otherwise `desc`'
        in: query
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
      - "$ref": "#/components/parameters/per_page"
      - "$ref": "#/components/parameters/page"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                type: array
                items:
                  "$ref": "#/components/schemas/minimal-repository"
              examples:
                default:
                  "$ref": "#/components/examples/minimal-repository-items"
          headers:
            Link:
              "$ref": "#/components/headers/link"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: false
          name: nebula
          note: |-
            You can set the visibility of a repository using the new `visibility` parameter in the [Repositories API](https://developer.github.com/v3/repos/), and get a repository's visibility with a new response key. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes/).

            To access repository visibility during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.nebula-preview+json
            ```
  "/repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks":
    delete:
      summary: Remove status check protection
      description: Protected branches are available in public repositories with GitHub
        Free and GitHub Free for organizations, and in public and private repositories
        with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise
        Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products)
        in the GitHub Help documentation.
      tags:
      - repos
      operationId: repos/remove-status-check-protection
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#remove-status-check-protection
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '204':
          description: No Content
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    patch:
      summary: Update status check protection
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Updating required status checks requires admin or owner permissions to the repository and branch protection to be enabled.
      tags:
      - repos
      operationId: repos/update-status-check-protection
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#update-status-check-potection
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                strict:
                  type: boolean
                  description: Require branches to be up to date before merging.
                contexts:
                  type: array
                  description: The list of status checks to require in order to merge
                    into this branch
                  items:
                    type: string
            example:
              strict: true
              contexts:
              - continuous-integration/travis-ci
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/status-check-policy"
              examples:
                default:
                  "$ref": "#/components/examples/status-check-policy"
        '404':
          "$ref": "#/components/responses/not_found"
        '422':
          "$ref": "#/components/responses/validation_failed"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    get:
      summary: Get status checks protection
      description: Protected branches are available in public repositories with GitHub
        Free and GitHub Free for organizations, and in public and private repositories
        with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise
        Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products)
        in the GitHub Help documentation.
      tags:
      - repos
      operationId: repos/get-status-checks-protection
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#get-status-checks-protection
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/status-check-policy"
              examples:
                default:
                  "$ref": "#/components/examples/status-check-policy"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}":
    delete:
      summary: Delete a repository
      description: |-
        Deleting a repository requires admin access. If OAuth is used, the `delete_repo` scope is required.

        If an organization owner has configured the organization to prevent members from deleting organization-owned
        repositories, you will get a `403 Forbidden` response.
      tags:
      - repos
      operationId: repos/delete
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/#delete-a-repository
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      responses:
        '204':
          description: Empty response
        '403':
          description: 'If an organization owner has configured the organization to
            prevent members from deleting organization-owned repositories, a member
            will get this response:'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  documentation_url:
                    type: string
              example:
                message: Organization members cannot delete repositories.
                documentation_url: https://developer.github.com/enterprise/2.20/v3/repos/#delete-a-repository
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    get:
      summary: Get a repository
      description: |-
        When you pass the `scarlet-witch-preview` media type, requests to get a repository will also return the repository's code of conduct if it can be detected from the repository's code of conduct file.

        The `parent` and `source` objects are present when the repository is a fork. `parent` is the repository this repository was forked from, `source` is the ultimate source for the network.
      tags:
      - repos
      operationId: repos/get
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/#get-a-repository
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/full-repository"
              examples:
                default-response:
                  "$ref": "#/components/examples/full-repository-default-response"
                response-with-scarlet-witch-preview-media-type:
                  "$ref": "#/components/examples/full-repository-response-with-scarlet-witch-preview-media-type"
        '403':
          "$ref": "#/components/responses/forbidden"
        '404':
          "$ref": "#/components/responses/not_found"
        '301':
          "$ref": "#/components/responses/moved_permanently"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: false
          name: nebula
          note: |-
            You can set the visibility of a repository using the new `visibility` parameter in the [Repositories API](https://developer.github.com/v3/repos/), and get a repository's visibility with a new response key. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes/).

            To access repository visibility during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.nebula-preview+json
            ```
        - required: false
          name: scarlet-witch
          note: |-
            The Codes of Conduct API is currently available for developers to preview.

            To access the API during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.scarlet-witch-preview+json
            ```
    patch:
      summary: Update a repository
      description: "**Note**: To edit a repository's topics, use the [Replace all
        repository topics](https://developer.github.com/enterprise/2.20/v3/repos/#replace-all-repository-topics)
        endpoint."
      tags:
      - repos
      operationId: repos/update
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/#update-a-repository
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The name of the repository.
                description:
                  type: string
                  description: A short description of the repository.
                homepage:
                  type: string
                  description: A URL with more information about the repository.
                private:
                  type: boolean
                  description: "Either `true` to make the repository private or `false`
                    to make it public. Default: `false`.  \n**Note**: You will get
                    a `422` error if the organization restricts [changing repository
                    visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories)
                    to organization owners and a non-owner tries to change the value
                    of private. **Note**: You will get a `422` error if the organization
                    restricts [changing repository visibility](https://help.github.com/articles/repository-permission-levels-for-an-organization#changing-the-visibility-of-repositories)
                    to organization owners and a non-owner tries to change the value
                    of private."
                  default: false
                visibility:
                  type: string
                  description: Can be `public` or `private`. If your organization
                    is associated with an enterprise account using GitHub Enterprise
                    Cloud or GitHub Enterprise Server 2.20+, `visibility` can also
                    be `internal`. The `visibility` parameter overrides the `private`
                    parameter when you use both along with the `nebula-preview` preview
                    header.
                  enum:
                  - public
                  - private
                  - visibility
                  - internal
                has_issues:
                  type: boolean
                  description: Either `true` to enable issues for this repository
                    or `false` to disable them.
                  default: true
                has_projects:
                  type: boolean
                  description: Either `true` to enable projects for this repository
                    or `false` to disable them. **Note:** If you're creating a repository
                    in an organization that has disabled repository projects, the
                    default is `false`, and if you pass `true`, the API returns an
                    error.
                  default: true
                has_wiki:
                  type: boolean
                  description: Either `true` to enable the wiki for this repository
                    or `false` to disable it.
                  default: true
                is_template:
                  type: boolean
                  description: Either `true` to make this repo available as a template
                    repository or `false` to prevent it.
                  default: false
                default_branch:
                  type: string
                  description: Updates the default branch for this repository.
                allow_squash_merge:
                  type: boolean
                  description: Either `true` to allow squash-merging pull requests,
                    or `false` to prevent squash-merging.
                  default: true
                allow_merge_commit:
                  type: boolean
                  description: Either `true` to allow merging pull requests with a
                    merge commit, or `false` to prevent merging pull requests with
                    merge commits.
                  default: true
                allow_rebase_merge:
                  type: boolean
                  description: Either `true` to allow rebase-merging pull requests,
                    or `false` to prevent rebase-merging.
                  default: true
                delete_branch_on_merge:
                  type: boolean
                  description: Either `true` to allow automatically deleting head
                    branches when pull requests are merged, or `false` to prevent
                    automatic deletion.
                  default: false
                archived:
                  type: boolean
                  description: "`true` to archive this repository. **Note**: You cannot
                    unarchive repositories through the API."
                  default: false
            example:
              name: Hello-World
              description: This is your first repository
              homepage: https://github.com
              private: true
              has_issues: true
              has_projects: true
              has_wiki: true
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/full-repository"
              examples:
                default:
                  "$ref": "#/components/examples/full-repository"
        '403':
          "$ref": "#/components/responses/forbidden"
        '422':
          "$ref": "#/components/responses/validation_failed"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews:
        - required: false
          name: nebula
          note: |-
            You can set the visibility of a repository using the new `visibility` parameter in the [Repositories API](https://developer.github.com/v3/repos/), and get a repository's visibility with a new response key. For more information, see the [blog post](https://developer.github.com/changes/2019-12-03-internal-visibility-changes/).

            To access repository visibility during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.nebula-preview+json
            ```
        - required: false
          name: baptiste
          note: |-
            The `is_template` and `template_repository` keys are currently available for developer to preview. See [Create a repository using a template](https://developer.github.com/v3/repos/#create-a-repository-using-a-template) to learn how to create template repositories. To access these new response keys during the preview period, you must provide a custom [media type](https://developer.github.com/v3/media) in the `Accept` header:
            ```shell
            application/vnd.github.baptiste-preview+json
            ```
  "/repos/{owner}/{repo}/branches/{branch}/protection/restrictions":
    delete:
      summary: Delete access restrictions
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Disables the ability to restrict who can push to this branch.
      tags:
      - repos
      operationId: repos/delete-access-restrictions
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#delete-access-restrictions
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '204':
          description: No Content
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    get:
      summary: Get access restrictions
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Lists who has access to this protected branch.

        **Note**: Users, apps, and teams `restrictions` are only available for organization-owned repositories.
      tags:
      - repos
      operationId: repos/get-access-restrictions
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#get-access-restrictions
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/branch-restriction-policy"
              examples:
                default:
                  "$ref": "#/components/examples/branch-restriction-policy"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/keys/{key_id}":
    get:
      summary: Get a deploy key
      description: ''
      tags:
      - repos
      operationId: repos/get-deploy-key
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/keys/#get-a-deploy-key
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/key_id"
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/deploy-key"
              examples:
                default:
                  "$ref": "#/components/examples/deploy-key"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    delete:
      summary: Delete a deploy key
      description: Deploy keys are immutable. If you need to update a key, remove
        the key and create a new one instead.
      tags:
      - repos
      operationId: repos/delete-deploy-key
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/keys/#delete-a-deploy-key
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/key_id"
      responses:
        '204':
          description: Empty response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/releases/{release_id}":
    patch:
      summary: Update a release
      description: Users with push access to the repository can edit a release.
      tags:
      - repos
      operationId: repos/update-release
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/releases/#update-a-release
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/release_id"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                tag_name:
                  type: string
                  description: The name of the tag.
                target_commitish:
                  type: string
                  description: 'Specifies the commitish value that determines where
                    the Git tag is created from. Can be any branch or commit SHA.
                    Unused if the Git tag already exists. Default: the repository''s
                    default branch (usually `master`).'
                name:
                  type: string
                  description: The name of the release.
                body:
                  type: string
                  description: Text describing the contents of the tag.
                draft:
                  type: boolean
                  description: "`true` makes the release a draft, and `false` publishes
                    the release."
                prerelease:
                  type: boolean
                  description: "`true` to identify the release as a prerelease, `false`
                    to identify the release as a full release."
            example:
              tag_name: v1.0.0
              target_commitish: master
              name: v1.0.0
              body: Description of the release
              draft: false
              prerelease: false
      responses:
        '200':
          description: response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/release"
              examples:
                default:
                  "$ref": "#/components/examples/release"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    get:
      summary: Get a release
      description: "**Note:** This returns an `upload_url` key corresponding to the
        endpoint for uploading release assets. This key is a [hypermedia resource](https://developer.github.com/enterprise/2.20/v3/#hypermedia)."
      tags:
      - repos
      operationId: repos/get-release
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/releases/#get-a-release
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/release_id"
      responses:
        '200':
          description: "**Note:** This returns an `upload_url` key corresponding to
            the endpoint for uploading release assets. This key is a [hypermedia resource](https://developer.github.com/enterprise/2.20/v3/#hypermedia)."
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/release"
              examples:
                default:
                  "$ref": "#/components/examples/release"
        '404':
          "$ref": "#/components/responses/not_found"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    delete:
      summary: Delete a release
      description: Users with push access to the repository can delete a release.
      tags:
      - repos
      operationId: repos/delete-release
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/releases/#delete-a-release
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/release_id"
      responses:
        '204':
          description: Empty response
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
  "/repos/{owner}/{repo}/branches/{branch}/protection":
    delete:
      summary: Delete branch protection
      description: Protected branches are available in public repositories with GitHub
        Free and GitHub Free for organizations, and in public and private repositories
        with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise
        Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products)
        in the GitHub Help documentation.
      tags:
      - repos
      operationId: repos/delete-branch-protection
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#delete-branch-protection
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      responses:
        '204':
          description: Empty response
        '403':
          "$ref": "#/components/responses/forbidden"
      x-github:
        githubCloudOnly: false
        enabledForGitHubApps: true
        previews: []
    put:
      summary: Update branch protection
      description: |-
        Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://help.github.com/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.

        Protecting a branch requires admin or owner permissions to the repository.

        **Note**: Passing new arrays of `users` and `teams` replaces their previous values.

        **Note**: The list of users, apps, and teams in total is limited to 100 items.
      tags:
      - repos
      operationId: repos/update-branch-protection
      externalDocs:
        description: API method documentation
        url: https://developer.github.com/enterprise/2.20/v3/repos/branches/#update-branch-protection
      parameters:
      - "$ref": "#/components/parameters/owner"
      - "$ref": "#/components/parameters/repo"
      - "$ref": "#/components/parameters/branch"
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                required_status_checks:
                  type: object
                  description: Require status checks to pass before merging. Set to
                    `null` to disable.
                  nullable: true
                  properties:
                    strict:
                      type: boolean
                      description: Require branches to be up to date before merging.
                    contexts:
                      type: array
                      description: The list of status checks to require in order to
                        merge into this branch
                      items:
                        type: string
                  required:
                  - strict
                  - contexts
                enforce_admins:
                  type: boolean
                  description: Enforce all configured restrictions for administrators.
                    Set to `true` to enforce required status checks for repository
                    administrators. Set to `null` to disable.
                  nullable: true
                required_pull_request_reviews:
                  type: object
                  description: Require at least one approving review on a pull request,
                    before merging. Set to `null` to disable.
                  nullable: true
                  properties:
                    dismissal_restrictions:
                      type: object
                      description: Specify which users and teams can dismiss pull
                        request reviews. Pass an empty `dismissal_restrictions` object
                        to disable. User and team `dismissal_restrictions` are only
                        available for organization-owned repositories. Omit this parameter
                        for personal repositories.
                      properties:
                        users:
                          type: array
                          description: The list of user `login`s with dismissal access
                          items:
                            type: string
                        teams:
                          type: array
                          description: The list of team `slug`s with dismissal access
              
Download .txt
gitextract_uoe1hdom/

├── .github/
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── PULL_REQUEST_TEMPLATE.md
│   ├── dependabot.yml
│   ├── labeler.yml
│   └── workflows/
│       ├── codeql-analysis.yml
│       ├── greetings.yml
│       ├── label.yml
│       └── quisque.yml
├── .gitignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE.md
├── README.md
├── SECURITY.md
├── example/
│   ├── config.json
│   ├── ghes-2.20.yml
│   └── openapi.yml
├── package.json
├── src/
│   ├── .babelrc
│   ├── .browserslistrc
│   ├── assets/
│   │   ├── highlighter-theme-dark.less
│   │   ├── highlighter-theme-light.less
│   │   ├── theme.less
│   │   └── utils.less
│   ├── components/
│   │   ├── ContactTeam.vue
│   │   ├── DocEntry.vue
│   │   ├── DocEntryTitle.vue
│   │   ├── DocFooter.vue
│   │   ├── DocHeader.vue
│   │   ├── DocLayout.vue
│   │   ├── DocSidebar.vue
│   │   ├── DocSidebarEntry.vue
│   │   ├── DocSidebarTag.vue
│   │   ├── DocTag.vue
│   │   ├── DocToolbox.vue
│   │   ├── DocToolboxDropdown.vue
│   │   ├── DocToolboxIcon.vue
│   │   ├── Endpoint.vue
│   │   ├── Example.vue
│   │   ├── Highlight.vue
│   │   ├── Markdown.vue
│   │   ├── ReqBody.vue
│   │   ├── ReqResponse.vue
│   │   ├── Shield.vue
│   │   ├── SplitSection.vue
│   │   └── StatusCode.vue
│   ├── environment.json
│   ├── index.html
│   ├── index.js
│   ├── index.vue
│   ├── plugins/
│   │   ├── codegen.js
│   │   └── envInject.js
│   ├── store.js
│   └── vue.config.js
└── src-engine/
    ├── cli.js
    └── index.js
Download .txt
SYMBOL INDEX (13 symbols across 3 files)

FILE: src-engine/index.js
  method constructor (line 11) | constructor(schema, outputDir, configFile) {
  method prepare (line 63) | async prepare() {
  method finish (line 89) | async finish() {
  method finalize (line 97) | async finalize() {
  method generate (line 102) | async generate(file) {
  method loadAPI (line 123) | async loadAPI(file) {
  method _displayBanner (line 138) | async _displayBanner(text, type = "default") {
  method _displayInfo (line 157) | async _displayInfo() {
  method _displaySchemaSyntaxError (line 167) | async _displaySchemaSyntaxError(details) {

FILE: src/plugins/codegen.js
  method curl (line 6) | curl(server, def) {

FILE: src/store.js
  method setServer (line 12) | setServer(state, server) {
  method setLang (line 15) | setLang(state, lang) {
  method setShowDefinition (line 18) | setShowDefinition(state, show) {
Condensed preview — 57 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (2,252K chars).
[
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 834,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the b"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 595,
    "preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
  },
  {
    "path": ".github/PULL_REQUEST_TEMPLATE.md",
    "chars": 920,
    "preview": "# Description\n\nPlease include a summary of the change and which issue is fixed. Please also include relevant motivation "
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 191,
    "preview": "version: 2\nupdates:\n  - package-ecosystem: \"npm\"\n    directory: \"/\"\n    schedule:\n      interval: \"daily\"\n    assignees:"
  },
  {
    "path": ".github/labeler.yml",
    "chars": 84,
    "preview": "documentation:\n  - \"**/*.md\"\n\nengine:\n  - \"src/**/*\"\n\ntemplate:\n  - \"src-nuxt/**/*\"\n"
  },
  {
    "path": ".github/workflows/codeql-analysis.yml",
    "chars": 1996,
    "preview": "name: \"CodeQL\"\n\non:\n  push:\n    branches: [master]\n  pull_request:\n    # The branches below must be a subset of the bran"
  },
  {
    "path": ".github/workflows/greetings.yml",
    "chars": 804,
    "preview": "name: Greetings\n\non: [pull_request, issues]\n\njobs:\n  greeting:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions"
  },
  {
    "path": ".github/workflows/label.yml",
    "chars": 181,
    "preview": "name: Labeler\n\non: [pull_request]\n\njobs:\n  label:\n    runs-on: ubuntu-latest\n    steps:\n    - uses: actions/labeler@v2\n "
  },
  {
    "path": ".github/workflows/quisque.yml",
    "chars": 856,
    "preview": "name: Quisque API Build\n\non:\n  push:\n    branches: [\"master\"]\n\njobs:\n  build:\n    runs-on: ubuntu-latest\n    steps:\n    "
  },
  {
    "path": ".gitignore",
    "chars": 62,
    "preview": "node_modules/\n.nuxt/\ndist/\ndocs/\ntmp/\n*.log\npackage-lock.json\n"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3358,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 2486,
    "preview": "# Contributing\n\nWe love pull requests from everyone.\n\nWhen contributing to this repository, please first discuss the cha"
  },
  {
    "path": "LICENSE.md",
    "chars": 1058,
    "preview": "# Copyright (c) 2020+ OurOpenCode\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this "
  },
  {
    "path": "README.md",
    "chars": 7279,
    "preview": "<h1 align=\"center\">OpenDocumenter</h1>\n\n<p align=\"center\">\n  <img alt=\"Version\" src=\"https://img.shields.io/github/packa"
  },
  {
    "path": "SECURITY.md",
    "chars": 577,
    "preview": "# Security Policy\n\n## Supported Versions\nOnly the latest version is supported and actively maintained while the project "
  },
  {
    "path": "example/config.json",
    "chars": 1218,
    "preview": "{\n  \"mergeFromDirectory\": null,\n  \"disableGeneratedUsingFooter\": false,\n  \"abortOnInvalidSchema\": false,\n  \"vueModernMod"
  },
  {
    "path": "example/ghes-2.20.yml",
    "chars": 2093979,
    "preview": "---\nopenapi: 3.0.3\ninfo:\n  version: 0.0.4\n  title: GitHub v3 REST API\n  description: GitHub's v3 REST API.\n  license:\n  "
  },
  {
    "path": "example/openapi.yml",
    "chars": 14552,
    "preview": "openapi: \"3.0.0\"\n\ninfo:\n  version: 1.0.0\n  title: Quisque API\n  description: |\n    Lorem ipsum dolor sit amet, consectet"
  },
  {
    "path": "package.json",
    "chars": 1625,
    "preview": "{\n  \"name\": \"opendocumenter\",\n  \"version\": \"0.5.0\",\n  \"author\": \"$ourOpenCode\",\n  \"scripts\": {\n    \"start\": \"npm-run-all"
  },
  {
    "path": "src/.babelrc",
    "chars": 58,
    "preview": "{\n  \"presets\": [\n    \"@vue/cli-plugin-babel/preset\"\n  ]\n}\n"
  },
  {
    "path": "src/.browserslistrc",
    "chars": 30,
    "preview": "> 1%\nlast 2 versions\nnot dead\n"
  },
  {
    "path": "src/assets/highlighter-theme-dark.less",
    "chars": 1145,
    "preview": "/*\n\nOrginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>\n\n*/\n\n.hljs {\n  display: block"
  },
  {
    "path": "src/assets/highlighter-theme-light.less",
    "chars": 1145,
    "preview": "/*\n\nOrginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmail.com>\n\n*/\n\n.hljs {\n  display: block"
  },
  {
    "path": "src/assets/theme.less",
    "chars": 1837,
    "preview": "/**\n * Colors\n */\n\n@color-body-background: white;\n@color-body-text: black;\n\n@color-body-link: #292b36;\n@color-body-link-"
  },
  {
    "path": "src/assets/utils.less",
    "chars": 87,
    "preview": ".truncated() {\n  white-space: nowrap;\n  overflow: hidden;\n  text-overflow: ellipsis;\n}\n"
  },
  {
    "path": "src/components/ContactTeam.vue",
    "chars": 945,
    "preview": "<template>\n  <div class=\"contact-team\">\n    {{ $i18n(\"HAVE_ANY_QUESTIONS_CONTACT\") }}\n    <span v-if=\"email && url\">\n   "
  },
  {
    "path": "src/components/DocEntry.vue",
    "chars": 2350,
    "preview": "<template>\n  <SplitSection class=\"entry\">\n    <DocEntryTitle :title=\"definition.summary\" :path=\"definition.path\" :method"
  },
  {
    "path": "src/components/DocEntryTitle.vue",
    "chars": 795,
    "preview": "<template>\n  <div class=\"entry-title\" :id=\"$hashPath(path, method)\">\n    <div class=\"entry-title__title\">\n      <p>{{ ti"
  },
  {
    "path": "src/components/DocFooter.vue",
    "chars": 1063,
    "preview": "<template>\n  <SplitSection class=\"footer\" id=\"bottom\">\n    <a href=\"https://github.com/ouropencode/opendocumenter\" targe"
  },
  {
    "path": "src/components/DocHeader.vue",
    "chars": 2311,
    "preview": "<template>\n  <SplitSection class=\"header\" id=\"top\" :no-padding=\"true\">\n    <div class=\"header-split\">\n      <div class=\""
  },
  {
    "path": "src/components/DocLayout.vue",
    "chars": 1297,
    "preview": "<template>\n  <div class=\"layout\">\n    <div class=\"layout__sidebar\">\n      <DocSidebar />\n    </div>\n    <div class=\"layo"
  },
  {
    "path": "src/components/DocSidebar.vue",
    "chars": 1130,
    "preview": "<template>\n  <div class=\"sidebar\">\n    <div>\n      <DocSidebarTag :home=\"true\" />\n    </div>\n\n    <div class=\"external-d"
  },
  {
    "path": "src/components/DocSidebarEntry.vue",
    "chars": 1319,
    "preview": "<template>\n  <a :href=\"href\" class=\"sidebar-entry\" @click=\"click\">\n    <div class=\"sidebar-entry__title\">{{ definition.s"
  },
  {
    "path": "src/components/DocSidebarTag.vue",
    "chars": 1493,
    "preview": "<template>\n  <div class=\"sidebar-tag\" v-if=\"home\">\n    <a href=\"#\" @click=\"click\" class=\"sidebar-tag__name\">{{ $api.info"
  },
  {
    "path": "src/components/DocTag.vue",
    "chars": 1002,
    "preview": "<template>\n  <div class=\"doc-tag\">\n    <SplitSection>\n      <div :id=\"$hashPath('', tag.name)\" class=\"doc-tag__title\">{{"
  },
  {
    "path": "src/components/DocToolbox.vue",
    "chars": 2306,
    "preview": "<template>\n  <div class=\"toolbox\">\n    <DocToolboxDropdown v-if=\"serverOptions.length\" :label=\"$i18n('SERVER')\" v-model="
  },
  {
    "path": "src/components/DocToolboxDropdown.vue",
    "chars": 2289,
    "preview": "<template>\n  <div class=\"toolbox-dropdown\">\n    <div class=\"toolbox-dropdown__label\">\n      {{ label }}\n    </div>\n\n    "
  },
  {
    "path": "src/components/DocToolboxIcon.vue",
    "chars": 406,
    "preview": "<template>\n  <div class=\"toolbox-icon\" @click=\"$emit('click')\">\n    <font-awesome-icon :icon=\"icon\" />\n  </div>\n</templa"
  },
  {
    "path": "src/components/Endpoint.vue",
    "chars": 2398,
    "preview": "<template>\n  <div class=\"endpoint\" :data-type=\"method\" @click=\"copyText\">\n    <div class=\"endpoint__path\" ref=\"text\">\n  "
  },
  {
    "path": "src/components/Example.vue",
    "chars": 617,
    "preview": "<template>\n  <div class=\"example\">\n    <div class=\"example__title\">{{ title }}</div>\n    <highlight :dark-mode=\"true\" :l"
  },
  {
    "path": "src/components/Highlight.vue",
    "chars": 1352,
    "preview": "<template>\n  <div :key=\"content+lang\" class=\"highlight\">\n    <highlight-code :class=\"highlightClasses\" :lang=\"realLang\">"
  },
  {
    "path": "src/components/Markdown.vue",
    "chars": 680,
    "preview": "<template>\n  <markdown-it-vue-light class=\"markdown md-body\" :content=\"content\" />\n</template>\n\n<script>\nimport Markdown"
  },
  {
    "path": "src/components/ReqBody.vue",
    "chars": 372,
    "preview": "<template>\n  <div class=\"req-body\">\n    <Highlight lang=\"json\" :content=\"body.content['application/json'].example\" />\n  "
  },
  {
    "path": "src/components/ReqResponse.vue",
    "chars": 842,
    "preview": "<template>\n  <div class=\"req-response\">\n    <div class=\"req-response__code\">\n      <StatusCode :code=\"code\" />\n    </div"
  },
  {
    "path": "src/components/Shield.vue",
    "chars": 821,
    "preview": "<template>\n  <a :href=\"href\" class=\"badge\">\n    <img :src=\"src\" />\n  </a>\n</template>\n\n<script>\nexport default {\n  props"
  },
  {
    "path": "src/components/SplitSection.vue",
    "chars": 686,
    "preview": "<template>\n  <div class=\"split-section\">\n    <div class=\"split-section__main\">\n      <slot></slot>\n    </div>\n    <div c"
  },
  {
    "path": "src/components/StatusCode.vue",
    "chars": 1680,
    "preview": "<template>\n  <div class=\"status-code\">\n    <div class=\"status-code__code\">{{ code }}</div>\n    <div class=\"status-code__"
  },
  {
    "path": "src/environment.json",
    "chars": 190,
    "preview": "{\n  \"api\": {\n    \"openapi\": \"0.0.0\",\n    \"info\": {},\n    \"servers\": [],\n    \"paths\": {},\n    \"components\": {},\n    \"secu"
  },
  {
    "path": "src/index.html",
    "chars": 776,
    "preview": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"utf-8\">\n    <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n   "
  },
  {
    "path": "src/index.js",
    "chars": 1661,
    "preview": "import Vue from 'vue'\n\nimport './plugins/codegen'\nimport envInject from './plugins/envInject'\n\nVue.config.productionTip "
  },
  {
    "path": "src/index.vue",
    "chars": 1081,
    "preview": "<template>\n  <div id=\"app\">\n    <DocLayout />\n  </div>\n</template>\n\n<script>\nimport DocLayout from \"@/components/DocLayo"
  },
  {
    "path": "src/plugins/codegen.js",
    "chars": 653,
    "preview": "import Vue from 'vue'\nimport store from '@/store'\n\nconst generators = {\n\n  curl(server, def) {\n    let cmd = `curl -X ${"
  },
  {
    "path": "src/plugins/envInject.js",
    "chars": 1474,
    "preview": "import Vue from 'vue'\nimport SwaggerParser from '@apidevtools/swagger-parser'\nimport Environment from '../environment.js"
  },
  {
    "path": "src/store.js",
    "chars": 606,
    "preview": "import Vue from 'vue'\nimport Vuex from 'vuex'\nVue.use(Vuex)\n\nconst state = () => ({\n  currentServer: '',\n  currentLang: "
  },
  {
    "path": "src/vue.config.js",
    "chars": 213,
    "preview": "module.exports = {\n  \"publicPath\": \"./\",\n  pages: {\n    index: {\n      entry: 'src/index.js',\n      template: 'src/index"
  },
  {
    "path": "src-engine/cli.js",
    "chars": 1587,
    "preview": "#!/usr/bin/env node\n\nconst Core = require('./index.js')\nconst minimist = require(\"minimist\")\nconst colors = require(\"col"
  },
  {
    "path": "src-engine/index.js",
    "chars": 5136,
    "preview": "const SwaggerParser = require(\"@apidevtools/swagger-parser\")\nconst copy = require(\"recursive-copy\")\nconst path = require"
  }
]

About this extraction

This page contains the full source code of the ouropencode/OpenDocumenter GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 57 files (2.1 MB), approximately 547.1k tokens, and a symbol index with 13 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!