-
-
-
-
-
-
-
-
-
-
diff --git a/content/admin/overview/about-upgrades-to-new-releases.md b/content/admin/overview/about-upgrades-to-new-releases.md
index f36e85519247..fbcaefad55f8 100644
--- a/content/admin/overview/about-upgrades-to-new-releases.md
+++ b/content/admin/overview/about-upgrades-to-new-releases.md
@@ -45,5 +45,5 @@ To upgrade your enterprise to a new release, see "[Release notes](/enterprise-se
- [ {% data variables.product.prodname_roadmap %} ]( {% data variables.product.prodname_roadmap_link %} ) in the `github/roadmap` repository
{% if currentVersion == "github-ae@latest" %}
-- [ {% data variables.product.prodname_ghe_managed %} release notes](/admin/overview/github-ae-release-notes)
+- [ {% data variables.product.prodname_ghe_managed %} release notes](/admin/release-notes)
{% endif %}
diff --git a/content/admin/overview/github-ae-release-notes.md b/content/admin/overview/github-ae-release-notes.md
deleted file mode 100644
index dbd6bc961a96..000000000000
--- a/content/admin/overview/github-ae-release-notes.md
+++ /dev/null
@@ -1,89 +0,0 @@
----
-title: GitHub AE release notes
-intro: March 1, 2021
-versions:
- github-ae: '*'
----
-
-### Features
-
-#### {% data variables.product.prodname_actions %} beta
-
-[{% data variables.product.prodname_actions %}](https://github.com/features/actions) is a powerful, flexible solution for CI/CD and workflow automation. For more information, see "[Introduction to {% data variables.product.prodname_actions %}](/actions/learn-github-actions/introduction-to-github-actions)."
-
-{% data variables.product.prodname_actions %} on {% data variables.product.product_name %} uses a new [{% data variables.actions.hosted_runner %}](/actions/using-github-hosted-runners/about-ae-hosted-runners), only available for {% data variables.product.product_name %}, that enables you to customize the size, image, and networking configuration of the runners. These runners are a finished-service CI compute environment with auto-scaling and management, fully managed by {% data variables.product.company_short %}. During the beta, the use {% data variables.actions.hosted_runner %}s is free of charge. For more information, see "[Adding {% data variables.actions.hosted_runner %}s](/actions/using-github-hosted-runners/adding-ae-hosted-runners)."
-
-Please note that when {% data variables.product.prodname_actions %} is enabled during this upgrade, two organizations named "GitHub Actions" (@**actions** and @**github**) will appear in {% data variables.product.product_location %}. These organizations are required by {% data variables.product.prodname_actions %}. Users named @**ghost** and @**actions** appear as the actors for creation of these organizations in the audit log.
-
-#### {% data variables.product.prodname_registry %} beta
-
-[{% data variables.product.prodname_registry %}](https://github.com/features/packages) is a package hosting service, natively integrated with {% data variables.product.prodname_actions %}, APIs, and webhooks. Create an [end-to-end DevOps workflow](/github-ae@latest/packages/quickstart) that includes your code, continuous integration, and deployment solutions. For more information, see "[About {% data variables.product.prodname_registry %}](/packages/learn-github-packages/about-github-packages)."
-
-During this beta, {% data variables.product.prodname_registry %} is free of charge to {% data variables.product.product_name %} customers.
-
-#### {% data variables.product.prodname_GH_advanced_security %} beta
-
-{% data variables.product.prodname_GH_advanced_security %} is available in beta and includes both {% data variables.product.prodname_code_scanning %} and {% data variables.product.prodname_secret_scanning %}. Repository administrators and organization owners can opt into {% data variables.product.prodname_advanced_security %} features in the settings for a repository or organization, within the **Security and analysis** tab. For more information, see "[About {% data variables.product.prodname_GH_advanced_security %}](/github/getting-started-with-github/about-github-advanced-security)."
-
-During this beta, {% data variables.product.prodname_advanced_security %} features are free of charge to {% data variables.product.product_name %} customers.
-
-#### Manage teams from your identity provider (IdP)
-
-Customers using SCIM (System for Cross-domain Identity Management) can now sync security groups in Azure Active Directory with {% data variables.product.company_short %} teams. Once a team has been linked to a security group, membership will be automatically updated in {% data variables.product.product_name %} when a user is added or removed from their assigned security group. For more information, see "[Synchronizing a team with an identity provider group](/organizations/organizing-members-into-teams/synchronizing-a-team-with-an-identity-provider-group)."
-
-#### IP allow lists beta
-
-Enterprise and organization owners can now use IP allow lists to restrict traffic to the enterprise or specific organizations. After you configure an IP allow list, only visitors from IP addresses on the list are permitted to access the resources protected by the list.
-
-This functionality is provided in addition to the ability to request network security group changes that filter traffic to the entirety of the {% data variables.product.product_name %} tenant.
-
-For more information, see "[Restricting network traffic to your enterprise](/admin/configuration/restricting-network-traffic-to-your-enterprise)" and "[Managing allowed IP addresses for your organization](/organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization)."
-
-#### Pull request auto-merge
-
-With auto-merge, pull requests can be set to merge automatically when all merge requirements have been satisfied. This saves users from needing to constantly check the state of their pull requests just to merge them. Auto-merge can be enabled by a user with permission to merge and on pull requests that have unsatisfied merge requirements (like missing approvals or pending or failing required status checks). For more information, see "[Automatically merging a pull request](/github/collaborating-with-issues-and-pull-requests/automatically-merging-a-pull-request)."
-
-### Changes
-
-#### Developer changes
-
-- [Organization owners can now disable publication](/organizations/managing-organization-settings/managing-the-publication-of-github-pages-sites-for-your-organization) of {% data variables.product.prodname_pages %} sites from repositories in the organization. This will not unpublish existing sites.
-- Repositories that use {% data variables.product.prodname_pages %} can now [build and deploy from any branch](/pages/getting-started-with-github-pages/about-github-pages#publishing-sources-for-github-pages-sites).
-- When writing an issue or pull request, the list syntax for bullets, numbers, and tasks will now be autocompleted after you press `return` or `enter`.
-- You can now delete a directory in a repository from the repository page. When navigating to a directory, a new kebab button next to the "Add file" button gives the option to delete the directory.
-- It’s now easier and faster to [reference issues or pull requests](/github/writing-on-github/basic-writing-and-formatting-syntax#referencing-issues-and-pull-requests), with search across multiple words after the "#".
-
-##### Administration changes
-
-- Enterprise owners can now [publish a mandatory message](/admin/user-management/customizing-user-messages-for-your-enterprise#creating-a-mandatory-message). The message is shown to all users and they must acknowledge it. This can be used to display important information, terms of service or policies.
-- The {% data variables.product.prodname_github_app%} single file path permission can now [support up to ten files](/developers/apps/creating-a-github-app-using-url-parameters).
-- When configuring a {% data variables.product.prodname_github_app%}, the authorization callback URL is a required field. Now we will permit the integrator to specify multiple callback URLs. {% data variables.product.product_name %} denies authorization if the callback URL from the request is not listed.
-- A [new API endpoint](/rest/reference/apps#create-a-scoped-access-token) enables the exchange of a user to server token for a user to server token scoped to specific repositories.
-- Events are now logged in the audit log on [promoting a team member to be a team maintainer and on demoting a team maintainer to be a team member](/admin/user-management/audited-actions#teams).
-- The [OAuth device authorization flow](/developers/apps/authorizing-oauth-apps#device-flow) is now supported. This allows any CLI client or developer tool to authenticate using a secondary system.
-- A user can no longer delete their account if SCIM provisioning is enabled.
-
-##### Default branch renaming
-
-Enterprise and organization owners can now set the default branch name for new repositories. Enterprise owners can also enforce their choice of default branch name across all organizations or allow individual organizations to choose their own. For more information, see "[Enforcing repository management policies in your enterprise](/admin/policies/enforcing-repository-management-policies-in-your-enterprise#enforcing-a-policy-on-the-default-branch-name)" and "[Managing the default branch name for repositories in your organization](/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization)."
-
-Existing repositories are unaffected by these settings, and their default branch name will not be changed.
-
-This change is one of many changes {% data variables.product.company_short %} is making to support projects and maintainers that want to rename their default branch. To learn more, see [github/renaming](https://github.com/github/renaming).
-
-
-### Bug fixes
-- Users can no longer set a backup email address on their profile. Their email address is set through the IdP only.
-- You can no longer enable two-factor authentication after configuring authentication through your IdP.
-- {% data variables.product.product_name %} can now connect to Azure Boards.
-- Version headers were missing from the APIs, and have now been set to "GitHub AE."
-- Links to documentation have been fixed.
-- Configuration of audit log forwarding within the enterprise's settings was failing.
-- Navigating to gists could result in a 500 error.
-- The Support email or URL was failing to save. It now saves after a period of a few minutes.
-- Organization level pull request templates were not being applied to all pull requests in the organization.
-
-### Known issues
-
-- Geographic location data is not shown in the audit log. Location information can otherwise be discerned from the IP address associated with each event.
-- The link to {% data variables.product.prodname_registry %} from a repository page shows an incorrect search page when that repository does not have any packages.
diff --git a/content/admin/overview/index.md b/content/admin/overview/index.md
index 9f047fd8bd7d..7c88265d8645 100644
--- a/content/admin/overview/index.md
+++ b/content/admin/overview/index.md
@@ -8,6 +8,7 @@ versions:
github-ae: '*'
children:
- /about-github-ae
+ - /about-upgrades-to-new-releases
- /about-data-residency
- /about-enterprise-accounts
- /managing-your-github-enterprise-license
@@ -15,6 +16,5 @@ children:
- /about-upgrades-to-new-releases
- /system-overview
- /about-the-github-enterprise-api
- - /github-ae-release-notes
---
For more information, or to purchase {% data variables.product.prodname_enterprise %}, see [{% data variables.product.prodname_enterprise %}](https://github.com/enterprise).
diff --git a/content/admin/release-notes.md b/content/admin/release-notes.md
index 7dfc63a71c88..da80bfef2ab2 100644
--- a/content/admin/release-notes.md
+++ b/content/admin/release-notes.md
@@ -1,11 +1,12 @@
---
title: Release notes
-intro: 'The release notes for {{ allVersions[currentVersion].versionTitle }}.'
layout: release-notes
versions:
enterprise-server: '*'
+ github-ae: '*'
topics:
- Enterprise
- Upgrades
+redirect_from:
+ - /admin/overview/github-ae-release-notes
---
-
diff --git a/content/admin/user-management/managing-organizations-in-your-enterprise/requiring-two-factor-authentication-for-an-organization.md b/content/admin/user-management/managing-organizations-in-your-enterprise/requiring-two-factor-authentication-for-an-organization.md
index 4ea6d1986487..1ed54604f3ce 100644
--- a/content/admin/user-management/managing-organizations-in-your-enterprise/requiring-two-factor-authentication-for-an-organization.md
+++ b/content/admin/user-management/managing-organizations-in-your-enterprise/requiring-two-factor-authentication-for-an-organization.md
@@ -8,7 +8,7 @@ versions:
enterprise-server: '*'
type: how_to
topics:
- - 2fa
+ - 2FA
- Enterprise
- Organizations
- Policies
diff --git a/content/billing/managing-licensing-for-github-advanced-security/about-licensing-for-github-advanced-security.md b/content/billing/managing-licensing-for-github-advanced-security/about-licensing-for-github-advanced-security.md
index 0f1c9fc5af18..ce8aea83f9d1 100644
--- a/content/billing/managing-licensing-for-github-advanced-security/about-licensing-for-github-advanced-security.md
+++ b/content/billing/managing-licensing-for-github-advanced-security/about-licensing-for-github-advanced-security.md
@@ -4,6 +4,7 @@ intro: 'If you want to use {% data variables.product.prodname_GH_advanced_securi
product: '{% data reusables.gated-features.ghas %}'
redirect_from:
- /github/setting-up-and-managing-billing-and-payments-on-github/about-licensing-for-github-advanced-security
+ - /github/setting-up-and-managing-billing-and-payments-on-github/managing-licensing-for-github-advanced-security/about-licensing-for-github-advanced-security
versions:
free-pro-team: '*'
type: overview
diff --git a/content/billing/managing-licensing-for-github-advanced-security/viewing-your-github-advanced-security-usage.md b/content/billing/managing-licensing-for-github-advanced-security/viewing-your-github-advanced-security-usage.md
index c3348bdf2ccb..978818dd5871 100644
--- a/content/billing/managing-licensing-for-github-advanced-security/viewing-your-github-advanced-security-usage.md
+++ b/content/billing/managing-licensing-for-github-advanced-security/viewing-your-github-advanced-security-usage.md
@@ -4,6 +4,7 @@ intro: 'You can view usage of your {% data variables.product.prodname_GH_advance
permissions: 'Enterprise owners can manage access to {% data variables.product.prodname_GH_advanced_security %} for their organization or enterprise organizations.'
product: '{% data reusables.gated-features.ghas %}'
redirect_from:
+ - /github/setting-up-and-managing-billing-and-payments-on-github/managing-licensing-for-github-advanced-security/viewing-your-github-advanced-security-usage
- /github/setting-up-and-managing-your-enterprise/managing-use-of-advanced-security-for-organizations-in-your-enterprise-account
- /github/setting-up-and-managing-billing-and-payments-on-github/viewing-your-github-advanced-security-usage
versions:
diff --git a/content/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md b/content/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md
index 70798cbef9d7..a6d6c26d8e40 100644
--- a/content/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md
+++ b/content/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md
@@ -48,7 +48,7 @@ You need write permission to view a summary of all the alerts for a repository o
{% data reusables.repositories.sidebar-security %}
{% data reusables.repositories.sidebar-code-scanning-alerts %}
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1"%}
-1. Optionally, use the drop-down menus to filter alerts. For example, you can filter by the tool that was used to identify alerts.
+1. Optionally, use{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.2" %} the free text search box or{% endif %} the drop-down menus to filter alerts. For example, you can filter by the tool that was used to identify alerts.
![Filter by tool](/assets/images/help/repository/code-scanning-filter-by-tool.png){% endif %}
1. Under "{% data variables.product.prodname_code_scanning_capc %}," click the alert you'd like to explore.
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1"%}
@@ -61,12 +61,49 @@ You need write permission to view a summary of all the alerts for a repository o
1. Alerts from {% data variables.product.prodname_codeql %} analysis include a description of the problem. Click **Show more** for guidance on how to fix your code.
![Details for an alert](/assets/images/help/repository/code-scanning-alert-details.png)
+{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.2" %}
+### Searching {% data variables.product.prodname_code_scanning %} alerts
+
+You can search the list of alerts. This is useful if there is a large number of alerts in your repository, or if you don't know the exact name for an alert for example. {% data variables.product.product_name %} performs the free text search across:
+- The name of the alert
+- The alert description
+- The alert details (this also includes the information hidden from view by default in the **Show more** collapsible section)
+
+ ![The alert information used in searches](/assets/images/help/repository/code-scanning-free-text-search-areas.png)
+
+| Supported search | Syntax example | Results |
+| ---- | ---- | ---- |
+| Single word search | `injection` | Returns all the alerts containing the word `injection` |
+| Multiple word search | `sql injection` | Returns all the alerts containing `sql` or `injection` |
+| Exact match search(use double quotes) | `"sql injection"` | Returns all the alerts containing the exact phrase `sql injection` |
+| OR search | `sql OR injection` | Returns all the alerts containing `sql` or `injection` |
+| AND search | `sql AND injection` | Returns all the alerts containing both words `sql` and `injection` |
+
+{% tip %}
+
+**Tips:**
+- The multiple word search is equivalent to an OR search.
+- The AND search will return results where the search terms are found _anywhere_, in any order in the alert name, description, or details.
+
+{% endtip %}
+
+{% data reusables.repositories.navigate-to-repo %}
+{% data reusables.repositories.sidebar-security %}
+{% data reusables.repositories.sidebar-code-scanning-alerts %}
+1. To the right of the **Filters** drop-down menus, type the keywords to search for in the free text search box.
+ ![The free text search box](/assets/images/help/repository/code-scanning-search-alerts.png)
+2. Press return. The alert listing will contain the open {% data variables.product.prodname_code_scanning %} alerts matching your search criteria.
+
+{% endif %}
+
### Fixing an alert
Anyone with write permission for a repository can fix an alert by committing a correction to the code. If the repository has {% data variables.product.prodname_code_scanning %} scheduled to run on pull requests, it's best to raise a pull request with your correction. This will trigger {% data variables.product.prodname_code_scanning %} analysis of the changes and test that your fix doesn't introduce any new problems. For more information, see "[Configuring {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/configuring-code-scanning)" and "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)."
If you have write permission for a repository, you can view fixed alerts by viewing the summary of alerts and clicking **Closed**. For more information, see "[Viewing the alerts for a repository](#viewing-the-alerts-for-a-repository)." The "Closed" list shows fixed alerts and alerts that users have dismissed.
+You can use{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.2" %} the free text search or{% endif %} the filters to display a subset of alerts and then in turn mark all matching alerts as closed.
+
Alerts may be fixed in one branch but not in another. You can use the "Branch" drop-down menu, on the summary of alerts, to check whether an alert is fixed in a particular branch.
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1"%}
@@ -105,7 +142,7 @@ To dismiss or delete alerts:
![Deleting alerts](/assets/images/help/repository/code-scanning-delete-alerts.png)
- Optionally, you can use the filters to display a subset of alerts and then delete all matching alerts at once. For example, if you have removed a query from {% data variables.product.prodname_codeql %} analysis, you can use the "Rule" filter to list just the alerts for that query and then select and delete all of those alerts.
+ Optionally, you can use{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.2" %} the free text search or{% endif %} the filters to display a subset of alerts and then delete all matching alerts at once. For example, if you have removed a query from {% data variables.product.prodname_codeql %} analysis, you can use the "Rule" filter to list just the alerts for that query and then select and delete all of those alerts.
{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@3.1"%}
![Filter alerts by rule](/assets/images/help/repository/code-scanning-filter-by-rule.png)
diff --git a/content/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-runner-in-your-ci-system.md b/content/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-runner-in-your-ci-system.md
index d58df42cb380..b7761613cb81 100644
--- a/content/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-runner-in-your-ci-system.md
+++ b/content/code-security/secure-coding/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-runner-in-your-ci-system.md
@@ -158,7 +158,7 @@ This example is similar to the previous example, however this time the repositor
$ . /srv/checkout/example-repo-2/codeql-runner/codeql-env.sh
```
-1. Build the code. On macOS, you need to prefix the build command with the environment variable `$CODEQL_RUNNER`. For more information, see "[Troubleshooting {% data variables.product.prodname_codeql_runner %} in your CI system](/code-security/secure-coding/troubleshooting-codeql-runner-in-your-ci-system#no-code-found-during-the-build)#no-code-found-during-the-build)."
+1. Build the code. On macOS, you need to prefix the build command with the environment variable `$CODEQL_RUNNER`. For more information, see "[Troubleshooting {% data variables.product.prodname_codeql_runner %} in your CI system](/code-security/secure-coding/troubleshooting-codeql-runner-in-your-ci-system#no-code-found-during-the-build)."
{% data reusables.code-scanning.codeql-runner-analyze-example %}
diff --git a/content/codespaces/setting-up-your-codespace/personalizing-codespaces-for-your-account.md b/content/codespaces/setting-up-your-codespace/personalizing-codespaces-for-your-account.md
index 70bec916fcdf..d6a393c4fc06 100644
--- a/content/codespaces/setting-up-your-codespace/personalizing-codespaces-for-your-account.md
+++ b/content/codespaces/setting-up-your-codespace/personalizing-codespaces-for-your-account.md
@@ -51,8 +51,10 @@ When you create a new codespace, {% data variables.product.prodname_dotcom %} cl
* _install_
* _bootstrap.sh_
* _bootstrap_
+* _script/bootstrap_
* _setup.sh_
* _setup_
+* _script/setup_
If none of these files are found, then any files or folders in `dotfiles` starting with `.` are symlinked to the codespace's `~` or `$HOME` directory.
diff --git a/content/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file.md b/content/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file.md
index 8eaaef845826..95710b4ff141 100644
--- a/content/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file.md
+++ b/content/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file.md
@@ -1,6 +1,6 @@
---
title: Creating a default community health file
-intro: 'You can create default community health files, such as CONTRIBUTING and CODE_OF_CONDUCT. Default files will be used for any public repository owned by the account that does not contain its own file of that type.'
+intro: 'You can create default community health files, such as CONTRIBUTING and CODE_OF_CONDUCT. Default files will be used for any repository owned by the account that does not contain its own file of that type.'
redirect_from:
- /articles/creating-a-default-community-health-file-for-your-organization
- /github/building-a-strong-community/creating-a-default-community-health-file-for-your-organization
@@ -16,12 +16,12 @@ topics:
You can add default community health files to the root of a public repository called `.github` that is owned by an organization{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@latest" or currentVersion ver_gt "enterprise-server@2.19" %} or user account{% endif %}.
-{% data variables.product.product_name %} will use and display default files for any public repository owned by the account that does not have its own file of that type in any of the following places:
+{% data variables.product.product_name %} will use and display default files for any repository owned by the account that does not have its own file of that type in any of the following places:
- the root of the repository
- the `.github` folder
- the `docs` folder
-For example, anyone who creates an issue or pull request in a public repository that does not have its own CONTRIBUTING file will see a link to the default CONTRIBUTING file. If a repository has any files in its own `.github/ISSUE_TEMPLATE` folder{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@latest" or currentVersion ver_gt "enterprise-server@2.19" %}, including issue templates or a *config.yml* file,{% endif %} none of the contents of the default `.github/ISSUE_TEMPLATE` folder will be used.
+For example, anyone who creates an issue or pull request in a repository that does not have its own CONTRIBUTING file will see a link to the default CONTRIBUTING file. If a repository has any files in its own `.github/ISSUE_TEMPLATE` folder{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@latest" or currentVersion ver_gt "enterprise-server@2.19" %}, including issue templates or a *config.yml* file,{% endif %} none of the contents of the default `.github/ISSUE_TEMPLATE` folder will be used.
Default files are not included in clones, packages, or downloads of individual repositories because they are stored only in the `.github` repository.
diff --git a/content/developers/apps/building-github-apps/creating-a-github-app-using-url-parameters.md b/content/developers/apps/building-github-apps/creating-a-github-app-using-url-parameters.md
index e73617e48b5e..565436341abf 100644
--- a/content/developers/apps/building-github-apps/creating-a-github-app-using-url-parameters.md
+++ b/content/developers/apps/building-github-apps/creating-a-github-app-using-url-parameters.md
@@ -14,21 +14,30 @@ topics:
### About {% data variables.product.prodname_github_app %} URL parameters
You can add query parameters to these URLs to preselect the configuration of a {% data variables.product.prodname_github_app %} on a personal or organization account:
+
* **User account:** `{% data variables.product.oauth_host_code %}/settings/apps/new`
* **Organization account:** `{% data variables.product.oauth_host_code %}/organizations/:org/settings/apps/new`
The person creating the app can edit the preselected values from the {% data variables.product.prodname_github_app %} registration page, before submitting the app. If you do not include required parameters in the URL query string, like `name`, the person creating the app will need to input a value before submitting the app.
+{% if currentVersion ver_gt "enterprise-server@3.1" or currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@next" %}
+For apps that require a secret to secure their webhook, the secret's value must be set in the form by the person creating the app, not by using query parameters. For more information, see "[Securing your webhooks](/developers/webhooks-and-events/webhooks/securing-your-webhooks)."
+{% endif %}
+
The following URL creates a new public app called `octocat-github-app` with a preconfigured description and callback URL. This URL also selects read and write permissions for `checks`, subscribes to the `check_run` and `check_suite` webhook events, and selects the option to request user authorization (OAuth) during installation:
{% if currentVersion == "free-pro-team@latest" or currentVersion == "github-ae@next" or currentVersion ver_gt "enterprise-server@3.0" %}
-```
+
+```text
{% data variables.product.oauth_host_code %}/settings/apps/new?name=octocat-github-app&description=An%20Octocat%20App&callback_urls[]=https://example.com&request_oauth_on_install=true&public=true&checks=write&events[]=check_run&events[]=check_suite
```
+
{% else %}
-```
+
+```text
{% data variables.product.oauth_host_code %}/settings/apps/new?name=octocat-github-app&description=An%20Octocat%20App&callback_url=https://example.com&request_oauth_on_install=true&public=true&checks=write&events[]=check_run&events[]=check_suite
```
+
{% endif %}
The complete list of available query parameters, permissions, and events is listed in the sections below.
@@ -47,11 +56,11 @@ The complete list of available query parameters, permissions, and events is list
`setup_on_update` | `boolean` | Set to `true` to redirect people to the setup URL when installations have been updated, for example, after repositories are added or removed.
`public` | `boolean` | Set to `true` when your {% data variables.product.prodname_github_app %} is available to the public or `false` when it is only accessible to the owner of the app.
`webhook_url` | `string` | The full URL that you would like to send webhook event payloads to.
-`webhook_secret` | `string` | You can specify a secret to secure your webhooks. See "[Securing your webhooks](/webhooks/securing/)" for more details.
-`events` | `array of strings` | Webhook events. Some webhook events require `read` or `write` permissions for a resource before you can select the event when registering a new {% data variables.product.prodname_github_app %}. See the "[{% data variables.product.prodname_github_app %} webhook events](#github-app-webhook-events)" section for available events and their required permissions. You can select multiple events in a query string. For example, `events[]=public&events[]=label`.
+{% if currentVersion ver_lt "enterprise-server@3.2" or currentVersion == "github-ae@latest" %}`webhook_secret` | `string` | You can specify a secret to secure your webhooks. See "[Securing your webhooks](/webhooks/securing/)" for more details.
+{% endif %}`events` | `array of strings` | Webhook events. Some webhook events require `read` or `write` permissions for a resource before you can select the event when registering a new {% data variables.product.prodname_github_app %}. See the "[{% data variables.product.prodname_github_app %} webhook events](#github-app-webhook-events)" section for available events and their required permissions. You can select multiple events in a query string. For example, `events[]=public&events[]=label`.
`domain` | `string` | The URL of a content reference.
`single_file_name` | `string` | This is a narrowly-scoped permission that allows the app to access a single file in any repository. When you set the `single_file` permission to `read` or `write`, this field provides the path to the single file your {% data variables.product.prodname_github_app %} will manage. {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %} If you need to manage multiple files, see `single_file_paths` below. {% endif %}{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}
-`single_file_paths` | `array of strings` | This allows the app to access up ten specified files in a repository. When you set the `single_file` permission to `read` or `write`, this array can store the paths for up to ten files that your {% data variables.product.prodname_github_app %} will manage. These files all receive the same permission set by `single_file`, and do not have separate individual permissions. When two or more files are configured, the API returns `multiple_single_files=true`, otherwise it returns `multiple_single_files=false`.{% endif %}
+`single_file_paths` | `array of strings` | This allows the app to access up ten specified files in a repository. When you set the `single_file` permission to `read` or `write`, this array can store the paths for up to ten files that your {% data variables.product.prodname_github_app %} will manage. These files all receive the same permission set by `single_file`, and do not have separate individual permissions. When two or more files are configured, the API returns `multiple_single_files=true`, otherwise it returns `multiple_single_files=false`.{% endif %}
### {% data variables.product.prodname_github_app %} permissions
diff --git a/content/github/authenticating-to-github/index.md b/content/github/authenticating-to-github/index.md
index da0c8d0f60bd..b148d49abbef 100644
--- a/content/github/authenticating-to-github/index.md
+++ b/content/github/authenticating-to-github/index.md
@@ -18,7 +18,7 @@ versions:
enterprise-server: '*'
github-ae: '*'
topics:
- - 2fa
+ - 2FA
- Identity
- Access management
- Usernames
diff --git a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication.md b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication.md
index 1d606c99435d..fdd3188522f6 100644
--- a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication.md
+++ b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication.md
@@ -8,7 +8,7 @@ versions:
free-pro-team: '*'
enterprise-server: '*'
topics:
- - 2fa
+ - 2FA
---
For {% data variables.product.product_name %}, the second form of authentication is a code that's generated by an application on your mobile device{% if currentVersion == "free-pro-team@latest" %} or sent as a text message (SMS){% endif %}. After you enable 2FA, {% data variables.product.product_name %} generates an authentication code any time someone attempts to sign into your {% data variables.product.product_name %} account. The only way someone can sign into your account is if they know both your password and have access to the authentication code on your phone.
diff --git a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication.md b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication.md
index 29b4e76fc89b..dfe25fe70827 100644
--- a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication.md
+++ b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication.md
@@ -11,7 +11,7 @@ versions:
free-pro-team: '*'
enterprise-server: '*'
topics:
- - 2fa
+ - 2FA
---
With two-factor authentication enabled, you'll need to provide an authentication code when accessing {% data variables.product.product_name %} through your browser. If you access {% data variables.product.product_name %} using other methods, such as the API or the command line, you'll need to use an alternative form of authentication. For more information, see "[About authentication to {% data variables.product.prodname_dotcom %}](/github/authenticating-to-github/about-authentication-to-github)."
diff --git a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/changing-two-factor-authentication-delivery-methods-for-your-mobile-device.md b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/changing-two-factor-authentication-delivery-methods-for-your-mobile-device.md
index 6524b7a8a362..0fd2837baf2c 100644
--- a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/changing-two-factor-authentication-delivery-methods-for-your-mobile-device.md
+++ b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/changing-two-factor-authentication-delivery-methods-for-your-mobile-device.md
@@ -8,7 +8,7 @@ redirect_from:
versions:
free-pro-team: '*'
topics:
- - 2fa
+ - 2FA
---
{% note %}
diff --git a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication-recovery-methods.md b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication-recovery-methods.md
index f9e9d4ed5bc1..ba0f98eb02f0 100644
--- a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication-recovery-methods.md
+++ b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication-recovery-methods.md
@@ -13,7 +13,7 @@ versions:
free-pro-team: '*'
enterprise-server: '*'
topics:
- - 2fa
+ - 2FA
---
In addition to securely storing your two-factor authentication recovery codes, we strongly recommend configuring one or more additional recovery methods.
diff --git a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication.md b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication.md
index 3189aa3b15a4..58e5ea2ad41e 100644
--- a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication.md
+++ b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication.md
@@ -11,7 +11,7 @@ versions:
free-pro-team: '*'
enterprise-server: '*'
topics:
- - 2fa
+ - 2FA
---
You can configure two-factor authentication using a mobile app{% if currentVersion == "free-pro-team@latest" %} or via text message{% endif %}. You can also add a security key.
diff --git a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/countries-where-sms-authentication-is-supported.md b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/countries-where-sms-authentication-is-supported.md
index 1230bcb8dc76..71f6b4e2d45e 100644
--- a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/countries-where-sms-authentication-is-supported.md
+++ b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/countries-where-sms-authentication-is-supported.md
@@ -7,7 +7,7 @@ redirect_from:
versions:
free-pro-team: '*'
topics:
- - 2fa
+ - 2FA
---
If we don't support two-factor authentication via text message for your country of residence, you can set up authentication via a TOTP mobile application. For more information, see "[Configuring two-factor authentication](/articles/configuring-two-factor-authentication)."
diff --git a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/disabling-two-factor-authentication-for-your-personal-account.md b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/disabling-two-factor-authentication-for-your-personal-account.md
index c733c4d604d1..c1ef7998b7da 100644
--- a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/disabling-two-factor-authentication-for-your-personal-account.md
+++ b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/disabling-two-factor-authentication-for-your-personal-account.md
@@ -8,7 +8,7 @@ versions:
free-pro-team: '*'
enterprise-server: '*'
topics:
- - 2fa
+ - 2FA
---
We strongly recommend using two-factor authentication to secure your account. If you need to disable 2FA, we recommend re-enabling it as soon as possible.
diff --git a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/index.md b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/index.md
index 1dde6ff69e75..5cb69a855596 100644
--- a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/index.md
+++ b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/index.md
@@ -9,7 +9,7 @@ versions:
free-pro-team: '*'
enterprise-server: '*'
topics:
- - 2fa
+ - 2FA
children:
- /about-two-factor-authentication
- /configuring-two-factor-authentication
diff --git a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md
index a3bec956c0d4..b488bde6a8a7 100644
--- a/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md
+++ b/content/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md
@@ -10,7 +10,7 @@ versions:
free-pro-team: '*'
enterprise-server: '*'
topics:
- - 2fa
+ - 2FA
---
{% if currentVersion == "free-pro-team@latest" %}
diff --git a/content/github/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message.md b/content/github/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message.md
index a21115562691..967292d6627f 100644
--- a/content/github/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message.md
+++ b/content/github/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message.md
@@ -49,9 +49,9 @@ We strongly discourage force pushing, since this changes the history of your rep
**Changing the message of the most recently pushed commit**
1. Follow the [steps above](/articles/changing-a-commit-message#commit-has-not-been-pushed-online) to amend the commit message.
-2. Use the `push --force` command to force push over the old commit.
+2. Use the `push --force-with-lease` command to force push over the old commit.
```shell
- $ git push --force example-branch
+ $ git push --force-with-lease example-branch
```
**Changing the message of older or multiple commit messages**
diff --git a/content/rest/reference/repos.md b/content/rest/reference/repos.md
index 550c0eec0665..b9b984d3c185 100644
--- a/content/rest/reference/repos.md
+++ b/content/rest/reference/repos.md
@@ -369,4 +369,4 @@ Name | Type | Description
``hub.mode``|`string` | **Required**. Either `subscribe` or `unsubscribe`.
``hub.topic``|`string` |**Required**. The URI of the GitHub repository to subscribe to. The path must be in the format of `/{owner}/{repo}/events/{event}`.
``hub.callback``|`string` | The URI to receive the updates to the topic.
-``hub.secret``|`string` | A shared secret key that generates a SHA1 HMAC of the outgoing body content. You can verify a push came from GitHub by comparing the raw request body with the contents of the `X-Hub-Signature` header. You can see [the PubSubHubbub documentation](https://pubsubhubbub.github.io/PubSubHubbub/pubsubhubbub-core-0.4.html#authednotify) for more details.
+``hub.secret``|`string` | A shared secret key that generates a hash signature of the outgoing body content. You can verify a push came from GitHub by comparing the raw request body with the contents of the {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}`X-Hub-Signature` or `X-Hub-Signature-256` headers{% elsif currentVersion ver_lt "enterprise-server@2.23" %}`X-Hub-Signature` header{% elsif currentVersion == "github-ae@latest" %}`X-Hub-Signature-256` header{% endif %}. You can see [the PubSubHubbub documentation](https://pubsubhubbub.github.io/PubSubHubbub/pubsubhubbub-core-0.4.html#authednotify) for more details.
diff --git a/data/allowed-topics.js b/data/allowed-topics.js
index be77a0493c45..7c2baa2e45bd 100644
--- a/data/allowed-topics.js
+++ b/data/allowed-topics.js
@@ -11,7 +11,7 @@
// content and/or content strategy team for review.
module.exports = [
- '2fa',
+ '2FA',
'Action development',
'Actions',
'Administrator',
diff --git a/data/release-notes/2-20/0.yml b/data/release-notes/enterprise-server/2-20/0.yml
similarity index 100%
rename from data/release-notes/2-20/0.yml
rename to data/release-notes/enterprise-server/2-20/0.yml
diff --git a/data/release-notes/2-20/1.yml b/data/release-notes/enterprise-server/2-20/1.yml
similarity index 100%
rename from data/release-notes/2-20/1.yml
rename to data/release-notes/enterprise-server/2-20/1.yml
diff --git a/data/release-notes/2-20/10.yml b/data/release-notes/enterprise-server/2-20/10.yml
similarity index 100%
rename from data/release-notes/2-20/10.yml
rename to data/release-notes/enterprise-server/2-20/10.yml
diff --git a/data/release-notes/2-20/11.yml b/data/release-notes/enterprise-server/2-20/11.yml
similarity index 100%
rename from data/release-notes/2-20/11.yml
rename to data/release-notes/enterprise-server/2-20/11.yml
diff --git a/data/release-notes/2-20/12.yml b/data/release-notes/enterprise-server/2-20/12.yml
similarity index 100%
rename from data/release-notes/2-20/12.yml
rename to data/release-notes/enterprise-server/2-20/12.yml
diff --git a/data/release-notes/2-20/13.yml b/data/release-notes/enterprise-server/2-20/13.yml
similarity index 100%
rename from data/release-notes/2-20/13.yml
rename to data/release-notes/enterprise-server/2-20/13.yml
diff --git a/data/release-notes/2-20/14.yml b/data/release-notes/enterprise-server/2-20/14.yml
similarity index 100%
rename from data/release-notes/2-20/14.yml
rename to data/release-notes/enterprise-server/2-20/14.yml
diff --git a/data/release-notes/2-20/15.yml b/data/release-notes/enterprise-server/2-20/15.yml
similarity index 100%
rename from data/release-notes/2-20/15.yml
rename to data/release-notes/enterprise-server/2-20/15.yml
diff --git a/data/release-notes/2-20/16.yml b/data/release-notes/enterprise-server/2-20/16.yml
similarity index 100%
rename from data/release-notes/2-20/16.yml
rename to data/release-notes/enterprise-server/2-20/16.yml
diff --git a/data/release-notes/2-20/17.yml b/data/release-notes/enterprise-server/2-20/17.yml
similarity index 100%
rename from data/release-notes/2-20/17.yml
rename to data/release-notes/enterprise-server/2-20/17.yml
diff --git a/data/release-notes/2-20/18.yml b/data/release-notes/enterprise-server/2-20/18.yml
similarity index 100%
rename from data/release-notes/2-20/18.yml
rename to data/release-notes/enterprise-server/2-20/18.yml
diff --git a/data/release-notes/2-20/19.yml b/data/release-notes/enterprise-server/2-20/19.yml
similarity index 100%
rename from data/release-notes/2-20/19.yml
rename to data/release-notes/enterprise-server/2-20/19.yml
diff --git a/data/release-notes/2-20/2.yml b/data/release-notes/enterprise-server/2-20/2.yml
similarity index 100%
rename from data/release-notes/2-20/2.yml
rename to data/release-notes/enterprise-server/2-20/2.yml
diff --git a/data/release-notes/2-20/20.yml b/data/release-notes/enterprise-server/2-20/20.yml
similarity index 100%
rename from data/release-notes/2-20/20.yml
rename to data/release-notes/enterprise-server/2-20/20.yml
diff --git a/data/release-notes/2-20/21.yml b/data/release-notes/enterprise-server/2-20/21.yml
similarity index 100%
rename from data/release-notes/2-20/21.yml
rename to data/release-notes/enterprise-server/2-20/21.yml
diff --git a/data/release-notes/2-20/22.yml b/data/release-notes/enterprise-server/2-20/22.yml
similarity index 100%
rename from data/release-notes/2-20/22.yml
rename to data/release-notes/enterprise-server/2-20/22.yml
diff --git a/data/release-notes/2-20/23.yml b/data/release-notes/enterprise-server/2-20/23.yml
similarity index 100%
rename from data/release-notes/2-20/23.yml
rename to data/release-notes/enterprise-server/2-20/23.yml
diff --git a/data/release-notes/2-20/24.yml b/data/release-notes/enterprise-server/2-20/24.yml
similarity index 100%
rename from data/release-notes/2-20/24.yml
rename to data/release-notes/enterprise-server/2-20/24.yml
diff --git a/data/release-notes/2-20/3.yml b/data/release-notes/enterprise-server/2-20/3.yml
similarity index 100%
rename from data/release-notes/2-20/3.yml
rename to data/release-notes/enterprise-server/2-20/3.yml
diff --git a/data/release-notes/2-20/4.yml b/data/release-notes/enterprise-server/2-20/4.yml
similarity index 100%
rename from data/release-notes/2-20/4.yml
rename to data/release-notes/enterprise-server/2-20/4.yml
diff --git a/data/release-notes/2-20/5.yml b/data/release-notes/enterprise-server/2-20/5.yml
similarity index 100%
rename from data/release-notes/2-20/5.yml
rename to data/release-notes/enterprise-server/2-20/5.yml
diff --git a/data/release-notes/2-20/6.yml b/data/release-notes/enterprise-server/2-20/6.yml
similarity index 100%
rename from data/release-notes/2-20/6.yml
rename to data/release-notes/enterprise-server/2-20/6.yml
diff --git a/data/release-notes/2-20/7.yml b/data/release-notes/enterprise-server/2-20/7.yml
similarity index 100%
rename from data/release-notes/2-20/7.yml
rename to data/release-notes/enterprise-server/2-20/7.yml
diff --git a/data/release-notes/2-20/8.yml b/data/release-notes/enterprise-server/2-20/8.yml
similarity index 100%
rename from data/release-notes/2-20/8.yml
rename to data/release-notes/enterprise-server/2-20/8.yml
diff --git a/data/release-notes/2-20/9.yml b/data/release-notes/enterprise-server/2-20/9.yml
similarity index 100%
rename from data/release-notes/2-20/9.yml
rename to data/release-notes/enterprise-server/2-20/9.yml
diff --git a/data/release-notes/2-21/0.yml b/data/release-notes/enterprise-server/2-21/0.yml
similarity index 100%
rename from data/release-notes/2-21/0.yml
rename to data/release-notes/enterprise-server/2-21/0.yml
diff --git a/data/release-notes/2-21/1.yml b/data/release-notes/enterprise-server/2-21/1.yml
similarity index 100%
rename from data/release-notes/2-21/1.yml
rename to data/release-notes/enterprise-server/2-21/1.yml
diff --git a/data/release-notes/2-21/10.yml b/data/release-notes/enterprise-server/2-21/10.yml
similarity index 100%
rename from data/release-notes/2-21/10.yml
rename to data/release-notes/enterprise-server/2-21/10.yml
diff --git a/data/release-notes/2-21/11.yml b/data/release-notes/enterprise-server/2-21/11.yml
similarity index 100%
rename from data/release-notes/2-21/11.yml
rename to data/release-notes/enterprise-server/2-21/11.yml
diff --git a/data/release-notes/2-21/12.yml b/data/release-notes/enterprise-server/2-21/12.yml
similarity index 100%
rename from data/release-notes/2-21/12.yml
rename to data/release-notes/enterprise-server/2-21/12.yml
diff --git a/data/release-notes/2-21/13.yml b/data/release-notes/enterprise-server/2-21/13.yml
similarity index 100%
rename from data/release-notes/2-21/13.yml
rename to data/release-notes/enterprise-server/2-21/13.yml
diff --git a/data/release-notes/2-21/14.yml b/data/release-notes/enterprise-server/2-21/14.yml
similarity index 100%
rename from data/release-notes/2-21/14.yml
rename to data/release-notes/enterprise-server/2-21/14.yml
diff --git a/data/release-notes/2-21/15.yml b/data/release-notes/enterprise-server/2-21/15.yml
similarity index 100%
rename from data/release-notes/2-21/15.yml
rename to data/release-notes/enterprise-server/2-21/15.yml
diff --git a/data/release-notes/2-21/16.yml b/data/release-notes/enterprise-server/2-21/16.yml
similarity index 100%
rename from data/release-notes/2-21/16.yml
rename to data/release-notes/enterprise-server/2-21/16.yml
diff --git a/data/release-notes/2-21/17.yml b/data/release-notes/enterprise-server/2-21/17.yml
similarity index 100%
rename from data/release-notes/2-21/17.yml
rename to data/release-notes/enterprise-server/2-21/17.yml
diff --git a/data/release-notes/2-21/18.yml b/data/release-notes/enterprise-server/2-21/18.yml
similarity index 100%
rename from data/release-notes/2-21/18.yml
rename to data/release-notes/enterprise-server/2-21/18.yml
diff --git a/data/release-notes/2-21/19.yml b/data/release-notes/enterprise-server/2-21/19.yml
similarity index 100%
rename from data/release-notes/2-21/19.yml
rename to data/release-notes/enterprise-server/2-21/19.yml
diff --git a/data/release-notes/2-21/2.yml b/data/release-notes/enterprise-server/2-21/2.yml
similarity index 100%
rename from data/release-notes/2-21/2.yml
rename to data/release-notes/enterprise-server/2-21/2.yml
diff --git a/data/release-notes/2-21/20.yml b/data/release-notes/enterprise-server/2-21/20.yml
similarity index 100%
rename from data/release-notes/2-21/20.yml
rename to data/release-notes/enterprise-server/2-21/20.yml
diff --git a/data/release-notes/2-21/21.yml b/data/release-notes/enterprise-server/2-21/21.yml
similarity index 100%
rename from data/release-notes/2-21/21.yml
rename to data/release-notes/enterprise-server/2-21/21.yml
diff --git a/data/release-notes/2-21/22.yml b/data/release-notes/enterprise-server/2-21/22.yml
similarity index 100%
rename from data/release-notes/2-21/22.yml
rename to data/release-notes/enterprise-server/2-21/22.yml
diff --git a/data/release-notes/2-21/3.yml b/data/release-notes/enterprise-server/2-21/3.yml
similarity index 100%
rename from data/release-notes/2-21/3.yml
rename to data/release-notes/enterprise-server/2-21/3.yml
diff --git a/data/release-notes/2-21/4.yml b/data/release-notes/enterprise-server/2-21/4.yml
similarity index 100%
rename from data/release-notes/2-21/4.yml
rename to data/release-notes/enterprise-server/2-21/4.yml
diff --git a/data/release-notes/2-21/5.yml b/data/release-notes/enterprise-server/2-21/5.yml
similarity index 100%
rename from data/release-notes/2-21/5.yml
rename to data/release-notes/enterprise-server/2-21/5.yml
diff --git a/data/release-notes/2-21/6.yml b/data/release-notes/enterprise-server/2-21/6.yml
similarity index 100%
rename from data/release-notes/2-21/6.yml
rename to data/release-notes/enterprise-server/2-21/6.yml
diff --git a/data/release-notes/2-21/7.yml b/data/release-notes/enterprise-server/2-21/7.yml
similarity index 100%
rename from data/release-notes/2-21/7.yml
rename to data/release-notes/enterprise-server/2-21/7.yml
diff --git a/data/release-notes/2-21/8.yml b/data/release-notes/enterprise-server/2-21/8.yml
similarity index 100%
rename from data/release-notes/2-21/8.yml
rename to data/release-notes/enterprise-server/2-21/8.yml
diff --git a/data/release-notes/2-21/9.yml b/data/release-notes/enterprise-server/2-21/9.yml
similarity index 100%
rename from data/release-notes/2-21/9.yml
rename to data/release-notes/enterprise-server/2-21/9.yml
diff --git a/data/release-notes/2-22/0.yml b/data/release-notes/enterprise-server/2-22/0.yml
similarity index 100%
rename from data/release-notes/2-22/0.yml
rename to data/release-notes/enterprise-server/2-22/0.yml
diff --git a/data/release-notes/2-22/1.yml b/data/release-notes/enterprise-server/2-22/1.yml
similarity index 100%
rename from data/release-notes/2-22/1.yml
rename to data/release-notes/enterprise-server/2-22/1.yml
diff --git a/data/release-notes/2-22/10.yml b/data/release-notes/enterprise-server/2-22/10.yml
similarity index 100%
rename from data/release-notes/2-22/10.yml
rename to data/release-notes/enterprise-server/2-22/10.yml
diff --git a/data/release-notes/2-22/11.yml b/data/release-notes/enterprise-server/2-22/11.yml
similarity index 100%
rename from data/release-notes/2-22/11.yml
rename to data/release-notes/enterprise-server/2-22/11.yml
diff --git a/data/release-notes/2-22/12.yml b/data/release-notes/enterprise-server/2-22/12.yml
similarity index 100%
rename from data/release-notes/2-22/12.yml
rename to data/release-notes/enterprise-server/2-22/12.yml
diff --git a/data/release-notes/2-22/13.yml b/data/release-notes/enterprise-server/2-22/13.yml
similarity index 100%
rename from data/release-notes/2-22/13.yml
rename to data/release-notes/enterprise-server/2-22/13.yml
diff --git a/data/release-notes/2-22/14.yml b/data/release-notes/enterprise-server/2-22/14.yml
similarity index 100%
rename from data/release-notes/2-22/14.yml
rename to data/release-notes/enterprise-server/2-22/14.yml
diff --git a/data/release-notes/2-22/2.yml b/data/release-notes/enterprise-server/2-22/2.yml
similarity index 100%
rename from data/release-notes/2-22/2.yml
rename to data/release-notes/enterprise-server/2-22/2.yml
diff --git a/data/release-notes/2-22/3.yml b/data/release-notes/enterprise-server/2-22/3.yml
similarity index 100%
rename from data/release-notes/2-22/3.yml
rename to data/release-notes/enterprise-server/2-22/3.yml
diff --git a/data/release-notes/2-22/4.yml b/data/release-notes/enterprise-server/2-22/4.yml
similarity index 100%
rename from data/release-notes/2-22/4.yml
rename to data/release-notes/enterprise-server/2-22/4.yml
diff --git a/data/release-notes/2-22/5.yml b/data/release-notes/enterprise-server/2-22/5.yml
similarity index 100%
rename from data/release-notes/2-22/5.yml
rename to data/release-notes/enterprise-server/2-22/5.yml
diff --git a/data/release-notes/2-22/6.yml b/data/release-notes/enterprise-server/2-22/6.yml
similarity index 100%
rename from data/release-notes/2-22/6.yml
rename to data/release-notes/enterprise-server/2-22/6.yml
diff --git a/data/release-notes/2-22/7.yml b/data/release-notes/enterprise-server/2-22/7.yml
similarity index 100%
rename from data/release-notes/2-22/7.yml
rename to data/release-notes/enterprise-server/2-22/7.yml
diff --git a/data/release-notes/2-22/8.yml b/data/release-notes/enterprise-server/2-22/8.yml
similarity index 100%
rename from data/release-notes/2-22/8.yml
rename to data/release-notes/enterprise-server/2-22/8.yml
diff --git a/data/release-notes/2-22/9.yml b/data/release-notes/enterprise-server/2-22/9.yml
similarity index 100%
rename from data/release-notes/2-22/9.yml
rename to data/release-notes/enterprise-server/2-22/9.yml
diff --git a/data/release-notes/3-0/0-rc1.yml b/data/release-notes/enterprise-server/3-0/0-rc1.yml
similarity index 100%
rename from data/release-notes/3-0/0-rc1.yml
rename to data/release-notes/enterprise-server/3-0/0-rc1.yml
diff --git a/data/release-notes/3-0/0-rc2.yml b/data/release-notes/enterprise-server/3-0/0-rc2.yml
similarity index 100%
rename from data/release-notes/3-0/0-rc2.yml
rename to data/release-notes/enterprise-server/3-0/0-rc2.yml
diff --git a/data/release-notes/3-0/0.yml b/data/release-notes/enterprise-server/3-0/0.yml
similarity index 100%
rename from data/release-notes/3-0/0.yml
rename to data/release-notes/enterprise-server/3-0/0.yml
diff --git a/data/release-notes/3-0/1.yml b/data/release-notes/enterprise-server/3-0/1.yml
similarity index 100%
rename from data/release-notes/3-0/1.yml
rename to data/release-notes/enterprise-server/3-0/1.yml
diff --git a/data/release-notes/3-0/2.yml b/data/release-notes/enterprise-server/3-0/2.yml
similarity index 100%
rename from data/release-notes/3-0/2.yml
rename to data/release-notes/enterprise-server/3-0/2.yml
diff --git a/data/release-notes/3-0/3.yml b/data/release-notes/enterprise-server/3-0/3.yml
similarity index 100%
rename from data/release-notes/3-0/3.yml
rename to data/release-notes/enterprise-server/3-0/3.yml
diff --git a/data/release-notes/3-0/4.yml b/data/release-notes/enterprise-server/3-0/4.yml
similarity index 100%
rename from data/release-notes/3-0/4.yml
rename to data/release-notes/enterprise-server/3-0/4.yml
diff --git a/data/release-notes/3-0/5.yml b/data/release-notes/enterprise-server/3-0/5.yml
similarity index 100%
rename from data/release-notes/3-0/5.yml
rename to data/release-notes/enterprise-server/3-0/5.yml
diff --git a/data/release-notes/3-0/6.yml b/data/release-notes/enterprise-server/3-0/6.yml
similarity index 100%
rename from data/release-notes/3-0/6.yml
rename to data/release-notes/enterprise-server/3-0/6.yml
diff --git a/data/release-notes/3-0/7.yml b/data/release-notes/enterprise-server/3-0/7.yml
similarity index 100%
rename from data/release-notes/3-0/7.yml
rename to data/release-notes/enterprise-server/3-0/7.yml
diff --git a/data/release-notes/3-0/8.yml b/data/release-notes/enterprise-server/3-0/8.yml
similarity index 100%
rename from data/release-notes/3-0/8.yml
rename to data/release-notes/enterprise-server/3-0/8.yml
diff --git a/data/release-notes/3-1/0-rc1.yml b/data/release-notes/enterprise-server/3-1/0-rc1.yml
similarity index 95%
rename from data/release-notes/3-1/0-rc1.yml
rename to data/release-notes/enterprise-server/3-1/0-rc1.yml
index 3d06e0e705a2..5b28c70d8de4 100644
--- a/data/release-notes/3-1/0-rc1.yml
+++ b/data/release-notes/enterprise-server/3-1/0-rc1.yml
@@ -18,6 +18,11 @@ sections:
Administrators using {% data variables.product.prodname_GH_advanced_security %} can [enable and configure](/enterprise-server@3.1/admin/configuration/configuring-secret-scanning-for-your-appliance) {% data variables.product.prodname_GH_advanced_security %} secret scanning. You can review the [updated minimum requirements for your platform](/enterprise-server@3.1/admin/installation/setting-up-a-github-enterprise-server-instance) before you turn on {% data variables.product.prodname_GH_advanced_security %} secret scanning.
+ - heading: GitHub Advanced Security Code Scanning
+ notes:
+ - |
+ [{% data variables.product.prodname_GH_advanced_security %} code scanning](https://github.com/features/security) is now generally available on {% data variables.product.prodname_ghe_server %} 3.1+. Organizations who have purchased {% data variables.product.prodname_GH_advanced_security %} can use this capability to do static analysis security testing against their code, and prevent vulnerabilities from making it to their production code using CodeQL, our semantic analysis engine. For more information, see "[Configuring code scanning on your appliance](/en/enterprise-server@3.1/admin/configuration/configuring-code-scanning-for-your-appliance#running-code-scanning-using-github-actions)."
+
- heading: GitHub Advanced Security billing improvements
notes:
- |
diff --git a/data/release-notes/enterprise-server/README.md b/data/release-notes/enterprise-server/README.md
new file mode 100644
index 000000000000..5a488316c8e6
--- /dev/null
+++ b/data/release-notes/enterprise-server/README.md
@@ -0,0 +1,37 @@
+# Release notes for GitHub Enterprise Server
+
+Rendered here: https://docs.github.com/en/enterprise-server@latest/admin/release-notes
+
+## How it works
+
+### Placeholder content file
+
+A content file exists in `content/admin/release-notes.md`. It has a special frontmatter property `layout: release-notes` and no Markdown content. The source of the release notes comes from YAML data.
+
+### YAML source
+
+The source data for the release notes lives in this directory (`data/release-notes/enterprise-server`).
+
+The directories are named by GHES release number (with a hyphen instead of a period).
+
+The YAML files in each directory are named by patch number. Some patch filenames may end with `-rc.yml`, which means it's a release candidate. A release candidate file also requires `release_candidate: true` in the YAML data.
+
+Release notes of deprecated GHES versions (see `lib/enterprise-server-releases.js`) are **not** removed from the site and will always be displayed alongside currently supported versions.
+
+Note that patch files can be deprecated individually (i.e., hidden on the docs site) by an optional `deprecated: true` property.
+
+### Middleware processing
+
+The YAML data is processed and sorted by `middleware/contextualizers/release-notes.js` and added to the `context` object.
+
+### Layouts
+
+The `context` object data is rendered by `layouts/release-notes.html` and `includes/enterprise-server-release-notes.html`.
+
+The release notes page has a custom design with CSS in `stylesheets/release-notes.scss` and client-side JavaScript in `javascripts/release-notes.js`.
+
+### Schema
+
+The schema that validates the YAML data lives in `tests/helpers/schemas/ghes-release-notes-schema.js`. See the schema file to find out the required and optional properties.
+
+The schema is exercised by a test in `tests/linting/lint-files.js`. The test will fail if the data does not pass validation.
diff --git a/data/release-notes/github-ae/2021-03/2021-03-03.yml b/data/release-notes/github-ae/2021-03/2021-03-03.yml
new file mode 100644
index 000000000000..7185cd78c4b1
--- /dev/null
+++ b/data/release-notes/github-ae/2021-03/2021-03-03.yml
@@ -0,0 +1,83 @@
+date: '2021-03-03'
+friendlyDate: 'March 3, 2021'
+title: 'Week of March 3, 2021'
+currentWeek: false
+sections:
+ features:
+ - heading: 'GitHub Actions beta'
+ notes:
+ - |
+ [{% data variables.product.prodname_actions %}](https://github.com/features/actions) is a powerful, flexible solution for CI/CD and workflow automation. For more information, see "[Introduction to {% data variables.product.prodname_actions %}](/actions/learn-github-actions/introduction-to-github-actions)."
+
+ {% data variables.product.prodname_actions %} on {% data variables.product.product_name %} uses a new [{% data variables.actions.hosted_runner %}](/actions/using-github-hosted-runners/about-ae-hosted-runners), only available for {% data variables.product.product_name %}, that enables you to customize the size, image, and networking configuration of the runners. These runners are a finished-service CI compute environment with auto-scaling and management, fully managed by {% data variables.product.company_short %}. During the beta, the use {% data variables.actions.hosted_runner %}s is free of charge. For more information, see "[Adding {% data variables.actions.hosted_runner %}s](/actions/using-github-hosted-runners/adding-ae-hosted-runners)."
+
+ Please note that when {% data variables.product.prodname_actions %} is enabled during this upgrade, two organizations named "GitHub Actions" (@**actions** and @**github**) will appear in {% data variables.product.product_location %}. These organizations are required by {% data variables.product.prodname_actions %}. Users named @**ghost** and @**actions** appear as the actors for creation of these organizations in the audit log.
+ - heading: 'GitHub Packages beta'
+ notes:
+ - |
+ [{% data variables.product.prodname_registry %}](https://github.com/features/packages) is a package hosting service, natively integrated with {% data variables.product.prodname_actions %}, APIs, and webhooks. Create an [end-to-end DevOps workflow](/github-ae@latest/packages/quickstart) that includes your code, continuous integration, and deployment solutions. During this beta, {% data variables.product.prodname_registry %} is offered free of charge to {% data variables.product.product_name %} customers.
+ - heading: 'GitHub Advanced Security beta'
+ notes:
+ - |
+ {% data variables.product.prodname_GH_advanced_security %} is available in beta and includes both code scanning and secret scanning. During this beta, {% data variables.product.prodname_GH_advanced_security %} features are being offered free of charge to {% data variables.product.product_name %} customers. Repository and organization administrators can opt-in to use {% data variables.product.prodname_GH_advanced_security %} in the Security and Analysis tab under settings.
+
+ Learn more about {% data variables.product.prodname_GH_advanced_security %} [code scanning](/github/finding-security-vulnerabilities-and-errors-in-your-code/about-code-scanning) and [secret scanning](/github/administering-a-repository/about-secret-scanning) on {% data variables.product.prodname_ghe_managed %}.
+
+ - heading: Manage teams from your identity provider (IdP)
+ notes:
+ - |
+ Customers using SCIM (System for Cross-domain Identity Management) can now sync security groups in Azure Active Directory with {% data variables.product.company_short %} teams. Once a team has been linked to a security group, membership will be automatically updated in {% data variables.product.product_name %} when a user is added or removed from their assigned security group.
+
+ - heading: IP allow lists beta
+ notes:
+ - |
+ [{% data variables.product.company_short %} IP allow lists](/admin/configuration/restricting-network-traffic-to-your-enterprise) provide the ability to filter traffic from administrator-specified IP ranges, defined by CIDR notation. The allow list is defined at the enterprise or organization account level in Security > Settings. All traffic that attempts to reach resources within the enterprise account and organizations are filtered by the IP allow lists. This functionality is provided in addition to the ability to request network security group changes that filter traffic to the entirety of the GHAE tenant.
+
+ changes:
+ - heading: Developer Changes
+ notes:
+ - |
+ [Organization owners can now disable publication](/github/setting-up-and-managing-organizations-and-teams/managing-the-publication-of-github-pages-sites-for-your-organization) of {% data variables.product.prodname_pages %} sites from repositories in the organization. This will not unpublish existing sites.
+ - Repositories that use {% data variables.product.prodname_pages %} can now [build and deploy from any branch](/github/working-with-github-pages/about-github-pages#publishing-sources-for-github-pages-sites).
+ - When writing an issue or pull request, the list syntax for bullets, numbers, and tasks will now be autocompleted after you press `return` or `enter`.
+ - You can now delete a directory in a repository from the repository page. When navigating to a directory, a new kebab button next to the "Add file" button gives the option to delete the directory.
+ - It's now easier and faster to [reference issues or pull requests](/github/writing-on-github/basic-writing-and-formatting-syntax#referencing-issues-and-pull-requests), with search across multiple words after the "#".
+
+ - heading: Administration changes
+ notes:
+ - Enterprise owners can now publish a mandatory message. The message is shown to all users and they must acknowledge it. This can be used to display important information, terms of service or policies.
+ - The {% data variables.product.prodname_github_app%} single file path permission can now [support up to ten files](/developers/apps/creating-a-github-app-using-url-parameters).
+ - When configuring a {% data variables.product.prodname_github_app%}, the authorization callback URL is a required field. Now we will permit the integrator to specify multiple callback URLs. {% data variables.product.product_name %} denies authorization if the callback URL from the request is not listed.
+ - A [new API endpoint](/rest/reference/apps#create-a-scoped-access-token) enables the exchange of a user to server token for a user to server token scoped to specific repositories.
+ - Events are now logged in the audit log on [promoting a team member to be a team maintainer and on demoting a team maintainer to be a team member](/admin/user-management/audited-actions#teams).
+ - The [OAuth device authorization flow](/developers/apps/authorizing-oauth-apps#device-flow) is now supported. This allows any CLI client or developer tool to authenticate using a secondary system.
+ - A user can no longer delete their account if SCIM provisioning is enabled.
+
+ - heading: Default branch renaming
+ notes:
+ - |
+ Enterprise and organization owners can now set the default branch name for new repositories. Enterprise owners can also enforce their choice of default branch name across all organizations or allow individual organizations to choose their own.
+
+ Existing repositories are unaffected by these settings, and their default branch name will not be changed.
+
+ This change is one of many changes {% data variables.product.company_short %} is making to support projects and maintainers that want to rename their default branch. To learn more, see [github/renaming](https://github.com/github/renaming).
+
+ bugs:
+ - heading: Bug fixes
+ notes:
+ - Users can no longer set a backup email address on their profile. Their email address is set through the IdP only.
+ - You can no longer enable two-factor authentication after configuring authentication through your IdP.
+ - |
+ {% data variables.product.product_name %} can now connect to Azure Boards.
+ - Version headers were missing from the APIs, and have now been set to "GitHub AE."
+ - Links to documentation have been fixed.
+ - Configuration of audit log forwarding within the enterprise's settings was failing.
+ - Navigating to gists could result in a 500 error.
+ - The Support email or URL was failing to save. It now saves after a period of a few minutes.
+ - Organization level pull request templates were not being applied to all pull requests in the organization.
+
+ known_issues:
+ - heading: Known issues
+ notes:
+ - Geographic location data is not shown in the audit log. Location information can otherwise be discerned from the IP address associated with each event.
+ - The link to {% data variables.product.prodname_registry %} from a repository page shows an incorrect search page when that repository does not have any packages.
diff --git a/data/release-notes/github-ae/README.md b/data/release-notes/github-ae/README.md
new file mode 100644
index 000000000000..b20276bebd62
--- /dev/null
+++ b/data/release-notes/github-ae/README.md
@@ -0,0 +1,35 @@
+# Release notes for GitHub AE
+
+Rendered here: https://docs.github.com/en/github-ae@latest/admin/release-notes
+
+## How it works
+
+### Placeholder content file
+
+A content file exists in `content/admin/release-notes.md`. It has a special frontmatter property `layout: release-notes` and no Markdown content. The source of the release notes comes from YAML data.
+
+### YAML source
+
+The source data for the release notes lives in this directory (`data/release-notes/github-ae`).
+
+The directories are named by month. The YAML files are named by the data of a weekly release.
+
+A boolean property called `currentWeek` must be set in each YAML file. No more than one file at a time can have this property set to true.
+
+Note that patch files can be deprecated individually (i.e., hidden on the docs site) by an optional `deprecated: true` property.
+
+### Middleware processing
+
+The YAML data is processed and sorted by `middleware/contextualizers/release-notes.js` and added to the `context` object.
+
+### Layouts
+
+The `context` object data is rendered by `layouts/release-notes.html` and `includes/github-ae-release-notes.html`.
+
+The release notes page has a custom design with CSS in `stylesheets/release-notes.scss` and client-side JavaScript in `javascripts/release-notes.js`.
+
+### Schema
+
+The schema that validates the YAML data lives in `tests/helpers/schemas/ghae-release-notes-schema.js`. See the schema file to find out the required and optional properties.
+
+The schema is exercised by a test in `tests/linting/lint-files.js`. The test will fail if the data does not pass validation.
diff --git a/data/reusables/enterprise_migrations/locking-repositories.md b/data/reusables/enterprise_migrations/locking-repositories.md
index f44ff52c94c8..ea0ecd6bcfb3 100644
--- a/data/reusables/enterprise_migrations/locking-repositories.md
+++ b/data/reusables/enterprise_migrations/locking-repositories.md
@@ -1,6 +1,6 @@
{% tip %}
-**Note:** Locking a repository prevents users from pushing to the repository or modifying a repository's resources, like issues, labels, milestones, wikis, and comments. New teams and collaborators can't be associated with a locked repository.
+**Note:** Locking a repository prevents all read or write access to the repository. You cannot associate new teams or collaborators with a locked repository.
-If you're performing a trial run, you don't need to lock repositories. Otherwise, it's highly recommended. For more information, see "[About Migrations](/enterprise/admin/migrations/about-migrations#types-of-migrations)."
+If you're performing a trial run, you do not need to lock the repository. When you migrate data from a repository that's in use, {% data variables.product.company_short %} strongly recommends locking the repository. For more information, see "[About Migrations](/enterprise/admin/migrations/about-migrations#types-of-migrations)."
{% endtip %}
diff --git a/data/reusables/webhooks/secret.md b/data/reusables/webhooks/secret.md
index 95f3a341ca08..a92e5fca87b5 100644
--- a/data/reusables/webhooks/secret.md
+++ b/data/reusables/webhooks/secret.md
@@ -1 +1 @@
-Setting a webhook secret allows you to ensure that `POST` requests sent to the payload URL are from {% data variables.product.product_name %}. When you set a secret, you'll receive the {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" or currentVersion == "github-ae@latest" %}`X-Hub-Signature` and `X-Hub-Signature-256` headers{% elsif currentVersion ver_lt "enterprise-server@2.23" %}`X-Hub-Signature` header{% elsif currentVersion == "github-ae@latest" %}`X-Hub-Signature-256` header{% endif %} in the webhook `POST` request. For more information on how to use a secret with a signature header to secure your webhook payloads, see "[Securing your webhooks](/webhooks/securing/)."
+Setting a webhook secret allows you to ensure that `POST` requests sent to the payload URL are from {% data variables.product.product_name %}. When you set a secret, you'll receive the {% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}`X-Hub-Signature` and `X-Hub-Signature-256` headers{% elsif currentVersion ver_lt "enterprise-server@2.23" %}`X-Hub-Signature` header{% elsif currentVersion == "github-ae@latest" %}`X-Hub-Signature-256` header{% endif %} in the webhook `POST` request. For more information on how to use a secret with a signature header to secure your webhook payloads, see "[Securing your webhooks](/webhooks/securing/)."
diff --git a/data/ui.yml b/data/ui.yml
index 261ade0760f8..f2bb008deaf4 100644
--- a/data/ui.yml
+++ b/data/ui.yml
@@ -18,10 +18,14 @@ header:
please visit our
English documentation.
early_access: đŸ“£ Please do not share this URL publicly. This page contains content about an early access feature.
- ghes_release_notes_use_latest: Please use the latest release for the latest security, performance, and bug fixes.
- ghes_release_notes_upgrade_patch_only: đŸ“£ This is not the latest patch release of Enterprise Server. {% data ui.header.notices.ghes_release_notes_use_latest %}
- ghes_release_notes_upgrade_release_only: đŸ“£ This is not the latest release of Enterprise Server. {% data ui.header.notices.ghes_release_notes_use_latest %}
- ghes_release_notes_upgrade_patch_and_release: đŸ“£ This is not the latest patch release of this release series, and this is not the latest release of Enterprise Server. {% data ui.header.notices.ghes_release_notes_use_latest %}
+ release_notes_use_latest: Please use the latest release for the latest security, performance, and bug fixes.
+ # GHES release notes
+ ghes_release_notes_upgrade_patch_only: đŸ“£ This is not the latest patch release of Enterprise Server. {% data ui.header.notices.release_notes_use_latest %}
+ ghes_release_notes_upgrade_release_only: đŸ“£ This is not the latest release of Enterprise Server. {% data ui.header.notices.release_notes_use_latest %}
+ ghes_release_notes_upgrade_patch_and_release: đŸ“£ This is not the latest patch release of this release series, and this is not the latest release of Enterprise Server. {% data ui.header.notices.release_notes_use_latest %}
+release_notes:
+ banner_text_current: These changes will roll out over the next one week.
+ banner_text_past: These changes rolled out to enterprises during the week of
search:
need_help: Need help?
placeholder: Search topics, products...
diff --git a/includes/enterprise-server-release-notes.html b/includes/enterprise-server-release-notes.html
new file mode 100644
index 000000000000..88806054b0f6
--- /dev/null
+++ b/includes/enterprise-server-release-notes.html
@@ -0,0 +1,156 @@
+{% assign product = siteTree[currentLanguage][currentVersion].products[currentProduct] %}
+{% assign currentVersionObject = allVersions[currentVersion] %}
+
+
"
+ }
+ ],
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/rest/reference/apps#create-a-content-attachment"
+ },
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "
Required. The title of the attachment
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ "body": {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
+ "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ ],
+ "responses": [
+ {
+ "httpStatusCode": "200",
+ "httpStatusMessage": "OK",
+ "description": "Response",
+ "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
- }
- ],
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/rest/reference/apps#create-a-content-attachment"
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "
Required. The title of the attachment
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- "body": {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
- "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- ],
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "Response",
- "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
+ }
+ ],
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.18/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.18/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/enterprise-server@2.18/rest/reference/apps#create-a-content-attachment"
+ },
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "
Required. The title of the attachment
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ "body": {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
+ "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ ],
+ "responses": [
+ {
+ "httpStatusCode": "200",
+ "httpStatusMessage": "OK",
+ "description": "Response",
+ "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
- }
- ],
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.18/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.18/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/enterprise-server@2.18/rest/reference/apps#create-a-content-attachment"
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "
Required. The title of the attachment
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- "body": {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
- "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- ],
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "Response",
- "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
+ }
+ ],
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.19/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.19/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/enterprise-server@2.19/rest/reference/apps#create-a-content-attachment"
+ },
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "
Required. The title of the attachment
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ "body": {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
+ "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ ],
+ "responses": [
+ {
+ "httpStatusCode": "200",
+ "httpStatusMessage": "OK",
+ "description": "Response",
+ "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
- }
- ],
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.19/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.19/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/enterprise-server@2.19/rest/reference/apps#create-a-content-attachment"
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "
Required. The title of the attachment
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- "body": {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
- "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- ],
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "Response",
- "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
+ }
+ ],
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.20/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.20/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.20/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/enterprise-server@2.20/rest/reference/apps#create-a-content-attachment"
+ },
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "
Required. The title of the attachment
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ "body": {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.20/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
+ "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ ],
+ "responses": [
+ {
+ "httpStatusCode": "200",
+ "httpStatusMessage": "OK",
+ "description": "Response",
+ "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
- }
- ],
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.20/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.20/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.20/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/enterprise-server@2.20/rest/reference/apps#create-a-content-attachment"
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "
Required. The title of the attachment
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- "body": {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.20/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
- "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- ],
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "Response",
- "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
+ }
+ ],
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.21/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.21/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/enterprise-server@2.21/rest/reference/apps#create-a-content-attachment"
+ },
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "
Required. The title of the attachment
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ "body": {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.21/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
+ "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ ],
+ "responses": [
+ {
+ "httpStatusCode": "200",
+ "httpStatusMessage": "OK",
+ "description": "Response",
+ "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
- }
- ],
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.21/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.21/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/enterprise-server@2.21/rest/reference/apps#create-a-content-attachment"
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "
Required. The title of the attachment
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- "body": {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.21/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
- "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- ],
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "Response",
- "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
+ }
+ ],
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.22/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.22/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.22/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/enterprise-server@2.22/rest/reference/apps#create-a-content-attachment"
+ },
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "
Required. The title of the attachment
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ "body": {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
+ "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ ],
+ "responses": [
+ {
+ "httpStatusCode": "200",
+ "httpStatusMessage": "OK",
+ "description": "Response",
+ "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
- }
- ],
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.22/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.22/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.22/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/enterprise-server@2.22/rest/reference/apps#create-a-content-attachment"
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "
Required. The title of the attachment
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- "body": {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
- "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- ],
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "Response",
- "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
+ }
+ ],
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.0/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.0/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.0/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/enterprise-server@3.0/rest/reference/apps#create-a-content-attachment"
+ },
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "
Required. The title of the attachment
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ "body": {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.0/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
+ "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ ],
+ "responses": [
+ {
+ "httpStatusCode": "200",
+ "httpStatusMessage": "OK",
+ "description": "Response",
+ "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
- }
- ],
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.0/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.0/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.0/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/enterprise-server@3.0/rest/reference/apps#create-a-content-attachment"
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "
Required. The title of the attachment
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- "body": {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.0/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
- "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- ],
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "Response",
- "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
+ }
+ ],
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.1/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.1/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.1/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/enterprise-server@3.1/rest/reference/apps#create-a-content-attachment"
+ },
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "
Required. The title of the attachment
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ "body": {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.1/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
+ "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ ],
+ "responses": [
+ {
+ "httpStatusCode": "200",
+ "httpStatusMessage": "OK",
+ "description": "Response",
+ "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
- }
- ],
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.1/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.1/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.1/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/enterprise-server@3.1/rest/reference/apps#create-a-content-attachment"
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "
Required. The title of the attachment
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- "body": {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.1/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
- "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- ],
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "Response",
- "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
+ }
+ ],
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/github-ae@latest/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/github-ae@latest/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/github-ae@latest/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/github-ae@latest/rest/reference/apps#create-a-content-attachment"
+ },
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "
Required. The title of the attachment
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ "body": {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/github-ae@latest/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
+ "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024,
+ "name": "title",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The title of the attachment",
+ "childParamsGroups": []
+ },
+ {
+ "description": "
Required. The body of the attachment
",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144,
+ "name": "body",
+ "in": "body",
+ "rawType": "string",
+ "rawDescription": "The body of the attachment",
+ "childParamsGroups": []
+ }
+ ],
+ "responses": [
+ {
+ "httpStatusCode": "200",
+ "httpStatusMessage": "OK",
+ "description": "Response",
+ "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
- }
- ],
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/github-ae@latest/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/github-ae@latest/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/github-ae@latest/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/apps#create-a-content-attachment"
- },
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "
Required. The title of the attachment
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- "body": {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/github-ae@latest/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```",
- "html": "
To access the Content Attachments API during the preview period, you must provide a custom media type in the Accept header:
Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the id and repositoryfull_name of the content reference from the content_reference event to create an attachment.
\n
The app must create a content attachment within six hours of the content reference URL being posted. See \"Using content attachments\" for details about content attachments.
",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024,
- "name": "title",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The title of the attachment",
- "childParamsGroups": []
- },
- {
- "description": "
Required. The body of the attachment
",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144,
- "name": "body",
- "in": "body",
- "rawType": "string",
- "rawDescription": "The body of the attachment",
- "childParamsGroups": []
- }
- ],
- "responses": [
- {
- "httpStatusCode": "200",
- "httpStatusMessage": "OK",
- "description": "Response",
- "payload": "
{\n \"id\": 101,\n \"title\": \"[A-1234] Error found in core/models.py file'\",\n \"body\": \"You have used an email that already exists for the user_email_uniq field.\\n ## DETAILS:\\n\\nThe (email)=(Octocat@github.com) already exists.\\n\\n The error was found in core/models.py in get_or_create_user at line 62.\\n\\n self.save()\"\n}\n
"
- },
- {
- "httpStatusCode": "304",
- "httpStatusMessage": "Not Modified",
- "description": "Not modified"
- },
- {
- "httpStatusCode": "403",
- "httpStatusMessage": "Forbidden",
- "description": "Forbidden"
- },
- {
- "httpStatusCode": "404",
- "httpStatusMessage": "Not Found",
- "description": "Resource not found"
- },
- {
- "httpStatusCode": "410",
- "httpStatusMessage": "Gone",
- "description": "Gone"
- },
- {
- "httpStatusCode": "415",
- "httpStatusMessage": "Unsupported Media Type",
- "description": "Preview header missing"
- },
- {
- "httpStatusCode": "422",
- "httpStatusMessage": "Unprocessable Entity",
- "description": "Validation failed"
- }
- ]
}
]
\ No newline at end of file
diff --git a/lib/rest/static/dereferenced/api.github.com.deref.json b/lib/rest/static/dereferenced/api.github.com.deref.json
index a1b897f243bf..053a4b7493b5 100644
--- a/lib/rest/static/dereferenced/api.github.com.deref.json
+++ b/lib/rest/static/dereferenced/api.github.com.deref.json
@@ -185332,6 +185332,313 @@
}
}
},
+ "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
+ "post": {
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/rest/reference/apps#create-a-content-attachment"
+ },
+ "parameters": [
+ {
+ "name": "owner",
+ "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "repo",
+ "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "content_reference_id",
+ "description": "The `id` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "ContentReferenceAttachment",
+ "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
+ "type": "object",
+ "properties": {
+ "id": {
+ "description": "The ID of the attachment",
+ "example": 21,
+ "type": "integer"
+ },
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ },
+ "node_id": {
+ "description": "The node_id of the content attachment",
+ "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "title",
+ "body"
+ ]
+ },
+ "examples": {
+ "default": {
+ "value": {
+ "id": 101,
+ "title": "[A-1234] Error found in core/models.py file'",
+ "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
+ }
+ }
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation failed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Validation Error",
+ "description": "Validation Error",
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "errors": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "code"
+ ],
+ "properties": {
+ "resource": {
+ "type": "string"
+ },
+ "field": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "index": {
+ "type": "integer"
+ },
+ "value": {
+ "oneOf": [
+ {
+ "type": "string",
+ "nullable": true
+ },
+ {
+ "type": "integer",
+ "nullable": true
+ },
+ {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Resource not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "410": {
+ "description": "Gone",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "415": {
+ "description": "Preview header missing",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "304": {
+ "description": "Not modified"
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
+ }
+ ],
+ "category": "apps",
+ "subcategory": "installations"
+ }
+ }
+ },
"/repos/{owner}/{repo}/contents/{path}": {
"get": {
"summary": "Get repository content",
@@ -392433,313 +392740,6 @@
"category": "meta"
}
}
- },
- "/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
- "post": {
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/rest/reference/apps#create-a-content-attachment"
- },
- "parameters": [
- {
- "name": "owner",
- "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "content_reference_id",
- "description": "The `id` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Response",
- "content": {
- "application/json": {
- "schema": {
- "title": "ContentReferenceAttachment",
- "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
- "type": "object",
- "properties": {
- "id": {
- "description": "The ID of the attachment",
- "example": 21,
- "type": "integer"
- },
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- },
- "node_id": {
- "description": "The node_id of the content attachment",
- "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
- "type": "string"
- }
- },
- "required": [
- "id",
- "title",
- "body"
- ]
- },
- "examples": {
- "default": {
- "value": {
- "id": 101,
- "title": "[A-1234] Error found in core/models.py file'",
- "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
- }
- }
- }
- }
- }
- },
- "422": {
- "description": "Validation failed",
- "content": {
- "application/json": {
- "schema": {
- "title": "Validation Error",
- "description": "Validation Error",
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "errors": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "code"
- ],
- "properties": {
- "resource": {
- "type": "string"
- },
- "field": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "code": {
- "type": "string"
- },
- "index": {
- "type": "integer"
- },
- "value": {
- "oneOf": [
- {
- "type": "string",
- "nullable": true
- },
- {
- "type": "integer",
- "nullable": true
- },
- {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- }
- }
- ]
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Resource not found",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "410": {
- "description": "Gone",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "415": {
- "description": "Preview header missing",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "304": {
- "description": "Not modified"
- },
- "403": {
- "description": "Forbidden",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
- }
- ],
- "category": "apps",
- "subcategory": "installations"
- }
- }
}
}
}
\ No newline at end of file
diff --git a/lib/rest/static/dereferenced/ghes-2.18.deref.json b/lib/rest/static/dereferenced/ghes-2.18.deref.json
index 619469fe3d55..8296bfb81237 100644
--- a/lib/rest/static/dereferenced/ghes-2.18.deref.json
+++ b/lib/rest/static/dereferenced/ghes-2.18.deref.json
@@ -117293,6 +117293,313 @@
}
}
},
+ "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
+ "post": {
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.18/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.18/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/enterprise-server@2.18/rest/reference/apps#create-a-content-attachment"
+ },
+ "parameters": [
+ {
+ "name": "owner",
+ "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "repo",
+ "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "content_reference_id",
+ "description": "The `id` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "ContentReferenceAttachment",
+ "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
+ "type": "object",
+ "properties": {
+ "id": {
+ "description": "The ID of the attachment",
+ "example": 21,
+ "type": "integer"
+ },
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ },
+ "node_id": {
+ "description": "The node_id of the content attachment",
+ "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "title",
+ "body"
+ ]
+ },
+ "examples": {
+ "default": {
+ "value": {
+ "id": 101,
+ "title": "[A-1234] Error found in core/models.py file'",
+ "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
+ }
+ }
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation failed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Validation Error",
+ "description": "Validation Error",
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "errors": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "code"
+ ],
+ "properties": {
+ "resource": {
+ "type": "string"
+ },
+ "field": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "index": {
+ "type": "integer"
+ },
+ "value": {
+ "oneOf": [
+ {
+ "type": "string",
+ "nullable": true
+ },
+ {
+ "type": "integer",
+ "nullable": true
+ },
+ {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Resource not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "410": {
+ "description": "Gone",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "415": {
+ "description": "Preview header missing",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "304": {
+ "description": "Not modified"
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
+ }
+ ],
+ "category": "apps",
+ "subcategory": "installations"
+ }
+ }
+ },
"/repos/{owner}/{repo}/contents/{path}": {
"get": {
"summary": "Get repository content",
@@ -296922,313 +297229,6 @@
"category": "meta"
}
}
- },
- "/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
- "post": {
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.18/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.18/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.18/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/enterprise-server@2.18/rest/reference/apps#create-a-content-attachment"
- },
- "parameters": [
- {
- "name": "owner",
- "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "content_reference_id",
- "description": "The `id` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Response",
- "content": {
- "application/json": {
- "schema": {
- "title": "ContentReferenceAttachment",
- "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
- "type": "object",
- "properties": {
- "id": {
- "description": "The ID of the attachment",
- "example": 21,
- "type": "integer"
- },
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- },
- "node_id": {
- "description": "The node_id of the content attachment",
- "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
- "type": "string"
- }
- },
- "required": [
- "id",
- "title",
- "body"
- ]
- },
- "examples": {
- "default": {
- "value": {
- "id": 101,
- "title": "[A-1234] Error found in core/models.py file'",
- "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
- }
- }
- }
- }
- }
- },
- "422": {
- "description": "Validation failed",
- "content": {
- "application/json": {
- "schema": {
- "title": "Validation Error",
- "description": "Validation Error",
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "errors": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "code"
- ],
- "properties": {
- "resource": {
- "type": "string"
- },
- "field": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "code": {
- "type": "string"
- },
- "index": {
- "type": "integer"
- },
- "value": {
- "oneOf": [
- {
- "type": "string",
- "nullable": true
- },
- {
- "type": "integer",
- "nullable": true
- },
- {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- }
- }
- ]
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Resource not found",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "410": {
- "description": "Gone",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "415": {
- "description": "Preview header missing",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "304": {
- "description": "Not modified"
- },
- "403": {
- "description": "Forbidden",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.18/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
- }
- ],
- "category": "apps",
- "subcategory": "installations"
- }
- }
}
}
}
\ No newline at end of file
diff --git a/lib/rest/static/dereferenced/ghes-2.19.deref.json b/lib/rest/static/dereferenced/ghes-2.19.deref.json
index 3810620046d4..3ccc1e8aadbf 100644
--- a/lib/rest/static/dereferenced/ghes-2.19.deref.json
+++ b/lib/rest/static/dereferenced/ghes-2.19.deref.json
@@ -120335,6 +120335,313 @@
}
}
},
+ "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
+ "post": {
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.19/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.19/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/enterprise-server@2.19/rest/reference/apps#create-a-content-attachment"
+ },
+ "parameters": [
+ {
+ "name": "owner",
+ "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "repo",
+ "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "content_reference_id",
+ "description": "The `id` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "ContentReferenceAttachment",
+ "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
+ "type": "object",
+ "properties": {
+ "id": {
+ "description": "The ID of the attachment",
+ "example": 21,
+ "type": "integer"
+ },
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ },
+ "node_id": {
+ "description": "The node_id of the content attachment",
+ "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "title",
+ "body"
+ ]
+ },
+ "examples": {
+ "default": {
+ "value": {
+ "id": 101,
+ "title": "[A-1234] Error found in core/models.py file'",
+ "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
+ }
+ }
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation failed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Validation Error",
+ "description": "Validation Error",
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "errors": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "code"
+ ],
+ "properties": {
+ "resource": {
+ "type": "string"
+ },
+ "field": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "index": {
+ "type": "integer"
+ },
+ "value": {
+ "oneOf": [
+ {
+ "type": "string",
+ "nullable": true
+ },
+ {
+ "type": "integer",
+ "nullable": true
+ },
+ {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Resource not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "410": {
+ "description": "Gone",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "415": {
+ "description": "Preview header missing",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "304": {
+ "description": "Not modified"
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
+ }
+ ],
+ "category": "apps",
+ "subcategory": "installations"
+ }
+ }
+ },
"/repos/{owner}/{repo}/contents/{path}": {
"get": {
"summary": "Get repository content",
@@ -300288,313 +300595,6 @@
"category": "meta"
}
}
- },
- "/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
- "post": {
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.19/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.19/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.19/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/enterprise-server@2.19/rest/reference/apps#create-a-content-attachment"
- },
- "parameters": [
- {
- "name": "owner",
- "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "content_reference_id",
- "description": "The `id` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Response",
- "content": {
- "application/json": {
- "schema": {
- "title": "ContentReferenceAttachment",
- "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
- "type": "object",
- "properties": {
- "id": {
- "description": "The ID of the attachment",
- "example": 21,
- "type": "integer"
- },
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- },
- "node_id": {
- "description": "The node_id of the content attachment",
- "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
- "type": "string"
- }
- },
- "required": [
- "id",
- "title",
- "body"
- ]
- },
- "examples": {
- "default": {
- "value": {
- "id": 101,
- "title": "[A-1234] Error found in core/models.py file'",
- "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
- }
- }
- }
- }
- }
- },
- "422": {
- "description": "Validation failed",
- "content": {
- "application/json": {
- "schema": {
- "title": "Validation Error",
- "description": "Validation Error",
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "errors": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "code"
- ],
- "properties": {
- "resource": {
- "type": "string"
- },
- "field": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "code": {
- "type": "string"
- },
- "index": {
- "type": "integer"
- },
- "value": {
- "oneOf": [
- {
- "type": "string",
- "nullable": true
- },
- {
- "type": "integer",
- "nullable": true
- },
- {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- }
- }
- ]
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Resource not found",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "410": {
- "description": "Gone",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "415": {
- "description": "Preview header missing",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "304": {
- "description": "Not modified"
- },
- "403": {
- "description": "Forbidden",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.19/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
- }
- ],
- "category": "apps",
- "subcategory": "installations"
- }
- }
}
}
}
\ No newline at end of file
diff --git a/lib/rest/static/dereferenced/ghes-2.20.deref.json b/lib/rest/static/dereferenced/ghes-2.20.deref.json
index 770b9f402ca6..8cd03d760145 100644
--- a/lib/rest/static/dereferenced/ghes-2.20.deref.json
+++ b/lib/rest/static/dereferenced/ghes-2.20.deref.json
@@ -122556,6 +122556,313 @@
}
}
},
+ "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
+ "post": {
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.20/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.20/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.20/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/enterprise-server@2.20/rest/reference/apps#create-a-content-attachment"
+ },
+ "parameters": [
+ {
+ "name": "owner",
+ "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "repo",
+ "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "content_reference_id",
+ "description": "The `id` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "ContentReferenceAttachment",
+ "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
+ "type": "object",
+ "properties": {
+ "id": {
+ "description": "The ID of the attachment",
+ "example": 21,
+ "type": "integer"
+ },
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ },
+ "node_id": {
+ "description": "The node_id of the content attachment",
+ "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "title",
+ "body"
+ ]
+ },
+ "examples": {
+ "default": {
+ "value": {
+ "id": 101,
+ "title": "[A-1234] Error found in core/models.py file'",
+ "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
+ }
+ }
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation failed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Validation Error",
+ "description": "Validation Error",
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "errors": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "code"
+ ],
+ "properties": {
+ "resource": {
+ "type": "string"
+ },
+ "field": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "index": {
+ "type": "integer"
+ },
+ "value": {
+ "oneOf": [
+ {
+ "type": "string",
+ "nullable": true
+ },
+ {
+ "type": "integer",
+ "nullable": true
+ },
+ {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Resource not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "410": {
+ "description": "Gone",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "415": {
+ "description": "Preview header missing",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "304": {
+ "description": "Not modified"
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.20/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
+ }
+ ],
+ "category": "apps",
+ "subcategory": "installations"
+ }
+ }
+ },
"/repos/{owner}/{repo}/contents/{path}": {
"get": {
"summary": "Get repository content",
@@ -303594,313 +303901,6 @@
"category": "meta"
}
}
- },
- "/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
- "post": {
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.20/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.20/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.20/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/enterprise-server@2.20/rest/reference/apps#create-a-content-attachment"
- },
- "parameters": [
- {
- "name": "owner",
- "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "content_reference_id",
- "description": "The `id` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Response",
- "content": {
- "application/json": {
- "schema": {
- "title": "ContentReferenceAttachment",
- "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
- "type": "object",
- "properties": {
- "id": {
- "description": "The ID of the attachment",
- "example": 21,
- "type": "integer"
- },
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- },
- "node_id": {
- "description": "The node_id of the content attachment",
- "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
- "type": "string"
- }
- },
- "required": [
- "id",
- "title",
- "body"
- ]
- },
- "examples": {
- "default": {
- "value": {
- "id": 101,
- "title": "[A-1234] Error found in core/models.py file'",
- "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
- }
- }
- }
- }
- }
- },
- "422": {
- "description": "Validation failed",
- "content": {
- "application/json": {
- "schema": {
- "title": "Validation Error",
- "description": "Validation Error",
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "errors": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "code"
- ],
- "properties": {
- "resource": {
- "type": "string"
- },
- "field": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "code": {
- "type": "string"
- },
- "index": {
- "type": "integer"
- },
- "value": {
- "oneOf": [
- {
- "type": "string",
- "nullable": true
- },
- {
- "type": "integer",
- "nullable": true
- },
- {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- }
- }
- ]
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Resource not found",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "410": {
- "description": "Gone",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "415": {
- "description": "Preview header missing",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "304": {
- "description": "Not modified"
- },
- "403": {
- "description": "Forbidden",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.20/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
- }
- ],
- "category": "apps",
- "subcategory": "installations"
- }
- }
}
}
}
\ No newline at end of file
diff --git a/lib/rest/static/dereferenced/ghes-2.21.deref.json b/lib/rest/static/dereferenced/ghes-2.21.deref.json
index 84527ae4e67b..025848fbc940 100644
--- a/lib/rest/static/dereferenced/ghes-2.21.deref.json
+++ b/lib/rest/static/dereferenced/ghes-2.21.deref.json
@@ -134168,6 +134168,313 @@
}
}
},
+ "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
+ "post": {
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.21/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.21/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/enterprise-server@2.21/rest/reference/apps#create-a-content-attachment"
+ },
+ "parameters": [
+ {
+ "name": "owner",
+ "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "repo",
+ "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "content_reference_id",
+ "description": "The `id` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "ContentReferenceAttachment",
+ "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
+ "type": "object",
+ "properties": {
+ "id": {
+ "description": "The ID of the attachment",
+ "example": 21,
+ "type": "integer"
+ },
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ },
+ "node_id": {
+ "description": "The node_id of the content attachment",
+ "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "title",
+ "body"
+ ]
+ },
+ "examples": {
+ "default": {
+ "value": {
+ "id": 101,
+ "title": "[A-1234] Error found in core/models.py file'",
+ "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
+ }
+ }
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation failed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Validation Error",
+ "description": "Validation Error",
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "errors": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "code"
+ ],
+ "properties": {
+ "resource": {
+ "type": "string"
+ },
+ "field": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "index": {
+ "type": "integer"
+ },
+ "value": {
+ "oneOf": [
+ {
+ "type": "string",
+ "nullable": true
+ },
+ {
+ "type": "integer",
+ "nullable": true
+ },
+ {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Resource not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "410": {
+ "description": "Gone",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "415": {
+ "description": "Preview header missing",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "304": {
+ "description": "Not modified"
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.21/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
+ }
+ ],
+ "category": "apps",
+ "subcategory": "installations"
+ }
+ }
+ },
"/repos/{owner}/{repo}/contents/{path}": {
"get": {
"summary": "Get repository content",
@@ -313642,313 +313949,6 @@
"category": "meta"
}
}
- },
- "/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
- "post": {
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.21/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.21/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.21/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/enterprise-server@2.21/rest/reference/apps#create-a-content-attachment"
- },
- "parameters": [
- {
- "name": "owner",
- "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "content_reference_id",
- "description": "The `id` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Response",
- "content": {
- "application/json": {
- "schema": {
- "title": "ContentReferenceAttachment",
- "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
- "type": "object",
- "properties": {
- "id": {
- "description": "The ID of the attachment",
- "example": 21,
- "type": "integer"
- },
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- },
- "node_id": {
- "description": "The node_id of the content attachment",
- "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
- "type": "string"
- }
- },
- "required": [
- "id",
- "title",
- "body"
- ]
- },
- "examples": {
- "default": {
- "value": {
- "id": 101,
- "title": "[A-1234] Error found in core/models.py file'",
- "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
- }
- }
- }
- }
- }
- },
- "422": {
- "description": "Validation failed",
- "content": {
- "application/json": {
- "schema": {
- "title": "Validation Error",
- "description": "Validation Error",
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "errors": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "code"
- ],
- "properties": {
- "resource": {
- "type": "string"
- },
- "field": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "code": {
- "type": "string"
- },
- "index": {
- "type": "integer"
- },
- "value": {
- "oneOf": [
- {
- "type": "string",
- "nullable": true
- },
- {
- "type": "integer",
- "nullable": true
- },
- {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- }
- }
- ]
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Resource not found",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "410": {
- "description": "Gone",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "415": {
- "description": "Preview header missing",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "304": {
- "description": "Not modified"
- },
- "403": {
- "description": "Forbidden",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.21/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
- }
- ],
- "category": "apps",
- "subcategory": "installations"
- }
- }
}
}
}
\ No newline at end of file
diff --git a/lib/rest/static/dereferenced/ghes-2.22.deref.json b/lib/rest/static/dereferenced/ghes-2.22.deref.json
index cec548f69416..aa6b8e7c8fee 100644
--- a/lib/rest/static/dereferenced/ghes-2.22.deref.json
+++ b/lib/rest/static/dereferenced/ghes-2.22.deref.json
@@ -165071,6 +165071,313 @@
}
}
},
+ "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
+ "post": {
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.22/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.22/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.22/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/enterprise-server@2.22/rest/reference/apps#create-a-content-attachment"
+ },
+ "parameters": [
+ {
+ "name": "owner",
+ "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "repo",
+ "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "content_reference_id",
+ "description": "The `id` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "ContentReferenceAttachment",
+ "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
+ "type": "object",
+ "properties": {
+ "id": {
+ "description": "The ID of the attachment",
+ "example": 21,
+ "type": "integer"
+ },
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ },
+ "node_id": {
+ "description": "The node_id of the content attachment",
+ "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "title",
+ "body"
+ ]
+ },
+ "examples": {
+ "default": {
+ "value": {
+ "id": 101,
+ "title": "[A-1234] Error found in core/models.py file'",
+ "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
+ }
+ }
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation failed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Validation Error",
+ "description": "Validation Error",
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "errors": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "code"
+ ],
+ "properties": {
+ "resource": {
+ "type": "string"
+ },
+ "field": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "index": {
+ "type": "integer"
+ },
+ "value": {
+ "oneOf": [
+ {
+ "type": "string",
+ "nullable": true
+ },
+ {
+ "type": "integer",
+ "nullable": true
+ },
+ {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Resource not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "410": {
+ "description": "Gone",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "415": {
+ "description": "Preview header missing",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "304": {
+ "description": "Not modified"
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
+ }
+ ],
+ "category": "apps",
+ "subcategory": "installations"
+ }
+ }
+ },
"/repos/{owner}/{repo}/contents/{path}": {
"get": {
"summary": "Get repository content",
@@ -345131,313 +345438,6 @@
"category": "meta"
}
}
- },
- "/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
- "post": {
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@2.22/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@2.22/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@2.22/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/enterprise-server@2.22/rest/reference/apps#create-a-content-attachment"
- },
- "parameters": [
- {
- "name": "owner",
- "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "content_reference_id",
- "description": "The `id` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Response",
- "content": {
- "application/json": {
- "schema": {
- "title": "ContentReferenceAttachment",
- "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
- "type": "object",
- "properties": {
- "id": {
- "description": "The ID of the attachment",
- "example": 21,
- "type": "integer"
- },
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- },
- "node_id": {
- "description": "The node_id of the content attachment",
- "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
- "type": "string"
- }
- },
- "required": [
- "id",
- "title",
- "body"
- ]
- },
- "examples": {
- "default": {
- "value": {
- "id": 101,
- "title": "[A-1234] Error found in core/models.py file'",
- "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
- }
- }
- }
- }
- }
- },
- "422": {
- "description": "Validation failed",
- "content": {
- "application/json": {
- "schema": {
- "title": "Validation Error",
- "description": "Validation Error",
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "errors": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "code"
- ],
- "properties": {
- "resource": {
- "type": "string"
- },
- "field": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "code": {
- "type": "string"
- },
- "index": {
- "type": "integer"
- },
- "value": {
- "oneOf": [
- {
- "type": "string",
- "nullable": true
- },
- {
- "type": "integer",
- "nullable": true
- },
- {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- }
- }
- ]
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Resource not found",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "410": {
- "description": "Gone",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "415": {
- "description": "Preview header missing",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "304": {
- "description": "Not modified"
- },
- "403": {
- "description": "Forbidden",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@2.22/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
- }
- ],
- "category": "apps",
- "subcategory": "installations"
- }
- }
}
}
}
\ No newline at end of file
diff --git a/lib/rest/static/dereferenced/ghes-3.0.deref.json b/lib/rest/static/dereferenced/ghes-3.0.deref.json
index 214b73f6ceb0..e9706e24f4c8 100644
--- a/lib/rest/static/dereferenced/ghes-3.0.deref.json
+++ b/lib/rest/static/dereferenced/ghes-3.0.deref.json
@@ -170466,6 +170466,313 @@
}
}
},
+ "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
+ "post": {
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.0/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.0/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.0/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/enterprise-server@3.0/rest/reference/apps#create-a-content-attachment"
+ },
+ "parameters": [
+ {
+ "name": "owner",
+ "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "repo",
+ "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "content_reference_id",
+ "description": "The `id` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "ContentReferenceAttachment",
+ "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
+ "type": "object",
+ "properties": {
+ "id": {
+ "description": "The ID of the attachment",
+ "example": 21,
+ "type": "integer"
+ },
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ },
+ "node_id": {
+ "description": "The node_id of the content attachment",
+ "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "title",
+ "body"
+ ]
+ },
+ "examples": {
+ "default": {
+ "value": {
+ "id": 101,
+ "title": "[A-1234] Error found in core/models.py file'",
+ "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
+ }
+ }
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation failed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Validation Error",
+ "description": "Validation Error",
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "errors": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "code"
+ ],
+ "properties": {
+ "resource": {
+ "type": "string"
+ },
+ "field": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "index": {
+ "type": "integer"
+ },
+ "value": {
+ "oneOf": [
+ {
+ "type": "string",
+ "nullable": true
+ },
+ {
+ "type": "integer",
+ "nullable": true
+ },
+ {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Resource not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "410": {
+ "description": "Gone",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "415": {
+ "description": "Preview header missing",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "304": {
+ "description": "Not modified"
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.0/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
+ }
+ ],
+ "category": "apps",
+ "subcategory": "installations"
+ }
+ }
+ },
"/repos/{owner}/{repo}/contents/{path}": {
"get": {
"summary": "Get repository content",
@@ -350852,313 +351159,6 @@
"category": "meta"
}
}
- },
- "/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
- "post": {
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.0/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.0/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.0/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/enterprise-server@3.0/rest/reference/apps#create-a-content-attachment"
- },
- "parameters": [
- {
- "name": "owner",
- "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "content_reference_id",
- "description": "The `id` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Response",
- "content": {
- "application/json": {
- "schema": {
- "title": "ContentReferenceAttachment",
- "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
- "type": "object",
- "properties": {
- "id": {
- "description": "The ID of the attachment",
- "example": 21,
- "type": "integer"
- },
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- },
- "node_id": {
- "description": "The node_id of the content attachment",
- "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
- "type": "string"
- }
- },
- "required": [
- "id",
- "title",
- "body"
- ]
- },
- "examples": {
- "default": {
- "value": {
- "id": 101,
- "title": "[A-1234] Error found in core/models.py file'",
- "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
- }
- }
- }
- }
- }
- },
- "422": {
- "description": "Validation failed",
- "content": {
- "application/json": {
- "schema": {
- "title": "Validation Error",
- "description": "Validation Error",
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "errors": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "code"
- ],
- "properties": {
- "resource": {
- "type": "string"
- },
- "field": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "code": {
- "type": "string"
- },
- "index": {
- "type": "integer"
- },
- "value": {
- "oneOf": [
- {
- "type": "string",
- "nullable": true
- },
- {
- "type": "integer",
- "nullable": true
- },
- {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- }
- }
- ]
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Resource not found",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "410": {
- "description": "Gone",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "415": {
- "description": "Preview header missing",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "304": {
- "description": "Not modified"
- },
- "403": {
- "description": "Forbidden",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.0/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
- }
- ],
- "category": "apps",
- "subcategory": "installations"
- }
- }
}
}
}
\ No newline at end of file
diff --git a/lib/rest/static/dereferenced/ghes-3.1.deref.json b/lib/rest/static/dereferenced/ghes-3.1.deref.json
index 1a98e1cf46da..5ac9f83b12d0 100644
--- a/lib/rest/static/dereferenced/ghes-3.1.deref.json
+++ b/lib/rest/static/dereferenced/ghes-3.1.deref.json
@@ -173350,6 +173350,313 @@
}
}
},
+ "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
+ "post": {
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.1/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.1/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.1/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/enterprise-server@3.1/rest/reference/apps#create-a-content-attachment"
+ },
+ "parameters": [
+ {
+ "name": "owner",
+ "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "repo",
+ "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "content_reference_id",
+ "description": "The `id` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "ContentReferenceAttachment",
+ "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
+ "type": "object",
+ "properties": {
+ "id": {
+ "description": "The ID of the attachment",
+ "example": 21,
+ "type": "integer"
+ },
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ },
+ "node_id": {
+ "description": "The node_id of the content attachment",
+ "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "title",
+ "body"
+ ]
+ },
+ "examples": {
+ "default": {
+ "value": {
+ "id": 101,
+ "title": "[A-1234] Error found in core/models.py file'",
+ "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
+ }
+ }
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation failed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Validation Error",
+ "description": "Validation Error",
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "errors": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "code"
+ ],
+ "properties": {
+ "resource": {
+ "type": "string"
+ },
+ "field": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "index": {
+ "type": "integer"
+ },
+ "value": {
+ "oneOf": [
+ {
+ "type": "string",
+ "nullable": true
+ },
+ {
+ "type": "integer",
+ "nullable": true
+ },
+ {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Resource not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "410": {
+ "description": "Gone",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "415": {
+ "description": "Preview header missing",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "304": {
+ "description": "Not modified"
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.1/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
+ }
+ ],
+ "category": "apps",
+ "subcategory": "installations"
+ }
+ }
+ },
"/repos/{owner}/{repo}/contents/{path}": {
"get": {
"summary": "Get repository content",
@@ -355243,313 +355550,6 @@
"category": "meta"
}
}
- },
- "/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
- "post": {
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/enterprise-server@3.1/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/enterprise-server@3.1/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/enterprise-server@3.1/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/enterprise-server@3.1/rest/reference/apps#create-a-content-attachment"
- },
- "parameters": [
- {
- "name": "owner",
- "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "content_reference_id",
- "description": "The `id` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Response",
- "content": {
- "application/json": {
- "schema": {
- "title": "ContentReferenceAttachment",
- "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
- "type": "object",
- "properties": {
- "id": {
- "description": "The ID of the attachment",
- "example": 21,
- "type": "integer"
- },
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- },
- "node_id": {
- "description": "The node_id of the content attachment",
- "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
- "type": "string"
- }
- },
- "required": [
- "id",
- "title",
- "body"
- ]
- },
- "examples": {
- "default": {
- "value": {
- "id": 101,
- "title": "[A-1234] Error found in core/models.py file'",
- "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
- }
- }
- }
- }
- }
- },
- "422": {
- "description": "Validation failed",
- "content": {
- "application/json": {
- "schema": {
- "title": "Validation Error",
- "description": "Validation Error",
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "errors": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "code"
- ],
- "properties": {
- "resource": {
- "type": "string"
- },
- "field": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "code": {
- "type": "string"
- },
- "index": {
- "type": "integer"
- },
- "value": {
- "oneOf": [
- {
- "type": "string",
- "nullable": true
- },
- {
- "type": "integer",
- "nullable": true
- },
- {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- }
- }
- ]
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Resource not found",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "410": {
- "description": "Gone",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "415": {
- "description": "Preview header missing",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "304": {
- "description": "Not modified"
- },
- "403": {
- "description": "Forbidden",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/enterprise-server@3.1/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
- }
- ],
- "category": "apps",
- "subcategory": "installations"
- }
- }
}
}
}
\ No newline at end of file
diff --git a/lib/rest/static/dereferenced/github.ae.deref.json b/lib/rest/static/dereferenced/github.ae.deref.json
index 648467a8bff0..3d6bdd4ae418 100644
--- a/lib/rest/static/dereferenced/github.ae.deref.json
+++ b/lib/rest/static/dereferenced/github.ae.deref.json
@@ -141894,6 +141894,313 @@
}
}
},
+ "/repos/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
+ "post": {
+ "summary": "Create a content attachment",
+ "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/github-ae@latest/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/github-ae@latest/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/github-ae@latest/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
+ "tags": [
+ "apps"
+ ],
+ "operationId": "apps/create-content-attachment",
+ "externalDocs": {
+ "description": "API method documentation",
+ "url": "https://docs.github.com/github-ae@latest/rest/reference/apps#create-a-content-attachment"
+ },
+ "parameters": [
+ {
+ "name": "owner",
+ "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "repo",
+ "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "content_reference_id",
+ "description": "The `id` of the `content_reference` event.",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "properties": {
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ }
+ },
+ "required": [
+ "title",
+ "body"
+ ],
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "ContentReferenceAttachment",
+ "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
+ "type": "object",
+ "properties": {
+ "id": {
+ "description": "The ID of the attachment",
+ "example": 21,
+ "type": "integer"
+ },
+ "title": {
+ "description": "The title of the attachment",
+ "example": "Title of the attachment",
+ "type": "string",
+ "maxLength": 1024
+ },
+ "body": {
+ "description": "The body of the attachment",
+ "example": "Body of the attachment",
+ "type": "string",
+ "maxLength": 262144
+ },
+ "node_id": {
+ "description": "The node_id of the content attachment",
+ "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
+ "type": "string"
+ }
+ },
+ "required": [
+ "id",
+ "title",
+ "body"
+ ]
+ },
+ "examples": {
+ "default": {
+ "value": {
+ "id": 101,
+ "title": "[A-1234] Error found in core/models.py file'",
+ "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
+ }
+ }
+ }
+ }
+ }
+ },
+ "422": {
+ "description": "Validation failed",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Validation Error",
+ "description": "Validation Error",
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "errors": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "required": [
+ "code"
+ ],
+ "properties": {
+ "resource": {
+ "type": "string"
+ },
+ "field": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "index": {
+ "type": "integer"
+ },
+ "value": {
+ "oneOf": [
+ {
+ "type": "string",
+ "nullable": true
+ },
+ {
+ "type": "integer",
+ "nullable": true
+ },
+ {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Resource not found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "410": {
+ "description": "Gone",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "415": {
+ "description": "Preview header missing",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "message",
+ "documentation_url"
+ ],
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "304": {
+ "description": "Not modified"
+ },
+ "403": {
+ "description": "Forbidden",
+ "content": {
+ "application/json": {
+ "schema": {
+ "title": "Basic Error",
+ "description": "Basic Error",
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "documentation_url": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-github": {
+ "githubCloudOnly": false,
+ "enabledForGitHubApps": true,
+ "previews": [
+ {
+ "required": true,
+ "name": "corsair",
+ "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/github-ae@latest/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
+ }
+ ],
+ "category": "apps",
+ "subcategory": "installations"
+ }
+ }
+ },
"/repos/{owner}/{repo}/contents/{path}": {
"get": {
"summary": "Get repository content",
@@ -311664,313 +311971,6 @@
"category": "meta"
}
}
- },
- "/{owner}/{repo}/content_references/{content_reference_id}/attachments": {
- "post": {
- "summary": "Create a content attachment",
- "description": "Creates an attachment under a content reference URL in the body or comment of an issue or pull request. Use the `id` and `repository` `full_name` of the content reference from the [`content_reference` event](https://docs.github.com/github-ae@latest/webhooks/event-payloads/#content_reference) to create an attachment.\n\nThe app must create a content attachment within six hours of the content reference URL being posted. See \"[Using content attachments](https://docs.github.com/github-ae@latest/apps/using-content-attachments/)\" for details about content attachments.\n\nYou must use an [installation access token](https://docs.github.com/github-ae@latest/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation) to access this endpoint.",
- "tags": [
- "apps"
- ],
- "operationId": "apps/create-content-attachment",
- "externalDocs": {
- "description": "API method documentation",
- "url": "https://docs.github.com/github-ae@latest/rest/reference/apps#create-a-content-attachment"
- },
- "parameters": [
- {
- "name": "owner",
- "description": "The owner of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "description": "The name of the repository. Determined from the `repository` `full_name` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "content_reference_id",
- "description": "The `id` of the `content_reference` event.",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "properties": {
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- }
- },
- "required": [
- "title",
- "body"
- ],
- "type": "object"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Response",
- "content": {
- "application/json": {
- "schema": {
- "title": "ContentReferenceAttachment",
- "description": "Content Reference attachments allow you to provide context around URLs posted in comments",
- "type": "object",
- "properties": {
- "id": {
- "description": "The ID of the attachment",
- "example": 21,
- "type": "integer"
- },
- "title": {
- "description": "The title of the attachment",
- "example": "Title of the attachment",
- "type": "string",
- "maxLength": 1024
- },
- "body": {
- "description": "The body of the attachment",
- "example": "Body of the attachment",
- "type": "string",
- "maxLength": 262144
- },
- "node_id": {
- "description": "The node_id of the content attachment",
- "example": "MDE3OkNvbnRlbnRBdHRhY2htZW50MjE=",
- "type": "string"
- }
- },
- "required": [
- "id",
- "title",
- "body"
- ]
- },
- "examples": {
- "default": {
- "value": {
- "id": 101,
- "title": "[A-1234] Error found in core/models.py file'",
- "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()"
- }
- }
- }
- }
- }
- },
- "422": {
- "description": "Validation failed",
- "content": {
- "application/json": {
- "schema": {
- "title": "Validation Error",
- "description": "Validation Error",
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "errors": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "code"
- ],
- "properties": {
- "resource": {
- "type": "string"
- },
- "field": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "code": {
- "type": "string"
- },
- "index": {
- "type": "integer"
- },
- "value": {
- "oneOf": [
- {
- "type": "string",
- "nullable": true
- },
- {
- "type": "integer",
- "nullable": true
- },
- {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- }
- }
- ]
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Resource not found",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "410": {
- "description": "Gone",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "415": {
- "description": "Preview header missing",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "message",
- "documentation_url"
- ],
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- }
- }
- }
- }
- }
- },
- "304": {
- "description": "Not modified"
- },
- "403": {
- "description": "Forbidden",
- "content": {
- "application/json": {
- "schema": {
- "title": "Basic Error",
- "description": "Basic Error",
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
- },
- "documentation_url": {
- "type": "string"
- },
- "url": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "x-github": {
- "githubCloudOnly": false,
- "enabledForGitHubApps": true,
- "previews": [
- {
- "required": true,
- "name": "corsair",
- "note": "To access the Content Attachments API during the preview period, you must provide a custom [media type](https://docs.github.com/github-ae@latest/rest/overview/media-types) in the `Accept` header:\n```shell\napplication/vnd.github.corsair-preview+json\n```"
- }
- ],
- "category": "apps",
- "subcategory": "installations"
- }
- }
}
}
}
\ No newline at end of file
diff --git a/middleware/contextualizers/enterprise-release-notes.js b/middleware/contextualizers/enterprise-release-notes.js
deleted file mode 100644
index 94e00e4cbf36..000000000000
--- a/middleware/contextualizers/enterprise-release-notes.js
+++ /dev/null
@@ -1,124 +0,0 @@
-const semver = require('semver')
-const renderContent = require('../../lib/render-content')
-const patterns = require('../../lib/patterns')
-const { all, firstReleaseNote, latest } = require('../../lib/enterprise-server-releases')
-
-// Display all GHES release notes, regardless of deprecation status,
-// starting with the first release notes in 2.20
-const supported = all.filter(release => {
- return semver.gte(
- semver.coerce(release), semver.coerce(firstReleaseNote)
- ) && release !== '11.10.340'
-})
-
-/**
- * Turn { [key]: { notes, intro, date } }
- * into [{ version, notes, intro, date }]
- */
-function sortPatchKeys (release, version) {
- const keys = Object.keys(release)
- .map(key => {
- const keyWithDots = key.replace(/-/g, '.')
- return {
- version: `${version}.${keyWithDots}`,
- patchVersion: keyWithDots,
- downloadVersion: `${version}.${keyWithDots.replace(/\.rc\d*$/, '')}`,
- ...release[key]
- }
- })
- // Filter out any deprecated patches
- .filter(key => !key.deprecated)
- return keys
- .sort((a, b) => {
- let aTemp = a.version
- let bTemp = b.version
-
- // There's an RC version here, so doing regular semver
- // comparisons won't work. So, we'll convert the incompatible version
- // strings to real semver strings, then compare.
- const [aBase, aRc] = a.version.split('.rc')
- if (aRc) aTemp = `${aBase}-rc.${aRc}`
-
- const [bBase, bRc] = b.version.split('.rc')
- if (bRc) bTemp = `${bBase}-rc.${bRc}`
-
- if (semver.gt(aTemp, bTemp)) return -1
- if (semver.lt(aTemp, bTemp)) return 1
- return 0
- })
-}
-
-/**
- * Render each note in the given patch, by looping through the
- * sections and rendering either `note` or `note.notes` in the
- * case of a sub-section
- */
-async function renderPatchNotes (patch, ctx) {
- // Run the notes through the markdown rendering pipeline
- for (const key in patch.sections) {
- await Promise.all(patch.sections[key].map(async (noteOrHeading, index) => {
- patch.sections[key][index] = typeof noteOrHeading === 'string'
- ? await renderContent(noteOrHeading, ctx)
- : {
- ...noteOrHeading,
- notes: await Promise.all(noteOrHeading.notes.map(note => renderContent(note, ctx)))
- }
- }))
- }
-
- // Also render the patch's intro
- if (patch.intro) {
- patch.intro = await renderContent(patch.intro, ctx)
- }
-
- return patch
-}
-
-module.exports = async function enterpriseReleaseNotesContext (req, res, next) {
- // The `/release-notes` sub-path
- if (!(req.path.endsWith('/release-notes') || req.path.endsWith('/admin'))) return next()
-
- // ignore paths that don't have an enterprise version number
- if (!patterns.getEnterpriseServerNumber.test(req.path)) return next()
-
- // extract enterprise version from path, e.g. 2.16
- const requestedVersion = req.path.match(patterns.getEnterpriseServerNumber)[1]
-
- const versionString = `${requestedVersion.replace(/\./g, '-')}`
-
- const allReleaseNotes = req.context.site.data['release-notes']
-
- // This version doesn't have any release notes - let's be helpful and redirect
- // to the notes on `enterprise.github.com`
- if (!allReleaseNotes || !allReleaseNotes[versionString]) {
- return res.redirect(`https://enterprise.github.com/releases/${requestedVersion}.0/notes`)
- }
-
- const releaseNotes = allReleaseNotes[versionString]
- const patches = sortPatchKeys(releaseNotes, requestedVersion)
-
- req.context.releaseNotes = await Promise.all(patches.map(async patch => renderPatchNotes(patch, req.context)))
-
- // Put together information about other releases
- req.context.releases = supported.map(version => {
- const ret = { version }
- if (!req.context.site.data['release-notes']) return ret
- const release = req.context.site.data['release-notes'][version.replace(/\./g, '-')]
- if (!release) return ret
- const patches = sortPatchKeys(release, version)
-
- const firstPreviousRelease = all[all.findIndex(v => v === version) + 1]
- const secondPreviousRelease = all[all.findIndex(v => v === firstPreviousRelease) + 1]
-
- return { ...ret, patches, firstPreviousRelease, secondPreviousRelease }
- })
-
- const releaseIndex = supported.findIndex(release => release === requestedVersion)
- req.context.nextRelease = supported[releaseIndex - 1]
- req.context.prevRelease = supported[releaseIndex + 1]
-
- req.context.latestPatch = patches[0].version
- req.context.latestRelease = latest
-
- return next()
-}
diff --git a/middleware/contextualizers/release-notes.js b/middleware/contextualizers/release-notes.js
new file mode 100644
index 000000000000..2a54833aab08
--- /dev/null
+++ b/middleware/contextualizers/release-notes.js
@@ -0,0 +1,74 @@
+const semver = require('semver')
+const { all, latest, firstReleaseNote } = require('../../lib/enterprise-server-releases')
+const { sortReleasesByDate, sortPatchKeys, renderPatchNotes, getAllReleases } = require('../../lib/release-notes-utils')
+
+// Display all GHES release notes, regardless of deprecation status,
+// starting with the first release notes in 2.20
+const supported = all.filter(release => {
+ return semver.gte(
+ semver.coerce(release), semver.coerce(firstReleaseNote)
+ ) && release !== '11.10.340'
+})
+
+module.exports = async function releaseNotesContext (req, res, next) {
+ // The `/release-notes` sub-path
+ if (!(req.path.endsWith('/release-notes') || req.path.endsWith('/admin'))) return next()
+
+ const [requestedPlan, requestedRelease] = req.context.currentVersion.split('@')
+ const releaseNotesPerPlan = req.context.site.data['release-notes'][requestedPlan]
+
+ // 404 if no release notes can be found
+ if (!releaseNotesPerPlan) return next()
+
+ // Release notes handling differs if version has numbered releases (like GHES) or not (like GHAE)
+ const hasNumberedReleases = !(requestedRelease === 'latest')
+
+ // GHES gets handled here...
+ if (hasNumberedReleases) {
+ const currentReleaseNotes = releaseNotesPerPlan[`${requestedRelease.replace(/\./g, '-')}`]
+
+ if (!currentReleaseNotes && req.path.endsWith('/release-notes')) {
+ // If the GHES version doesn't have any release notes, let's be helpful and redirect to `enterprise.github.com`
+ return requestedPlan === 'enterprise-server'
+ ? res.redirect(`https://enterprise.github.com/releases/${requestedRelease}.0/notes`)
+ : next()
+ }
+
+ const patches = sortPatchKeys(currentReleaseNotes, requestedRelease, { semverSort: hasNumberedReleases })
+ req.context.releaseNotes = await Promise.all(patches.map(async patch => renderPatchNotes(patch, req.context)))
+ req.context.releases = getAllReleases(supported, releaseNotesPerPlan, hasNumberedReleases)
+
+ // Add firstPreviousRelease and secondPreviousRelease convenience props for use in includes/product-releases.html
+ req.context.releases.forEach(release => {
+ release.firstPreviousRelease = all[all.findIndex(v => v === release.version) + 1]
+ release.secondPreviousRelease = all[all.findIndex(v => v === release.firstPreviousRelease) + 1]
+ })
+
+ const releaseIndex = supported.findIndex(release => release === requestedRelease)
+ req.context.nextRelease = supported[releaseIndex - 1]
+ req.context.prevRelease = supported[releaseIndex + 1]
+
+ req.context.latestPatch = patches[0].version
+ req.context.latestRelease = latest
+ }
+
+ // GHAE gets handled here...
+ if (!hasNumberedReleases) {
+ const sortedReleases = sortReleasesByDate(releaseNotesPerPlan)
+ const sortedNotes = sortedReleases.map(release => sortPatchKeys(releaseNotesPerPlan[release], release, { semverSort: false })).flat()
+
+ req.context.releaseNotes = await Promise.all(sortedNotes.map(async patch => renderPatchNotes(patch, req.context)))
+ req.context.releases = getAllReleases(sortedReleases, releaseNotesPerPlan, hasNumberedReleases)
+ // do some date format massaging, since we want the friendly date to render as the "version"
+ .map(r => {
+ const d = r.patches[0].friendlyDate.split(' ')
+ d.splice(1, 1)
+ r.version = d.join(' ')
+ return r
+ })
+
+ req.context.latestPatch = sortedNotes[0].date
+ }
+
+ return next()
+}
diff --git a/middleware/index.js b/middleware/index.js
index ab5beb09d0a6..7cffb68e5d5d 100644
--- a/middleware/index.js
+++ b/middleware/index.js
@@ -36,7 +36,13 @@ module.exports = function (app) {
// *** Security ***
app.use(require('./cors'))
- app.use(require('helmet')())
+ app.use(require('helmet')({
+ // Override referrerPolicy to match the browser's default: "strict-origin-when-cross-origin".
+ // Helmet now defaults to "no-referrer", which is a problem for our archived assets proxying.
+ referrerPolicy: {
+ policy: 'strict-origin-when-cross-origin'
+ }
+ }))
app.use(require('./csp')) // Must come after helmet
app.use(require('./cookie-parser')) // Must come before csrf
app.use(express.json()) // Must come before csrf
@@ -105,7 +111,7 @@ module.exports = function (app) {
app.use(haltOnDroppedConnection)
// *** Preparation for render-page: contextualizers ***
- app.use(asyncMiddleware(instrument('./contextualizers/enterprise-release-notes')))
+ app.use(asyncMiddleware(instrument('./contextualizers/release-notes')))
app.use(instrument('./contextualizers/graphql'))
app.use(instrument('./contextualizers/rest'))
app.use(instrument('./contextualizers/webhooks'))
diff --git a/tests/helpers/schemas/ghae-release-notes-schema.js b/tests/helpers/schemas/ghae-release-notes-schema.js
new file mode 100644
index 000000000000..4fcbc5e93970
--- /dev/null
+++ b/tests/helpers/schemas/ghae-release-notes-schema.js
@@ -0,0 +1,71 @@
+const section = {
+ anyOf: [
+ {
+ type: 'array',
+ items: { type: 'string' },
+ minItems: 1
+ },
+ {
+ type: 'object',
+ properties: {
+ heading: {
+ type: 'string',
+ required: true
+ },
+ notes: {
+ type: 'array',
+ items: { type: 'string' },
+ required: true,
+ minItems: 1
+ }
+ }
+ }
+ ]
+}
+
+module.exports = {
+ properties: {
+ intro: {
+ type: 'string'
+ },
+ date: {
+ type: 'string',
+ format: 'date',
+ required: true
+ },
+ friendlyDate: {
+ type: 'string',
+ required: true
+ },
+ title: {
+ type: 'string',
+ required: true
+ },
+ currentWeek: {
+ type: 'boolean',
+ required: true
+ },
+ release_candidate: {
+ type: 'boolean',
+ default: false
+ },
+ deprecated: {
+ type: 'boolean',
+ default: false
+ },
+ sections: {
+ required: true,
+ type: 'object',
+ minProperties: 1,
+ properties: [
+ 'bugs',
+ 'known_issues',
+ 'features',
+ 'changes',
+ 'deprecations',
+ 'security_fixes',
+ 'backups'
+ ].reduce((prev, curr) => ({ ...prev, [curr]: section }), {})
+ }
+ }
+}
diff --git a/tests/helpers/schemas/release-notes-schema.js b/tests/helpers/schemas/ghes-release-notes-schema.js
similarity index 100%
rename from tests/helpers/schemas/release-notes-schema.js
rename to tests/helpers/schemas/ghes-release-notes-schema.js
diff --git a/tests/linting/lint-files.js b/tests/linting/lint-files.js
index 8db8a1c03e74..5fcc88f212d3 100644
--- a/tests/linting/lint-files.js
+++ b/tests/linting/lint-files.js
@@ -10,7 +10,8 @@ const readFileAsync = require('../../lib/readfile-async')
const frontmatter = require('../../lib/frontmatter')
const languages = require('../../lib/languages')
const { tags } = require('../../lib/liquid-tags/extended-markdown')
-const ghesReleaseNotesSchema = require('../helpers/schemas/release-notes-schema')
+const ghesReleaseNotesSchema = require('../helpers/schemas/ghes-release-notes-schema')
+const ghaeReleaseNotesSchema = require('../helpers/schemas/ghae-release-notes-schema')
const learningTracksSchema = require('../helpers/schemas/learning-tracks-schema')
const renderContent = require('../../lib/render-content')
const { execSync } = require('child_process')
@@ -22,7 +23,8 @@ const contentDir = path.join(rootDir, 'content')
const reusablesDir = path.join(rootDir, 'data/reusables')
const variablesDir = path.join(rootDir, 'data/variables')
const glossariesDir = path.join(rootDir, 'data/glossaries')
-const ghesReleaseNotesDir = path.join(rootDir, 'data/release-notes')
+const ghesReleaseNotesDir = path.join(rootDir, 'data/release-notes/enterprise-server')
+const ghaeReleaseNotesDir = path.join(rootDir, 'data/release-notes/github-ae')
const learningTracks = path.join(rootDir, 'data/learning-tracks')
const languageCodes = Object.keys(languages)
@@ -171,7 +173,7 @@ const yamlWalkOptions = {
}
// different lint rules apply to different content types
-let mdToLint, ymlToLint, releaseNotesToLint, learningTracksToLint
+let mdToLint, ymlToLint, ghesReleaseNotesToLint, ghaeReleaseNotesToLint, learningTracksToLint
if (!process.env.TEST_TRANSLATION) {
// compile lists of all the files we want to lint
@@ -201,7 +203,12 @@ if (!process.env.TEST_TRANSLATION) {
// GHES release notes
const ghesReleaseNotesYamlAbsPaths = walk(ghesReleaseNotesDir, yamlWalkOptions).sort()
const ghesReleaseNotesYamlRelPaths = ghesReleaseNotesYamlAbsPaths.map(p => slash(path.relative(rootDir, p)))
- releaseNotesToLint = zip(ghesReleaseNotesYamlRelPaths, ghesReleaseNotesYamlAbsPaths)
+ ghesReleaseNotesToLint = zip(ghesReleaseNotesYamlRelPaths, ghesReleaseNotesYamlAbsPaths)
+
+ // GHAE release notes
+ const ghaeReleaseNotesYamlAbsPaths = walk(ghaeReleaseNotesDir, yamlWalkOptions).sort()
+ const ghaeReleaseNotesYamlRelPaths = ghaeReleaseNotesYamlAbsPaths.map(p => slash(path.relative(rootDir, p)))
+ ghaeReleaseNotesToLint = zip(ghaeReleaseNotesYamlRelPaths, ghaeReleaseNotesYamlAbsPaths)
// Learning tracks
const learningTracksYamlAbsPaths = walk(learningTracks, yamlWalkOptions).sort()
@@ -216,7 +223,7 @@ if (!process.env.TEST_TRANSLATION) {
console.log(`Found ${changedFilesRelPaths.length} translated files.`)
- const { mdRelPaths = [], ymlRelPaths = [], releaseNotesRelPaths = [], learningTracksRelPaths = [] } = groupBy(changedFilesRelPaths, (path) => {
+ const { mdRelPaths = [], ymlRelPaths = [], ghesReleaseNotesRelPaths = [], ghaeReleaseNotesRelPaths = [], learningTracksRelPaths = [] } = groupBy(changedFilesRelPaths, (path) => {
// separate the changed files to different groups
if (path.endsWith('README.md')) {
return 'throwAway'
@@ -224,8 +231,10 @@ if (!process.env.TEST_TRANSLATION) {
return 'mdRelPaths'
} else if (path.match(/\/data\/(variables|glossaries)\//i)) {
return 'ymlRelPaths'
- } else if (path.match(/\/data\/release-notes\//i)) {
- return 'releaseNotesRelPaths'
+ } else if (path.match(/\/data\/release-notes\/enterprise-server/i)) {
+ return 'ghesReleaseNotesRelPaths'
+ } else if (path.match(/\/data\/release-notes\/github-ae/i)) {
+ return 'ghaeReleaseNotesRelPaths'
} else if (path.match(/\data\/learning-tracks/)) {
return 'learningTracksRelPaths'
} else {
@@ -234,14 +243,15 @@ if (!process.env.TEST_TRANSLATION) {
}
})
- const [mdTuples, ymlTuples, releaseNotesTuples, learningTracksTuples] = [mdRelPaths, ymlRelPaths, releaseNotesRelPaths, learningTracksRelPaths].map(relPaths => {
+ const [mdTuples, ymlTuples, ghesReleaseNotesTuples, ghaeReleaseNotesTuples, learningTracksTuples] = [mdRelPaths, ymlRelPaths, ghesReleaseNotesRelPaths, ghaeReleaseNotesRelPaths, learningTracksRelPaths].map(relPaths => {
const absPaths = relPaths.map(p => path.join(rootDir, p))
return zip(relPaths, absPaths)
})
mdToLint = mdTuples
ymlToLint = ymlTuples
- releaseNotesToLint = releaseNotesTuples
+ ghesReleaseNotesToLint = ghesReleaseNotesTuples
+ ghaeReleaseNotesToLint = ghaeReleaseNotesTuples
learningTracksToLint = learningTracksTuples
}
@@ -661,9 +671,9 @@ describe('lint yaml content', () => {
)
})
-describe('lint release notes', () => {
- if (releaseNotesToLint.length < 1) return
- describe.each(releaseNotesToLint)(
+describe('lint GHES release notes', () => {
+ if (ghesReleaseNotesToLint.length < 1) return
+ describe.each(ghesReleaseNotesToLint)(
'%s',
(yamlRelPath, yamlAbsPath) => {
let dictionary
@@ -707,6 +717,59 @@ describe('lint release notes', () => {
)
})
+describe('lint GHAE release notes', () => {
+ if (ghaeReleaseNotesToLint.length < 1) return
+ const currentWeeksFound = []
+ describe.each(ghaeReleaseNotesToLint)(
+ '%s',
+ (yamlRelPath, yamlAbsPath) => {
+ let dictionary
+
+ beforeAll(async () => {
+ const fileContents = await readFileAsync(yamlAbsPath, 'utf8')
+ dictionary = yaml.load(fileContents, { filename: yamlRelPath })
+ })
+
+ it('matches the schema', () => {
+ const { errors } = revalidator.validate(dictionary, ghaeReleaseNotesSchema)
+ const errorMessage = errors.map(error => `- [${error.property}]: ${error.actual}, ${error.message}`).join('\n')
+ expect(errors.length, errorMessage).toBe(0)
+ })
+
+ it('does not have more than one yaml file with currentWeek set to true', () => {
+ if (dictionary.currentWeek) currentWeeksFound.push(yamlRelPath)
+ const errorMessage = `Found more than one file with currentWeek set to true: ${currentWeeksFound.join('\n')}`
+ expect(currentWeeksFound.length, errorMessage).not.toBeGreaterThan(1)
+ })
+
+ it('contains valid liquid', () => {
+ const { intro, sections } = dictionary
+ let toLint = { intro }
+ for (const key in sections) {
+ const section = sections[key]
+ const label = `sections.${key}`
+ section.forEach((part) => {
+ if (Array.isArray(part)) {
+ toLint = { ...toLint, ...{ [label]: section.join('\n') } }
+ } else {
+ for (const prop in section) {
+ toLint = { ...toLint, ...{ [`${label}.${prop}`]: section[prop] } }
+ }
+ }
+ })
+ }
+
+ for (const key in toLint) {
+ if (!toLint[key]) continue
+ expect(() => renderContent.liquid.parse(toLint[key]), `${key} contains invalid liquid`)
+ .not
+ .toThrow()
+ }
+ })
+ }
+ )
+})
+
describe('lint learning tracks', () => {
if (learningTracksToLint.length < 1) return
describe.each(learningTracksToLint)(
diff --git a/tests/routing/enterprise-release-notes.js b/tests/routing/release-notes.js
similarity index 80%
rename from tests/routing/enterprise-release-notes.js
rename to tests/routing/release-notes.js
index 6a8f6c26b3fc..bbf08d1e2aad 100644
--- a/tests/routing/enterprise-release-notes.js
+++ b/tests/routing/release-notes.js
@@ -1,6 +1,6 @@
const { get } = require('../helpers/supertest')
-describe('enterprise release notes', () => {
+describe('release notes', () => {
jest.setTimeout(60 * 1000)
beforeAll(async () => {
@@ -16,9 +16,13 @@ describe('enterprise release notes', () => {
expect(res.headers.location).toBe('https://enterprise.github.com/releases/2.19.0/notes')
})
- // We can't write this test until we have real release notes
it('renders the release-notes layout if this version\'s release notes are in this repo', async () => {
const res = await get('/en/enterprise-server@2.22/admin/release-notes')
expect(res.statusCode).toBe(200)
})
+
+ it('renders the release-notes layout for GitHub AE', async () => {
+ const res = await get('/en/github-ae@latest/admin/release-notes')
+ expect(res.statusCode).toBe(200)
+ })
})