Merge branch 'main' into rai-content-linter-rule
This commit is contained in:
@@ -7,8 +7,11 @@ name: Move new issues to correct docs repo
|
||||
on:
|
||||
issues:
|
||||
types:
|
||||
# Note, if an issue is transferred from github/some-other-repo
|
||||
# over to github/docs-internal, this will trigger both 'transferred'
|
||||
# *and* 'opened' events. And 'opened' covers the most basic case
|
||||
# of an issue being created here in this repo.
|
||||
- opened
|
||||
- transferred
|
||||
- reopened
|
||||
|
||||
permissions:
|
||||
|
||||
4
.github/workflows/orphaned-assets-check.yml
vendored
4
.github/workflows/orphaned-assets-check.yml
vendored
@@ -41,7 +41,9 @@ jobs:
|
||||
run: |
|
||||
set -e
|
||||
|
||||
filesToRemove=`npm run find-orphaned-assets`
|
||||
# The `-s` is to make npm run silent and not print verbose
|
||||
# information about the npm script alias.
|
||||
filesToRemove=`npm run -s find-orphaned-assets`
|
||||
[ -z "$filesToRemove" ] && exit 0
|
||||
|
||||
echo $filesToRemove | xargs git rm
|
||||
|
||||
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
@@ -71,7 +71,6 @@ jobs:
|
||||
- release-notes
|
||||
- rest
|
||||
- search
|
||||
- secret-scanning
|
||||
- shielding
|
||||
# - tests
|
||||
# - tools
|
||||
|
||||
BIN
assets/images/help/billing/cancel-pending-changes-org.png
Normal file
BIN
assets/images/help/billing/cancel-pending-changes-org.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 49 KiB |
@@ -4,6 +4,7 @@ shortTitle: Required workflows
|
||||
intro: You can specify which workflows will run as required status checks in all repositories or selected repositories in your organization.
|
||||
versions:
|
||||
feature: required-workflows
|
||||
permissions: Because this feature is being deprecated, this article is only relevant if you are already using required workflows for {% data variables.product.prodname_actions %}.
|
||||
type: how_to
|
||||
topics:
|
||||
- Workflows
|
||||
|
||||
@@ -174,6 +174,7 @@ Network settings are excluded from the backup snapshot. After restoration, you m
|
||||
|
||||
1. Ensure maintenance mode is enabled on the primary instance and all active processes have completed. For more information, see "[AUTOTITLE](/admin/configuration/configuring-your-enterprise/enabling-and-scheduling-maintenance-mode)."
|
||||
1. Stop replication on all replica nodes in a high-availability configuration. For more information, see "[AUTOTITLE](/admin/enterprise-management/configuring-high-availability/about-high-availability-configuration#ghe-repl-stop)."
|
||||
1. Provision a new {% data variables.product.product_name %} instance to use as a target for the restoration of your backup. For more information, see "[AUTOTITLE](/admin/installation/setting-up-a-github-enterprise-server-instance)."
|
||||
1. If {% data variables.location.product_location %} has {% data variables.product.prodname_actions %} enabled, you must configure the external storage provider for {% data variables.product.prodname_actions %} on the replacement instance. For more information, see "[AUTOTITLE](/admin/github-actions/advanced-configuration-and-troubleshooting/backing-up-and-restoring-github-enterprise-server-with-github-actions-enabled)."
|
||||
|
||||
### Starting the restore operation
|
||||
|
||||
@@ -212,6 +212,8 @@ To use the script, fill in the placeholder environment variable values with the
|
||||
|
||||
- Run the following script in the same directory where you saved the `actions-nsg-deployment.bicep` file.
|
||||
- When setting the `YOUR_AZURE_LOCATION` environment variable, use your region’s name. This value is different than your region’s display name. To see a list of names and display names, use `az account list-locations -o table`.
|
||||
- When you create the network settings resource, a service association link is applied to the subnet that you provide. This link prevents accidental deletion of the subnet while in use by the {% data variables.product.prodname_actions %} service.
|
||||
- To delete the subnet, the service association link needs to be removed first. The service association link is safely removed when the network settings resource is deleted. You can delete the network settings resource only when it is not in use by a network configuration in your {% data variables.product.company_short %} settings.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
@@ -222,7 +224,7 @@ To use the script, fill in the placeholder environment variable values with the
|
||||
# - Resource group
|
||||
# - Network Security Group rules
|
||||
# - Virtual network (vnet) and subnet
|
||||
# - Network Settings with specified subnet and GitHub Enterprise databse ID
|
||||
# - Network Settings with specified subnet and GitHub Enterprise database ID
|
||||
#
|
||||
# It also registers the `GitHub.Network` resource provider with the subscription,
|
||||
# delegates the created subnet to the Actions service via the `GitHub.Network/NetworkSettings`
|
||||
|
||||
@@ -34,5 +34,6 @@ You can enable the `same-origin` referrer policy to instruct modern browsers to
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
1. Under {% octicon "gear" aria-hidden="true" %} **Settings**, click **Authentication security**.
|
||||
1. Under "User Agent Referrer Policy", select **Enable same origin referrer policy for all organizations**.
|
||||
1. Click **Save**.
|
||||
|
||||
@@ -114,6 +114,8 @@ When this option is selected, the certificate is validated to make sure:
|
||||
|
||||
You can establish role-based access control for users from your LDAP server by synchronizing {% data variables.product.prodname_ghe_server %} users and team membership against your established LDAP groups. For more information, see "[AUTOTITLE](/organizations/organizing-members-into-teams/creating-a-team#creating-teams-with-ldap-sync-enabled)."
|
||||
|
||||
LDAP sync does not create user accounts on {% data variables.location.product_location %}. For more information, see "[Viewing and creating LDAP users](#viewing-and-creating-ldap-users)."
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Using LDAP Synchronization with groups that exceed 1499 members may lead to team membership synchronization failures.
|
||||
@@ -124,7 +126,7 @@ If you need help determining if modifying the `MaxValRange` is the right approac
|
||||
|
||||
{% endnote %}
|
||||
|
||||
To enable LDAP Sync, in your LDAP settings, select **Synchronize Emails**, **Synchronize SSH Keys**, or **Synchronize GPG Keys** .
|
||||
To enable LDAP Sync, in your LDAP settings, select **Synchronize Emails**, **Synchronize SSH Keys**, or **Synchronize GPG Keys**.
|
||||
|
||||
After you enable LDAP sync, a synchronization job will run at the specified time interval to perform the following operations on each user account:
|
||||
|
||||
@@ -188,6 +190,8 @@ If disclosing such information is not desired, your company or organization shou
|
||||
|
||||
## Viewing and creating LDAP users
|
||||
|
||||
When you use LDAP, your instance creates a user account the first time someone successfully signs in using LDAP credentials. Alternatively, you can manually provision a user account.
|
||||
|
||||
You can view the full list of LDAP users who have access to your instance and provision new users.
|
||||
|
||||
{% data reusables.enterprise_site_admin_settings.sign-in %}
|
||||
|
||||
@@ -8,6 +8,7 @@ redirect_from:
|
||||
- /admin/user-management/managing-dormant-users
|
||||
- /admin/user-management/managing-users-in-your-enterprise/managing-dormant-users
|
||||
intro: '{% data reusables.enterprise-accounts.dormant-user-activity-threshold %}'
|
||||
permissions: "{% ifversion ghec or ghae %}Enterprise owners can manage dormant users for an enterprise.{% elsif ghes %}Site administrators can manage dormant users on a {% data variables.product.product_name %} instance.{% endif %}"
|
||||
versions:
|
||||
ghec: '*'
|
||||
ghes: '*'
|
||||
@@ -37,12 +38,14 @@ You can customize the dormancy threshold for {% data variables.location.product_
|
||||
|
||||
Dormancy applies to both enterprise members and outside collaborators.
|
||||
|
||||
{% ifversion ghes %}
|
||||
|
||||
## Viewing dormant users
|
||||
|
||||
{% data reusables.enterprise-accounts.viewing-dormant-users %}
|
||||
|
||||
{% data reusables.enterprise_site_admin_settings.access-settings %}
|
||||
1. In the left sidebar, click **Dormant users**.{% ifversion ghes %}
|
||||
1. In the left sidebar, click **Dormant users**.
|
||||
1. To suspend all the dormant users in this list, at the top of the page, click **Suspend all**.
|
||||
|
||||
## Determining whether a user account is dormant
|
||||
@@ -62,6 +65,7 @@ Dormancy applies to both enterprise members and outside collaborators.
|
||||
{% data reusables.enterprise-accounts.policies-tab %}
|
||||
{% data reusables.enterprise-accounts.options-tab %}
|
||||
1. Under "Dormancy threshold", select the dropdown menu, and click the desired dormancy threshold.
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% ifversion ghec %}
|
||||
|
||||
@@ -245,6 +245,12 @@ To set up streaming to Google Cloud Storage, you must create a service account i
|
||||
|
||||
To stream audit logs to Splunk's HTTP Event Collector (HEC) endpoint you must make sure that the endpoint is configured to accept HTTPS connections. For more information, see [Set up and use HTTP Event Collector in Splunk Web](https://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector) in the Splunk documentation.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data variables.product.prodname_dotcom %} validates the HEC endpoint via `<Domain>:port/services/collector`. If self-hosting the HEC endpoint (such as with [Splunk HEC Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/splunkhecreceiver) via OpenTelemetry), ensure the endpoint is reachable at this destination.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% ifversion ghec %}
|
||||
To get a list of IP address ranges that {% data variables.product.prodname_dotcom %} uses for connections to the HEC endpoint, you can use the REST API. The `meta` endpoint for {% data variables.product.product_name %} includes a `hooks` key with a list of the IP addresses. For more information, see "[Meta](/rest/meta/meta#get-github-enterprise-cloud-meta-information)" in the REST API documentation.
|
||||
{% endif %}
|
||||
|
||||
@@ -126,3 +126,52 @@ print(f"JWT: {encoded_jwt}")
|
||||
```
|
||||
|
||||
This script will prompt you for the file path where your private key is stored and for the ID of your app. Alternatively, you can pass those values as inline arguments when you execute the script.
|
||||
|
||||
### Example: Using Bash to generate a JWT
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** You must pass your App ID and the file path where your private key is stored as arguments when running this script.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
```bash copy
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o pipefail
|
||||
|
||||
app_id=$1 # App ID as first argument
|
||||
pem=$( cat $2 ) # file path of the private key as second argument
|
||||
|
||||
now=$(date +%s)
|
||||
iat=$((${now} - 60)) # Issues 60 seconds in the past
|
||||
exp=$((${now} + 600)) # Expires 10 minutes in the future
|
||||
|
||||
b64enc() { openssl base64 | tr -d '=' | tr '/+' '_-' | tr -d '\n'; }
|
||||
|
||||
header_json='{
|
||||
"typ":"JWT",
|
||||
"alg":"RS256"
|
||||
}'
|
||||
# Header encode
|
||||
header=$( echo -n "${header_json}" | b64enc )
|
||||
|
||||
payload_json='{
|
||||
"iat":'"${iat}"',
|
||||
"exp":'"${exp}"',
|
||||
"iss":'"${app_id}"'
|
||||
}'
|
||||
# Payload encode
|
||||
payload=$( echo -n "${payload_json}" | b64enc )
|
||||
|
||||
# Signature
|
||||
header_payload="${header}"."${payload}"
|
||||
signature=$(
|
||||
openssl dgst -sha256 -sign <(echo -n "${pem}") \
|
||||
<(echo -n "${header_payload}") | b64enc
|
||||
)
|
||||
|
||||
# Create JWT
|
||||
JWT="${header_payload}"."${signature}"
|
||||
printf '%s\n' "JWT: $JWT"
|
||||
```
|
||||
|
||||
@@ -32,6 +32,6 @@ See these pages for details on how to authenticate when using the {% data variab
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** [Rate limits for the REST API](/rest/overview/rate-limits-for-the-rest-api) apply to all {% data variables.product.prodname_marketplace %} API endpoints.
|
||||
**Note:** [Rate limits for the REST API](/rest/using-the-rest-api/rate-limits-for-the-rest-api) apply to all {% data variables.product.prodname_marketplace %} API endpoints.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
@@ -108,11 +108,11 @@ If your enterprise does not use {% data variables.product.prodname_emus %}, you
|
||||
|
||||
### Accounts that consume a license on {% data variables.product.prodname_ghe_server %}
|
||||
|
||||
Each user account on {% data variables.product.prodname_ghe_server %} consumes a seat.
|
||||
After a user successfully authenticates to a {% data variables.product.prodname_ghe_server %} instance for the first time, the user consumes a seat.
|
||||
|
||||
Suspended users are not counted when calculating the number of licensed users consuming seats. For more information, see "[Suspending and unsuspending users]({% ifversion not ghes %}/enterprise-server@latest{% endif %}/admin/user-management/managing-users-in-your-enterprise/suspending-and-unsuspending-users){% ifversion not ghes %}" in the {% data variables.product.prodname_ghe_server %} documentation.{% else %}."{% endif %}
|
||||
|
||||
Dormant users do occupy a seat license. As such, you can choose to suspend dormant users to release user licenses. For more information, see "[Managing dormant users]({% ifversion not ghes %}/enterprise-server@latest{% endif %}/admin/user-management/managing-users-in-your-enterprise/managing-dormant-users){% ifversion not ghes %}" in the {% data variables.product.prodname_ghe_server %} documentation.{% else %}."{% endif %}
|
||||
Dormant users do occupy a seat license. Administrators can suspend dormant users to free licenses. For more information, see "[Managing dormant users]({% ifversion not ghes %}/enterprise-server@latest{% endif %}/admin/user-management/managing-users-in-your-enterprise/managing-dormant-users){% ifversion not ghes %}" in the {% data variables.product.prodname_ghe_server %} documentation.{% else %}."{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ When you cancel a pending change, your plan will not change until your next bill
|
||||
|
||||
{% data reusables.organizations.billing-settings %}
|
||||
{% data reusables.dotcom_billing.review-pending-changes %}
|
||||
{% data reusables.dotcom_billing.cancel-pending-changes %}
|
||||
{% data reusables.dotcom_billing.cancel-pending-changes-org %}
|
||||
{% data reusables.dotcom_billing.confirm-cancel-pending-changes %}
|
||||
|
||||
## Further reading
|
||||
|
||||
@@ -20,6 +20,12 @@ shortTitle: Billing cycle
|
||||
---
|
||||
When you change your billing cycle's duration, your {% data variables.product.prodname_dotcom %} subscription, along with any other paid features and products, will be moved to your new billing cycle on your next billing date.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Certain products, such as {% data variables.product.prodname_copilot_for_business %}, {% data variables.product.prodname_actions %}, or {% data variables.product.prodname_registry %}, only offer monthly billing.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## Changing the duration of your personal account's billing cycle
|
||||
|
||||
{% data reusables.user-settings.access_settings %}
|
||||
|
||||
@@ -66,7 +66,7 @@ Through the "Code security and analysis" page of your organization's settings, y
|
||||
1. Click **Settings** next to your organization.
|
||||
1. Click **Code security & analysis**.
|
||||
1. Click **Enable all** next to "{% data variables.product.prodname_code_scanning_caps %}".{% ifversion bulk-code-scanning-query-suite%}
|
||||
1. In the "Query suites" section of the "Enable {% data variables.product.prodname_code_scanning %} default setup" dialog box displayed, select the query suite your configuration of default setup will run. For more information, see "[AUTOTITLE](/code-security/code-scanning/managing-your-code-scanning-configuration/built-in-codeql-query-suites)."
|
||||
1. In the "Query suites" section of the "Enable {% data variables.product.prodname_code_scanning %} default setup" dialog box displayed, select the query suite your configuration of default setup will run. For more information, see "[AUTOTITLE](/code-security/code-scanning/managing-your-code-scanning-configuration/codeql-query-suites)."
|
||||
1. To enable your configuration of default setup, click **Enable for eligible repositories**.
|
||||
1. Optionally, to recommend the "Extended" query suite throughout your organization when enabling default setup, select "Recommend the extended query suite for repositories enabling default setup."{% else %}
|
||||
1. In the "Enable {% data variables.product.prodname_code_scanning %} for eligible repositories" dialog box displayed, click **Enable for eligible repositories** to enable your configuration of default setup.{% endif %}
|
||||
@@ -119,7 +119,7 @@ You can select all of the displayed repositories, or a subset of them, and enabl
|
||||
1. In the list of repositories, select each repository you want to enable {% data variables.product.prodname_code_scanning %} for. To select all repositories on the page, click the checkbox next to **NUMBER Active**. To select all repositories that match the current search, click the checkbox next to **NUMBER Active** and then click **Select all NUMBER repos**.
|
||||
1. Click **Security settings** next to **NUMBER selected**.
|
||||
1. In the side panel, in the "{% data variables.product.prodname_codeql %} Default Setup" section, select **No change**, then click **Enable**.{% ifversion bulk-code-scanning-query-suite %}
|
||||
1. Optionally, to choose a different query suite than your organization's default query suite, select **Query suite: SUITE NAME**, then click the query suite your configuration of default setup should use. For more information, see "[AUTOTITLE](/code-security/code-scanning/managing-your-code-scanning-configuration/built-in-codeql-query-suites)."{% endif %}
|
||||
1. Optionally, to choose a different query suite than your organization's default query suite, select **Query suite: SUITE NAME**, then click the query suite your configuration of default setup should use. For more information, see "[AUTOTITLE](/code-security/code-scanning/managing-your-code-scanning-configuration/codeql-query-suites)."{% endif %}
|
||||
1. To confirm the enablement of {% data variables.product.prodname_code_scanning %} for the selected repositories, click **Apply changes NUMBER**. Alternatively, to select or deselect more repositories for {% data variables.product.prodname_code_scanning %} enablement, click {% octicon "x" aria-label="Close" %} to close the panel without applying your changes.
|
||||
|
||||
{% note %}
|
||||
|
||||
@@ -38,10 +38,6 @@ Default setup for {% data variables.product.prodname_code_scanning %} is the qui
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
|
||||
You can enable the automatically selected configuration of default setup to start scanning your code as soon as possible, or you can customize aspects of the configuration to better meet your {% data variables.product.prodname_code_scanning %} needs. If you choose to customize the configuration yourself, you can select:{% ifversion code-scanning-without-workflow-310 %}
|
||||
- the languages default setup will analyze.{% endif %}
|
||||
- the query suite default setup will run. For more information, see "[AUTOTITLE](/code-security/code-scanning/managing-your-code-scanning-configuration/built-in-codeql-query-suites)."
|
||||
|
||||
{% ifversion org-enable-code-scanning %}You can also enable default setup for multiple or all repositories in an organization at the same time. For information on bulk enablement, see "[AUTOTITLE](/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning-at-scale)."{% endif %}
|
||||
|
||||
If you need more granular control over your {% data variables.product.prodname_code_scanning %} configuration, you should instead configure advanced setup. For more information, see "[AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning)."
|
||||
@@ -64,6 +60,10 @@ Enterprise owners, organization and repository administrators can add self-hoste
|
||||
|
||||
You can use default setup if your repository includes languages that aren't supported by {% data variables.product.prodname_codeql %}, such as R. For more information on {% data variables.product.prodname_codeql %}-supported languages, see "[AUTOTITLE](/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql#about-codeql)."
|
||||
|
||||
### Customizing default setup
|
||||
|
||||
We recommend that you start using {% data variables.product.prodname_code_scanning %} with default setup. After you've initially configured default setup, you can evaluate {% data variables.product.prodname_code_scanning %} to see how it's working for you. If you find that something isn't working as you expect, you can customize default setup to better meet your code security needs. For more information, see "[AUTOTITLE](/code-security/code-scanning/enabling-code-scanning/evaluating-default-setup-for-code-scanning)."
|
||||
|
||||
{% ifversion code-scanning-default-setup-recommended-languages and code-scanning-without-workflow-310 %}
|
||||
|
||||
### About adding {% ifversion code-scanning-default-setup-automatic-311 %}non-compiled and {% endif %}compiled languages to your default setup
|
||||
@@ -122,7 +122,7 @@ When you initially configure default setup for {% data variables.product.prodnam
|
||||
|
||||

|
||||
|
||||
If you choose the **Extended** query suite, your {% data variables.product.prodname_code_scanning %} configuration will run lower severity and precision queries in addition to the queries included in the **Default** query suite. For more information on the available query suites, see "[AUTOTITLE](/code-security/code-scanning/managing-your-code-scanning-configuration/built-in-codeql-query-suites)."
|
||||
If you choose the **Extended** query suite, your {% data variables.product.prodname_code_scanning %} configuration will run lower severity and precision queries in addition to the queries included in the **Default** query suite. For more information on the available query suites, see "[AUTOTITLE](/code-security/code-scanning/managing-your-code-scanning-configuration/codeql-query-suites)."
|
||||
|
||||
{% note %}
|
||||
|
||||
@@ -143,7 +143,9 @@ When you initially configure default setup for {% data variables.product.prodnam
|
||||
|
||||
## Next steps
|
||||
|
||||
After you configure default setup for {% data variables.product.prodname_code_scanning %}, and your configuration runs successfully at least once, you can start examining and resolving {% data variables.product.prodname_code_scanning %} alerts. For more information on {% data variables.product.prodname_code_scanning %} alerts, see "[AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts)" and "[AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/managing-code-scanning-alerts-for-your-repository)."
|
||||
After your configuration runs successfully at least once, you can start examining and resolving {% data variables.product.prodname_code_scanning %} alerts. For more information on {% data variables.product.prodname_code_scanning %} alerts, see "[AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/about-code-scanning-alerts)" and "[AUTOTITLE](/code-security/code-scanning/managing-code-scanning-alerts/managing-code-scanning-alerts-for-your-repository)."
|
||||
|
||||
After you've configured default setup for {% data variables.product.prodname_code_scanning %}, you can read about evaluating how it's working for you and the next steps you can take to customize it. For more information, see "[AUTOTITLE](/code-security/code-scanning/enabling-code-scanning/evaluating-default-setup-for-code-scanning)."
|
||||
|
||||
You can find detailed information about your {% data variables.product.prodname_code_scanning %} configuration, including timestamps for each scan and the percentage of files scanned, on the tool status page. For more information, see "[AUTOTITLE](/code-security/code-scanning/managing-your-code-scanning-configuration/about-the-tool-status-page)."
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: Evaluating default setup for code scanning
|
||||
shortTitle: Evaluate code scanning
|
||||
intro: 'Learn how to assess how code scanning is working for you, and how you can customize your setup to best meet your code security needs.'
|
||||
product: '{% data reusables.gated-features.code-scanning %}'
|
||||
type: how_to
|
||||
topics:
|
||||
- Advanced Security
|
||||
- Code scanning
|
||||
versions:
|
||||
feature: code-scanning-without-workflow
|
||||
---
|
||||
|
||||
## About evaluating a new {% data variables.product.prodname_code_scanning %} configuration
|
||||
|
||||
When you first start using {% data variables.product.prodname_code_scanning %}, you'll likely use default setup. This guide describes how to evaluate how default setup for {% data variables.product.prodname_code_scanning %} is working for you, and what steps to take if something isn't working as you expect. This guide also describes how you can customize {% data variables.product.prodname_code_scanning %} if you find that you have a specific use case that your new configuration doesn't fit.
|
||||
|
||||
## Customizing {% data variables.product.prodname_code_scanning %}
|
||||
|
||||
When you first configure default setup, or after an initial analysis of your code, you can edit{% ifversion code-scanning-without-workflow-310 %} which languages default setup will analyze and{% endif %} the query suite run during analysis. The `default` query suite contains a set of queries that are carefully designed to look for the most relevant security issues, while minimizing false positive results. However, you can use the `security-extended` suite to run additional queries, which have slightly lower precision. For more information on the available query suites, see "[AUTOTITLE](/code-security/code-scanning/managing-your-code-scanning-configuration/codeql-query-suites)."
|
||||
|
||||
For more information about customizing default setup, see "[AUTOTITLE](/code-security/code-scanning/managing-your-code-scanning-configuration/editing-your-configuration-of-default-setup)."
|
||||
|
||||
### Using advanced setup
|
||||
|
||||
If you've found that you still need more granular control over {% data variables.product.prodname_code_scanning %}, you can use advanced setup. Advanced setup requires significantly more effort to configure, customize, and maintain, so we recommend enabling default setup first. For more information about advanced setup, see "[AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning)" and "[AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning)."
|
||||
|
||||
## Evaluating {% data variables.product.prodname_code_scanning %} with the {% data variables.code-scanning.tool_status_page %}
|
||||
|
||||
The {% data variables.code-scanning.tool_status_page %} shows useful information about all of your {% data variables.product.prodname_code_scanning %} tools. You can use it to investigate whether individual tools are working for a repository, when files in the repository were first scanned and most recently scanned, and when upcoming scans are scheduled. It's also a useful starting point for debugging issues.
|
||||
|
||||
Using the {% data variables.code-scanning.tool_status_page %}, you can download the list of rules that {% data variables.product.prodname_code_scanning %} is checking against, in CSV format. For integrated tools like {% data variables.product.prodname_codeql %}, you can also see more detailed information, including a percentage of files scanned and specific error messages.
|
||||
|
||||
If you find that default setup doesn't scan all your files, you may need to customize {% data variables.product.prodname_code_scanning %}. For more information, see "[Customizing code scanning](#customizing-code-scanning)" in this article. Alternatively, or if something else isn't working as you expect, you may find our dedicated troubleshooting documentation useful. For more information, see "[AUTOTITLE](/code-security/code-scanning/troubleshooting-code-scanning)".
|
||||
|
||||
For more detailed information about the {% data variables.code-scanning.tool_status_page %}, see "[AUTOTITLE](/code-security/code-scanning/managing-your-code-scanning-configuration/about-the-tool-status-page#viewing-the-tool-status-page-for-a-repository)."
|
||||
@@ -11,5 +11,6 @@ topics:
|
||||
- CodeQL
|
||||
children:
|
||||
- /configuring-default-setup-for-code-scanning
|
||||
- /evaluating-default-setup-for-code-scanning
|
||||
- /configuring-default-setup-for-code-scanning-at-scale
|
||||
---
|
||||
|
||||
@@ -36,6 +36,7 @@ To monitor results from {% data variables.product.prodname_code_scanning %} acro
|
||||
|
||||
{% ifversion code-scanning-without-workflow %}
|
||||
To get started with {% data variables.product.prodname_code_scanning %}, see "[AUTOTITLE](/code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning)."
|
||||
|
||||
{% else %}
|
||||
To get started with {% data variables.product.prodname_code_scanning %}, see "[AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/configuring-advanced-setup-for-code-scanning)."
|
||||
{% endif %}
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
---
|
||||
title: Built-in CodeQL query suites
|
||||
shortTitle: Built-in CodeQL query suites
|
||||
title: CodeQL query suites
|
||||
shortTitle: CodeQL query suites
|
||||
intro: 'You can choose from different built-in {% data variables.product.prodname_codeql %} query suites to use in your {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %} setup.'
|
||||
product: '{% data reusables.gated-features.code-scanning %}'
|
||||
versions:
|
||||
feature: code-scanning-without-workflow
|
||||
redirect_from:
|
||||
- /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/built-in-codeql-query-suites
|
||||
- /code-security/code-scanning/managing-your-code-scanning-configuration/built-in-codeql-query-suites
|
||||
type: reference
|
||||
topics:
|
||||
- Code scanning
|
||||
@@ -15,7 +15,7 @@ topics:
|
||||
|
||||
After running an initial analysis of your code with default setup, you may need to make changes to your configuration to better meet your code security needs. For existing configurations of default setup, you can edit{% ifversion code-scanning-without-workflow-310 %}:
|
||||
- Which languages default setup will analyze.
|
||||
- {% endif %} The query suite run during analysis. For more information on the available query suites, see "[AUTOTITLE](/code-security/code-scanning/managing-your-code-scanning-configuration/built-in-codeql-query-suites)."
|
||||
- {% endif %} The query suite run during analysis. For more information on the available query suites, see "[AUTOTITLE](/code-security/code-scanning/managing-your-code-scanning-configuration/codeql-query-suites)."
|
||||
|
||||
{% ifversion codeql-model-packs-java %}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ topics:
|
||||
children:
|
||||
- /about-the-tool-status-page
|
||||
- /editing-your-configuration-of-default-setup
|
||||
- /built-in-codeql-query-suites
|
||||
- /codeql-query-suites
|
||||
- /viewing-code-scanning-logs
|
||||
- /c-cpp-built-in-queries
|
||||
- /csharp-built-in-queries
|
||||
|
||||
@@ -366,6 +366,15 @@ You can also manage pull requests for grouped version updates using comment comm
|
||||
|
||||
Dependencies can be ignored either by adding them to `ignore` or by using the `@dependabot ignore` command on a pull request opened by {% data variables.product.prodname_dependabot %}.
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning**:
|
||||
- We recommend you do _not_ use `ignore` to prevent {% data variables.product.prodname_dependabot %} from accessing private registries. This may work for some ecosystems but we have no means of knowing whether package managers require access to all dependencies to be able to successfully perform updates, which makes this method unreliable. The supported way to handle private dependencies is to give {% data variables.product.prodname_dependabot %} access to private registries or private repositories. For more information, see "[AUTOTITLE](/code-security/dependabot/working-with-dependabot/configuring-access-to-private-registries-for-dependabot)."
|
||||
|
||||
- For {% data variables.product.prodname_actions %} and Docker, you may use `ignore` to prevent {% data variables.product.prodname_dependabot %} from accessing private registries.
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
#### Creating `ignore` conditions from `@dependabot ignore`
|
||||
|
||||
Dependencies ignored by using the `@dependabot ignore` command are stored centrally for each package manager. If you start ignoring dependencies in the `dependabot.yml` file, these existing preferences are considered alongside the `ignore` dependencies in the configuration.
|
||||
|
||||
@@ -26,12 +26,9 @@ topics:
|
||||
|
||||
If your project communicates with an external service, you might use a token or private key for authentication. Tokens and private keys are examples of secrets that a service provider can issue. If you check a secret into a repository, anyone who has read access to the repository can use the secret to access the external service with your privileges. We recommend that you store secrets in a dedicated, secure location outside of the repository for your project.
|
||||
|
||||
{% data variables.product.prodname_secret_scanning_caps %} will scan your entire Git history on all branches present in your {% data variables.product.prodname_dotcom %} repository for secrets{% ifversion ghec or ghes or ghae %}, even if the repository is archived{% endif %}. {% ifversion secret-scanning-issue-body-comments %}{% data reusables.secret-scanning.scan-issue-description-and-comments %}{% else %}{% data variables.product.prodname_secret_scanning_caps %} does not scan issues.{% endif %}
|
||||
{% data variables.product.prodname_secret_scanning_caps %} will scan your entire Git history on all branches present in your {% data variables.product.prodname_dotcom %} repository for secrets{% ifversion ghec or ghes or ghae %}, even if the repository is archived{% endif %}.{% ifversion ghes < 3.11 %} {% data variables.product.prodname_secret_scanning_caps %} does not scan issues.{% endif %}
|
||||
|
||||
{% ifversion secret-scanning-backfills-historical-issues %}
|
||||
Additionally, {% data variables.product.prodname_secret_scanning %} scans the titles, descriptions, and comments, in open and closed historical issues, and reports leaked secrets as alerts on {% data variables.product.prodname_dotcom %}{% ifversion ghec %}. A notification is sent to the relevant partner when a historical partner pattern is detected{% endif %}.
|
||||
|
||||
{% endif %}
|
||||
{% data reusables.secret-scanning.what-is-scanned %}
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
{% data variables.product.prodname_secret_scanning_caps %} is available on {% data variables.product.prodname_dotcom_the_website %} in two forms:
|
||||
@@ -42,7 +39,7 @@ Additionally, {% data variables.product.prodname_secret_scanning %} scans the ti
|
||||
{% ifversion fpt %}The following users can enable and configure additional scanning:
|
||||
- Owners of repositories on {% data variables.product.prodname_dotcom_the_website %}, on any _public_ repositories they own.
|
||||
- Organizations owning _public_ repositories, on any of these repositories.
|
||||
- Organizations using {% data variables.product.prodname_ghe_cloud %}, on any public repositories (for free), and on any private and internal repositories, when you have a license for {% data variables.product.prodname_GH_advanced_security %}.{% elsif ghec %}You can enable and configure additional scanning for repositories owned by organizations that use {% data variables.product.prodname_ghe_cloud %} for any public repositories (for free), and for private and internal repositorites when you have a license for {% data variables.product.prodname_GH_advanced_security %}.{% endif %}
|
||||
- Organizations using {% data variables.product.prodname_ghe_cloud %}, on any public repositories (for free), and on any private and internal repositories, when you have a license for {% data variables.product.prodname_GH_advanced_security %}.{% elsif ghec %}You can enable and configure additional scanning for repositories owned by organizations that use {% data variables.product.prodname_ghe_cloud %} for any public repositories (for free), and for private and internal repositories when you have a license for {% data variables.product.prodname_GH_advanced_security %}.{% endif %}
|
||||
|
||||
Any strings that match patterns provided by secret scanning partners, by other service providers, or defined by you or your organization, are reported as alerts in the **Security** tab of repositories. If a string in a public repository matches a partner pattern, it is also reported to the partner. For more information, see the "[About {% data variables.secret-scanning.user_alerts %}](#about-secret-scanning-alerts-for-users)" section below.{% endif %}
|
||||
|
||||
@@ -70,7 +67,7 @@ Additionally, {% data variables.product.prodname_secret_scanning %} scans the ti
|
||||
|
||||
## About {% data variables.secret-scanning.partner_alerts %}
|
||||
|
||||
When you make a repository public, or push changes to a public repository, {% data variables.product.product_name %} always scans the code for secrets that match partner patterns. Public packages on the npm registry are also scanned. {% ifversion secret-scanning-issue-body-comments %}{% data reusables.secret-scanning.scan-issue-description-and-comments %}{% endif %} If {% data variables.product.prodname_secret_scanning %} detects a potential secret, we notify the service provider who issued the secret. The service provider validates the string and then decides whether they should revoke the secret, issue a new secret, or contact you directly. Their action will depend on the associated risks to you or them. For more information, see "[AUTOTITLE](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets)."
|
||||
When you make a repository public, or push changes to a public repository, {% data variables.product.product_name %} always scans the code for secrets that match partner patterns. Public packages on the npm registry are also scanned. If {% data variables.product.prodname_secret_scanning %} detects a potential secret, we notify the service provider who issued the secret. The service provider validates the string and then decides whether they should revoke the secret, issue a new secret, or contact you directly. Their action will depend on the associated risks to you or them. For more information, see "[AUTOTITLE](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets)."
|
||||
|
||||
You cannot change the configuration of {% data variables.product.prodname_secret_scanning %} for partner patterns on public repositories.
|
||||
|
||||
@@ -78,9 +75,9 @@ You cannot change the configuration of {% data variables.product.prodname_secret
|
||||
|
||||
## About {% data variables.secret-scanning.user_alerts %}{% ifversion ghes or ghae %} on {% data variables.product.product_name %}{% endif %}
|
||||
|
||||
{% ifversion ghes or ghae %}{% data variables.secret-scanning.user_alerts_caps %} is available on all organization-owned repositories as part of {% data variables.product.prodname_GH_advanced_security %}. The feature is not available on user-owned repositories.{% endif %}{% ifversion fpt or ghec %}{% data variables.secret-scanning.user_alerts_caps %} are available for free on all public repositories{% endif %}{% ifversion fpt %}.{% endif %}{%ifversion ghec %}, and for private and internal repositories that are owned by organizations using {% data variables.product.prodname_ghe_cloud %} with a license for {% data variables.product.prodname_GH_advanced_security %}.{% endif %} When you enable {% data variables.product.prodname_secret_scanning %} for a repository, {% data variables.product.prodname_dotcom %} scans the code for patterns that match secrets used by many service providers. {% ifversion secret-scanning-backfill-email %}When the scan is completed, {% data variables.product.prodname_dotcom %} sends an email alert to the enterprise and organization owners, even if no secrets were found.{% endif %}
|
||||
{% ifversion ghes or ghae %}{% data variables.secret-scanning.user_alerts_caps %} is available on all organization-owned repositories as part of {% data variables.product.prodname_GH_advanced_security %}. The feature is not available on user-owned repositories.{% endif %}{% ifversion fpt or ghec %}{% data variables.secret-scanning.user_alerts_caps %} are available for free on all public repositories{% endif %}{% ifversion fpt %}.{% endif %}{%ifversion ghec %}, and for private and internal repositories that are owned by organizations using {% data variables.product.prodname_ghe_cloud %} with a license for {% data variables.product.prodname_GH_advanced_security %}.{% endif %} When you enable {% data variables.product.prodname_secret_scanning %} for a repository, {% data variables.product.prodname_dotcom %} scans the code for patterns that match secrets used by many service providers. {% ifversion secret-scanning-backfill-email %}When the scan is completed, {% data variables.product.prodname_dotcom %} sends an email alert to the enterprise and organization owners, even if no secrets were found.{% endif %} For more information about the repository content that is scanned, see "[About {% data variables.product.prodname_secret_scanning %}](#about--data-variablesproductprodname_secret_scanning)" above.
|
||||
|
||||
{% ifversion secret-scanning-issue-body-comments %}{% data reusables.secret-scanning.scan-issue-description-and-comments %}{% endif %} When a supported secret is leaked, {% data variables.product.product_name %} generates a {% data variables.product.prodname_secret_scanning %} alert. {% ifversion secret-scanning-backfills %}{% data variables.product.prodname_dotcom %} will also periodically run a full git history scan of existing content in {% ifversion fpt %}public{% else %}{% data variables.product.prodname_GH_advanced_security %}{% endif %} repositories where {% data variables.product.prodname_secret_scanning %} is enabled, and send alert notifications following the {% data variables.product.prodname_secret_scanning %} alert notification settings.{% endif %}{% ifversion secret-scanning-non-provider-patterns %} User alerts can be of two types: high confidence alerts, or non-provider alerts.{% endif %} For more information, see "{% ifversion fpt or ghec %}[About user alerts](/code-security/secret-scanning/secret-scanning-patterns#about-user--alerts){% else %}[{% data variables.product.prodname_secret_scanning_caps %} patterns](/code-security/secret-scanning/secret-scanning-patterns#about-user-secret-scanning-alerts){% endif %}."
|
||||
When a supported secret is leaked, {% data variables.product.product_name %} generates a {% data variables.product.prodname_secret_scanning %} alert. {% ifversion secret-scanning-backfills %}{% data variables.product.prodname_dotcom %} will also periodically run a full git history scan of existing content in {% ifversion fpt %}public{% else %}{% data variables.product.prodname_GH_advanced_security %}{% endif %} repositories where {% data variables.product.prodname_secret_scanning %} is enabled, and send alert notifications following the {% data variables.product.prodname_secret_scanning %} alert notification settings.{% endif %}{% ifversion secret-scanning-non-provider-patterns %} User alerts can be of two types: high confidence alerts, or non-provider alerts.{% endif %} For more information, see "{% ifversion fpt or ghec %}[About user alerts](/code-security/secret-scanning/secret-scanning-patterns#about-user--alerts){% else %}[{% data variables.product.prodname_secret_scanning_caps %} patterns](/code-security/secret-scanning/secret-scanning-patterns#about-user-secret-scanning-alerts){% endif %}."
|
||||
|
||||
If you're a repository administrator, you can enable {% data variables.secret-scanning.user_alerts %} for any {% ifversion fpt %}public{% endif %} repository{% ifversion ghec or ghes or ghae %}, including archived repositories{% endif %}. Organization owners can also enable {% data variables.secret-scanning.user_alerts %} for all {% ifversion fpt %}public {% endif %}repositories or for all new {% ifversion fpt %}public {% endif %}repositories within an organization. For more information, see "[AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository)" and "[AUTOTITLE](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization)."
|
||||
|
||||
@@ -91,12 +88,12 @@ You can also define custom {% data variables.product.prodname_secret_scanning %}
|
||||
|
||||
### Accessing {% data variables.secret-scanning.alerts %}
|
||||
|
||||
When you enable {% data variables.product.prodname_secret_scanning %} for a repository or push commits to a repository with {% data variables.product.prodname_secret_scanning %} enabled, {% data variables.product.prodname_dotcom %} scans the contents for secrets that match patterns defined by service providers{% ifversion ghes or ghae or ghec %} and any custom patterns defined in your enterprise, organization, or repository{% endif %}. {% ifversion secret-scanning-issue-body-comments %}{% data reusables.secret-scanning.scan-issue-description-and-comments %}{% endif %} {% ifversion secret-scanning-backfills %}{% data variables.product.prodname_dotcom %} also runs a scan of all historical code content in {% ifversion fpt %}public {% endif %}repositories with {% data variables.product.prodname_secret_scanning %} enabled when a new partner pattern {% ifversion not fpt %}or custom pattern{% endif %} is added or updated.{% endif%}
|
||||
When you enable {% data variables.product.prodname_secret_scanning %} for a repository or push commits to a repository with {% data variables.product.prodname_secret_scanning %} enabled, {% data variables.product.prodname_dotcom %} scans the contents for secrets that match patterns defined by service providers{% ifversion ghes or ghae or ghec %} and any custom patterns defined in your enterprise, organization, or repository{% endif %}.
|
||||
|
||||
If {% data variables.product.prodname_secret_scanning %} detects a secret in a commit,{% ifversion secret-scanning-issue-body-comments %} issue description, or comment,{% endif %} {% data variables.product.prodname_dotcom %} generates an alert.
|
||||
When {% data variables.product.prodname_secret_scanning %} detects a secret, {% data variables.product.prodname_dotcom %} generates an alert.
|
||||
|
||||
- {% data variables.product.prodname_dotcom %} sends an email alert to the repository administrators and organization owners. You'll receive an alert if you are watching the repository{% ifversion secret-scanning-notification-settings %}, {% else %}, and {% endif %}if you have enabled notifications either for security alerts or for all the activity on the repository{% ifversion secret-scanning-notification-settings %}, and if, in your notification settings, you have selected to receive email notifications for the repositories that you are watching.{% else %}.{% endif %}
|
||||
- If the person who introduced the secret in the commit{% ifversion secret-scanning-issue-body-comments %}, issue description, or comment{% endif %} isn't ignoring the repository, {% data variables.product.prodname_dotcom %} will also send them an email alert. The emails contains a link to the related {% data variables.product.prodname_secret_scanning %} alert. The person who introduced the secret can then view the alert in the repository, and resolve the alert.
|
||||
- If the person who introduced the secret isn't ignoring the repository, {% data variables.product.prodname_dotcom %} will also send them an email alert. The emails contains a link to the related {% data variables.product.prodname_secret_scanning %} alert. The person who introduced the secret can then view the alert in the repository, and resolve the alert.
|
||||
- {% data variables.product.prodname_dotcom %} displays an alert in the **Security** tab of the repository.
|
||||
|
||||
For more information about viewing and resolving {% data variables.secret-scanning.alerts %}, see "[AUTOTITLE](/code-security/secret-scanning/managing-alerts-from-secret-scanning)."
|
||||
|
||||
@@ -25,9 +25,7 @@ shortTitle: Configure secret scans
|
||||
|
||||
## Enabling {% data variables.secret-scanning.user_alerts %}
|
||||
|
||||
You can enable {% data variables.secret-scanning.user_alerts %} for any {% ifversion fpt %}free public{% endif %} repository{% ifversion ghec or ghes or ghae %} that is owned by an organization{% else %} that you own{% endif %}. Once enabled, {% data reusables.secret-scanning.secret-scanning-process %} {% ifversion secret-scanning-issue-body-comments %}{% data reusables.secret-scanning.scan-issue-description-and-comments %}
|
||||
|
||||
{% endif %}
|
||||
You can enable {% data variables.secret-scanning.user_alerts %} for any {% ifversion fpt %}free public{% endif %} repository{% ifversion ghec or ghes or ghae %} that is owned by an organization{% else %} that you own{% endif %}. Once enabled, {% data reusables.secret-scanning.secret-scanning-process %}{% ifversion ghes < 3.11 %} {% data variables.product.prodname_secret_scanning_caps %} does not scan issues.{% endif %} {% data reusables.secret-scanning.what-is-scanned %}
|
||||
|
||||
You can also enable {% data variables.product.prodname_secret_scanning %} for multiple repositories in an organization at the same time. For more information, see "[AUTOTITLE](/code-security/getting-started/securing-your-organization)."
|
||||
|
||||
|
||||
@@ -47,7 +47,8 @@ shortTitle: Manage secret alerts
|
||||
{% data reusables.secret-scanning.validity-check-partner-patterns-beta %}
|
||||
|
||||
{% data reusables.secret-scanning.validity-check-partner-patterns-enabled %}
|
||||
{% endif %}
|
||||
{% endif %}{% ifversion secret-scanning-bypass-filter %}
|
||||
1. Optionally, to see which alerts are the result of a user bypassing push protection, select the "Bypassed" dropdown menu, then click **True**.{% endif %}
|
||||
1. Under "{% data variables.product.prodname_secret_scanning_caps %}", click the alert you want to view.{% ifversion secret-scanning-non-provider-patterns %}
|
||||
{% note %}
|
||||
|
||||
|
||||
@@ -28,12 +28,12 @@ If a contributor bypasses a push protection block for a secret, {% data variable
|
||||
- adds the bypass event to the audit log.{% ifversion secret-scanning-push-protection-email %}
|
||||
- sends an email alert to organization or personal account owners, security managers, and repository administrators who are watching the repository, with a link to the secret and the reason why it was allowed.{% endif %}
|
||||
|
||||
{% ifversion ghec or fpt %}
|
||||
{% note %}
|
||||
{% data reusables.secret-scanning.bypass-reasons-and-alerts %}
|
||||
|
||||
**Note:** The github.dev web-based editor doesn't support push protection. For more information about the editor, see "[AUTOTITLE](/codespaces/the-githubdev-web-based-editor)."
|
||||
{% ifversion secret-scanning-bypass-filter %}
|
||||
|
||||
On the {% data variables.product.prodname_secret_scanning %} alerts page for a repository or organization, you can apply the `bypassed:true` filter to easily see which alerts are the result of a user bypassing push protection.
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
|
||||
You can monitor security alerts to discover when users are bypassing push protections and creating alerts. For more information, see "[AUTOTITLE](/code-security/getting-started/auditing-security-alerts)."
|
||||
@@ -42,10 +42,16 @@ You can monitor security alerts to discover when users are bypassing push protec
|
||||
If you are an organization owner or security manager, you can view metrics on how push protection is performing across your organization. For more information, see "[AUTOTITLE](/code-security/security-overview/viewing-metrics-for-secret-scanning-push-protection-in-your-organization)."
|
||||
{% endif %}
|
||||
|
||||
{% data reusables.secret-scanning.bypass-reasons-and-alerts %}
|
||||
|
||||
For information on the secrets and service providers supported for push protection, see "[AUTOTITLE](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets)."
|
||||
|
||||
{% ifversion ghec or fpt %}
|
||||
{% note %}
|
||||
|
||||
**Note:** The github.dev web-based editor doesn't support push protection. For more information about the editor, see "[AUTOTITLE](/codespaces/the-githubdev-web-based-editor)."
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
|
||||
{% ifversion secret-scanning-push-protection-for-users %}
|
||||
|
||||
{% data reusables.secret-scanning.push-protection-for-users %}
|
||||
|
||||
@@ -129,24 +129,22 @@ At the team level, security overview displays repository-specific security infor
|
||||
|
||||
## Permission to view data in security overview
|
||||
|
||||
If you are an owner or security manager for an organization, you can see data for all the repositories in the organization in all views.{% ifversion security-overview-org-risk-coverage-enterprise %} You can see the data in the organization-level security overview, or see data for all organizations where you are an owner or security manager in the enterprise-level security overview.{% endif %}
|
||||
{% ifversion security-overview-org-risk-coverage-enterprise %}
|
||||
|
||||
{% ifversion ghec or ghes or ghae > 3.5 %}If you are an enterprise owner, you will need to join an organization as an organization owner to view data for the organization's repositories in either the organization-level or enterprise-level overview. For more information, see "[AUTOTITLE](/admin/user-management/managing-organizations-in-your-enterprise/managing-your-role-in-an-organization-owned-by-your-enterprise)."{% endif %}
|
||||
### Organization-level overview
|
||||
|
||||
If you are an organization member, you can view security overview for the organization and see data for repositories where you have access.{% ifversion security-overview-org-risk-coverage-enterprise %} You can view this data in the organization-level overview, but you cannot access the enterprise-level overview.{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% note %}
|
||||
If you are an owner or security manager for an organization, you can see data for all the repositories in the organization in all views.
|
||||
|
||||
**Note:** To ensure a consistent and responsive experience, for organization members, the organization-level security overview pages will only display results from the most recently updated 3,000 repositories. If your results have been restricted, a notification will appear at the top of the page. Organization owners and security managers will see results from all repositories.
|
||||
|
||||
{% endnote %}
|
||||
If you are an organization member, you can view security overview for the organization and see data for repositories where you have access.
|
||||
|
||||
{% ifversion security-overview-dashboard %}
|
||||
{% rowheaders %}
|
||||
|
||||
| Organization member with | Overview dashboard (beta) view | Risk and alerts views | Coverage view |
|
||||
|--------------------|-------------|---------------------|---------|
|
||||
| `admin` access for one or more repositories | View data for those repositories | View data for those repositories | View data for those repositories |
|
||||
| `admin` access for one or more repositories | View data for those repositories | View data for those repositories | View data for those repositories, and enable and disable security features |
|
||||
| `write` access for one or more repositories | View {% data variables.product.prodname_code_scanning %} and {% data variables.product.prodname_dependabot %} data for those repositories | View {% data variables.product.prodname_code_scanning %} and {% data variables.product.prodname_dependabot %} data for those repositories | No access for those repositories |
|
||||
| Security alert access for one or more repositories | View all security alert data for those repositories | View all security alert data for those repositories | No access for those repositories
|
||||
| Custom organization role with permission to view one or more types of security alert | View allowed alert data for all repositories | View allowed alert data for all repositories in all views | No access |
|
||||
@@ -157,7 +155,7 @@ If you are an organization member, you can view security overview for the organi
|
||||
|
||||
| Organization member with | Risk and alerts views | Coverage view |
|
||||
|--------------------|-------------|---------------------|
|
||||
| `admin` access for one or more repositories | View data for those repositories | View data for those repositories |
|
||||
| `admin` access for one or more repositories | View data for those repositories | View data for those repositories, and enable and disable security features |
|
||||
| `write` access for one or more repositories | View {% data variables.product.prodname_code_scanning %} and {% data variables.product.prodname_dependabot %} data for those repositories | No access for those repositories |
|
||||
| Security alert access for one or more repositories | View all security alert data for those repositories | No access for those repositories
|
||||
| Custom organization role with permission to view one or more types of security alert | View allowed alert data for all repositories in all views | No access |
|
||||
@@ -165,10 +163,31 @@ If you are an organization member, you can view security overview for the organi
|
||||
{% endrowheaders %}
|
||||
{% endif %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** To ensure a consistent and responsive experience, for organization members, the organization-level security overview pages will only display results from the most recently updated 3,000 repositories. If your results have been restricted, a notification will appear at the top of the page. Organization owners and security managers will see results from all repositories.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
For more information about access to security alerts and related views, see "[AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)" and "[AUTOTITLE](/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/about-custom-repository-roles#security)."
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% ifversion security-overview-org-risk-coverage-enterprise %}
|
||||
|
||||
### Enterprise-level overview
|
||||
|
||||
{% ifversion ghec or ghes or ghae > 3.5 %}
|
||||
{% note %}
|
||||
|
||||
**Note:** If you are an enterprise owner, you will need to join an organization as an organization owner to view data for the organization's repositories in both the organization-level and enterprise-level overview. For more information, see "[AUTOTITLE](/admin/user-management/managing-organizations-in-your-enterprise/managing-your-role-in-an-organization-owned-by-your-enterprise)."
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
|
||||
In the enterprise-level security overview, you can see data for all organizations where you are an organization owner or security manager. However, you cannot use the enterprise-level security overview to enable and disable security features. For more information, see "[AUTOTITLE](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)."
|
||||
{% endif %}
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[AUTOTITLE](/code-security/getting-started/securing-your-repository)"
|
||||
|
||||
@@ -87,7 +87,7 @@ Style your CTAs using the following format.
|
||||
Keep lines in code samples to about 60 characters, to avoid requiring readers to scroll horizontally in the code block. Locate explanatory text before the code block, rather than using comments inside the code block. See "[AUTOTITLE](/contributing/syntax-and-versioning-for-github-docs/using-markdown-and-liquid-in-github-docs#code-sample-syntax-highlighting)" for more information on the syntax and formatting of code blocks.
|
||||
|
||||
Within code blocks:
|
||||
- Specify the language of the sample after the first code fence. For a list of all supported languages, see "[Code languages](https://github.com/github/docs/blob/main/data/variables/code-languages.yml)" in the `github/docs` repository.
|
||||
- Specify the language of the sample after the first code fence. For a list of all supported languages, see "[Code languages](https://github.com/github/docs/blob/main/data/code-languages.yml)" in the `github/docs` repository.
|
||||
- Do not use HTML to style or markup a code block.
|
||||
- Style any placeholders that people need to replace with their own values in all caps.
|
||||
- **Use:** `git checkout -b BRANCH-NAME`
|
||||
@@ -217,6 +217,14 @@ Use italics to emphasize words or parts of a sentence. Use emphasis sparingly fo
|
||||
- **Use:** _For types of packages other than containers_, to the right of the package version click **Delete**.
|
||||
- **Avoid:** Next to _**Title**_, add a descriptive label for your new key.
|
||||
|
||||
## Error messages
|
||||
|
||||
When you include the text of an error message from a {% data variables.product.company_short %} product or interface in an article, format the text according to the interface where the message appears.
|
||||
|
||||
- If the message appears in {% data variables.product.prodname_dotcom %}'s web interface, or in a graphical client app like {% data variables.product.prodname_desktop %} or {% data variables.product.prodname_mobile %}, treat the message like other text in the UI. For more information, see "[User interface text](#user-interface-text)."
|
||||
|
||||
- If the message appears in a command-line interface, log output, or a response from an API, reproduce the text exactly and use backticks to format the message using a monospaced font.
|
||||
|
||||
## Footnotes
|
||||
|
||||
Avoid using footnotes where possible. Consider instead whether you could use a [callout](#callouts) or present the information in another way. See some [examples of alternatives to footnotes from NICE.org.uk](https://www.nice.org.uk/corporate/ecd6/chapter/footnotes).
|
||||
@@ -841,6 +849,7 @@ A release note for a bug fix answers the following questions.
|
||||
- Language like "fixed a bug..." or "fixed an issue..." is implied and unnecessary.
|
||||
- To reduce repetition and unnecessary words, "now" is usually implied.
|
||||
- To clarify actors and impact, avoid passive language when possible.
|
||||
- If the release note includes an error message, format the message according to the guidance in "[Error messages](#error-messages)."
|
||||
|
||||
#### Examples of release notes for bug fixes
|
||||
|
||||
@@ -896,6 +905,7 @@ A release note for a known issue answers the following questions.
|
||||
|
||||
- To clarify actors and impact, avoid passive language when possible.
|
||||
- To reduce repetition and unnecessary words, "now" is usually implied.
|
||||
- If the release note includes an error message, format the message according to the guidance in "[Error messages](#error-messages)."
|
||||
- If useful, include relevant links to GitHub Docs.
|
||||
- Known issues are also a type of content on GitHub Docs. For more information, see "[AUTOTITLE](/contributing/style-guide-and-content-model/troubleshooting-content-type#known-issues)." If useful, write or link to more in-depth and contextually relevant content in the docs.
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ For information on when to use callout tags, see "[AUTOTITLE](/contributing/styl
|
||||
|
||||
## Code sample syntax highlighting
|
||||
|
||||
To render syntax highlighting in command line instructions and code samples, we use triple backticks followed by the language of the sample. For a list of all supported languages, see [`code-languages.yml`](https://github.com/github/docs/blob/main/data/variables/code-languages.yml).
|
||||
To render syntax highlighting in command line instructions and code samples, we use triple backticks followed by the language of the sample. For a list of all supported languages, see [`code-languages.yml`](https://github.com/github/docs/blob/main/data/code-languages.yml).
|
||||
|
||||
### Example usage of code syntax highlighting
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ On {% data variables.product.prodname_dotcom_the_website %}, you can use {% data
|
||||
The following limitations apply to this beta release of {% data variables.product.prodname_copilot_chat_dotcom %}:
|
||||
|
||||
- {% data reusables.copilot.chat-limited-docset-availability %}
|
||||
- Chat responses may be suboptimal if you ask questions about a specific repository that you've selected as a context, and the repository has not been indexed for semantic code search. Owners of organizations {% ifversion ghec %}or enterprises {% endif %} can index up to {% data variables.copilot.max-chat-indexed-repos %} repositories for each organization.
|
||||
- Chat responses may be suboptimal if you ask questions about a specific repository that you've selected as a context, and the repository has not been indexed for semantic code search. Anyone who gets access to {% data variables.product.prodname_copilot_short %} from the organization that owns a repository can index that repository. Up to {% data variables.copilot.max-chat-indexed-repos %} repositories can be indexed for each organization.
|
||||
- The quality of the results from {% data variables.product.prodname_copilot_chat_short %} may, in some situations, be degraded if very large files, or a large number of files, are used as a context for a question.
|
||||
|
||||
## Prerequisites
|
||||
@@ -92,7 +92,7 @@ You can choose a specific context, such as a particular repository or a document
|
||||
|
||||
{% data variables.product.prodname_copilot_short %}'s ability to answer natural language questions like these in a repository context is improved when the repository has been indexed for semantic code search. The indexing status of the repository is displayed when you start a conversation that has a repository context.
|
||||
|
||||
If you are an organization owner{% ifversion ghec %}, or an enterprise owner,{% endif %} and the repository has not been indexed, an **Index this repository** button is displayed. Click this button to start the indexing process. You can index up to {% data variables.copilot.max-chat-indexed-repos %} repositories in an organization.
|
||||
If you get access to {% data variables.product.prodname_copilot_short %} from the organization that owns the repository, and the repository has not been indexed, an **Index this repository** button is displayed. Click this button to start the indexing process. Up to {% data variables.copilot.max-chat-indexed-repos %} repositories can be indexed for each organization.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -17,6 +17,12 @@ shortTitle: Enabling Copilot in the CLI
|
||||
|
||||
The {% data variables.product.prodname_copilot_cli %} public beta is available to all organizations{% ifversion ghec %} and enterprises{% endif %} that have an active {% data variables.product.prodname_copilot_for_business %} license. You can enable or disable {% data variables.product.prodname_copilot_cli_short %} for your organization{% ifversion ghec %} or enterprise{% endif %} in the {% data variables.product.prodname_copilot_short %} settings.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** To use {% data variables.product.prodname_copilot_cli %}, after it has been enabled, users must install the {% data variables.product.prodname_copilot_cli %} extension, see "[AUTOTITLE](/copilot/github-copilot-in-the-cli/using-github-copilot-in-the-cli)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## Enabling or disabling {% data variables.product.prodname_copilot_cli_short %} at the organization level
|
||||
|
||||
An organization owner can enable or disable {% data variables.product.prodname_copilot_cli_short %} for the organization. {% ifversion ghec %}You may not be able to configure this setting for your organization, if an enterprise owner has set a policy at the enterprise level.{% endif %}
|
||||
|
||||
@@ -23,7 +23,7 @@ topics:
|
||||
|
||||
## Prerequisites
|
||||
|
||||
To follow {% data variables.product.prodname_dotcom %} flow, you will need a {% data variables.product.prodname_dotcom %} account and a repository. {% ifversion fpt or ghec %}For information on how to create an account, see "[AUTOTITLE](/get-started/quickstart/creating-an-account-on-github)."{% elsif ghes or ghae %}For more information, contact your site administrator.{% endif %} For information on how to create a repository, see "[AUTOTITLE](/get-started/quickstart/create-a-repo)."{% ifversion fpt or ghec %} For information on how to find an existing repository to contribute to, see "[AUTOTITLE](/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github)."{% endif %}
|
||||
To follow {% data variables.product.prodname_dotcom %} flow, you will need a {% data variables.product.prodname_dotcom %} account and a repository. {% ifversion fpt or ghec %}For information on how to create an account, see "[AUTOTITLE](/get-started/quickstart/creating-an-account-on-github)."{% elsif ghes or ghae %}For more information, contact your site administrator.{% endif %} For information on how to create a repository, see "[AUTOTITLE](/repositories/creating-and-managing-repositories/quickstart-for-repositories)."{% ifversion fpt or ghec %} For information on how to find an existing repository to contribute to, see "[AUTOTITLE](/get-started/exploring-projects-on-github/finding-ways-to-contribute-to-open-source-on-github)."{% endif %}
|
||||
|
||||
## Following {% data variables.product.prodname_dotcom %} flow
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ children:
|
||||
- /creating-an-account-on-github
|
||||
- /hello-world
|
||||
- /set-up-git
|
||||
- /create-a-repo
|
||||
- /fork-a-repo
|
||||
- /github-flow
|
||||
- /contributing-to-projects
|
||||
|
||||
@@ -32,7 +32,7 @@ If you want to work with Git locally, but do not want to use the command line, y
|
||||
|
||||
If you do not need to work with files locally, {% data variables.product.product_name %} lets you complete many Git-related actions directly in the browser, including:
|
||||
|
||||
- [Creating a repository](/get-started/quickstart/create-a-repo)
|
||||
- [AUTOTITLE](/repositories/creating-and-managing-repositories/quickstart-for-repositories)
|
||||
- [Forking a repository](/get-started/quickstart/fork-a-repo)
|
||||
- [Managing files](/repositories/working-with-files/managing-files)
|
||||
- [Being social](/get-started/quickstart/be-social)
|
||||
|
||||
@@ -344,39 +344,32 @@ Footnotes are not supported in wikis.
|
||||
|
||||
## Alerts
|
||||
|
||||
Alerts are an extension of the blockquote syntax that you can use to emphasize critical information. On {% data variables.product.product_name %}, they are displayed with distinctive colors and icons to indicate the importance of the content. Alert syntax is supported in:
|
||||
- Issues
|
||||
- Pull requests
|
||||
- Markdown files
|
||||
- Discussions
|
||||
- Gists
|
||||
- Wikis
|
||||
- Releases
|
||||
Alerts are a Markdown extension based on the blockquote syntax that you can use to emphasize critical information. On {% data variables.product.product_name %}, they are displayed with distinctive colors and icons to indicate the significance of the content.
|
||||
|
||||
We recommend restricting the use of alerts to one or two per article to avoid overloading the reader. Consecutive alerts should be avoided.
|
||||
Use alerts only when they are crucial for user success and limit them to one or two per article to prevent overloading the reader. Additionally, you should avoid placing alerts consecutively. Alerts cannot be nested within other elements.
|
||||
|
||||
Multiple types of alerts are available. You can add an alert with a special blockquote line that specifies the alert type, and then add the alert information in a standard blockquote immediately after.
|
||||
To add an alert, use a special blockquote line specifying the alert type, followed by the alert information in a standard blockquote. Five types of alerts are available:
|
||||
|
||||
```markdown
|
||||
> [!NOTE]
|
||||
> Highlights information that users should take into account, even when skimming.
|
||||
> Useful information that users should know, even when skimming content.
|
||||
|
||||
> [!TIP]
|
||||
> Optional information to help a user be more successful.
|
||||
> Helpful advice for doing things better or more easily.
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Crucial information necessary for users to succeed.
|
||||
> Key information users need to know to achieve their goal.
|
||||
|
||||
> [!WARNING]
|
||||
> Critical content demanding immediate user attention due to potential risks.
|
||||
> Urgent info that needs immediate user attention to avoid problems.
|
||||
|
||||
> [!CAUTION]
|
||||
> Negative potential consequences of an action.
|
||||
> Advises about risks or negative outcomes of certain actions.
|
||||
```
|
||||
|
||||
Here are the rendered alerts.
|
||||
Here are the rendered alerts:
|
||||
|
||||

|
||||

|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ featuredLinks:
|
||||
- /pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
|
||||
- /issues/tracking-your-work-with-issues/creating-an-issue
|
||||
- /authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account
|
||||
- /get-started/quickstart/create-a-repo
|
||||
- /repositories/creating-and-managing-repositories/quickstart-for-repositories
|
||||
- /pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
|
||||
- /pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request
|
||||
- /get-started/quickstart/fork-a-repo
|
||||
|
||||
@@ -57,3 +57,5 @@ For other information, such as authentication and rate limit details, check out
|
||||
## Requesting support
|
||||
|
||||
{% data reusables.support.help_resources %}
|
||||
|
||||
If you observe unexpected failures, you can use [githubstatus.com](https://www.githubstatus.com/) or the [{% data variables.product.company_short %} status API](https://www.githubstatus.com/api) to check for incidents affecting the API.
|
||||
|
||||
@@ -17,6 +17,6 @@ In order for repository members to see a project listed in a repository, they mu
|
||||
1. On {% data variables.product.prodname_dotcom %}, navigate to the main page of your repository.
|
||||
1. Click {% octicon "table" aria-hidden="true" %} **Projects**.
|
||||

|
||||
1. Click **Link project**.
|
||||
1. Click **Link a project**.
|
||||
1. In the search bar that appears, search for projects that are owned by the same user or organization that owns the repository.
|
||||
1. Click on a project to list it in your repository.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Migrations documentation
|
||||
shortTitle: Migrations
|
||||
intro: "If you're moving to {% data variables.product.prodname_dotcom %} from another code hosting platform or moving between {% data variables.product.prodname_dotcom %} products, learn how to use our migration tooling to bring your work with you."
|
||||
intro: 'If you''re moving to {% data variables.product.prodname_dotcom %} from another code hosting platform or moving between {% data variables.product.prodname_dotcom %} products, learn how to use our migration tooling to bring your work with you.'
|
||||
introLinks:
|
||||
overview: /migrations/overview/about-githubs-migration-tooling
|
||||
plan_your_migration: /migrations/overview/planning-your-migration-to-github
|
||||
@@ -13,7 +13,7 @@ featuredLinks:
|
||||
popular:
|
||||
- /migrations/importing-source-code/using-github-importer/importing-a-repository-with-github-importer
|
||||
- /migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github
|
||||
- /migrations/using-github-enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-from-github-enterprise-server-to-github-enterprise-cloud
|
||||
- /migrations/using-github-enterprise-importer/migrating-between-github-products/migrating-repositories-from-github-enterprise-server-to-github-enterprise-cloud
|
||||
guideCards:
|
||||
- /migrations/using-github-enterprise-importer/preparing-to-migrate-with-github-enterprise-importer/managing-access-for-github-enterprise-importer
|
||||
- /migrations/using-github-enterprise-importer/completing-your-migration-with-github-enterprise-importer/reclaiming-mannequins-for-github-enterprise-importer
|
||||
@@ -36,3 +36,4 @@ children:
|
||||
- /using-github-enterprise-importer
|
||||
- /using-ghe-migrator
|
||||
---
|
||||
|
||||
|
||||
@@ -64,9 +64,9 @@ If you’re migrating from {% data variables.product.prodname_ghe_cloud %} or {%
|
||||
|
||||
{% endnote %}
|
||||
|
||||
If you’re migrating from Azure DevOps, we recommend the `inventory-report` command in the {% data variables.product.prodname_ado2gh_cli %}. The `inventory-report` command will connect with the Azure DevOps API, then build a simple CSV with some of the fields suggested above. For more information about how to install the {% data variables.product.prodname_ado2gh_cli %}, see "[AUTOTITLE]({% ifversion ghae %}/enterprise-cloud@latest{% endif %}/migrations/using-github-enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-from-azure-devops-to-github-enterprise-cloud)."
|
||||
If you’re migrating from Azure DevOps, we recommend the `inventory-report` command in the {% data variables.product.prodname_ado2gh_cli %}. The `inventory-report` command will connect with the Azure DevOps API, then build a simple CSV with some of the fields suggested above. For more information about how to install the {% data variables.product.prodname_ado2gh_cli %}, see "[AUTOTITLE]({% ifversion ghae %}/enterprise-cloud@latest{% endif %}/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/migrating-repositories-from-azure-devops-to-github-enterprise-cloud)."
|
||||
|
||||
If you’re migrating from Bitbucket Server or Bitbucket Data Center, we recommend the `inventory-report` command in the {% data variables.product.prodname_bbs2gh_cli %}. The `inventory-report` command will use your Bitbucket instance's API to build a simple CSV. For more information about how to install the {% data variables.product.prodname_bbs2gh_cli %}, see "[AUTOTITLE]({% ifversion ghae %}/enterprise-cloud@latest{% endif %}/migrations/using-github-enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud)."
|
||||
If you’re migrating from Bitbucket Server or Bitbucket Data Center, we recommend the `inventory-report` command in the {% data variables.product.prodname_bbs2gh_cli %}. The `inventory-report` command will use your Bitbucket instance's API to build a simple CSV. For more information about how to install the {% data variables.product.prodname_bbs2gh_cli %}, see "[AUTOTITLE]({% ifversion ghae %}/enterprise-cloud@latest{% endif %}/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud)."
|
||||
|
||||
For other migration origins, create your migration inventory yourself. You could build the spreadsheet using the origin’s reporting tools, if available, or API, or you could create the inventory manually.
|
||||
|
||||
|
||||
@@ -9,8 +9,9 @@ versions:
|
||||
children:
|
||||
- /understanding-github-enterprise-importer
|
||||
- /preparing-to-migrate-with-github-enterprise-importer
|
||||
- /migrating-organizations-with-github-enterprise-importer
|
||||
- /migrating-repositories-with-github-enterprise-importer
|
||||
- /migrating-from-azure-devops-to-github-enterprise-cloud
|
||||
- /migrating-from-bitbucket-server-to-github-enterprise-cloud
|
||||
- /migrating-between-github-products
|
||||
- /completing-your-migration-with-github-enterprise-importer
|
||||
redirect_from:
|
||||
- /early-access/github/migrating-with-github-enterprise-importer
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: Migrating between GitHub products
|
||||
shortTitle: Migrate between GitHub products
|
||||
intro: 'With {% data variables.product.prodname_importer_proper_name %}, you can migrate from {% data variables.product.prodname_ghe_server %} to {% data variables.product.prodname_ghe_cloud %}, or migrate between accounts on {% data variables.product.prodname_ghe_cloud %}.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghec: '*'
|
||||
children:
|
||||
- /overview-of-a-migration-between-github-products
|
||||
- /migrating-repositories-from-github-enterprise-server-to-github-enterprise-cloud
|
||||
- /migrating-repositories-from-githubcom-to-github-enterprise-cloud
|
||||
- /migrating-organizations-from-githubcom-to-github-enterprise-cloud
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Migrating organizations from GitHub.com to GitHub Enterprise Cloud
|
||||
shortTitle: GitHub.com to Enterprise Cloud
|
||||
shortTitle: Migrate organizations on GitHub.com
|
||||
intro: 'You can migrate organizations from {% data variables.product.prodname_dotcom_the_website %} to {% data variables.product.prodname_ghe_cloud %}, using the {% data variables.product.prodname_cli %} or the GraphQL API.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -9,6 +9,8 @@ versions:
|
||||
defaultTool: cli
|
||||
redirect_from:
|
||||
- /early-access/enterprise-importer/migrating-organizations-with-github-enterprise-importer/migrating-organizations-from-githubcom-to-github-enterprise-cloud
|
||||
- /migrations/using-github-enterprise-importer/migrating-organizations-with-github-enterprise-importer/migrating-organizations-from-githubcom-to-github-enterprise-cloud
|
||||
- /migrations/using-github-enterprise-importer/migrating-organizations-with-github-enterprise-importer
|
||||
---
|
||||
|
||||
## About organization migrations with {% data variables.product.prodname_importer_proper_name %}
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Migrating repositories from GitHub Enterprise Server to GitHub Enterprise Cloud
|
||||
shortTitle: Enterprise Server to Enterprise Cloud
|
||||
shortTitle: Migrate from Enterprise Server
|
||||
intro: 'You can migrate repositories from {% data variables.product.prodname_ghe_server %} to {% data variables.product.prodname_ghe_cloud %}, using the {% data variables.product.prodname_cli %} or API.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -10,6 +10,7 @@ defaultTool: cli
|
||||
redirect_from:
|
||||
- /early-access/enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-to-github-enterprise-cloud/migrating-repositories-from-github-enterprise-server-to-github-enterprise-cloud
|
||||
- /early-access/enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-from-github-enterprise-server-to-github-enterprise-cloud
|
||||
- /migrations/using-github-enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-from-github-enterprise-server-to-github-enterprise-cloud
|
||||
---
|
||||
|
||||
## About repository migrations with {% data variables.product.prodname_importer_proper_name %}
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Migrating repositories from GitHub.com to GitHub Enterprise Cloud
|
||||
shortTitle: GitHub.com to Enterprise Cloud
|
||||
shortTitle: Migrate repositories on GitHub.com
|
||||
intro: 'You can migrate repositories from {% data variables.product.prodname_dotcom_the_website %} to {% data variables.product.prodname_ghe_cloud %}, using the {% data variables.product.prodname_cli %} or the GraphQL API.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -10,6 +10,7 @@ defaultTool: cli
|
||||
redirect_from:
|
||||
- /early-access/enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-to-github-enterprise-cloud/migrating-repositories-from-githubcom-to-github-enterprise-cloud
|
||||
- /early-access/enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-from-githubcom-to-github-enterprise-cloud
|
||||
- /migrations/using-github-enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-from-githubcom-to-github-enterprise-cloud
|
||||
---
|
||||
|
||||
## About repository migrations with {% data variables.product.prodname_importer_proper_name %}
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Migrating between GitHub products with GitHub Enterprise Importer
|
||||
shortTitle: Migrate between GitHub products
|
||||
intro: 'Learn how to complete the entire process of migrating from one {% data variables.product.company_short %} product to another, from planning to implementation to completing follow-up tasks.'
|
||||
title: Overview of a migration between GitHub products
|
||||
shortTitle: Overview
|
||||
intro: 'Learn how to complete the entire process of migrating from one {% data variables.product.company_short %} product to another with {% data variables.product.prodname_importer_proper_name %}, from planning to implementation to completing follow-up tasks.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -9,6 +9,7 @@ versions:
|
||||
redirect_from:
|
||||
- /early-access/github/migrating-with-github-enterprise-importer/understanding-github-enterprise-importer/migrating-between-github-products-with-github-enterprise-importer
|
||||
- /early-access/enterprise-importer/understanding-github-enterprise-importer/migrating-between-github-products-with-github-enterprise-importer
|
||||
- /migrations/using-github-enterprise-importer/understanding-github-enterprise-importer/migrating-between-github-products-with-github-enterprise-importer
|
||||
---
|
||||
|
||||
## About migrations between {% data variables.product.company_short %} products
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: Migrating from Azure DevOps to GitHub Enterprise Cloud
|
||||
shortTitle: Migrate from Azure DevOps
|
||||
intro: 'You can migrate repositories to {% data variables.product.prodname_dotcom %} with {% data variables.product.prodname_importer_proper_name %}.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghec: '*'
|
||||
children:
|
||||
- /overview-of-a-migration-from-azure-devops-to-github-enterprise-cloud
|
||||
- /migrating-repositories-from-azure-devops-to-github-enterprise-cloud
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Migrating repositories from Azure DevOps to GitHub Enterprise Cloud
|
||||
shortTitle: ADO to Enterprise Cloud
|
||||
shortTitle: Migrate repositories
|
||||
intro: 'You can migrate repositories from Azure DevOps to {% data variables.product.prodname_ghe_cloud %}, using the {% data variables.product.prodname_cli %} or the GraphQL API.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -10,6 +10,7 @@ defaultTool: cli
|
||||
redirect_from:
|
||||
- /early-access/enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-to-github-enterprise-cloud/migrating-repositories-from-azure-devops-to-github-enterprise-cloud
|
||||
- /early-access/enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-from-azure-devops-to-github-enterprise-cloud
|
||||
- /migrations/using-github-enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-from-azure-devops-to-github-enterprise-cloud
|
||||
---
|
||||
|
||||
## About repository migrations with {% data variables.product.prodname_importer_proper_name %}
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Migrating from Azure DevOps with GitHub Enterprise Importer
|
||||
shortTitle: Migrate from Azure DevOps
|
||||
intro: 'Learn how to complete the entire process of migrating from Azure DevOps to {% data variables.product.prodname_dotcom %}, from planning to implementation to completing follow-up tasks.'
|
||||
title: Overview of a migration from Azure DevOps to GitHub Enterprise Cloud
|
||||
shortTitle: Overview
|
||||
intro: 'Learn how to complete the entire process of migrating from Azure DevOps to {% data variables.product.prodname_dotcom %} with {% data variables.product.prodname_importer_proper_name %}, from planning to implementation to completing follow-up tasks.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -9,6 +9,7 @@ versions:
|
||||
redirect_from:
|
||||
- /early-access/github/migrating-with-github-enterprise-importer/understanding-github-enterprise-importer/migrating-from-azure-devops-with-github-enterprise-importer
|
||||
- /early-access/enterprise-importer/understanding-github-enterprise-importer/migrating-from-azure-devops-with-github-enterprise-importer
|
||||
- /migrations/using-github-enterprise-importer/understanding-github-enterprise-importer/migrating-from-azure-devops-with-github-enterprise-importer
|
||||
---
|
||||
|
||||
## About migrations from Azure DevOps
|
||||
@@ -96,7 +97,7 @@ We recommend creating a test organization to use as a destination for your trial
|
||||
1. Create a test organization for your trial migrations.
|
||||
{% data reusables.enterprise-migration-tool.trial-migrations-tasks %}
|
||||
{% data reusables.enterprise-migration-tool.configure-destination-ip-allow-list %}
|
||||
1. Run your production migrations. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-from-azure-devops-to-github-enterprise-cloud)."
|
||||
1. Run your production migrations. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/migrating-repositories-from-azure-devops-to-github-enterprise-cloud)."
|
||||
{% data reusables.enterprise-migration-tool.delete-test-organization %}
|
||||
|
||||
## Completing follow-up tasks
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: Migrating from Bitbucket Server to GitHub Enterprise Cloud
|
||||
shortTitle: Migrate from Bitbucket Server
|
||||
intro: 'You can migrate repositories to {% data variables.product.prodname_dotcom %} with {% data variables.product.prodname_importer_proper_name %}.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghec: '*'
|
||||
children:
|
||||
- /overview-of-a-migration-from-bitbucket-server-to-github-enterprise-cloud
|
||||
- /migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Migrating repositories from Bitbucket Server to GitHub Enterprise Cloud
|
||||
shortTitle: Bitbucket Server to Enterprise Cloud
|
||||
shortTitle: Migrate repositories
|
||||
intro: 'You can migrate repositories from Bitbucket Server to {% data variables.product.prodname_ghe_cloud %} using the {% data variables.product.prodname_cli %}.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -9,6 +9,7 @@ versions:
|
||||
defaultTool: cli
|
||||
redirect_from:
|
||||
- /early-access/enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud
|
||||
- /migrations/using-github-enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud
|
||||
---
|
||||
|
||||
## About repository migrations with {% data variables.product.prodname_importer_proper_name %}
|
||||
@@ -1,13 +1,14 @@
|
||||
---
|
||||
title: Migrating from Bitbucket Server with GitHub Enterprise Importer
|
||||
shortTitle: Migrate from Bitbucket Server
|
||||
intro: 'Learn about the process of migrating from Bitbucket Server to {% data variables.product.prodname_dotcom %}, from planning to implementation to completing follow-up tasks.'
|
||||
title: Overview of a migration from Bitbucket Server to GitHub Enterprise Cloud
|
||||
shortTitle: Overview
|
||||
intro: 'Learn about the process of migrating from Bitbucket Server to {% data variables.product.prodname_dotcom %} with {% data variables.product.prodname_importer_proper_name %}, from planning to implementation to completing follow-up tasks.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghec: '*'
|
||||
redirect_from:
|
||||
- /early-access/enterprise-importer/understanding-github-enterprise-importer/migrating-from-bitbucket-server-with-github-enterprise-importer
|
||||
- /migrations/using-github-enterprise-importer/understanding-github-enterprise-importer/migrating-from-bitbucket-server-with-github-enterprise-importer
|
||||
---
|
||||
|
||||
## About migrations from Bitbucket Server
|
||||
@@ -89,7 +90,7 @@ We recommend creating a test organization to use as a destination for your trial
|
||||
1. Create a test organization for your trial migrations.
|
||||
{% data reusables.enterprise-migration-tool.trial-migrations-tasks %}
|
||||
{% data reusables.enterprise-migration-tool.configure-destination-ip-allow-list %}
|
||||
1. Run your production migrations. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud)."
|
||||
1. Run your production migrations. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud)."
|
||||
{% data reusables.enterprise-migration-tool.delete-test-organization %}
|
||||
|
||||
## Completing follow-up tasks
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
title: Migrating organizations with GitHub Enterprise Importer
|
||||
shortTitle: Migrate organizations
|
||||
intro: 'You can migrate organizations to {% data variables.product.prodname_dotcom %} with {% data variables.product.prodname_importer_proper_name %}.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghec: '*'
|
||||
children:
|
||||
- /migrating-organizations-from-githubcom-to-github-enterprise-cloud
|
||||
redirect_from:
|
||||
- /early-access/enterprise-importer/migrating-organizations-with-github-enterprise-importer
|
||||
---
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
title: Migrating repositories with GitHub Enterprise Importer
|
||||
shortTitle: Migrate repositories
|
||||
intro: 'You can migrate repositories to {% data variables.product.prodname_ghe_cloud %} with {% data variables.product.prodname_importer_proper_name %}.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghec: '*'
|
||||
children:
|
||||
- /migrating-repositories-from-azure-devops-to-github-enterprise-cloud
|
||||
- /migrating-repositories-from-bitbucket-server-to-github-enterprise-cloud
|
||||
- /migrating-repositories-from-githubcom-to-github-enterprise-cloud
|
||||
- /migrating-repositories-from-github-enterprise-server-to-github-enterprise-cloud
|
||||
redirect_from:
|
||||
- /early-access/github/migrating-with-github-enterprise-importer/running-a-migration-with-github-enterprise-importer
|
||||
- /early-access/github/migrating-with-github-enterprise-importer/migrating-to-github-enterprise-cloud-with-the-importer
|
||||
- /early-access/github/migrating-with-github-enterprise-importer/running-a-migration-with-github-enterprise-importer/running-a-migration-to-github-enterprise-cloud
|
||||
- /early-access/enterprise-importer/migrating-repositories-with-github-enterprise-importer/migrating-repositories-to-github-enterprise-cloud
|
||||
- /early-access/enterprise-importer/migrating-repositories-with-github-enterprise-importer
|
||||
---
|
||||
@@ -9,6 +9,7 @@ redirect_from:
|
||||
- /early-access/github/migrating-with-github-enterprise-importer/about-github-enterprise-importer
|
||||
- /early-access/github/migrating-with-github-enterprise-importer/understanding-github-enterprise-importer/about-github-enterprise-importer
|
||||
- /early-access/enterprise-importer/understanding-github-enterprise-importer/about-github-enterprise-importer
|
||||
- /migrations/using-github-enterprise-importer/migrating-repositories-with-github-enterprise-importer
|
||||
---
|
||||
|
||||
## About {% data variables.product.prodname_importer_proper_name %}
|
||||
@@ -36,6 +37,6 @@ For more information about which data is migrated for each source, see "[AUTOTIT
|
||||
|
||||
To get started with {% data variables.product.prodname_importer_proper_name %}, read the guide for your migration source. Each guide includes all the information you need to plan and implement a migration from that source, as well as follow-up tasks to complete after your migration.
|
||||
|
||||
- "[AUTOTITLE](/migrations/using-github-enterprise-importer/understanding-github-enterprise-importer/migrating-from-azure-devops-with-github-enterprise-importer)"
|
||||
- "[AUTOTITLE](/migrations/using-github-enterprise-importer/understanding-github-enterprise-importer/migrating-from-bitbucket-server-with-github-enterprise-importer)"
|
||||
- "[AUTOTITLE](/migrations/using-github-enterprise-importer/understanding-github-enterprise-importer/migrating-between-github-products-with-github-enterprise-importer)"
|
||||
- "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-azure-devops-to-github-enterprise-cloud/overview-of-a-migration-from-azure-devops-to-github-enterprise-cloud)"
|
||||
- "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-from-bitbucket-server-to-github-enterprise-cloud/overview-of-a-migration-from-bitbucket-server-to-github-enterprise-cloud)"
|
||||
- "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/overview-of-a-migration-between-github-products)"
|
||||
|
||||
@@ -9,10 +9,8 @@ versions:
|
||||
children:
|
||||
- /about-github-enterprise-importer
|
||||
- /migration-support-for-github-enterprise-importer
|
||||
- /migrating-between-github-products-with-github-enterprise-importer
|
||||
- /migrating-from-azure-devops-with-github-enterprise-importer
|
||||
- /migrating-from-bitbucket-server-with-github-enterprise-importer
|
||||
redirect_from:
|
||||
- /early-access/github/migrating-with-github-enterprise-importer/understanding-github-enterprise-importer
|
||||
- /early-access/enterprise-importer/understanding-github-enterprise-importer
|
||||
---
|
||||
|
||||
|
||||
@@ -64,12 +64,12 @@ When you migrate an organization, a new organization is created within the desti
|
||||
- Repositories
|
||||
- Team access to repositories
|
||||
- Member privileges
|
||||
- Organization-level webhooks (must be re-enabled after your migration, see "[Enabling webhooks](/migrations/using-github-enterprise-importer/understanding-github-enterprise-importer/migrating-between-github-products-with-github-enterprise-importer#enabling-webhooks)")
|
||||
- Organization-level webhooks (must be re-enabled after your migration, see "[Enabling webhooks](/migrations/using-github-enterprise-importer/migrating-between-github-products/overview-of-a-migration-between-github-products#enabling-webhooks)")
|
||||
- Default branch name for new repositories created in the organization
|
||||
|
||||
All repositories are migrated with private visibility. If you want to set a repository's visibility to public or internal, you can do this after the migration using the UI or API.
|
||||
|
||||
Team membership is **not** migrated. After the migration, you'll need to add members to migrated teams. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/understanding-github-enterprise-importer/migrating-between-github-products-with-github-enterprise-importer#recreating-teams)."
|
||||
Team membership is **not** migrated. After the migration, you'll need to add members to migrated teams. For more information, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/overview-of-a-migration-between-github-products#recreating-teams)."
|
||||
|
||||
{% note %}
|
||||
|
||||
@@ -87,7 +87,7 @@ When you migrate a repository, either directly or as part of an organization mig
|
||||
- Projects (classic) at the repository level
|
||||
- {% data variables.product.prodname_actions %} workflows
|
||||
- Commit comments
|
||||
- Active webhooks (must be re-enabled after your migration, see "[Enabling webhooks](/migrations/using-github-enterprise-importer/understanding-github-enterprise-importer/migrating-between-github-products-with-github-enterprise-importer#enabling-webhooks)")
|
||||
- Active webhooks (must be re-enabled after your migration, see "[Enabling webhooks](/migrations/using-github-enterprise-importer/migrating-between-github-products/overview-of-a-migration-between-github-products#enabling-webhooks)")
|
||||
- Repository topics
|
||||
- Repository settings
|
||||
- Branch protections (see "[Branch protections](#branch-protections)" for more details)
|
||||
@@ -175,6 +175,6 @@ There are limits to what {% data variables.product.prodname_importer_proper_name
|
||||
- **10 GB size limit for a Git repository:** This limit only applies to the source code. To inspect the size of your repository, use the [git-sizer](https://github.com/github/git-sizer) tool and check the total size of blobs.
|
||||
- **10 GB limit for metadata**: The {% data variables.product.prodname_importer_secondary_name %} cannot migrate repositories with more than 10 GB of metadata. Metadata includes issues, pull requests, releases, and attachments. In most cases, large metadata is caused by binary assets attached to releases. You can exclude releases from the migration with the `migrate-repo` command's `--skip-releases` flag, and then move your releases manually after the migration.
|
||||
- **{% data variables.large_files.product_name_short %} objects not migrated**: The {% data variables.product.prodname_importer_secondary_name %} can migrate repositories that use {% data variables.large_files.product_name_short %}, but the LFS objects themselves will not be migrated. They can be pushed to your migration destination as a follow-up task after the migration is complete. For more information, see "[AUTOTITLE](/repositories/creating-and-managing-repositories/duplicating-a-repository#mirroring-a-repository-that-contains-git-large-file-storage-objects)."
|
||||
- **Follow-up tasks required:** When migrating between {% data variables.product.prodname_dotcom %} products, certain settings are not migrated and must be reconfigured in the new repository. For a list of follow-up tasks you'll need to complete after each migration, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/understanding-github-enterprise-importer/migrating-between-github-products-with-github-enterprise-importer#completing-follow-up-tasks)."
|
||||
- **Follow-up tasks required:** When migrating between {% data variables.product.prodname_dotcom %} products, certain settings are not migrated and must be reconfigured in the new repository. For a list of follow-up tasks you'll need to complete after each migration, see "[AUTOTITLE](/migrations/using-github-enterprise-importer/migrating-between-github-products/overview-of-a-migration-between-github-products#completing-follow-up-tasks)."
|
||||
- **Delayed code search functionality:** Re-indexing the search index can take a few hours after a repository is migrated, and code searches may return unexpected results until re-indexing is complete.
|
||||
- **Rulesets configured for your organization can cause migrations to fail**: For example, if you configured a rule that requires email addresses for commit authors to end with `@monalisa.cat`, and the repository you're migrating contains commits that don't comply with this rule, your migration will fail. For more information about rulesets, see "[AUTOTITLE](/enterprise-cloud@latest/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets)."
|
||||
|
||||
@@ -44,6 +44,8 @@ If your organization requires two-factor authentication, all outside collaborato
|
||||
Outside collaborators cannot be added to an {% data variables.enterprise.prodname_emu_enterprise %}. However, you can grant limited access to users outside your enterprise using the guest collaborator role. For more information, see "[AUTOTITLE](/admin/managing-accounts-and-repositories/managing-users-in-your-enterprise/roles-in-an-enterprise#guest-collaborators)."
|
||||
{% endif %}
|
||||
|
||||
Outside collaborators cannot be added to a team, team membership is restricted to members of the organization.
|
||||
|
||||
## Adding outside collaborators to a repository
|
||||
|
||||
You can give outside collaborators access to a repository in your repository settings. For more information, see "[AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository#inviting-a-team-or-person)."
|
||||
|
||||
@@ -30,7 +30,13 @@ You can set up either or both of apex and `www` subdomain configurations for you
|
||||
|
||||
We recommend always using a `www` subdomain, even if you also use an apex domain. When you create a new site with an apex domain, we automatically attempt to secure the `www` subdomain for use when serving your site's content, but you need to make the DNS changes to use the `www` subdomain. If you configure a `www` subdomain, we automatically attempt to secure the associated apex domain. For more information, see "[AUTOTITLE](/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site)."
|
||||
|
||||
After you configure a custom domain for a user or organization site, the custom domain will replace the `<user>.github.io` or `<organization>.github.io` portion of the URL for any project sites owned by the account that are published publicly and do not have a custom domain configured. For example, if the custom domain for your user site is `www.octocat.com`, and you have a project site with no custom domain configured that is published from a repository called `octo-project`, the {% data variables.product.prodname_pages %} site for that repository will be available at `www.octocat.com/octo-project`.
|
||||
## Using a custom domain across multiple repositories
|
||||
|
||||
If you set a custom domain for a user or organization site, by default, the same custom domain will be used for all project sites owned by the same account. For more information about site types, see "[AUTOTITLE](/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites)."
|
||||
|
||||
For example, if the custom domain for your user site is `www.octocat.com`, and you have a project site with no custom domain configured that is published from a repository called `octo-project`, the {% data variables.product.prodname_pages %} site for that repository will be available at `www.octocat.com/octo-project`.
|
||||
|
||||
You can override the default custom domain by adding a custom domain to the individual repository.
|
||||
|
||||
{% note %}
|
||||
|
||||
@@ -38,7 +44,7 @@ After you configure a custom domain for a user or organization site, the custom
|
||||
|
||||
{% endnote %}
|
||||
|
||||
For more information about each type of site and handling custom domains, see "[AUTOTITLE](/pages/getting-started-with-github-pages/about-github-pages#types-of-github-pages-sites)."
|
||||
To remove the default custom domain, you must remove the custom domain from your user or organization site.
|
||||
|
||||
## Using a subdomain for your {% data variables.product.prodname_pages %} site
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ If you publish your site privately, the URL for your site will be different. For
|
||||
{% endif %}
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
For more information about how custom domains affect the URL for your site, see "[AUTOTITLE](/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages)."
|
||||
For more information about how custom domains affect the URL for your site, see "[AUTOTITLE](/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages#using-a-custom-domain-across-multiple-repositories)."
|
||||
{% endif %}
|
||||
|
||||
You can only create one user or organization site for each account on {% data variables.product.product_name %}. Project sites, whether owned by an organization or a personal account, are unlimited.
|
||||
@@ -124,7 +124,7 @@ In addition, your use of {% data variables.product.prodname_pages %} is subject
|
||||
|
||||
### Educational exercises
|
||||
|
||||
Using {% data variables.product.prodname_pages %} to create a copy of an existing website as a learning exercise is not prohibited. However, in addition to complying with the the [GitHub Terms of Service](/free-pro-team@latest/site-policy/github-terms/github-terms-of-service), you must write the code yourself, the site must not collect any user data, and you must include a prominent disclaimer on the site indicating that the project is not associated with the original and was only created for educational purposes.
|
||||
Using {% data variables.product.prodname_pages %} to create a copy of an existing website as a learning exercise is not prohibited. However, in addition to complying with the [GitHub Terms of Service](/free-pro-team@latest/site-policy/github-terms/github-terms-of-service), you must write the code yourself, the site must not collect any user data, and you must include a prominent disclaimer on the site indicating that the project is not associated with the original and was only created for educational purposes.
|
||||
|
||||
### Usage limits
|
||||
|
||||
|
||||
@@ -180,7 +180,8 @@ You can require that changes are successfully deployed to specific environments
|
||||
|
||||
### Lock branch
|
||||
|
||||
Locking a branch ensures that no commits can be made to the branch.
|
||||
Locking a branch will make the branch read-only and ensures that no commits can be made to the branch. Locked branches can also not be deleted.
|
||||
|
||||
By default, a forked repository does not support syncing from its upstream repository. You can enable **Allow fork syncing** to pull changes from the upstream repository while preventing other contributions to the fork's branch.
|
||||
{% endif %}
|
||||
|
||||
@@ -227,3 +228,9 @@ If a site administrator has blocked force pushes to the default branch only, you
|
||||
### Allow deletions
|
||||
|
||||
By default, you cannot delete a protected branch. When you enable deletion of a protected branch, anyone with at least write permissions to the repository can delete the branch.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If the branch is locked, you cannot delete the branch even if you have permission to delete it.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
@@ -50,6 +50,10 @@ You can require that changes are successfully deployed to specific environments
|
||||
|
||||
When you enable required commit signing on a branch, contributors {% ifversion fpt or ghec %}and bots{% endif %} can only push commits that have been signed and verified to the branch. For more information, see "[AUTOTITLE](/authentication/managing-commit-signature-verification/about-commit-signature-verification)."
|
||||
|
||||
Branch protection rules and rulesets behave differently when you create a branch: with rulesets, we check only the commits that aren't accessible from other branches, whereas with branch protection rules, we do not verify signed commits unless you restrict pushes that create matching branches. With both, when you update a branch, we still check all the commits in the specified range, even if a commit is reachable from other branches.
|
||||
|
||||
With both methods, we use the `verified_signature?` to confirm if a commit has a valid signature. If not, the update is not accepted.
|
||||
|
||||
{% note %}
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
@@ -24,7 +24,7 @@ topics:
|
||||
|
||||
A repository is the most basic element of {% data variables.product.prodname_dotcom %}. It's a place where you can store your code, your files, and each file's revision history. Repositories can have multiple collaborators and can be either public{% ifversion ghes or ghec %}, internal,{% endif %} or private.
|
||||
|
||||
To create a new repository, go to [https://github.com/new](https://github.com/new). For instructions, see "[AUTOTITLE](/get-started/quickstart/create-a-repo)."
|
||||
To create a new repository, go to [https://github.com/new](https://github.com/new). For instructions, see "[AUTOTITLE](/repositories/creating-and-managing-repositories/quickstart-for-repositories)."
|
||||
|
||||
## Repository terminology
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ topics:
|
||||
children:
|
||||
- /about-repositories
|
||||
- /best-practices-for-repositories
|
||||
- /quickstart-for-repositories
|
||||
- /repository-limits
|
||||
- /creating-a-new-repository
|
||||
- /creating-a-repository-from-a-template
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
---
|
||||
title: Create a repo
|
||||
title: Quickstart for repositories
|
||||
type: quick_start
|
||||
redirect_from:
|
||||
- /create-a-repo
|
||||
- /articles/create-a-repo
|
||||
- /github/getting-started-with-github/create-a-repo
|
||||
- /github/getting-started-with-github/quickstart/create-a-repo
|
||||
intro: 'To put your project up on {% data variables.product.prodname_dotcom %}, you will need to create a repository for it to live in.'
|
||||
- /get-started/quickstart/create-a-repo
|
||||
intro: 'Learn how to create a new repository and commit your first change in 5 minutes.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -19,28 +21,7 @@ topics:
|
||||
---
|
||||
## Create a repository
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
You can store a variety of projects in {% data variables.product.prodname_dotcom %} repositories, including open source projects. With open source projects, you can share code to make better, more reliable software. You can use repositories to collaborate with others and track your work. For more information, see "[AUTOTITLE](/repositories/creating-and-managing-repositories/about-repositories)." To learn more about open source projects, visit [OpenSource.org](https://opensource.org/about).
|
||||
|
||||
{% elsif ghes or ghae %}
|
||||
|
||||
You can store a variety of projects in {% data variables.product.product_name %} repositories, including innersource projects. With innersource, you can share code to make better, more reliable software. For more information on innersource, see {% data variables.product.company_short %}'s white paper "[An introduction to innersource](https://resources.github.com/whitepapers/introduction-to-innersource/)."
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes:**
|
||||
- You can create public repositories for an open source project. When creating your public repository, make sure to include a [license file](https://choosealicense.com/) that determines how you want your project to be shared with others. {% data reusables.open-source.open-source-guide-repositories %}
|
||||
- {% data reusables.open-source.open-source-learning %}
|
||||
- You can also add community health files to your repositories, to set guidelines on how to contribute, keep your repositories safe, and much more. For more information, see "[AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% endif %}
|
||||
{% data variables.product.product_name %} repositories store a variety of projects. In this guide, you'll create a repository and commit your first change.
|
||||
|
||||
{% webui %}
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Repositories documentation
|
||||
shortTitle: Repositories
|
||||
intro: Learn to use and manage the repositories that allow you to store and collaborate on your project's code.
|
||||
introLinks:
|
||||
quickstart: /get-started/quickstart/create-a-repo
|
||||
quickstart: /repositories/creating-and-managing-repositories/quickstart-for-repositories
|
||||
overview: /repositories/creating-and-managing-repositories/about-repositories
|
||||
featuredLinks:
|
||||
startHere:
|
||||
|
||||
@@ -10,6 +10,7 @@ topics:
|
||||
- API
|
||||
redirect_from:
|
||||
- /rest/overview/openapi-description
|
||||
- /rest/overview/about-the-openapi-description-for-the-rest-api
|
||||
---
|
||||
|
||||
## About OpenAPI
|
||||
46
content/rest/about-the-rest-api/about-the-rest-api.md
Normal file
46
content/rest/about-the-rest-api/about-the-rest-api.md
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: About the REST API
|
||||
shortTitle: About the REST API
|
||||
intro: 'Get oriented to the REST API documentation.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghec: '*'
|
||||
ghae: '*'
|
||||
topics:
|
||||
- API
|
||||
---
|
||||
|
||||
You can use {% data variables.product.company_short %}'s API to build scripts and applications that automate processes, integrate with {% data variables.product.company_short %}, and extend {% data variables.product.company_short %}. For example, you could use the API to triage issues, build an analytics dashboard, or manage releases.
|
||||
|
||||
Each REST API endpoint is documented individually, and the endpoints are categorized by the resource that they primarily affect. For example, you can find endpoints relating to issues in "[AUTOTITLE](/rest/issues)."
|
||||
|
||||
## Getting started with the REST API
|
||||
|
||||
**If you are new to REST APIs**, you may find it helpful to refer to the Quickstart or Getting Started guide for an introduction. For more information, see:
|
||||
|
||||
- "[AUTOTITLE](/rest/quickstart)"
|
||||
- "[AUTOTITLE](/rest/guides/getting-started-with-the-rest-api)"
|
||||
|
||||
**If you are familiar with REST APIs** but new to {% data variables.product.company_short %}'s REST API, you may find it helpful to refer to the authentication documentation. For more information, see:
|
||||
|
||||
- "[AUTOTITLE](/rest/overview/authenticating-to-the-rest-api)"
|
||||
|
||||
**If you are building scripts or applications** that use the REST API, you may find some of the following guides helpful. For examples of scripting with the REST API, see:
|
||||
|
||||
- "[AUTOTITLE](/rest/guides/scripting-with-the-rest-api-and-javascript)"
|
||||
- "[AUTOTITLE](/rest/guides/scripting-with-the-rest-api-and-ruby)"
|
||||
- "[AUTOTITLE](/apps/creating-github-apps/writing-code-for-a-github-app/building-a-github-app-that-responds-to-webhook-events)"
|
||||
- "[AUTOTITLE](/apps/creating-github-apps/writing-code-for-a-github-app/building-a-cli-with-a-github-app)"
|
||||
- "[AUTOTITLE](/webhooks/using-webhooks/automatically-redelivering-failed-deliveries-for-a-repository-webhook)"
|
||||
|
||||
For a list of libraries to facilitate scripting with the REST API, see "[AUTOTITLE](/rest/overview/libraries-for-the-rest-api)."
|
||||
|
||||
If you are building scripts or applications that use the REST API, you might also be interested in using webhooks to get notified about events or a {% data variables.product.prodname_github_app %} to access resources on behalf of a user or in an organization. For more information, see "[AUTOTITLE](/webhooks/about-webhooks)" and "[AUTOTITLE](/apps/creating-github-apps/about-creating-github-apps/deciding-when-to-build-a-github-app)."
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[AUTOTITLE](/rest/overview/comparing-githubs-rest-api-and-graphql-api)"
|
||||
- "[AUTOTITLE](/rest/guides/best-practices-for-using-the-rest-api)"
|
||||
- "[AUTOTITLE](/rest/overview/keeping-your-api-credentials-secure)"
|
||||
- "[AUTOTITLE](/rest/overview/troubleshooting-the-rest-api)"
|
||||
@@ -4,6 +4,8 @@ shortTitle: API Versions
|
||||
intro: Learn how to specify which REST API version to use whenever you make a request to the REST API.
|
||||
versions:
|
||||
feature: api-date-versioning
|
||||
redirect_from:
|
||||
- /rest/overview/api-versions
|
||||
---
|
||||
|
||||
## About API versioning
|
||||
@@ -4,6 +4,8 @@ shortTitle: Breaking changes
|
||||
intro: Learn about breaking changes that were introduced in each REST API version.
|
||||
versions:
|
||||
feature: api-date-versioning
|
||||
redirect_from:
|
||||
- /rest/overview/breaking-changes
|
||||
---
|
||||
|
||||
## About breaking changes in the REST API
|
||||
@@ -8,6 +8,7 @@ redirect_from:
|
||||
- /github/extending-github/getting-started-with-the-api
|
||||
- /developers/overview/about-githubs-apis
|
||||
- /rest/overview/about-githubs-apis
|
||||
- /rest/overview/comparing-githubs-rest-api-and-graphql-api
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -23,7 +24,7 @@ topics:
|
||||
|
||||
You should use the API that best aligns with your needs and that you are most comfortable using. You don't need to exclusively use one API over the other. Node IDs let you move between the REST API and GraphQL API. For more information, see "[AUTOTITLE](/graphql/guides/using-global-node-ids)."
|
||||
|
||||
This article discusses the benefits of each API. For more information about the GraphQL API, see "[AUTOTITLE](/graphql/overview/about-the-graphql-api)." For more information about the REST API, see [the REST documentation](/rest).
|
||||
This article discusses the benefits of each API. For more information about the GraphQL API, see "[AUTOTITLE](/graphql/overview/about-the-graphql-api)." For more information about the REST API, see "[AUTOTITLE](/rest/about-the-rest-api/about-the-rest-api)".
|
||||
|
||||
## Choosing the GraphQL API
|
||||
|
||||
20
content/rest/about-the-rest-api/index.md
Normal file
20
content/rest/about-the-rest-api/index.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: About the REST API
|
||||
intro: 'Learn more about the {% data variables.product.prodname_dotcom %} REST API and what you can do with it.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- API
|
||||
children:
|
||||
- /about-the-rest-api
|
||||
- /comparing-githubs-rest-api-and-graphql-api
|
||||
- /api-versions
|
||||
- /breaking-changes
|
||||
- /about-the-openapi-description-for-the-rest-api
|
||||
autogenerated: rest
|
||||
---
|
||||
|
||||
<!-- Content after this section is automatically generated -->
|
||||
@@ -4,6 +4,7 @@ intro: You can authenticate to the REST API to access more endpoints and have a
|
||||
redirect_from:
|
||||
- /v3/auth
|
||||
- /rest/overview/other-authentication-methods
|
||||
- /rest/overview/authenticating-to-the-rest-api
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -3,8 +3,10 @@ title: Endpoints available for fine-grained personal access tokens
|
||||
intro: 'Your {% data variables.product.pat_v2 %} can make requests to the following REST endpoints.'
|
||||
versions:
|
||||
feature: pat-v2
|
||||
shortTitle: 'Endpoints for fine-grained PATs'
|
||||
shortTitle: Endpoints for fine-grained PATs
|
||||
autogenerated: github-apps
|
||||
redirect_from:
|
||||
- /rest/overview/endpoints-available-for-fine-grained-personal-access-tokens
|
||||
---
|
||||
|
||||
<!-- The content of this page is rendered as a NextJS page component. -->
|
||||
@@ -7,6 +7,7 @@ redirect_from:
|
||||
- /v3/apps/available-endpoints
|
||||
- /rest/reference/endpoints-available-for-github-apps
|
||||
- /rest/overview/endpoints-available-for-github-apps
|
||||
- /rest/overview/endpoints-available-for-github-app-installation-access-tokens
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Endpoints available for GitHub App user access tokens
|
||||
shortTitle: Endpoints for GitHub App user tokens
|
||||
intro: 'Your GitHub App can make requests to the following REST endpoints with a user access token.'
|
||||
intro: Your GitHub App can make requests to the following REST endpoints with a user access token.
|
||||
permissions: 'You can use a user access token to access these endpoints using your {% data variables.product.prodname_github_app %}. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-with-a-github-app-on-behalf-of-a-user)."'
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -12,6 +12,8 @@ topics:
|
||||
- API
|
||||
- GitHub Apps
|
||||
autogenerated: github-apps
|
||||
redirect_from:
|
||||
- /rest/overview/endpoints-available-for-github-app-user-access-tokens
|
||||
---
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: REST API overview
|
||||
shortTitle: Overview
|
||||
intro: 'Learn about resources, libraries, previews and troubleshooting for {% data variables.product.prodname_dotcom %}''s REST API.'
|
||||
title: Authenticating to the REST API
|
||||
shortTitle: Authentication
|
||||
intro: 'Learn how to authenticate your REST API requests.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -10,25 +10,11 @@ versions:
|
||||
topics:
|
||||
- API
|
||||
children:
|
||||
- /comparing-githubs-rest-api-and-graphql-api
|
||||
- /resources-in-the-rest-api
|
||||
- /rate-limits-for-the-rest-api
|
||||
- /api-versions
|
||||
- /media-types
|
||||
- /authenticating-to-the-rest-api
|
||||
- /keeping-your-api-credentials-secure
|
||||
- /troubleshooting-the-rest-api
|
||||
- /libraries-for-the-rest-api
|
||||
- /about-the-openapi-description-for-the-rest-api
|
||||
- /issue-event-types
|
||||
- /github-event-types
|
||||
- /endpoints-available-for-github-app-installation-access-tokens
|
||||
- /endpoints-available-for-github-app-user-access-tokens
|
||||
- /endpoints-available-for-fine-grained-personal-access-tokens
|
||||
- /permissions-required-for-github-apps
|
||||
- /permissions-required-for-fine-grained-personal-access-tokens
|
||||
- /breaking-changes
|
||||
redirect_from:
|
||||
- /developers/overview
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Keeping your API credentials secure
|
||||
shortTitle: Keeping API credentials secure
|
||||
intro: 'Follow these best practices to keep your API credentials and tokens secure.'
|
||||
intro: Follow these best practices to keep your API credentials and tokens secure.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -9,6 +9,8 @@ versions:
|
||||
ghec: '*'
|
||||
topics:
|
||||
- API
|
||||
redirect_from:
|
||||
- /rest/overview/keeping-your-api-credentials-secure
|
||||
---
|
||||
|
||||
## Choose an appropriate authentication method
|
||||
@@ -3,8 +3,10 @@ title: Permissions required for fine-grained personal access tokens
|
||||
intro: 'These are the permissions required for a {% data variables.product.pat_v2 %} to use each REST API endpoint that works with {% data variables.product.pat_v2 %}s.'
|
||||
versions:
|
||||
feature: pat-v2
|
||||
shortTitle: 'Permissions for fine-grained PATs'
|
||||
shortTitle: Permissions for fine-grained PATs
|
||||
autogenerated: github-apps
|
||||
redirect_from:
|
||||
- /rest/overview/permissions-required-for-fine-grained-personal-access-tokens
|
||||
---
|
||||
|
||||
## About permissions required for {% data variables.product.pat_v2 %}
|
||||
@@ -4,6 +4,7 @@ intro: 'These are the permissions required for a {% data variables.product.prodn
|
||||
redirect_from:
|
||||
- /v3/apps/permissions
|
||||
- /rest/reference/permissions-required-for-github-apps
|
||||
- /rest/overview/permissions-required-for-github-apps
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -12,16 +12,13 @@ versions:
|
||||
topics:
|
||||
- API
|
||||
children:
|
||||
- /getting-started-with-the-rest-api
|
||||
- /scripting-with-the-rest-api-and-javascript
|
||||
- /scripting-with-the-rest-api-and-ruby
|
||||
- /discovering-resources-for-a-user
|
||||
- /delivering-deployments
|
||||
- /rendering-data-as-graphs
|
||||
- /working-with-comments
|
||||
- /using-pagination-in-the-rest-api
|
||||
- /building-a-ci-server
|
||||
- /best-practices-for-using-the-rest-api
|
||||
- /using-the-rest-api-to-interact-with-your-git-database
|
||||
- /using-the-rest-api-to-interact-with-checks
|
||||
- /encrypting-secrets-for-the-rest-api
|
||||
|
||||
@@ -1,35 +1,33 @@
|
||||
---
|
||||
title: GitHub REST API documentation
|
||||
shortTitle: REST API
|
||||
intro: >-
|
||||
To create integrations, retrieve data, and automate your workflows, build with
|
||||
the {% data variables.product.prodname_dotcom %} REST API.
|
||||
intro: 'Create integrations, retrieve data, and automate your workflows with the {% data variables.product.prodname_dotcom %} REST API.'
|
||||
introLinks:
|
||||
overview: /rest/overview/about-the-rest-api
|
||||
quickstart: /rest/quickstart
|
||||
overview: /rest/guides/getting-started-with-the-rest-api
|
||||
featuredLinks:
|
||||
startHere:
|
||||
- /rest/guides/getting-started-with-the-rest-api
|
||||
- /rest/overview/authenticating-to-the-rest-api
|
||||
- /rest/guides/best-practices-for-using-the-rest-api
|
||||
- /rest/guides/using-pagination-in-the-rest-api
|
||||
- /rest/about-the-rest-api/about-the-rest-api
|
||||
- /rest/using-the-rest-api/getting-started-with-the-rest-api
|
||||
- /rest/authentication/authenticating-to-the-rest-api
|
||||
- /rest/using-the-rest-api/best-practices-for-using-the-rest-api
|
||||
popular:
|
||||
- /rest/overview/rate-limits-for-the-rest-api
|
||||
- /rest/overview/api-versions
|
||||
- /rest/overview/authenticating-to-the-rest-api
|
||||
- /rest/overview/troubleshooting-the-rest-api
|
||||
- /rest/using-the-rest-api/rate-limits-for-the-rest-api
|
||||
- /rest/using-the-rest-api/troubleshooting-the-rest-api
|
||||
- /rest/guides/scripting-with-the-rest-api-and-javascript
|
||||
- /rest/overview/keeping-your-api-credentials-secure
|
||||
- /rest/authentication/keeping-your-api-credentials-secure
|
||||
guideCards:
|
||||
- /rest/guides/delivering-deployments
|
||||
- /rest/guides/using-the-rest-api-to-interact-with-checks
|
||||
- /rest/guides/using-pagination-in-the-rest-api
|
||||
- /rest/using-the-rest-api/using-pagination-in-the-rest-api
|
||||
changelog:
|
||||
label: 'api, apis'
|
||||
layout: product-landing
|
||||
redirect_from:
|
||||
- /v3
|
||||
- /rest/reference
|
||||
- /rest/overview
|
||||
- /developers/overview
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -37,7 +35,9 @@ versions:
|
||||
ghec: '*'
|
||||
children:
|
||||
- /quickstart
|
||||
- /overview
|
||||
- /about-the-rest-api
|
||||
- /using-the-rest-api
|
||||
- /authentication
|
||||
- /guides
|
||||
- /actions
|
||||
- /activity
|
||||
|
||||
@@ -1,193 +0,0 @@
|
||||
---
|
||||
title: Resources in the REST API
|
||||
intro: 'Learn how to navigate the resources provided by the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API.'
|
||||
redirect_from:
|
||||
- /rest/initialize-the-repo
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- API
|
||||
---
|
||||
|
||||
## Root endpoint
|
||||
|
||||
You can issue a `GET` request to the root endpoint to get all the endpoint categories that the REST API supports:
|
||||
|
||||
```shell
|
||||
$ curl {% ifversion fpt or ghae or ghec %}
|
||||
-u USERNAME:TOKEN {% endif %}{% ifversion ghes %}-u USERNAME:PASSWORD {% endif %}{% data variables.product.api_url_pre %}
|
||||
```
|
||||
|
||||
## GraphQL global node IDs
|
||||
|
||||
See the guide on "[AUTOTITLE](/graphql/guides/using-global-node-ids)" for detailed information about how to find `node_id`s via the REST API and use them in GraphQL operations.
|
||||
|
||||
## Hypermedia
|
||||
|
||||
All resources may have one or more `*_url` properties linking to other
|
||||
resources. These are meant to provide explicit URLs so that proper API clients
|
||||
don't need to construct URLs on their own. It is highly recommended that API
|
||||
clients use these. Doing so will make future upgrades of the API easier for
|
||||
developers. All URLs are expected to be proper [RFC 6570](https://datatracker.ietf.org/doc/html/rfc6570) URI templates.
|
||||
|
||||
You can then expand these templates using something like the [uri_template](https://github.com/hannesg/uri_template)
|
||||
gem:
|
||||
|
||||
>> tmpl = URITemplate.new('/notifications{?since,all,participating}')
|
||||
>> tmpl.expand
|
||||
=> "/notifications"
|
||||
|
||||
>> tmpl.expand all: 1
|
||||
=> "/notifications?all=1"
|
||||
|
||||
>> tmpl.expand all: 1, participating: 1
|
||||
=> "/notifications?all=1&participating=1"
|
||||
|
||||
## Cross origin resource sharing
|
||||
|
||||
The API supports Cross Origin Resource Sharing (CORS) for AJAX requests from
|
||||
any origin.
|
||||
You can read the [CORS W3C Recommendation](http://www.w3.org/TR/cors/), or
|
||||
[this intro](https://code.google.com/archive/p/html5security/wikis/CrossOriginRequestSecurity.wiki) from the
|
||||
HTML 5 Security Guide.
|
||||
|
||||
Here's a sample request sent from a browser hitting
|
||||
`http://example.com`:
|
||||
|
||||
```shell
|
||||
$ curl -I {% data variables.product.api_url_pre %} -H "Origin: http://example.com"
|
||||
HTTP/2 302
|
||||
Access-Control-Allow-Origin: *
|
||||
Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
||||
```
|
||||
|
||||
This is what the CORS preflight request looks like:
|
||||
|
||||
```shell
|
||||
$ curl -I {% data variables.product.api_url_pre %} -H "Origin: http://example.com" -X OPTIONS
|
||||
HTTP/2 204
|
||||
Access-Control-Allow-Origin: *
|
||||
Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-GitHub-OTP, X-Requested-With
|
||||
Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE
|
||||
Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
||||
Access-Control-Max-Age: 86400
|
||||
```
|
||||
|
||||
## JSON-P callbacks
|
||||
|
||||
You can send a `?callback` parameter to any GET call to have the results
|
||||
wrapped in a JSON function. This is typically used when browsers want
|
||||
to embed {% data variables.product.product_name %} content in web pages by getting around cross domain
|
||||
issues. The response includes the same data output as the regular API,
|
||||
plus the relevant HTTP Header information.
|
||||
|
||||
```shell
|
||||
$ curl {% data variables.product.api_url_pre %}?callback=foo
|
||||
|
||||
> /**/foo({
|
||||
> "meta": {
|
||||
> "status": 200,
|
||||
> "x-ratelimit-limit": "5000",
|
||||
> "x-ratelimit-remaining": "4966",
|
||||
> "x-ratelimit-reset": "1372700873",
|
||||
> "Link": [ // pagination headers and other links
|
||||
> ["{% data variables.product.api_url_pre %}?page=2", {"rel": "next"}]
|
||||
> ]
|
||||
> },
|
||||
> "data": {
|
||||
> // the data
|
||||
> }
|
||||
> })
|
||||
```
|
||||
|
||||
You can write a JavaScript handler to process the callback. Here's a minimal example you can try out:
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
function foo(response) {
|
||||
var meta = response.meta;
|
||||
var data = response.data;
|
||||
console.log(meta);
|
||||
console.log(data);
|
||||
}
|
||||
|
||||
var script = document.createElement('script');
|
||||
script.src = '{% data variables.product.api_url_code %}?callback=foo';
|
||||
|
||||
document.getElementsByTagName('head')[0].appendChild(script);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p>Open up your browser's console.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
All of the headers are the same String value as the HTTP Headers with one
|
||||
notable exception: Link. Link headers are pre-parsed for you and come
|
||||
through as an array of `[url, options]` tuples.
|
||||
|
||||
A link that looks like this:
|
||||
|
||||
Link: <url1>; rel="next", <url2>; rel="foo"; bar="baz"
|
||||
|
||||
... will look like this in the Callback output:
|
||||
|
||||
```json
|
||||
{
|
||||
"Link": [
|
||||
[
|
||||
"url1",
|
||||
{
|
||||
"rel": "next"
|
||||
}
|
||||
],
|
||||
[
|
||||
"url2",
|
||||
{
|
||||
"rel": "foo",
|
||||
"bar": "baz"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Timezones
|
||||
|
||||
Some requests that create new data, such as creating a new commit, allow you to provide time zone information when specifying or generating timestamps. We apply the following rules, in order of priority, to determine timezone information for such API calls.
|
||||
|
||||
- [Explicitly providing an ISO 8601 timestamp with timezone information](#explicitly-providing-an-iso-8601-timestamp-with-timezone-information)
|
||||
- [Using the `Time-Zone` header](#using-the-time-zone-header)
|
||||
- [Using the last known timezone for the user](#using-the-last-known-timezone-for-the-user)
|
||||
- [Defaulting to UTC without other timezone information](#defaulting-to-utc-without-other-timezone-information)
|
||||
|
||||
Note that these rules apply only to data passed to the API, not to data returned by the API. As mentioned in "[Schema](#schema)," timestamps returned by the API are in UTC time, ISO 8601 format.
|
||||
|
||||
### Explicitly providing an ISO 8601 timestamp with timezone information
|
||||
|
||||
For API calls that allow for a timestamp to be specified, we use that exact timestamp. An example of this is the API to manage commits. For more information, see "[AUTOTITLE](/rest/git#commits)."
|
||||
|
||||
These timestamps look something like `2014-02-27T15:05:06+01:00`. Also see [this example](/rest/git#example-input) for how these timestamps can be specified.
|
||||
|
||||
### Using the `Time-Zone` header
|
||||
|
||||
It is possible to supply a `Time-Zone` header which defines a timezone according to the [list of names from the Olson database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
||||
|
||||
```shell
|
||||
curl -H "Time-Zone: Europe/Amsterdam" -X POST {% data variables.product.api_url_pre %}/repos/github-linguist/linguist/contents/new_file.md
|
||||
```
|
||||
|
||||
This means that we generate a timestamp for the moment your API call is made in the timezone this header defines. For example, the API to manage contents generates a git commit for each addition or change and uses the current time as the timestamp. For more information, see "[AUTOTITLE](/rest/repos#contents)." This header will determine the timezone used for generating that current timestamp.
|
||||
|
||||
### Using the last known timezone for the user
|
||||
|
||||
If no `Time-Zone` header is specified and you make an authenticated call to the API, we use the last known timezone for the authenticated user. The last known timezone is updated whenever you browse the {% data variables.product.product_name %} website.
|
||||
|
||||
### Defaulting to UTC without other timezone information
|
||||
|
||||
If the steps above don't result in any information, we use UTC as the timezone to create the git commit.
|
||||
@@ -41,7 +41,7 @@ Pull requests have these possible link relations:
|
||||
- `issue`: The API location of this pull request's [issue](/rest/issues)
|
||||
- `comments`: The API location of this pull request's [issue comments](/rest/issues#comments)
|
||||
- `review_comments`: The API location of this pull request's [review comments](/rest/pulls#comments)
|
||||
- `review_comment`: The [URL template](/rest#hypermedia) to construct the API location for a [review comment](/rest/pulls#comments) in this pull request's repository
|
||||
- `review_comment`: The [URL template](/rest/using-the-rest-api/getting-started-with-the-rest-api#hypermedia) to construct the API location for a [review comment](/rest/pulls#comments) in this pull request's repository
|
||||
- `commits`: The API location of this pull request's [commits](#list-commits-on-a-pull-request)
|
||||
- `statuses`: The API location of this pull request's [commit statuses](/rest/commits#commit-statuses), which are the statuses of its `head` branch
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ redirect_from:
|
||||
- /guides/best-practices-for-integrators
|
||||
- /v3/guides/best-practices-for-integrators
|
||||
- /rest/guides/best-practices-for-integrators
|
||||
- /rest/guides/best-practices-for-using-the-rest-api
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Getting started with the REST API
|
||||
shortTitle: Using the API
|
||||
shortTitle: Getting started
|
||||
intro: 'Learn how to use the {% data variables.product.prodname_dotcom %} REST API.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -9,6 +9,11 @@ versions:
|
||||
ghec: '*'
|
||||
topics:
|
||||
- API
|
||||
redirect_from:
|
||||
- /rest/guides/getting-started-with-the-rest-api
|
||||
- /rest/initialize-the-repo
|
||||
- /rest/overview/resources-in-the-rest-api
|
||||
- /rest/using-the-rest-api/resources-in-the-rest-api
|
||||
---
|
||||
|
||||
## Introduction
|
||||
@@ -34,7 +39,7 @@ The REST API reference documentation describes the HTTP method, path, and parame
|
||||
|
||||
The HTTP method of an endpoint defines the type of action it performs on a given resource. Some common HTTP methods are `GET`, `POST`, `DELETE`, and `PATCH`. The REST API reference documentation provides the HTTP method for every endpoint.
|
||||
|
||||
For example, the HTTP method for the ["List repository issues" endpoint]([AUTOTITLE](/rest/issues/issues#list-repository-issues) is `GET`."
|
||||
For example, the HTTP method for the ["List repository issues" endpoint](/rest/issues/issues#list-repository-issues) is `GET`."
|
||||
|
||||
Where possible, the {% data variables.product.product_name %} REST API strives to use an appropriate HTTP method for each action.
|
||||
|
||||
@@ -689,8 +694,25 @@ Note that authorization sometimes influences the amount of detail included in a
|
||||
|
||||
The reason for this is because some attributes are computationally expensive for the API to provide, so {% data variables.product.prodname_dotcom %} excludes those attributes from the summary representation. To obtain those attributes, you can fetch the detailed representation.
|
||||
|
||||
The documentation provides an example response for each API method. The example
|
||||
response illustrates all attributes that are returned by that method.
|
||||
The documentation provides an example response for each API method. The example response illustrates all attributes that are returned by that method.
|
||||
|
||||
#### Hypermedia
|
||||
|
||||
All resources may have one or more `*_url` properties linking to other resources. These are meant to provide explicit URLs so that proper API clients don't need to construct URLs on their own. It is highly recommended that API clients use these. Doing so will make future upgrades of the API easier for developers. All URLs are expected to be proper [RFC 6570](https://datatracker.ietf.org/doc/html/rfc6570) URI templates.
|
||||
|
||||
You can then expand these templates using something like the [uri_template](https://github.com/hannesg/uri_template) gem:
|
||||
|
||||
```ruby
|
||||
>> tmpl = URITemplate.new('/notifications{?since,all,participating}')
|
||||
>> tmpl.expand
|
||||
=> "/notifications"
|
||||
|
||||
>> tmpl.expand all: 1
|
||||
=> "/notifications?all=1"
|
||||
|
||||
>> tmpl.expand all: 1, participating: 1
|
||||
=> "/notifications?all=1&participating=1"
|
||||
```
|
||||
|
||||
## Next steps
|
||||
|
||||
@@ -7,6 +7,7 @@ redirect_from:
|
||||
- /developers/webhooks-and-events/events/github-event-types
|
||||
- /webhooks-and-events/events/github-event-types
|
||||
- /developers/webhooks-and-events/events
|
||||
- /rest/overview/github-event-types
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
24
content/rest/using-the-rest-api/index.md
Normal file
24
content/rest/using-the-rest-api/index.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
title: Using the REST API
|
||||
intro: 'Learn how to use the {% data variables.product.prodname_dotcom %} REST API, follow best practices, and troubleshoot problems.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- API
|
||||
children:
|
||||
- /getting-started-with-the-rest-api
|
||||
- /rate-limits-for-the-rest-api
|
||||
- /using-pagination-in-the-rest-api
|
||||
- /libraries-for-the-rest-api
|
||||
- /media-types
|
||||
- /best-practices-for-using-the-rest-api
|
||||
- /troubleshooting-the-rest-api
|
||||
- /timezones-and-the-rest-api
|
||||
- /using-cors-and-jsonp-to-make-cross-origin-requests
|
||||
- /issue-event-types
|
||||
- /github-event-types
|
||||
---
|
||||
|
||||
@@ -6,6 +6,7 @@ redirect_from:
|
||||
- /developers/webhooks-and-events/issue-event-types
|
||||
- /developers/webhooks-and-events/events/issue-event-types
|
||||
- /webhooks-and-events/events/issue-event-types
|
||||
- /rest/overview/issue-event-types
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -6,6 +6,7 @@ redirect_from:
|
||||
- /libraries
|
||||
- /v3/libraries
|
||||
- /rest/overview/libraries
|
||||
- /rest/overview/libraries-for-the-rest-api
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -3,6 +3,7 @@ title: Media types
|
||||
intro: Learn about media types for specifying the format of the data you want to consume.
|
||||
redirect_from:
|
||||
- /v3/media
|
||||
- /rest/overview/media-types
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -9,6 +9,8 @@ versions:
|
||||
ghec: '*'
|
||||
topics:
|
||||
- API
|
||||
redirect_from:
|
||||
- /rest/overview/rate-limits-for-the-rest-api
|
||||
---
|
||||
|
||||
{% ifversion ghes %}
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
title: Timezones and the REST API
|
||||
shortTitle: Timezones
|
||||
intro: 'Some REST API endpoints allow you to specify timezone information with your request.'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- API
|
||||
---
|
||||
|
||||
Some requests that create new data, such as creating a new commit, allow you to provide timezone information when specifying or generating timestamps.
|
||||
|
||||
Note that these rules apply only to data passed to the API, not to data returned by the API. Timestamps returned by the API are in UTC time, ISO 8601 format.
|
||||
|
||||
## Determining the timezone for a request
|
||||
|
||||
To determine timezone information for applicable API calls, we apply these rules in order of priority:
|
||||
|
||||
1. [Explicitly providing an ISO 8601 timestamp with timezone information](#explicitly-providing-an-iso-8601-timestamp-with-timezone-information)
|
||||
1. [Using the `Time-Zone` header](#using-the-time-zone-header)
|
||||
1. [Using the last known timezone for the user](#using-the-last-known-timezone-for-the-user)
|
||||
1. [Defaulting to UTC without other timezone information](#defaulting-to-utc-without-other-timezone-information)
|
||||
|
||||
### Explicitly providing an ISO 8601 timestamp with timezone information
|
||||
|
||||
For API calls that allow for a timestamp to be specified, we use that exact timestamp. These timestamps look something like `2014-02-27T15:05:06+01:00`.
|
||||
|
||||
An example of this is the API to manage commits. For more information, see "[AUTOTITLE](/rest/git/commits#create-a-commit)."
|
||||
|
||||
### Using the `Time-Zone` header
|
||||
|
||||
It is possible to supply a `Time-Zone` header, which defines a timezone according to the [list of names from the Olson database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
||||
|
||||
```shell
|
||||
curl -H "Time-Zone: Europe/Amsterdam" -X POST {% data variables.product.api_url_pre %}/repos/github-linguist/linguist/contents/new_file.md
|
||||
```
|
||||
|
||||
This means that we generate a timestamp for the moment your API call is made, in the timezone this header defines.
|
||||
|
||||
For example, the API to manage contents generates a git commit for each addition or change, and it uses the current time as the timestamp. For more information, see "[AUTOTITLE](/rest/repos#contents)." The `Time-Zone` header will determine the timezone used for generating that current timestamp.
|
||||
|
||||
### Using the last known timezone for the user
|
||||
|
||||
If no `Time-Zone` header is specified and you make an authenticated call to the API, we use the last known timezone for the authenticated user. The last known timezone is updated whenever you browse the {% data variables.product.product_name %} website.
|
||||
|
||||
### Defaulting to UTC without other timezone information
|
||||
|
||||
If the steps above don't result in any information, we use UTC as the timezone.
|
||||
@@ -5,6 +5,7 @@ intro: Learn how to diagnose and resolve common problems for the REST API.
|
||||
redirect_from:
|
||||
- /v3/troubleshooting
|
||||
- /rest/overview/troubleshooting
|
||||
- /rest/overview/troubleshooting-the-rest-api
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -162,7 +163,7 @@ curl sends a valid `User-Agent` header by default.
|
||||
|
||||
If you observe an error that is not addressed here, you should refer to the error message that the API gives you. Most error messages will provide a clue about what is wrong and a link to relevant documentation.
|
||||
|
||||
If you observe unexpected failures, you can check the status of the REST API at [githubstatus.com](https://www.githubstatus.com/).
|
||||
If you observe unexpected failures, you can use [githubstatus.com](https://www.githubstatus.com/) or the [{% data variables.product.company_short %} status API](https://www.githubstatus.com/api) to check for incidents affecting the API.
|
||||
|
||||
## Further reading
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
---
|
||||
title: Using CORS and JSONP to make cross-origin requests
|
||||
shortTitle: CORS and JSONP
|
||||
intro: You can make API requests across domains using cross-origin resource sharing (CORS) and JSONP callbacks.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
topics:
|
||||
- API
|
||||
---
|
||||
|
||||
## About cross-origin requests
|
||||
|
||||
A cross-origin request is a request made to a different domain than the one originating the request. For security reasons, most web browsers block cross-origin requests. However, you can use cross-origin resource sharing (CORS) and JSONP callbacks to make cross-origin requests.
|
||||
|
||||
## Cross-origin resource sharing (CORS)
|
||||
|
||||
The REST API supports cross-origin resource sharing (CORS) for AJAX requests from any origin. For more information, see the "[CORS W3C Recommendation](http://www.w3.org/TR/cors/)" and the [HTML 5 Security Guide](https://code.google.com/archive/p/html5security/wikis/CrossOriginRequestSecurity.wiki)
|
||||
|
||||
Here's a sample request sent from a browser hitting
|
||||
`http://example.com`:
|
||||
|
||||
```shell
|
||||
$ curl -I {% data variables.product.api_url_pre %} -H "Origin: http://example.com"
|
||||
HTTP/2 302
|
||||
Access-Control-Allow-Origin: *
|
||||
Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
||||
```
|
||||
|
||||
This is what the CORS preflight request looks like:
|
||||
|
||||
```shell
|
||||
$ curl -I {% data variables.product.api_url_pre %} -H "Origin: http://example.com" -X OPTIONS
|
||||
HTTP/2 204
|
||||
Access-Control-Allow-Origin: *
|
||||
Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-GitHub-OTP, X-Requested-With
|
||||
Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE
|
||||
Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
||||
Access-Control-Max-Age: 86400
|
||||
```
|
||||
|
||||
## JSON-P callbacks
|
||||
|
||||
You can send a `?callback` parameter to any GET call to have the results
|
||||
wrapped in a JSON function. This is typically used when browsers want to embed {% data variables.product.product_name %} content in web pages and avoid cross-domain problems. The response includes the same data output as the regular API, plus the relevant HTTP Header information.
|
||||
|
||||
```shell
|
||||
$ curl {% data variables.product.api_url_pre %}?callback=foo
|
||||
|
||||
> /**/foo({
|
||||
> "meta": {
|
||||
> "status": 200,
|
||||
> "x-ratelimit-limit": "5000",
|
||||
> "x-ratelimit-remaining": "4966",
|
||||
> "x-ratelimit-reset": "1372700873",
|
||||
> "Link": [ // pagination headers and other links
|
||||
> ["{% data variables.product.api_url_pre %}?page=2", {"rel": "next"}]
|
||||
> ]
|
||||
> },
|
||||
> "data": {
|
||||
> // the data
|
||||
> }
|
||||
> })
|
||||
```
|
||||
|
||||
You can write a JavaScript handler to process the callback. Here's a minimal example you can try:
|
||||
|
||||
```html
|
||||
<html>
|
||||
<head>
|
||||
<script type="text/javascript">
|
||||
function foo(response) {
|
||||
var meta = response.meta;
|
||||
var data = response.data;
|
||||
console.log(meta);
|
||||
console.log(data);
|
||||
}
|
||||
|
||||
var script = document.createElement('script');
|
||||
script.src = '{% data variables.product.api_url_code %}?callback=foo';
|
||||
|
||||
document.getElementsByTagName('head')[0].appendChild(script);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<p>Open up your browser's console.</p>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
All of the headers have the same string value as the HTTP Headers, except `Link`. `Link` headers are pre-parsed for you and come through as an array of `[url, options]` tuples.
|
||||
|
||||
For example, a link that looks like this:
|
||||
|
||||
```shell
|
||||
Link: <url1>; rel="next", <url2>; rel="foo"; bar="baz"
|
||||
```
|
||||
|
||||
will look like this in the Callback output:
|
||||
|
||||
```json
|
||||
{
|
||||
"Link": [
|
||||
[
|
||||
"url1",
|
||||
{
|
||||
"rel": "next"
|
||||
}
|
||||
],
|
||||
[
|
||||
"url2",
|
||||
{
|
||||
"rel": "foo",
|
||||
"bar": "baz"
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
```
|
||||
@@ -5,6 +5,7 @@ redirect_from:
|
||||
- /guides/traversing-with-pagination
|
||||
- /v3/guides/traversing-with-pagination
|
||||
- /rest/guides/traversing-with-pagination
|
||||
- /rest/guides/using-pagination-in-the-rest-api
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user