diff --git a/.github/workflows/browser-test.yml b/.github/workflows/browser-test.yml index bc046045fa..4631fe15be 100644 --- a/.github/workflows/browser-test.yml +++ b/.github/workflows/browser-test.yml @@ -65,6 +65,11 @@ jobs: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true run: npm ci --include=optional + - uses: ./.github/actions/get-docs-early-access + if: ${{ github.repository == 'github/docs-internal' }} + with: + token: ${{ secrets.DOCUBOT_REPO_PAT }} + - name: Cache nextjs build uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 with: diff --git a/.github/workflows/openapi-decorate.yml b/.github/workflows/openapi-decorate.yml index d0e3d9a29f..4118807fed 100644 --- a/.github/workflows/openapi-decorate.yml +++ b/.github/workflows/openapi-decorate.yml @@ -63,6 +63,7 @@ jobs: git status echo "Deleting the cloned github/rest-api-description repo..." rm -rf rest-api-description + rm -rf openApiTemp - name: Create pull request env: diff --git a/assets/images/actions-bypass-env-protection-rules.png b/assets/images/actions-bypass-env-protection-rules.png new file mode 100644 index 0000000000..1c14d479d9 Binary files /dev/null and b/assets/images/actions-bypass-env-protection-rules.png differ diff --git a/assets/images/help/gist/create-secret-gist-button.png b/assets/images/help/gist/create-secret-gist-button.png deleted file mode 100644 index 5652d09a90..0000000000 Binary files a/assets/images/help/gist/create-secret-gist-button.png and /dev/null differ diff --git a/assets/images/help/gist/gist-visibility-drop-down-ae.png b/assets/images/help/gist/gist-visibility-drop-down-ae.png index b1d1d775e2..90645e9d72 100644 Binary files a/assets/images/help/gist/gist-visibility-drop-down-ae.png and b/assets/images/help/gist/gist-visibility-drop-down-ae.png differ diff --git a/assets/images/help/gist/gist-visibility-drop-down.png b/assets/images/help/gist/gist-visibility-drop-down.png index 85680c236d..4c29003871 100644 Binary files a/assets/images/help/gist/gist-visibility-drop-down.png and b/assets/images/help/gist/gist-visibility-drop-down.png differ diff --git a/assets/images/help/gist/gist_clone_btn.png b/assets/images/help/gist/gist_clone_btn.png index 462a31ea8b..0b23cce4e0 100644 Binary files a/assets/images/help/gist/gist_clone_btn.png and b/assets/images/help/gist/gist_clone_btn.png differ diff --git a/assets/images/help/gist/gist_forks.png b/assets/images/help/gist/gist_forks.png deleted file mode 100644 index f6bc78bc7e..0000000000 Binary files a/assets/images/help/gist/gist_forks.png and /dev/null differ diff --git a/assets/images/help/gist/gist_history.png b/assets/images/help/gist/gist_history.png index 24bac8aa4d..1d77d7d232 100644 Binary files a/assets/images/help/gist/gist_history.png and b/assets/images/help/gist/gist_history.png differ diff --git a/assets/images/help/gist/gist_name_description.png b/assets/images/help/gist/gist_name_description.png deleted file mode 100644 index 9ff0510c83..0000000000 Binary files a/assets/images/help/gist/gist_name_description.png and /dev/null differ diff --git a/assets/images/help/gist/gist_revisions_tab.png b/assets/images/help/gist/gist_revisions_tab.png deleted file mode 100644 index 4c12027290..0000000000 Binary files a/assets/images/help/gist/gist_revisions_tab.png and /dev/null differ diff --git a/assets/images/help/gist/gist_text_box.png b/assets/images/help/gist/gist_text_box.png deleted file mode 100644 index 914025cc6b..0000000000 Binary files a/assets/images/help/gist/gist_text_box.png and /dev/null differ diff --git a/assets/images/help/marketplace/marketplace-add-payment-method-org.png b/assets/images/help/marketplace/marketplace-add-payment-method-org.png deleted file mode 100644 index 4a1339ebaf..0000000000 Binary files a/assets/images/help/marketplace/marketplace-add-payment-method-org.png and /dev/null differ diff --git a/assets/images/help/marketplace/marketplace-add-payment-method-personal.png b/assets/images/help/marketplace/marketplace-add-payment-method-personal.png deleted file mode 100644 index 5755d5b008..0000000000 Binary files a/assets/images/help/marketplace/marketplace-add-payment-method-personal.png and /dev/null differ diff --git a/assets/images/help/marketplace/marketplace-buy-with-github-button.png b/assets/images/help/marketplace/marketplace-buy-with-github-button.png deleted file mode 100644 index d2f38ac7bf..0000000000 Binary files a/assets/images/help/marketplace/marketplace-buy-with-github-button.png and /dev/null differ diff --git a/assets/images/help/marketplace/marketplace-choose-new-plan.png b/assets/images/help/marketplace/marketplace-choose-new-plan.png deleted file mode 100644 index 02c87f10d1..0000000000 Binary files a/assets/images/help/marketplace/marketplace-choose-new-plan.png and /dev/null differ diff --git a/assets/images/help/marketplace/marketplace-choose-plan.png b/assets/images/help/marketplace/marketplace-choose-plan.png deleted file mode 100644 index bf11cac236..0000000000 Binary files a/assets/images/help/marketplace/marketplace-choose-plan.png and /dev/null differ diff --git a/assets/images/help/marketplace/marketplace-choose-repo-install-option.png b/assets/images/help/marketplace/marketplace-choose-repo-install-option.png deleted file mode 100644 index dbadc41aa0..0000000000 Binary files a/assets/images/help/marketplace/marketplace-choose-repo-install-option.png and /dev/null differ diff --git a/assets/images/help/marketplace/marketplace-complete-order-begin-installation-button.png b/assets/images/help/marketplace/marketplace-complete-order-begin-installation-button.png deleted file mode 100644 index a76b07ff70..0000000000 Binary files a/assets/images/help/marketplace/marketplace-complete-order-begin-installation-button.png and /dev/null differ diff --git a/assets/images/help/marketplace/marketplace-confirm-org-no-org-details.png b/assets/images/help/marketplace/marketplace-confirm-org-no-org-details.png new file mode 100644 index 0000000000..bba3d27346 Binary files /dev/null and b/assets/images/help/marketplace/marketplace-confirm-org-no-org-details.png differ diff --git a/assets/images/help/marketplace/marketplace-confirm-org.png b/assets/images/help/marketplace/marketplace-confirm-org.png index 3dec038701..e7baa9651a 100644 Binary files a/assets/images/help/marketplace/marketplace-confirm-org.png and b/assets/images/help/marketplace/marketplace-confirm-org.png differ diff --git a/assets/images/help/marketplace/marketplace-confirm-personal-account.png b/assets/images/help/marketplace/marketplace-confirm-personal-account.png deleted file mode 100644 index ed85582f6c..0000000000 Binary files a/assets/images/help/marketplace/marketplace-confirm-personal-account.png and /dev/null differ diff --git a/assets/images/help/marketplace/marketplace-edit-app-billing-settings.png b/assets/images/help/marketplace/marketplace-edit-app-billing-settings.png deleted file mode 100644 index 57ede84aa3..0000000000 Binary files a/assets/images/help/marketplace/marketplace-edit-app-billing-settings.png and /dev/null differ diff --git a/assets/images/help/marketplace/marketplace-edit-payment-method-org.png b/assets/images/help/marketplace/marketplace-edit-payment-method-org.png deleted file mode 100644 index 0cc69c6fe4..0000000000 Binary files a/assets/images/help/marketplace/marketplace-edit-payment-method-org.png and /dev/null differ diff --git a/assets/images/help/marketplace/marketplace-edit-payment-method-personal.png b/assets/images/help/marketplace/marketplace-edit-payment-method-personal.png deleted file mode 100644 index b9a214eaea..0000000000 Binary files a/assets/images/help/marketplace/marketplace-edit-payment-method-personal.png and /dev/null differ diff --git a/assets/images/help/marketplace/marketplace-issue-plan-changes.png b/assets/images/help/marketplace/marketplace-issue-plan-changes.png deleted file mode 100644 index c50266bb22..0000000000 Binary files a/assets/images/help/marketplace/marketplace-issue-plan-changes.png and /dev/null differ diff --git a/assets/images/help/marketplace/marketplace-link-global-navigation.png b/assets/images/help/marketplace/marketplace-link-global-navigation.png index d43bf6553b..f19634901f 100644 Binary files a/assets/images/help/marketplace/marketplace-link-global-navigation.png and b/assets/images/help/marketplace/marketplace-link-global-navigation.png differ diff --git a/assets/images/help/marketplace/marketplace-new-quantity.png b/assets/images/help/marketplace/marketplace-new-quantity.png deleted file mode 100644 index c6b3f84738..0000000000 Binary files a/assets/images/help/marketplace/marketplace-new-quantity.png and /dev/null differ diff --git a/assets/images/help/marketplace/marketplace-report-app.png b/assets/images/help/marketplace/marketplace-report-app.png index 25b6c9b0f5..fe5fdb1871 100644 Binary files a/assets/images/help/marketplace/marketplace-report-app.png and b/assets/images/help/marketplace/marketplace-report-app.png differ diff --git a/assets/images/help/marketplace/marketplace-select-repo-field.png b/assets/images/help/marketplace/marketplace-select-repo-field.png deleted file mode 100644 index 2d984d8cda..0000000000 Binary files a/assets/images/help/marketplace/marketplace-select-repo-field.png and /dev/null differ diff --git a/assets/images/help/repository/create-dependabot-security-update-button-ungrouped.png b/assets/images/help/repository/create-dependabot-security-update-button-ungrouped.png index 1e443f7969..0d5a51aa54 100644 Binary files a/assets/images/help/repository/create-dependabot-security-update-button-ungrouped.png and b/assets/images/help/repository/create-dependabot-security-update-button-ungrouped.png differ diff --git a/assets/images/help/repository/dependabot-alerts-closed-checkbox.png b/assets/images/help/repository/dependabot-alerts-closed-checkbox.png index a448cccb9a..a7451f7f08 100644 Binary files a/assets/images/help/repository/dependabot-alerts-closed-checkbox.png and b/assets/images/help/repository/dependabot-alerts-closed-checkbox.png differ diff --git a/assets/images/help/repository/dependabot-alerts-closed.png b/assets/images/help/repository/dependabot-alerts-closed.png deleted file mode 100644 index a7451f7f08..0000000000 Binary files a/assets/images/help/repository/dependabot-alerts-closed.png and /dev/null differ diff --git a/assets/images/help/repository/dependabot-alerts-view.png b/assets/images/help/repository/dependabot-alerts-view.png index 0fcd5b3059..c5e0e58551 100644 Binary files a/assets/images/help/repository/dependabot-alerts-view.png and b/assets/images/help/repository/dependabot-alerts-view.png differ diff --git a/assets/images/help/repository/enable-secret-scanning-alerts-fpt.png b/assets/images/help/repository/enable-secret-scanning-alerts-fpt.png deleted file mode 100644 index 3271c0dce9..0000000000 Binary files a/assets/images/help/repository/enable-secret-scanning-alerts-fpt.png and /dev/null differ diff --git a/assets/images/help/repository/enable-secret-scanning-alerts.png b/assets/images/help/repository/enable-secret-scanning-alerts.png new file mode 100644 index 0000000000..d9591bfe8d Binary files /dev/null and b/assets/images/help/repository/enable-secret-scanning-alerts.png differ diff --git a/assets/images/help/repository/enable-secret-scanning-ghec.png b/assets/images/help/repository/enable-secret-scanning-ghec.png deleted file mode 100644 index d17d18a310..0000000000 Binary files a/assets/images/help/repository/enable-secret-scanning-ghec.png and /dev/null differ diff --git a/assets/images/help/repository/legacy-dependabot-alerts-view.png b/assets/images/help/repository/legacy-dependabot-alerts-view.png index e4860e21f6..b2d9dd6049 100644 Binary files a/assets/images/help/repository/legacy-dependabot-alerts-view.png and b/assets/images/help/repository/legacy-dependabot-alerts-view.png differ diff --git a/assets/images/help/repository/tags-download-zip-targz.png b/assets/images/help/repository/tags-download-zip-targz.png new file mode 100644 index 0000000000..bfc8c2388e Binary files /dev/null and b/assets/images/help/repository/tags-download-zip-targz.png differ diff --git a/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/about-your-profile.md b/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/about-your-profile.md index 65f341d069..66af0c9540 100644 --- a/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/about-your-profile.md +++ b/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/about-your-profile.md @@ -33,6 +33,7 @@ People who visit your profile can also see the following information. - Repositories you've starred{% ifversion fpt or ghec %} and organized into lists{% endif %}. For more information, see "[AUTOTITLE](/get-started/exploring-projects-on-github/saving-repositories-with-stars)." - An overview of your activity in organizations, repositories, and teams you're most active in. For more information, see "[AUTOTITLE](/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/showing-an-overview-of-your-activity-on-your-profile)."{% ifversion fpt or ghec %} - Badges and Achievements that highlight your activity and show if you use {% data variables.product.prodname_pro %} or participate in programs like the {% data variables.product.prodname_arctic_vault %}, {% data variables.product.prodname_sponsors %}, or the {% data variables.product.company_short %} Developer Program. For more information, see "[AUTOTITLE](/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile#displaying-badges-on-your-profile)."{% endif %} +- Your pronouns if you've set them. For more information, see "[AUTOTITLE](/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile#adding-pronouns-to-your-profile). You can also set a status on your profile to provide information about your availability. For more information, see "[AUTOTITLE](/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile#setting-a-status)." diff --git a/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile.md b/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile.md index 349c1baf13..cf3eccc06a 100644 --- a/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile.md +++ b/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/personalizing-your-profile.md @@ -96,6 +96,22 @@ For a longer-form and more prominent way of displaying customized information ab {% data reusables.profile.update-profile %} +## Adding pronouns to your profile + +Add pronouns to your public user profile to share information about yourself with other {% data variables.product.product_name %} users. Your pronouns will only be visible to users that are signed in to {% data variables.product.product_name %}. + +{% note %} + +**Note:** + Your pronouns will be visible to {% data variables.product.product_name %} users. It is important to consider that for transgender and non-binary people, covering demands in the workplace, at school, or in other contexts, may make it more comfortable not to share their pronouns. Please be aware of any applicable local laws, regulations, or cultural norms that may pose additional risks to transgender or non-binary people as you consider whether to leverage the pronouns feature. + +{% endnote %} + +{% data reusables.user-settings.access_settings %} +1. Under **Pronouns**, add the pronouns that you want displayed on your profile. You may add custom pronouns. + +{% data reusables.profile.update-profile %} + {% ifversion profile-time-zone %} ## Setting your location and time zone diff --git a/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/setting-your-profile-to-private.md b/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/setting-your-profile-to-private.md index 9ef85f8450..c4b1145b96 100644 --- a/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/setting-your-profile-to-private.md +++ b/content/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/setting-your-profile-to-private.md @@ -26,6 +26,7 @@ When your profile is private, the following content is hidden from your profile - Follow and Sponsor buttons. - Organization memberships. - Stars, projects, packages, and sponsoring tabs. +- Your pronouns. {% note %} diff --git a/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md b/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md index 77948fbfb5..f57615c219 100644 --- a/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md +++ b/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md @@ -21,6 +21,8 @@ Environments are used to describe a general deployment target like `production`, You can configure environments with protection rules and secrets. When a workflow job references an environment, the job won't start until all of the environment's protection rules pass. A job also cannot access secrets that are defined in an environment until all the environment protection rules pass. +{% ifversion actions-break-glass %}Optionally, you can bypass an environment's protection rules and force all pending jobs referencing the environment to proceed. For more information, see "[AUTOTITLE](/actions/managing-workflow-runs/reviewing-deployments#bypassing-environment-protection-rules)."{% endif %} + {% ifversion fpt %} {% note %} @@ -45,6 +47,12 @@ For more information on reviewing jobs that reference an environment with requir Use a wait timer to delay a job for a specific amount of time after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). +{% ifversion actions-break-glass %} +### Do not let admins bypass protection rules + +Prevent admins from being able to bypass the configured environment protection rules. +{% endif %} + ### Deployment branches Use deployment branches to restrict which branches can deploy to the environment. Below are the options for deployment branches for an environment: @@ -95,22 +103,28 @@ Variables stored in an environment are only available to workflow jobs that refe 1. Select **Wait timer**. 1. Enter the number of minutes to wait. 1. Click **Save protection rules**. -3. Optionally, specify what branches can deploy to this environment. For more information about the possible values, see "[Deployment branches](#deployment-branches)." +{%- ifversion actions-break-glass %} +3. Optionally, prevent admins from bypassing environment protection rules. For more information about bypassing environment protection rules, see "[AUTOTITLE](/actions/managing-workflow-runs/reviewing-deployments)." + 1. Select **Do not let admins bypass protection rules**. + 1. Click **Save protection rules**. +{%- endif %} +4. Optionally, specify what branches can deploy to this environment. For more information about the possible values, see "[Deployment branches](#deployment-branches)." 1. Select the desired option in the **Deployment branches** dropdown. 1. If you chose **Selected branches**, enter the branch name patterns that you want to allow. -4. Optionally, add environment secrets. These secrets are only available to workflow jobs that use the environment. Additionally, workflow jobs that use this environment can only access these secrets after any configured rules (for example, required reviewers) pass. For more information about secrets, see "[AUTOTITLE](/actions/security-guides/encrypted-secrets)." +5. Optionally, add environment secrets. These secrets are only available to workflow jobs that use the environment. Additionally, workflow jobs that use this environment can only access these secrets after any configured rules (for example, required reviewers) pass. For more information about secrets, see "[AUTOTITLE](/actions/security-guides/encrypted-secrets)." 1. Under **Environment secrets**, click **Add Secret**. 1. Enter the secret name. 1. Enter the secret value. 1. Click **Add secret**. {%- ifversion actions-configuration-variables %} -5. Optionally, add environment variables. These variables are only available to workflow jobs that use the environment, and are only accessible using the [`vars`](/actions/learn-github-actions/contexts#vars-context) context. For more information, see "[AUTOTITLE](/actions/learn-github-actions/variables)." +6. Optionally, add environment variables. These variables are only available to workflow jobs that use the environment, and are only accessible using the [`vars`](/actions/learn-github-actions/contexts#vars-context) context. For more information, see "[AUTOTITLE](/actions/learn-github-actions/variables)." 1. Under **Environment variables**, click **Add Variable**. 1. Enter the variable name. 1. Enter the variable value. 1. Click **Add variable**. {%- endif %} + You can also create and configure environments through the REST API. For more information, see "[AUTOTITLE](/rest/deployments/environments)," "[AUTOTITLE](/rest/actions/secrets),"{% ifversion actions-configuration-variables %} "[AUTOTITLE](/rest/actions/variables),"{% endif %} and "[AUTOTITLE](/rest/deployments/branch-policies)." Running a workflow that references an environment that does not exist will create an environment with the referenced name. The newly created environment will not have any protection rules or secrets configured. Anyone that can edit workflows in the repository can create environments via a workflow file, but only repository admins can configure the environment. diff --git a/content/actions/managing-workflow-runs/reviewing-deployments.md b/content/actions/managing-workflow-runs/reviewing-deployments.md index ae6415205c..092f5b0338 100644 --- a/content/actions/managing-workflow-runs/reviewing-deployments.md +++ b/content/actions/managing-workflow-runs/reviewing-deployments.md @@ -25,3 +25,25 @@ For more information about environments and required approvals, see "[AUTOTITLE] 4. Approve or reject: - To approve the job, click **Approve and deploy**. Once a job is approved (and any other environment protection rules have passed), the job will proceed. At this point, the job can access any secrets stored in the environment. - To reject the job, click **Reject**. If a job is rejected, the workflow will fail. + +{% ifversion actions-break-glass %} +## Bypassing environment protection rules + +If you have configured environment protection rules that control whether software can be deployed to an environment, you can bypass these rules and force all pending jobs referencing the environment to proceed. + +{% note %} + +**Notes:** + +- You cannot bypass environment protection rules if the environment has been configured to prevent admins from bypassing configured protection rules. For more information, see "[AUTOTITLE](/actions/deployment/targeting-different-environments/using-environments-for-deployment#creating-an-environment)." +- You can only bypass environment protection rules during workflow execution when a job referencing the environment is in a "Pending" state. + +{% endnote %} + +1. Navigate to the workflow run. For more information about navigating to a workflow run, see "[AUTOTITLE](/actions/monitoring-and-troubleshooting-workflows/viewing-workflow-run-history)." +1. To the right of **Deployment protection rules**, click **Start all waiting jobs**. + ![Screenshot of the "Deployment protection rules" section with the "Start all waiting jobs" button outlined in orange](/assets/images/actions-bypass-env-protection-rules.png) +1. In the pop-up window, select the environments for which you want to bypass environment protection rules. +1. Under **Leave a comment**, enter a description for bypassing the environment protection rules. +1. Click **I understand the consequences, start deploying**. +{% endif %} diff --git a/content/actions/migrating-to-github-actions/automating-migration-with-github-actions-importer.md b/content/actions/migrating-to-github-actions/automated-migrations/automating-migration-with-github-actions-importer.md similarity index 78% rename from content/actions/migrating-to-github-actions/automating-migration-with-github-actions-importer.md rename to content/actions/migrating-to-github-actions/automated-migrations/automating-migration-with-github-actions-importer.md index 6289b2a39f..1b6b3d0026 100644 --- a/content/actions/migrating-to-github-actions/automating-migration-with-github-actions-importer.md +++ b/content/actions/migrating-to-github-actions/automated-migrations/automating-migration-with-github-actions-importer.md @@ -1,6 +1,8 @@ --- title: Automating migration with GitHub Actions Importer intro: 'Use {% data variables.product.prodname_actions_importer %} to plan and automate your migration to {% data variables.product.prodname_actions %}.' +redirect_from: + - /actions/migrating-to-github-actions/automating-migration-with-github-actions-importer versions: fpt: '*' ghec: '*' @@ -19,12 +21,6 @@ shortTitle: 'Automate migration with {% data variables.product.prodname_actions_ [Legal notice](#legal-notice) -{% note %} - -**Note**: {% data variables.product.prodname_actions_importer %} is currently available as a public preview. Visit the [sign up page](https://github.com/features/actions-importer/signup) to request access to the preview. Once you are granted access you'll be able to use the `gh-actions-importer` CLI extension - -{% endnote %} - ## About {% data variables.product.prodname_actions_importer %} You can use {% data variables.product.prodname_actions_importer %} to plan and automatically migrate your CI/CD pipelines to {% data variables.product.prodname_actions %} from Azure DevOps, CircleCI, GitLab, Jenkins, and Travis CI. @@ -43,13 +39,10 @@ You can use {% data variables.product.prodname_actions_importer %} to migrate fr - Jenkins - Travis CI -Once you are granted access to the preview, you will be able to access further reference documentation for each of the supported platforms. - ## Prerequisites {% data variables.product.prodname_actions_importer %} has the following requirements: -- You must have been granted access to the public preview for the {% data variables.product.prodname_actions_importer %}. {%- ifversion ghes < 3.5 or ghae %} - Use a {% data variables.product.pat_generic %} with the `read:packages` scope enabled. {%- else %} @@ -111,8 +104,6 @@ You must configure credentials that allow {% data variables.product.prodname_act $ gh actions-importer configure ``` -Once you are granted access to the preview, you will be able to access further reference documentation about using environment variables. - ## Using the {% data variables.product.prodname_actions_importer %} CLI Use the subcommands of `gh actions-importer` to begin your migration to {% data variables.product.prodname_actions %}, including `audit`, `forecast`, `dry-run`, and `migrate`. @@ -138,8 +129,6 @@ Commands: travis-ci An audit will output a list of data used in a Travis CI instance. ``` -Once you are granted access to the preview, you will be able to access further reference documentation about running an audit. - ### Forecasting usage The `forecast` subcommand reviews historical pipeline usage to create a forecast of {% data variables.product.prodname_actions %} usage. @@ -162,8 +151,6 @@ Commands: github Forecasts GitHub Actions usage from historical GitHub pipeline utilization. ``` -Once you are granted access to the preview, you will be able to access further reference documentation about running a forecast. - ### Testing the migration process The `dry-run` subcommand can be used to convert a pipeline to its {% data variables.product.prodname_actions %} equivalent, and then write the workflow to your local filesystem. @@ -185,8 +172,6 @@ Commands: travis-ci Convert a Travis CI pipeline to a GitHub Actions workflow and output its yaml file. ``` -Once you are granted access to the preview, you will be able to access further reference documentation about performing a dry run. - ### Migrating a pipeline to {% data variables.product.prodname_actions %} The `migrate` subcommand can be used to convert a pipeline to its GitHub Actions equivalent and then create a pull request with the contents. @@ -208,32 +193,18 @@ Commands: travis-ci Convert a Travis CI pipeline to a GitHub Actions workflow and and open a pull request with the changes. ``` -Once you are granted access to the preview, you will be able to access further reference documentation about running a migration. +## Performing self-serve migrations using IssueOps + +You can use {% data variables.product.prodname_actions %} and {% data variables.product.prodname_github_issues %} to run CLI commands for {% data variables.product.prodname_actions_importer %}. This allows you to migrate your CI/CD workflows without installing software on your local machine. This approach is especially useful for organizations that want to enable self-service migrations to {% data variables.product.prodname_actions %}. Once IssueOps is configured, users can open an issue with the relevant template to migrate pipelines to {% data variables.product.prodname_actions %}. + +For more information about setting up self-serve migrations with IssueOps, see the [`actions/importer-issue-ops`](https://github.com/actions/importer-issue-ops) template repository. + +## Using the {% data variables.product.prodname_actions_importer %} labs repository + +The {% data variables.product.prodname_actions_importer %} labs repository contains platform-specific learning paths that teach you how to use {% data variables.product.prodname_actions_importer %} and how to approach migrations to {% data variables.product.prodname_actions %}. You can use this repository to learn how to use {% data variables.product.prodname_actions_importer %} to help plan, forecast, and automate your migration to {% data variables.product.prodname_actions %}. + +To learn more, see the [GitHub Actions Importer labs repository](https://github.com/actions/importer-labs/tree/main#readme). ## Legal notice -Portions have been adapted from https://github.com/github/gh-actions-importer/ under the MIT license: - -``` -MIT License - -Copyright (c) 2022 GitHub - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -``` +{% data reusables.actions.actions-importer-legal-notice %} diff --git a/content/actions/migrating-to-github-actions/automated-migrations/extending-github-actions-importer-with-custom-transformers.md b/content/actions/migrating-to-github-actions/automated-migrations/extending-github-actions-importer-with-custom-transformers.md new file mode 100644 index 0000000000..ad30e68e74 --- /dev/null +++ b/content/actions/migrating-to-github-actions/automated-migrations/extending-github-actions-importer-with-custom-transformers.md @@ -0,0 +1,181 @@ +--- +title: Extending GitHub Actions Importer with custom transformers +intro: '{% data variables.product.prodname_actions_importer %} offers the ability to extend its built-in mapping.' +versions: + fpt: '*' + ghec: '*' + ghes: '*' + ghae: '*' +type: how_to +topics: + - Migration + - CI + - CD +shortTitle: 'Extending GitHub Actions Importer' +--- + +[Legal notice](#legal-notice) + +## About custom transformers + +{% data variables.product.prodname_actions_importer %} offers the ability to extend its built-in mapping by creating custom transformers. Custom transformers can be used to: + +- Convert items that {% data variables.product.prodname_actions_importer %} does not automatically convert, or modify how items are converted. For more information, see "[Creating custom transformers for items](#creating-custom-transformers-for-items)." +- Convert references to runners to use different runner labels. For more information, see "[Creating custom transformers for runners](#creating-custom-transformers-for-runners)." +- Convert environment variable values from your existing pipelines to {% data variables.product.prodname_actions %} workflows. For more information, see "[Creating custom transformers for environment variables](#creating-custom-transformers-for-environment-variables)." + +## Using custom transformers with {% data variables.product.prodname_actions_importer %} + +A custom transformer contains mapping logic that {% data variables.product.prodname_actions_importer %} can use to transform your plugins, tasks, runner labels, or environment variables to work with {% data variables.product.prodname_actions %}. Custom transformers are written with a domain-specific language (DSL) built on top of Ruby, and are defined within a file with the `.rb` file extension. + +You can use the `--custom-transformers` CLI option to specify which custom transformer files to use with the `audit`, `dry-run`, and `migrate` commands. + +For example, if custom transformers are defined in a file named `transformers.rb`, you can use the following command to use them with {% data variables.product.prodname_actions_importer %}: + +``` +gh actions-importer ... --custom-transformers transformers.rb +``` + +Alternatively, you can use the glob pattern syntax to specify multiple custom transformer files. For example, if multiple custom transformer files are within a directory named `transformers`, you can provide them all to {% data variables.product.prodname_actions_importer %} with the following command: + +``` +gh actions-importer ... --custom-transformers transformers/*.rb +``` + +{% note %} + +**Note:** When you use custom transformers, the custom transformer files must reside in the same directory, or in subdirectores, from where the `gh actions-importer` command is run. + +{% endnote %} + +## Creating custom transformers for items + +You can create custom transformers that {% data variables.product.prodname_actions_importer %} will use when converting existing build steps or triggers to their equivalent in {% data variables.product.prodname_actions %}. This is especially useful when: + +- {% data variables.product.prodname_actions_importer %} doesn't automatically convert an item. +- You want to change how an item is converted by {% data variables.product.prodname_actions_importer %}. +- Your existing pipelines use custom or proprietary extensions, such as shared libraries in Jenkins, and you need to define how these steps should function in {% data variables.product.prodname_actions %}. + +{% data variables.product.prodname_actions_importer %} uses custom transformers that are defined using a DSL built on top of Ruby. In order to create custom transformers for build steps and triggers: + +- Each custom transformer file must contain at least one `transform` method. +- Each `transform` method must return a `Hash`, an array of `Hash`'s, or `nil`. This returned value will correspond to an action defined in YAML. For more information about actions, see "[AUTOTITLE](/actions/learn-github-actions/understanding-github-actions)." + +### Example custom transformer for a build step + +The following example converts a build step that uses the "buildJavascriptApp" identifier to run various `npm` commands: + +```ruby{:copy} +transform "buildJavascriptApp" do |item| + command = ["build", "package", "deploy"].map do |script| + "npm run #{script}" + end + + { + name: "build javascript app", + run: command.join("\n") + } +end +``` + +The above example results in the following {% data variables.product.prodname_actions %} workflow step. It is comprised of converted build steps that had a `buildJavascriptApp` identifier: + +```yaml +- name: build javascript app + run: | + npm run build + npm run package + npm run deploy +``` + +The `transform` method uses the identifier of the build step from your source CI/CD instance in an argument. In this example, the identifier is `buildJavascriptLibrary`. You can also use comma-separated values to pass multiple identifiers to the `transform` method. For example, `transform "buildJavascriptApp", "buildTypescriptApp" { |item| ... }`. + +{% note %} + +**Note**: The data structure of `item` will be different depending on the CI/CD platform and the type of item being converted. + +{% endnote %} + +## Creating custom transformers for runners + +You can customize the mapping between runners in your source CI/CD instance and their equivalent {% data variables.product.prodname_actions %} runners. + +{% data variables.product.prodname_actions_importer %} uses custom transformers that are defined using a DSL built on top of Ruby. To create custom transformers for runners: + +- The custom transformer file must have at least one `runner` method. +- The `runner` method accepts two parameters. The first parameter is the source CI/CD instance's runner label, and the second parameter is the corresponding {% data variables.product.prodname_actions %} runner label. {% ifversion not ghae %}For more information on {% data variables.product.prodname_actions %} runners, see "[AUTOTITLE](/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources)."{% endif %} + +### Example custom transformers for runners + +The following example shows a `runner` method that converts one runner label to one {% data variables.product.prodname_actions %} runner label in the resulting workflow. + +```ruby{:copy} +runner "linux", "ubuntu-latest" +``` + +You can also use the `runner` method to convert one runner label to multiple {% data variables.product.prodname_actions %} runner labels in the resulting workflow. + +```ruby{:copy} +runner "big-agent", ["self-hosted", "xl", "linux"] +``` + +{% data variables.product.prodname_actions_importer %} attempts to map the runner label as best it can. In cases where it cannot do this, the `ubuntu-latest` runner label is used as a default. You can use a special keyword with the `runner` method to control this default value. For example, the following custom transformer instructs {% data variables.product.prodname_actions_importer %} to use `macos-latest` as the default runner instead of `ubuntu-latest`. + +```ruby{:copy} +runner :default, "macos-latest" +``` + +## Creating custom transformers for environment variables + +You can customize the mapping between environment variables in your source CI/CD pipelines to their values in {% data variables.product.prodname_actions %}. + +{% data variables.product.prodname_actions_importer %} uses custom transformers that are defined using a DSL built on top of Ruby. To create custom transformers for environment variables: + +- The custom transformer file must have at least one `env` method. +- The `env` method accepts two parameters. The first parameter is the name of the environment variable in the original pipeline, and the second parameter is the updated value for the environment variable for {% data variables.product.prodname_actions %}. For more information about {% data variables.product.prodname_actions %} environment variables, see "[AUTOTITLE](/actions/learn-github-actions/variables)." + +### Example custom transformers for environment variables + +There are several ways you can set up custom transformers to map your environment variables. + +- The following example sets the value of any existing environment variables named `OCTO`, to `CAT` when transforming a pipeline. + + ```ruby{:copy} + env "OCTO", "CAT" + ``` + + You can also remove all instances of a specific environment variable so they are not transformed to an {% data variables.product.prodname_actions %} workflow. The following example removes all environment variables with the name `MONA_LISA`. + + ```ruby{:copy} + env "MONA_LISA", nil + ``` + +- You can also map your existing environment variables to secrets. For example, the following `env` method maps an environment variable named `MONALISA` to a secret named `OCTOCAT`. + + ```ruby{:copy} + env "MONALISA", secret("OCTOCAT") + ``` + + This will set up a reference to a secret named `OCTOCAT` in the transformed workflow. For the secret to work, you will need to create the secret in your GitHub repository. For more information, see "[AUTOTITLE](/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository)." + +- You can also use regular expressions to update the values of multiple environment variables at once. For example, the following custom transformer removes all environment variables from the converted workflow: + + ```ruby{:copy} + env /.*/, nil + ``` + + The following example uses a regular expression match group to transform environment variable values to dynamically generated secrets. + + ```ruby{:copy} + env /^(.+)_SSH_KEY/, secret("%s_SSH_KEY) + ``` + + {% note %} + + **Note**: The order in which `env` methods are defined matters when using regular expressions. The first `env` transformer that matches an environment variable name takes precedence over subsequent `env` methods. You should define your most specific environment variable transformers first. + + {% endnote %} + +## Legal notice + +{% data reusables.actions.actions-importer-legal-notice %} diff --git a/content/actions/migrating-to-github-actions/automated-migrations/index.md b/content/actions/migrating-to-github-actions/automated-migrations/index.md new file mode 100644 index 0000000000..74333dda9c --- /dev/null +++ b/content/actions/migrating-to-github-actions/automated-migrations/index.md @@ -0,0 +1,15 @@ +--- +title: 'Using {% data variables.product.prodname_actions_importer %} to automate migrations' +shortTitle: Automated migrations +intro: 'Learn how to use {% data variables.product.prodname_actions_importer %} to migrate your CI/CD workflows to {% data variables.product.prodname_actions %}.' +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +children: + - /automating-migration-with-github-actions-importer + - /extending-github-actions-importer-with-custom-transformers + - /supplemental-arguments-and-settings +--- + diff --git a/content/actions/migrating-to-github-actions/automated-migrations/supplemental-arguments-and-settings.md b/content/actions/migrating-to-github-actions/automated-migrations/supplemental-arguments-and-settings.md new file mode 100644 index 0000000000..55b2373f65 --- /dev/null +++ b/content/actions/migrating-to-github-actions/automated-migrations/supplemental-arguments-and-settings.md @@ -0,0 +1,148 @@ +--- +title: Supplemental arguments and settings +intro: '{% data variables.product.prodname_actions_importer %} has several supplemental arguments and settings to tailor the migration process to your needs.' +versions: + fpt: '*' + ghec: '*' + ghes: '*' + ghae: '*' +type: reference +topics: + - Migration + - CI + - CD +--- + +[Legal notice](#legal-notice) + +This article provides general information for configuring {% data variables.product.prodname_actions_importer %}'s supplemental arguments and settings, such as optional parameters, path arguments, and network settings. + +## Optional parameters + +{% data variables.product.prodname_actions_importer %} has several optional parameters that you can use to customize the migration process. + +### Limiting allowed actions + +The following options can be used to limit which actions are allowed in converted workflows. When used in combination, these options expand the list of allowed actions. If none of these options are supplied, then all actions are allowed. + +- `--allowed-actions` specifies a list of actions to allow in converted workflows. Wildcards are supported. Any other actions other than those provided will be disallowed. + + For example: + + ```shell + --allowed-actions {% data reusables.actions.action-checkout %} actions/upload-artifact@* my-org/* + ``` + + You can provide an empty list to disallow all actions. For example, `--allowed-actions=`. + +- `--allow-verified-actions` specifies that all actions from verified creators are allowed. + +- `--allow-github-created-actions` specifies that actions published from the `github` or `actions` organizations are allowed. + + For example, such actions include `github/super-linter` and `actions/checkout`. + + This option is equivalent to `--allowed-actions actions/* github/*`. + +### Using a credentials file for authentication + +The `--credentials-file` parameter specifies the path to a file containing credentials for different servers that {% data variables.product.prodname_actions_importer %} can authenticate to. This is useful when build scripts (such as `.travis.yml` or `jenkinsfile`) are stored in multiple {% data variables.product.prodname_ghe_server %} instances. + +A credentials file must be a YAML file containing a list of server and access token combinations. {% data variables.product.prodname_actions_importer %} uses the credentials for the URL that most closely matches the network request being made. + +For example: + +```yml +- url: https://github.com + access_token: ghp_mygeneraltoken +- url: https://github.com/specific_org/ + access_token: ghp_myorgspecifictoken +- url: https://jenkins.org + access_token: abc123 + username: marty_mcfly +``` + +For the above credentials file, {% data variables.product.prodname_actions_importer %} uses the access token `ghp_mygeneraltoken` to authenticate all network requests to `https://github.com`, _unless_ the network request is for a repository in the `specific_org` organization. In that case, the `ghp_myorgspecifictoken` token is used to authenticate instead. + +#### Alternative source code providers + +{% data variables.product.prodname_actions_importer %} can automatically fetch source code from non-{% data variables.product.prodname_dotcom %} repositories. A credentials file can specify the `provider`, the provider URL, and the credentials needed to retrieve the source code. + +For example: + +```yml +- url: https://gitlab.com + access_token: super_secret_token + provider: gitlab +``` + +For the above example, {% data variables.product.prodname_actions_importer %} uses the token `super_secret_token` to retrieve any source code that is hosted on `https://gitlab.com`. + +Supported values for `provider` are: + +- `github` (default) +- `gitlab` +- `bitbucket_server` +- `azure_devops` + +### Restricting {% data variables.product.prodname_actions %} features to include in workflows + +You can use the `--features` option to limit the features used in workflows that {% data variables.product.prodname_actions_importer %} creates. This is useful for excluding newer {% data variables.product.prodname_actions %} syntax from workflows when migrating to an older {% data variables.product.prodname_ghe_server %} instance. When using the `--features` option, you must specify the version of {% data variables.product.prodname_ghe_server %} that you are migrating to. + +For example: + +```bash +gh actions-importer dry-run ... --features ghes-3.3 +``` + +The supported values for `--features` are: + +- `all` (default value) +- `ghes-latest` +- `ghes-`, where `` is the version of {% data variables.product.prodname_ghe_server %}, `3.0` or later. For example, `ghes-3.3`. + +### Disabling network response caching + +By default, {% data variables.product.prodname_actions_importer %} caches responses from network requests to reduce network load and reduce run time. You can use the `--no-http-cache` option to disable the network cache. For example: + +```bash +gh actions-importer forecast ... --no-http-cache +``` + +## Path arguments + +When running {% data variables.product.prodname_actions_importer %}, path arguments are relative to the container's disk, so absolute paths relative to the container's host machine are not supported. When {% data variables.product.prodname_actions_importer %} is run, the container's `/data` directory is mounted to the directory where {% data variables.product.prodname_actions_importer %} is run. + +For example, the following command outputs the {% data variables.product.prodname_actions_importer %} audit summary to the `/Users/mona/out` directory: + +```console +# Current directory: /Users/mona +$ gh actions-importer audit --output-dir /data/out +``` + +## Using a proxy + +To access servers that are configured with a HTTP proxy, you must set the following environment variables with the proxy's URL: + +- `OCTOKIT_PROXY`: for any {% data variables.product.prodname_dotcom %} server. +- `HTTP_PROXY` (or `HTTPS_PROXY`): for any other servers. + +For example: + +```sh +export OCTOKIT_PROXY=https://proxy.example.com:8443 +export HTTPS_PROXY=$OCTOKIT_PROXY +``` + +If the proxy requires authentication, a username and password must be included in the proxy URL. For example, `https://username:password@proxy.url:port`. + +## Disabling SSL certificate verification + +By default, {% data variables.product.prodname_actions_importer %} verifies SSL certificates when making network requests. You can disable SSL certificate verification with the `--no-ssl-verify` option. For example: + +```bash +gh actions-importer audit --output-dir ./output --no-ssl-verify +``` + +## Legal notice + +{% data reusables.actions.actions-importer-legal-notice %} diff --git a/content/actions/migrating-to-github-actions/index.md b/content/actions/migrating-to-github-actions/index.md index 05e4e9f359..dcccc48055 100644 --- a/content/actions/migrating-to-github-actions/index.md +++ b/content/actions/migrating-to-github-actions/index.md @@ -10,10 +10,6 @@ versions: redirect_from: - /articles/migrating-github-actions-from-hcl-syntax-to-yaml-syntax children: - - /automating-migration-with-github-actions-importer - - /migrating-from-azure-pipelines-to-github-actions - - /migrating-from-circleci-to-github-actions - - /migrating-from-gitlab-cicd-to-github-actions - - /migrating-from-jenkins-to-github-actions - - /migrating-from-travis-ci-to-github-actions ---- + - /automated-migrations + - /manual-migrations +--- \ No newline at end of file diff --git a/content/actions/migrating-to-github-actions/manual-migrations/index.md b/content/actions/migrating-to-github-actions/manual-migrations/index.md new file mode 100644 index 0000000000..6474e5cb61 --- /dev/null +++ b/content/actions/migrating-to-github-actions/manual-migrations/index.md @@ -0,0 +1,17 @@ +--- +title: Manually migrating to GitHub Actions +shortTitle: Manual migrations +intro: 'Learn how to manually migrate your existing CI/CD workflows to {% data variables.product.prodname_actions %}.' +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +children: + - /migrating-from-azure-pipelines-to-github-actions + - /migrating-from-circleci-to-github-actions + - /migrating-from-gitlab-cicd-to-github-actions + - /migrating-from-jenkins-to-github-actions + - /migrating-from-travis-ci-to-github-actions +--- + diff --git a/content/actions/migrating-to-github-actions/migrating-from-azure-pipelines-to-github-actions.md b/content/actions/migrating-to-github-actions/manual-migrations/migrating-from-azure-pipelines-to-github-actions.md similarity index 99% rename from content/actions/migrating-to-github-actions/migrating-from-azure-pipelines-to-github-actions.md rename to content/actions/migrating-to-github-actions/manual-migrations/migrating-from-azure-pipelines-to-github-actions.md index 5bc7b3f70f..2dc7fe1f40 100644 --- a/content/actions/migrating-to-github-actions/migrating-from-azure-pipelines-to-github-actions.md +++ b/content/actions/migrating-to-github-actions/manual-migrations/migrating-from-azure-pipelines-to-github-actions.md @@ -3,6 +3,7 @@ title: Migrating from Azure Pipelines to GitHub Actions intro: '{% data variables.product.prodname_actions %} and Azure Pipelines share several configuration similarities, which makes migrating to {% data variables.product.prodname_actions %} relatively straightforward.' redirect_from: - /actions/learn-github-actions/migrating-from-azure-pipelines-to-github-actions + - /actions/migrating-to-github-actions/migrating-from-azure-pipelines-to-github-actions versions: fpt: '*' ghes: '*' diff --git a/content/actions/migrating-to-github-actions/migrating-from-circleci-to-github-actions.md b/content/actions/migrating-to-github-actions/manual-migrations/migrating-from-circleci-to-github-actions.md similarity index 99% rename from content/actions/migrating-to-github-actions/migrating-from-circleci-to-github-actions.md rename to content/actions/migrating-to-github-actions/manual-migrations/migrating-from-circleci-to-github-actions.md index be7a0d12f9..82b61fbf7f 100644 --- a/content/actions/migrating-to-github-actions/migrating-from-circleci-to-github-actions.md +++ b/content/actions/migrating-to-github-actions/manual-migrations/migrating-from-circleci-to-github-actions.md @@ -3,6 +3,7 @@ title: Migrating from CircleCI to GitHub Actions intro: 'GitHub Actions and CircleCI share several similarities in configuration, which makes migration to GitHub Actions relatively straightforward.' redirect_from: - /actions/learn-github-actions/migrating-from-circleci-to-github-actions + - /actions/migrating-to-github-actions/migrating-from-circleci-to-github-actions versions: fpt: '*' ghes: '*' diff --git a/content/actions/migrating-to-github-actions/migrating-from-gitlab-cicd-to-github-actions.md b/content/actions/migrating-to-github-actions/manual-migrations/migrating-from-gitlab-cicd-to-github-actions.md similarity index 99% rename from content/actions/migrating-to-github-actions/migrating-from-gitlab-cicd-to-github-actions.md rename to content/actions/migrating-to-github-actions/manual-migrations/migrating-from-gitlab-cicd-to-github-actions.md index a21d12b396..52cfa30a3b 100644 --- a/content/actions/migrating-to-github-actions/migrating-from-gitlab-cicd-to-github-actions.md +++ b/content/actions/migrating-to-github-actions/manual-migrations/migrating-from-gitlab-cicd-to-github-actions.md @@ -3,6 +3,7 @@ title: Migrating from GitLab CI/CD to GitHub Actions intro: '{% data variables.product.prodname_actions %} and GitLab CI/CD share several configuration similarities, which makes migrating to {% data variables.product.prodname_actions %} relatively straightforward.' redirect_from: - /actions/learn-github-actions/migrating-from-gitlab-cicd-to-github-actions + - /actions/migrating-to-github-actions/migrating-from-gitlab-cicd-to-github-actions versions: fpt: '*' ghes: '*' diff --git a/content/actions/migrating-to-github-actions/migrating-from-jenkins-to-github-actions.md b/content/actions/migrating-to-github-actions/manual-migrations/migrating-from-jenkins-to-github-actions.md similarity index 99% rename from content/actions/migrating-to-github-actions/migrating-from-jenkins-to-github-actions.md rename to content/actions/migrating-to-github-actions/manual-migrations/migrating-from-jenkins-to-github-actions.md index 5a351755bf..db97acf6ba 100644 --- a/content/actions/migrating-to-github-actions/migrating-from-jenkins-to-github-actions.md +++ b/content/actions/migrating-to-github-actions/manual-migrations/migrating-from-jenkins-to-github-actions.md @@ -3,6 +3,7 @@ title: Migrating from Jenkins to GitHub Actions intro: '{% data variables.product.prodname_actions %} and Jenkins share multiple similarities, which makes migration to {% data variables.product.prodname_actions %} relatively straightforward.' redirect_from: - /actions/learn-github-actions/migrating-from-jenkins-to-github-actions + - /actions/migrating-to-github-actions/migrating-from-jenkins-to-github-actions versions: fpt: '*' ghes: '*' diff --git a/content/actions/migrating-to-github-actions/migrating-from-travis-ci-to-github-actions.md b/content/actions/migrating-to-github-actions/manual-migrations/migrating-from-travis-ci-to-github-actions.md similarity index 99% rename from content/actions/migrating-to-github-actions/migrating-from-travis-ci-to-github-actions.md rename to content/actions/migrating-to-github-actions/manual-migrations/migrating-from-travis-ci-to-github-actions.md index 6f7ff2b370..16bec8d0f8 100644 --- a/content/actions/migrating-to-github-actions/migrating-from-travis-ci-to-github-actions.md +++ b/content/actions/migrating-to-github-actions/manual-migrations/migrating-from-travis-ci-to-github-actions.md @@ -3,6 +3,7 @@ title: Migrating from Travis CI to GitHub Actions intro: '{% data variables.product.prodname_actions %} and Travis CI share multiple similarities, which helps make it relatively straightforward to migrate to {% data variables.product.prodname_actions %}.' redirect_from: - /actions/learn-github-actions/migrating-from-travis-ci-to-github-actions + - /actions/migrating-to-github-actions/migrating-from-travis-ci-to-github-actions versions: fpt: '*' ghes: '*' diff --git a/content/actions/using-workflows/events-that-trigger-workflows.md b/content/actions/using-workflows/events-that-trigger-workflows.md index 3ff88804ec..aed53bc6fb 100644 --- a/content/actions/using-workflows/events-that-trigger-workflows.md +++ b/content/actions/using-workflows/events-that-trigger-workflows.md @@ -19,11 +19,15 @@ shortTitle: Events that trigger workflows Workflow triggers are events that cause a workflow to run. For more information about how to use workflow triggers, see "[AUTOTITLE](/actions/using-workflows/triggering-a-workflow)." -## Available events +Some events have multiple activity types. For these events, you can specify which activity types will trigger a workflow run. For more information about what each activity type means, see "[AUTOTITLE](/webhooks-and-events/webhooks/webhook-events-and-payloads)." -Some events have multiple activity types. For these events, you can specify which activity types will trigger a workflow run. For more information about what each activity type means, see "[AUTOTITLE](/webhooks-and-events/webhooks/webhook-events-and-payloads)." Note that not all webhook events trigger workflows. +{% note %} -### `branch_protection_rule` +**Note:** Not all webhook events trigger workflows. + +{% endnote %} + +## `branch_protection_rule` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -47,7 +51,7 @@ on: types: [created, deleted] ``` -### `check_run` +## `check_run` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -71,7 +75,7 @@ on: types: [rerequested, completed] ``` -### `check_suite` +## `check_suite` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -101,7 +105,7 @@ on: types: [completed] ``` -### `create` +## `create` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -122,7 +126,7 @@ on: create ``` -### `delete` +## `delete` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -145,7 +149,7 @@ on: delete ``` -### `deployment` +## `deployment` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -160,7 +164,7 @@ on: deployment ``` -### `deployment_status` +## `deployment_status` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -182,7 +186,7 @@ on: ``` {% ifversion discussions %} -### `discussion` +## `discussion` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -208,7 +212,7 @@ on: types: [created, edited, answered] ``` -### `discussion_comment` +## `discussion_comment` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -236,7 +240,7 @@ on: {% endif %} -### `fork` +## `fork` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -253,7 +257,7 @@ on: fork ``` -### `gollum` +## `gollum` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -270,7 +274,7 @@ on: gollum ``` -### `issue_comment` +## `issue_comment` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -294,7 +298,7 @@ on: types: [created, deleted] ``` -#### `issue_comment` on issues only or pull requests only +### `issue_comment` on issues only or pull requests only The `issue_comment` event occurs for comments on both issues and pull requests. You can use the `github.event.issue.pull_request` property in a conditional to take different action depending on whether the triggering object was an issue or pull request. @@ -327,7 +331,7 @@ jobs: NUMBER: {% raw %}${{ github.event.issue.number }}{% endraw %} ``` -### `issues` +## `issues` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -351,7 +355,7 @@ on: types: [opened, edited, milestoned] ``` -### `label` +## `label` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -379,7 +383,7 @@ on: {% ifversion fpt or ghec %} -### `merge_group` +## `merge_group` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -405,7 +409,7 @@ on: ``` {% endif %} -### `milestone` +## `milestone` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -431,7 +435,7 @@ on: types: [opened, deleted] ``` -### `page_build` +## `page_build` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -448,7 +452,7 @@ on: page_build ``` -### `project` +## `project` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -486,7 +490,7 @@ on: types: [created, deleted] ``` -### `project_card` +## `project_card` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -524,7 +528,7 @@ on: types: [created, deleted] ``` -### `project_column` +## `project_column` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -562,7 +566,7 @@ on: types: [created, deleted] ``` -### `public` +## `public` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -579,7 +583,7 @@ on: public ``` -### `pull_request` +## `pull_request` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -625,7 +629,7 @@ jobs: - run: echo 'A review from octo-team was requested' ``` -#### Running your `pull_request` workflow based on the head or base branch of a pull request +### Running your `pull_request` workflow based on the head or base branch of a pull request You can use the `branches` or `branches-ignore` filter to configure your workflow to only run on pull requests that target specific branches. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore)." @@ -672,7 +676,7 @@ jobs: - run: echo "The head of this PR starts with 'releases/'" ``` -#### Running your `pull_request` workflow based on files changed in a pull request +### Running your `pull_request` workflow based on files changed in a pull request You can also configure your workflow to run when a pull request changes specific files. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)." @@ -702,7 +706,7 @@ on: {% endnote %} -#### Running your `pull_request` workflow when a pull request merges +### Running your `pull_request` workflow when a pull request merges When a pull request merges, the pull request is automatically closed. To run a workflow when a pull request merges, use the `pull_request` `closed` event type along with a conditional that checks the `merged` value of the event. For example, the following workflow will run whenever a pull request closes. The `if_merged` job will only run if the pull request was also merged. @@ -723,11 +727,11 @@ jobs: {% data reusables.developer-site.pull_request_forked_repos_link %} -### `pull_request_comment` (use `issue_comment`) +## `pull_request_comment` (use `issue_comment`) To run your workflow when a comment on a pull request (not on a pull request's diff) is created, edited, or deleted, use the [`issue_comment`](#issue_comment) event. For activity related to pull request reviews or pull request review comments, use the [`pull_request_review`](#pull_request_review) or [`pull_request_review_comment`](#pull_request_review_comment) events. -### `pull_request_review` +## `pull_request_review` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -749,7 +753,7 @@ on: types: [edited, dismissed] ``` -#### Running a workflow when a pull request is approved +### Running a workflow when a pull request is approved To run your workflow when a pull request has been approved, you can trigger your workflow with the `submitted` type of `pull_request_review` event, then check the review state with the `github.event.review.state` property. For example, this workflow will run whenever a pull request review is submitted, but the `approved` job will only run if the submitted review is an approving review: @@ -768,7 +772,7 @@ jobs: {% data reusables.developer-site.pull_request_forked_repos_link %} -### `pull_request_review_comment` +## `pull_request_review_comment` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -792,7 +796,7 @@ on: {% data reusables.developer-site.pull_request_forked_repos_link %} -### `pull_request_target` +## `pull_request_target` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -824,7 +828,7 @@ on: types: [assigned, opened, synchronize, reopened] ``` -#### Running your `pull_request_target` workflow based on the head or base branch of a pull request +### Running your `pull_request_target` workflow based on the head or base branch of a pull request You can use the `branches` or `branches-ignore` filter to configure your workflow to only run on pull requests that target specific branches. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore)." @@ -871,7 +875,7 @@ jobs: - run: echo "The head of this PR starts with 'releases/'" ``` -#### Running your `pull_request_target` workflow based on files changed in a pull request +### Running your `pull_request_target` workflow based on files changed in a pull request You can use the `paths` or `paths-ignore` filter to configure your workflow to run when a pull request changes specific files. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)." @@ -901,7 +905,7 @@ on: {% endnote %} -#### Running your `pull_request_target` workflow when a pull request merges +### Running your `pull_request_target` workflow when a pull request merges When a pull request merges, the pull request is automatically closed. To run a workflow when a pull request merges, use the `pull_request_target` `closed` event type along with a conditional that checks the `merged` value of the event. For example, the following workflow will run whenever a pull request closes. The `if_merged` job will only run if the pull request was also merged. @@ -920,7 +924,7 @@ jobs: echo The PR was merged ``` -### `push` +## `push` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -953,7 +957,7 @@ on: {% endnote %} -#### Running your workflow only when a push to specific branches occurs +### Running your workflow only when a push to specific branches occurs You can use the `branches` or `branches-ignore` filter to configure your workflow to only run when specific branches are pushed. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore)." @@ -982,7 +986,7 @@ on: {% endnote %} -#### Running your workflow only when a push of specific tags occurs +### Running your workflow only when a push of specific tags occurs You can use the `tags` or `tags-ignore` filter to configure your workflow to only run when specific tags are pushed. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore)." @@ -995,7 +999,7 @@ on: - v1.** ``` -#### Running your workflow only when a push affects specific files +### Running your workflow only when a push affects specific files You can use the `paths` or `paths-ignore` filter to configure your workflow to run when a push to specific files occurs. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)." @@ -1023,7 +1027,7 @@ on: {% endnote %} -### `registry_package` +## `registry_package` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -1047,7 +1051,7 @@ on: types: [published] ``` -### `release` +## `release` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -1081,7 +1085,7 @@ on: types: [published] ``` -### `repository_dispatch` +## `repository_dispatch` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | ------------------ | ------------ | ------------ | ------------------| @@ -1134,7 +1138,7 @@ jobs: run: echo $MESSAGE ``` -### `schedule` +## `schedule` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -1179,7 +1183,7 @@ You can use [crontab guru](https://crontab.guru/) to help generate your cron syn Notifications for scheduled workflows are sent to the user who last modified the cron syntax in the workflow file. For more information, see "[AUTOTITLE](/actions/monitoring-and-troubleshooting-workflows/notifications-for-workflow-runs)." -### `status` +## `status` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -1214,7 +1218,7 @@ jobs: echo The status is error or failed: $DESCRIPTION ``` -### `watch` +## `watch` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -1238,7 +1242,7 @@ on: types: [started] ``` -### `workflow_call` +## `workflow_call` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | ------------------ | ------------ | ------------ | ------------------| @@ -1252,7 +1256,7 @@ The example below only runs the workflow when it's called from another workflow: on: workflow_call ``` -### `workflow_dispatch` +## `workflow_dispatch` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | ------------------ | ------------ | ------------ | ------------------| @@ -1264,7 +1268,7 @@ To manually trigger a workflow, use the `workflow_dispatch` event. You can manua on: workflow_dispatch ``` -#### Providing inputs +### Providing inputs You can configure custom-defined input properties, default input values, and required inputs for the event directly in your workflow. When you trigger the event, you can provide the `ref` and any `inputs`. When the workflow runs, you can access the input values in the {% ifversion actions-unified-inputs %}`inputs`{% else %}`github.event.inputs`{% endif %} context. For more information, see "[AUTOTITLE](/actions/learn-github-actions/contexts)." @@ -1320,7 +1324,7 @@ gh workflow run run-tests.yml -f logLevel=warning -f tags=false -f environment=s For more information, see the {% data variables.product.prodname_cli %} information in "[AUTOTITLE](/actions/managing-workflow-runs/manually-running-a-workflow)." -### `workflow_run` +## `workflow_run` | Webhook event payload | Activity types | `GITHUB_SHA` | `GITHUB_REF` | | --------------------- | -------------- | ------------ | -------------| @@ -1362,7 +1366,7 @@ on: - completed ``` -#### Running a workflow based on the conclusion of another workflow +### Running a workflow based on the conclusion of another workflow A workflow run is triggered regardless of the conclusion of the previous workflow. If you want to run a job or step based on the result of the triggering workflow, you can use a conditional with the `github.event.workflow_run.conclusion` property. For example, this workflow will run whenever a workflow named "Build" completes, but the `on-success` job will only run if the "Build" workflow succeeded, and the `on-failure` job will only run if the "Build" workflow failed: @@ -1385,7 +1389,7 @@ jobs: - run: echo 'The triggering workflow failed' ``` -#### Limiting your workflow to run based on branches +### Limiting your workflow to run based on branches You can use the `branches` or `branches-ignore` filter to specify what branches the triggering workflow must run on in order to trigger your workflow. For more information, see "[AUTOTITLE](/actions/using-workflows/workflow-syntax-for-github-actions#onworkflow_runbranchesbranches-ignore)." For example, a workflow with the following trigger will only run when the workflow named `Build` runs on a branch named `canary`. @@ -1397,7 +1401,7 @@ on: branches: [canary] ``` -#### Using data from the triggering workflow +### Using data from the triggering workflow You can access the [`workflow_run` event payload](/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_run) that corresponds to the workflow that triggered your workflow. For example, if your triggering workflow generates artifacts, a workflow triggered with the `workflow_run` event can access these artifacts. diff --git a/content/actions/using-workflows/workflow-syntax-for-github-actions.md b/content/actions/using-workflows/workflow-syntax-for-github-actions.md index 6d9b4ce7cf..38a5c1ce42 100644 --- a/content/actions/using-workflows/workflow-syntax-for-github-actions.md +++ b/content/actions/using-workflows/workflow-syntax-for-github-actions.md @@ -82,7 +82,7 @@ In addition to the standard input parameters that are available, `on.workflow_ca If a `default` parameter is not set, the default value of the input is `false` for a boolean, `0` for a number, and `""` for a string. -Within the called workflow, you can use the `inputs` context to refer to an input. +Within the called workflow, you can use the `inputs` context to refer to an input. For more information, see "[AUTOTITLE](/actions/learn-github-actions/contexts#inputs-context)." If a caller workflow passes an input that is not specified in the called workflow, this results in an error. diff --git a/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/configuring-code-scanning-for-your-appliance.md b/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/configuring-code-scanning-for-your-appliance.md index df0c518d07..a2db122781 100644 --- a/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/configuring-code-scanning-for-your-appliance.md +++ b/content/admin/code-security/managing-github-advanced-security-for-your-enterprise/configuring-code-scanning-for-your-appliance.md @@ -42,10 +42,11 @@ You can configure {% data variables.product.prodname_code_scanning %} to run {% - A VM or container for {% data variables.product.prodname_code_scanning %} analysis to run in. -## Running {% data variables.product.prodname_code_scanning %} using {% data variables.product.prodname_actions %} + - + + +## Running {% data variables.product.prodname_code_scanning %} using {% data variables.product.prodname_actions %} ### Setting up a self-hosted runner diff --git a/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/migrating-your-enterprise-to-github-actions.md b/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/migrating-your-enterprise-to-github-actions.md index cef0ffd48e..5f8fff4eff 100644 --- a/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/migrating-your-enterprise-to-github-actions.md +++ b/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/migrating-your-enterprise-to-github-actions.md @@ -48,7 +48,7 @@ Identify the gates and checks in your existing system and verify that you can im ### Identifying and validating migration tools -Automated migration tools can translate your enterprise's workflows from the existing system's syntax to the syntax required by {% data variables.product.prodname_actions %}. Identify third-party tooling or contact your dedicated representative or {% data variables.contact.contact_enterprise_sales %} to ask about tools that {% data variables.product.company_short %} can provide. For example, you can use the {% data variables.product.prodname_actions_importer %} to plan, scope, and migrate your CI pipelines to {% data variables.product.prodname_actions %} from various supported services. For more information, see "[AUTOTITLE](/actions/migrating-to-github-actions/automating-migration-with-github-actions-importer)." +Automated migration tools can translate your enterprise's workflows from the existing system's syntax to the syntax required by {% data variables.product.prodname_actions %}. Identify third-party tooling or contact your dedicated representative or {% data variables.contact.contact_enterprise_sales %} to ask about tools that {% data variables.product.company_short %} can provide. For example, you can use the {% data variables.product.prodname_actions_importer %} to plan, scope, and migrate your CI pipelines to {% data variables.product.prodname_actions %} from various supported services. For more information, see "[AUTOTITLE](/actions/migrating-to-github-actions/automated-migrations/automating-migration-with-github-actions-importer)." After you've identified a tool to automate your migrations, validate the tool by running the tool on some test workflows and verifying that the results are as expected. diff --git a/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise.md b/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise.md index 7232f8f65d..b100934f84 100644 --- a/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise.md +++ b/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-authentication-for-your-enterprise.md @@ -137,6 +137,8 @@ If you use an external directory or identity provider (IdP) to centralize access - "[AUTOTITLE](/admin/identity-and-access-management/using-ldap-for-enterprise-iam)" - "[AUTOTITLE](/admin/identity-and-access-management/using-saml-for-enterprise-iam)" +{% data reusables.enterprise.saml-or-ldap %} + If you choose to use external authentication, you can also configure fallback authentication for people who don't have an account on your external authentication provider. For example, you may want to grant access to a contractor or machine user. For more information, see "[AUTOTITLE](/admin/identity-and-access-management/managing-iam-for-your-enterprise/allowing-built-in-authentication-for-users-outside-your-provider)." {% ifversion scim-for-ghes %} diff --git a/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users.md b/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users.md index 7155592fbb..d5ddce4fa5 100644 --- a/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users.md +++ b/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users.md @@ -80,7 +80,8 @@ To discover how a member was added to an organization, you can filter the member {% data variables.enterprise.prodname_managed_users_caps %} can only contribute to private and internal repositories within their enterprise and private repositories owned by their user account. {% data variables.enterprise.prodname_managed_users_caps %} have read-only access to the wider {% data variables.product.prodname_dotcom %} community. These visibility and access restrictions for users and content apply to all requests, including API requests. -* {% data variables.enterprise.prodname_managed_users_caps %} cannot be invited to organizations or repositories outside of the enterprise, nor can the {% data variables.enterprise.prodname_managed_users %} be invited to other enterprises. +* {% data variables.enterprise.prodname_managed_users_caps %} authenticate using only your identity provider, and have no password or two-factor authentication methods stored on {% data variables.product.prodname_dotcom %}. As a result, they do not see the sudo prompt when taking sensitive actions. For more information, see "[AUTOTITLE](/authentication/keeping-your-account-and-data-secure/sudo-mode)." +* {% data variables.enterprise.prodname_managed_users_caps %} cannot be invited to organizations or repositories outside of the enterprise, nor can the {% data variables.enterprise.prodname_managed_users %} be invited to other enterprises. * {% data variables.enterprise.prodname_managed_users_caps %} and the content they create is only visible to other members of the enterprise. * Other {% data variables.product.prodname_dotcom %} users cannot see, mention, or invite a {% data variables.enterprise.prodname_managed_user %} to collaborate. * {% data variables.enterprise.prodname_managed_users_caps %} can view all public repositories on {% data variables.product.prodname_dotcom_the_website %}, but cannot interact with repositories outside of the enterprise in any of the following ways: diff --git a/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/managing-team-memberships-with-identity-provider-groups.md b/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/managing-team-memberships-with-identity-provider-groups.md index 23aa406ccb..70ba89132b 100644 --- a/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/managing-team-memberships-with-identity-provider-groups.md +++ b/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/managing-team-memberships-with-identity-provider-groups.md @@ -20,7 +20,7 @@ topics: ## About team management with {% data variables.product.prodname_emus %} -With {% data variables.product.prodname_emus %}, you can manage team and organization membership within your enterprise through your IdP by connecting {% data variables.product.prodname_dotcom %} teams with IdP groups. When you connect a team in one of your enterprise's organizations to an IdP group, changes to membership from the IdP group are reflected in your enterprise automatically, reducing the need for manual updates and custom scripts. +With {% data variables.product.prodname_emus %}, you can manage team and organization membership within your enterprise through your IdP by connecting {% data variables.product.prodname_dotcom %} teams with IdP groups. When you connect a team in one of your enterprise's organizations to an IdP group, changes to membership from the IdP group are reflected in your enterprise automatically, reducing the need for manual updates and custom scripts. When a change to an IdP group or a new team connection results in a {% data variables.enterprise.prodname_managed_user %} joining a team in an organization they were not already a member of, the {% data variables.enterprise.prodname_managed_user %} will automatically be added to the organization. When you disconnect a group from a team, users who became members of the organization via team membership are removed from the organization if they are not assigned membership in the organization by any other means. @@ -44,9 +44,11 @@ You can connect a team in your enterprise to one IdP group. You can assign the s If you are connecting an existing team to an IdP group, you must first remove any members that were added manually. After you connect a team in your enterprise to an IdP group, your IdP administrator must make team membership changes through the identity provider. You cannot manage team membership on {% data variables.product.prodname_dotcom_the_website %}. +If you use Azure AD as your IdP, you can only connect a team to a security group. Nested group memberships and Microsoft 365 groups are not supported. + ## Creating a new team connected to an IdP group -Any member of an organization can create a new team and connect the team to an IdP group. +Any member of an organization can create a new team and connect the team to an IdP group. {% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} @@ -73,7 +75,7 @@ Organization owners and team maintainers can manage the existing connection betw {% data reusables.profile.access_org %} {% data reusables.organizations.specific_team %} {% data reusables.organizations.team_settings %} -1. Optionally, under "Identity Provider Group", to the right of the IdP group you want to disconnect, click {% octicon "x" aria-label="X symbol" %}. +1. Optionally, under "Identity Provider Group", to the right of the IdP group you want to disconnect, click {% octicon "x" aria-label="X symbol" %}. ![Unselect a connected IdP group from the GitHub team](/assets/images/enterprise/github-ae/teams/unselect-idp-group.png) 1. To connect an IdP group, under "Identity Provider Group", select the drop-down menu, and click an identity provider group from the list. ![Drop-down menu to choose identity provider group](/assets/images/enterprise/github-ae/teams/choose-an-idp-group.png) @@ -88,5 +90,5 @@ You can review a list of IdP groups, see any teams connected to an IdP group, an ![Screenshot showing "Identity provider" tab in enterprise sidebar](/assets/images/help/enterprises/enterprise-account-identity-provider-tab.png) 2. To see the members and teams connected to an IdP group, click the group's name. ![Screenshot showing list of IdP groups, the group name is highlighted](/assets/images/help/enterprises/select-idp-group.png) -4. To view the teams connected to the IdP group, click **Teams**. +4. To view the teams connected to the IdP group, click **Teams**. ![Screenshot showing the "Teams" button](/assets/images/help/enterprises/idp-groups-team-switcher.png) diff --git a/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/migrating-from-saml-to-oidc.md b/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/migrating-from-saml-to-oidc.md index 317d57f1b5..4eb35942fe 100644 --- a/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/migrating-from-saml-to-oidc.md +++ b/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/migrating-from-saml-to-oidc.md @@ -32,13 +32,19 @@ If you're new to {% data variables.product.prodname_emus %} and haven't yet conf 1. Before you begin the migration, sign in to Azure and disable provisioning in the existing {% data variables.product.prodname_emu_idp_application %} application. 1. If you use [Conditional Access (CA) network location policies](https://docs.microsoft.com/en-us/azure/active-directory/conditional-access/location-condition) in Azure AD, and you're currently using an IP allow list with your enterprise account or any of the organizations owned by the enterprise account on {% data variables.product.prodname_dotcom_the_website %}, disable the IP allow lists. For more information, see "[AUTOTITLE](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-allowed-ip-addresses-for-organizations-in-your-enterprise)" and "[AUTOTITLE](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization)." -1. Sign into {% data variables.product.prodname_dotcom_the_website %} as the setup user for your enterprise with the username **@SHORT-CODE_admin**. +1. Sign into {% data variables.product.prodname_dotcom_the_website %} as the setup user for your enterprise with the username **@SHORT-CODE_admin**. 1. When prompted to continue to your identity provider, click **Use a recovery code** and sign in using one of your enterprise's recovery codes. + + {% note %} + + **Note:** You must use a recovery code for your enterprise, not your user account. For more information, see "[Downloading your enterprise account's single sign-on recovery codes](/admin/identity-and-access-management/managing-recovery-codes-for-your-enterprise/downloading-your-enterprise-accounts-single-sign-on-recovery-codes)." + + {% endnote %} {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %} -1. At the bottom of the page, next to "Migrate to OpenID Connect single sign-on", click **Configure with Azure**. - {% warning %} +1. At the bottom of the page, next to "Migrate to OpenID Connect single sign-on", click **Configure with Azure**. + {% warning %} **Warning:** The migration can take up to an hour, and it is important that no users are provisioned during the migration. You can confirm if the migration is still in progress by returning to your enterprise's security settings page; if "Require SAML authentication" is still checked, the migration is still in progress. @@ -48,8 +54,8 @@ If you're new to {% data variables.product.prodname_emus %} and haven't yet conf 1. Read both warnings and click to continue. {% data reusables.enterprise-accounts.emu-azure-admin-consent %} 1. In a new tab or window, while signed in as the setup user on {% data variables.product.prodname_dotcom_the_website %}, create a {% data variables.product.pat_v1 %} with the **admin:enterprise** scope and **no expiration** and copy it to your clipboard. For more information about creating a new token, see "[AUTOTITLE](/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-scim-provisioning-for-enterprise-managed-users#creating-a-personal-access-token)." -1. In the settings for the {% data variables.product.prodname_emu_idp_oidc_application %} application in Azure Portal, under "Tenant URL", type `https://api.github.com/scim/v2/enterprises/YOUR_ENTERPRISE`, replacing YOUR_ENTERPRISE with the name of your enterprise account. - +1. In the settings for the {% data variables.product.prodname_emu_idp_oidc_application %} application in Azure Portal, under "Tenant URL", type `https://api.github.com/scim/v2/enterprises/YOUR_ENTERPRISE`, replacing YOUR_ENTERPRISE with the name of your enterprise account. + For example, if your enterprise account's URL is `https://github.com/enterprises/octo-corp`, the name of the enterprise account is `octo-corp`. 1. Under "Secret token", paste the {% data variables.product.pat_v1 %} with the **admin:enterprise** scope that you created earlier. 1. To test the configuration, click **Test Connection**. diff --git a/content/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap.md b/content/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap.md index 25245b7e83..da0342142c 100644 --- a/content/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap.md +++ b/content/admin/identity-and-access-management/using-ldap-for-enterprise-iam/using-ldap.md @@ -28,6 +28,8 @@ LDAP is a popular application protocol for access and maintenance of directory i If you use an LDAP directory for centralized authentication, you can configure LDAP authentication for the people who use {% data variables.location.product_location %}. +{% data reusables.enterprise.saml-or-ldap %} + {% data reusables.enterprise_user_management.built-in-authentication %} ## Supported LDAP services diff --git a/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam.md b/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam.md index ff2b14033e..ed1e9be2d9 100644 --- a/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam.md +++ b/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/about-saml-for-enterprise-iam.md @@ -56,6 +56,8 @@ SAML SSO allows people to authenticate and access {% data variables.location.pro SAML is an XML-based standard for authentication and authorization. When you configure SAML for {% data variables.location.product_location %}, the external system for authentication is called an identity provider (IdP). Your instance acts as a SAML service provider (SP). For more information about the SAML standard, see [Security Assertion Markup Language](https://en.wikipedia.org/wiki/Security_Assertion_Markup_Language) on Wikipedia. +{% data reusables.enterprise.saml-or-ldap %} + {% elsif ghae %} {% data reusables.saml.ae-uses-saml-sso %} {% data reusables.saml.ae-enable-saml-sso-during-bootstrapping %} diff --git a/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise.md b/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise.md index 0c46ce1a0b..db0790bdc7 100644 --- a/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise.md +++ b/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise.md @@ -1093,7 +1093,7 @@ Before you'll see `git` category actions, you must enable Git events in the audi {%- ifversion ghes %} | `repo.disk_archive` | A repository was archived on disk. For more information, see "[AUTOTITLE](/repositories/archiving-a-github-repository/archiving-repositories)." {%- endif %} -| `repo.download_zip` | A source code archive of a repository was downloaded as a ZIP file. +| `repo.download_zip` | A source code archive of a repository was downloaded as a ZIP file. For more information, see "[AUTOTITLE](/repositories/working-with-files/using-files/downloading-source-code-archives)." | `repo.pages_cname` | A {% data variables.product.prodname_pages %} custom domain was modified in a repository. | `repo.pages_create` | A {% data variables.product.prodname_pages %} site was created. | `repo.pages_destroy` | A {% data variables.product.prodname_pages %} site was deleted. diff --git a/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/searching-the-audit-log-for-your-enterprise.md b/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/searching-the-audit-log-for-your-enterprise.md index 28a810e961..f4f50b07e5 100644 --- a/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/searching-the-audit-log-for-your-enterprise.md +++ b/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/searching-the-audit-log-for-your-enterprise.md @@ -62,26 +62,41 @@ You can compose a search query from one or more `key:value` pairs, separated by The `key:value` pairs that can be used in a search query are: Key | Value ---------------:| -------------------------------------------------------- -`actor_id` | ID of the user account that initiated the action -`actor` | Name of the user account that initiated the action -`oauth_app_id` | ID of the OAuth application associated with the action -`action` | Name of the audited action -`user_id` | ID of the user affected by the action -`user` | Name of the user affected by the action -`repo_id` | ID of the repository affected by the action (if applicable) -`repo` | Name of the repository affected by the action (if applicable) -`actor_ip` | IP address from which the action was initiated -`created` | Time at which the action occurred{% ifversion ghes %}. If querying the audit log from the site admin dashboard, use `created_at` instead{% endif %} -`from` | View from which the action was initiated -`note` | Miscellaneous event-specific information (in either plain text or JSON format) -`org` | Name of the organization affected by the action (if applicable) -`org_id` | ID of the organization affected by the action (if applicable) -`business` | Name of the enterprise affected by the action (if applicable) -`business_id` | ID of the enterprise affected by the action (if applicable) +-------------- | -------------------------------------------------------- +`action` | Name of the audited action. +`actor` | Name of the user account that initiated the action. +{%- ifversion ghes or ghae %} +`actor_id` | ID of the user account that initiated the action.{% endif %} +{%- ifversion ghes or ghae %} +`actor_ip` | IP address from which the action was initiated.{% endif %} +{%- ifversion ghes or ghae %} +`business` | Name of the enterprise affected by the action (if applicable).{% endif %} +{%- ifversion ghes or ghae %} +`business_id` | ID of the enterprise affected by the action (if applicable).{% endif %} {%- ifversion token-audit-log %} -`hashed_token` | The token used to authenticate for the action (if applicable, see "[AUTOTITLE](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/identifying-audit-log-events-performed-by-an-access-token)") -{%- endif %} +`created` | Time at which the action occurred.{% ifversion ghes %} If querying the audit log from the site admin dashboard, use `created_at` instead.{% endif %} +`country` | Name of the country where the actor was when performing the action. +`country_code` | Two-letter short code of the country where the actor was when performing the action. +{%- ifversion ghes or ghae %} +`from` | View from which the action was initiated.{% endif %} +`hashed_token` | The token used to authenticate for the action (if applicable, see "[Identifying audit log events performed by an access token](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/identifying-audit-log-events-performed-by-an-access-token)"). {% endif %} +`ip` | IP address of the actor. +{%- ifversion ghes or ghae %} +`note` | Miscellaneous event-specific information (in either plain text or JSON format).{% endif %} +{%- ifversion ghes or ghae %} +`oauth_app_id` | ID of the OAuth application associated with the action.{% endif %} +`operation` | Operation type that corresponds with the action. Operation types are `create`, `access`, `modify`, `remove`, `authentication`, `transfer`, and `restore`. +{%- ifversion ghes or ghae %} +`org` | Name of the organization affected by the action (if applicable).{% endif %} +{%- ifversion ghes or ghae %} +`org_id` | ID of the organization affected by the action (if applicable).{% endif %} +{%- ifversion ghes or ghae %} +`repo_id` | ID of the repository affected by the action (if applicable).{% endif %} +`repository` | Name with owner of the repository where the action occurred (such as `octocat/octo-repo`). +{%- ifversion ghes or ghae %} +`user_id` | ID of the user affected by the action.{% endif %} +`user` | Name of the user affected by the action. + To see actions grouped by category, you can also use the action qualifier as a `key:value` pair. For more information, see "[Search based on the action performed](#search-based-on-the-action-performed)." diff --git a/content/admin/overview/best-practices-for-enterprises.md b/content/admin/overview/best-practices-for-enterprises.md index 06c5ce37e6..0abe8c2a7c 100644 --- a/content/admin/overview/best-practices-for-enterprises.md +++ b/content/admin/overview/best-practices-for-enterprises.md @@ -13,6 +13,10 @@ topics: - Fundamentals --- +## Assign multiple owners + +{% data reusables.organizations.ent-ownership-recommendation %} {% ifversion ghec or ghes %}For more information, see "[Inviting people to manage your enterprise](/admin/user-management/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise)."{% endif %} + {% ifversion ghec %} ## Identify the best authentication method for your enterprise diff --git a/content/admin/user-management/managing-organizations-in-your-enterprise/adding-organizations-to-your-enterprise.md b/content/admin/user-management/managing-organizations-in-your-enterprise/adding-organizations-to-your-enterprise.md index c3b262f4de..06f0502d6a 100644 --- a/content/admin/user-management/managing-organizations-in-your-enterprise/adding-organizations-to-your-enterprise.md +++ b/content/admin/user-management/managing-organizations-in-your-enterprise/adding-organizations-to-your-enterprise.md @@ -56,7 +56,9 @@ Enterprise owners who create an organization owned by the enterprise account aut ## Inviting an organization to join your enterprise account -Enterprise owners can invite existing organizations to join their enterprise account. If the organization you want to invite is already owned by another enterprise account, you must be an owner of both enterprise accounts, or the previous enterprise must give up ownership of the organization first. For more information, see "[AUTOTITLE](/admin/user-management/managing-organizations-in-your-enterprise/removing-organizations-from-your-enterprise)." +Enterprise owners can invite existing organizations to join their enterprise account. + +If the organization you want to invite is already owned by another enterprise account, you must be an owner of both enterprise accounts. If you're not, you can ask an owner of the enterprise account that currently owns the organization to transfer the organization to your enterprise account instead. For more information, see "[Transferring an organization between enterprise accounts](#transferring-an-organization-between-enterprise-accounts)." When you invite an organization to join your enterprise account, at least one owner needs to accept the invitation. Then, you must give a final approval for the transfer. diff --git a/content/admin/user-management/managing-users-in-your-enterprise/customizing-user-messages-for-your-enterprise.md b/content/admin/user-management/managing-users-in-your-enterprise/customizing-user-messages-for-your-enterprise.md index 8d33c01175..f6ab6eb5ac 100644 --- a/content/admin/user-management/managing-users-in-your-enterprise/customizing-user-messages-for-your-enterprise.md +++ b/content/admin/user-management/managing-users-in-your-enterprise/customizing-user-messages-for-your-enterprise.md @@ -91,7 +91,7 @@ Each time a user sees a mandatory message, an audit log event is created. The ev {% ifversion display-mandatory-message-again %} {% else %} {% note %} -**Note:** If you change the mandatory message for {% data variables.location.product_location %}, users who have already acknowledged the message will not see the new message. +**Note:** If you change the mandatory message for {% data variables.location.product_location %}, users who have already acknowledged the message will not see the new message. {% endnote %} {% endif %} @@ -103,7 +103,7 @@ Each time a user sees a mandatory message, an audit log event is created. The ev ![Add mandatory message button](/assets/images/enterprise/site-admin-settings/add-mandatory-message-button.png) 1. Under "Mandatory message", in the text box, type your message. ![Screenshot of the mandatory message text box](/assets/images/enterprise/site-admin-settings/mandatory-message-text-box.png) -{%- ifversion display-mandatory-message-again %} +{%- ifversion display-mandatory-message-again %} 1. Optionally, select **Show updated message to all users even if they dismissed the previous one**. ![Screenshot of checkbox that when selected pushes mandatory messages to all users](/assets/images/enterprise/site-admin-settings/push-mandatory-message-checkbox.png) {% endif %} @@ -132,12 +132,13 @@ You can also set an announcement banner{% ifversion ghes %} in the administrativ ![Screenshot of the text field to enter announcement](/assets/images/enterprise/site-admin-settings/announcement-text-field.png) 2. Optionally, under "Expires on", select the calendar drop-down menu and click an expiration date. - + {% ifversion ghe-announce-dismiss %} {% note %} **Note:** Announcements must either have an expiration date, be user dismissible, or both. {% endnote %} + {% endif %} ![Screenshot of the calendar drop-down menu to choose expiration date](/assets/images/enterprise/site-admin-settings/expiration-drop-down.png){% ifversion ghe-announce-dismiss %} 3. Optionally, to allow each user to dismiss the announcement, select **User dismissible**. diff --git a/content/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation.md b/content/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation.md new file mode 100644 index 0000000000..0c74e76db2 --- /dev/null +++ b/content/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation.md @@ -0,0 +1,145 @@ +--- +title: Authenticating as a GitHub App installation +shortTitle: Authenticate as an installation +intro: You can make your {% data variables.product.prodname_github_app %} authenticate as an installation in order to make API requests that affect resources owned by the account where the app is installed. +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: + - GitHub Apps +--- + +## About authentication as a {% data variables.product.prodname_github_app %} installation + +Once your {% data variables.product.prodname_github_app %} is installed on an account, you can make it authenticate as an app installation for API requests. This allows the app to access resources owned by that installation, as long as the app was granted the necessary repository access and permissions. API requests made by an app installation are attributed to the app. For more information about installing GitHub Apps, see "[Installing GitHub Apps](/developers/apps/managing-github-apps/installing-github-apps)." + +For example, if you want your app to change the `Status` field of an issue on a project owned by an organization called "octo-org," then you would authenticate as the octo-org installation of your app. The timeline of the issue would state that your app updated the status. + +To make an API request as an installation, you must first generate an installation access token. Then, you will send the installation access token in the `Authorization` header of your subsequent API requests. You can also use {% data variables.product.company_short %}'s Octokit SDKs, which can generate an installation access token for you. + +API requests that are made by app installations are called "server-to-server requests." If a REST API endpoint works with server-to-server requests, the REST reference documentation for that endpoint will say "Works with {% data variables.product.prodname_github_apps %}." Additionally, your app must have the required permissions to use the endpoint. For more information about the permissions required for REST API endpoints, see "[Permissions required for GitHub Apps](/rest/overview/permissions-required-for-github-apps)." + +App installations can also use the GraphQL API. Similar to the REST API, the app must have certain permissions to access objects in the GraphQL API. For GraphQL requests, you should test you app to ensure that your app has the required permissions for the GraphQL queries and mutations that you want to make. + +For more information about authenticating as an app on behalf of a user instead of as an app installation, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/identifying-and-authorizing-users-for-github-apps)". + +## Using an installation access token to authenticate as an app installation + +To authenticate as an installation with an installation access token, first use the REST API to generate an installation access token. Then, use that installation access token in the `Authorization` header of a REST API or GraphQL API request. The installation access token will expire after 1 hour. + +### Generating an installation access token + +{% data reusables.apps.generate-installation-access-token %} + +### Authenticating with an installation access token + +To authenticate with an installation access token, include it in the `Authorization` header of an API request. The access token will work with both the GraphQL API and the REST API. + +Your app must have the required permissions to use the endpoint. For more information about the permissions required for REST API endpoints, see "[Permissions required for GitHub Apps](/rest/overview/permissions-required-for-github-apps)." For GraphQL requests, you should test your app to ensure that it has the required permissions for the GraphQL queries and mutations that you want to make. + +In the following example, replace `INSTALLATION_ACCESS_TOKEN` with an installation access token: + +```shell +curl --request GET \ +--url "{% data variables.product.api_url_pre %}meta" \ +--header "Accept: application/vnd.github+json" \ +--header "Authorization: Bearer INSTALLATION_ACCESS_TOKEN"{% ifversion api-date-versioning %}\ +--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"{% endif %} +``` + +## Using the Octokit.js SDK to authenticate as an app installation + +You can use {% data variables.product.company_short %}'s Octokit.js SDK to authenticate as an app installation. One advantage of using the SDK to authenticate is that you do not need to generate a JSON web token (JWT) yourself. Additionally, the SDK will take care of regenerating an installation access token for you so you don't need to worry about the one hour expiration. + +{% note %} + +You must install and import `octokit` in order to use the Octokit.js library. The following example uses import statements in accordance with ES6. For more information about different installation and import methods, see [the Octokit.js README's Usage section](https://github.com/octokit/octokit.js/#usage). + +{% endnote %} + +### Using Octokit.js to authenticate with an installation ID + +1. Get the ID of your app. You can find your app's ID on the settings page for your app. For user-owned apps, the settings page is `https://github.com/settings/apps/APP-SLUG`. For organization-owned apps, the settings page is `https://github.com/organizations/ORGANIZATION/settings/apps/APP-SLUG`. Replace `APP-SLUG` with the slugified name of your app. Replace `ORGANIZATION` with the slugified name of your organization. For example, `https://github.com/organizations/octo-org/settings/apps/octo-app`. +1. Generate a private key. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/managing-private-keys-for-github-apps)". +1. Get the ID of the installation that you want to authenticate as. + + If you are responding to a webhook event, the webhook payload will include the installation ID. + + You can also use the REST API to find the ID for an installation of your app. For example, you can get an installation ID with the `GET /users/{username}/installation`, `GET /repos/{owner}/{repo}/installation`, `GET /orgs/{org}/installation`, or `GET /app/installations` endpoints. For more information, see "[AUTOTITLE](/rest/apps/apps)". +1. Import `App` from `octokit`. Create a new instance of `App`. In the following example, replace `APP_ID` with a reference to your app's ID. Replace `PRIVATE_KEY` with a reference to your app's private key. + + ```javascript{:copy} + import { App } from "octokit"; + + const app = new App({ + appId: APP_ID, + privateKey: PRIVATE_KEY, + }); + ``` + +1. Use the `getInstallationOctokit` method to create an authenticated `octokit` instance. In the following example, replace `INSTALLATION_ID` with the ID of the installation of your app that you want to authenticate on behalf of. + + ```javascript{:copy} + const octokit = await app.getInstallationOctokit(INSTALLATION_ID); + ``` + +1. Use an `octokit` method to make a request to the API. + + Your app must have the required permissions to use the endpoint. For more information about the permissions required for REST API endpoints, see "[Permissions required for GitHub Apps](/rest/overview/permissions-required-for-github-apps)." For GraphQL requests, you should test you app to ensure that your app has the required permissions for the GraphQL queries and mutations that you want to make. + + For example, to make a request to the GraphQL API: + + ```javascript{:copy} + await octokit.graphql(` + query { + viewer { + login + } + } + `) + ``` + + For example, to make a request to the REST API: + + ```javascript{:copy} + await octokit.request("GET /meta") + ``` + +### Using Octokit.js to authenticate in response to a webhook event + +The Octokit.js SDK also passes a pre-authenticated `octokit` instance to webhook event handlers. + +1. Get the ID of your app. You can find your app's ID on the settings page for your app. For user-owned apps, the settings page is `https://github.com/settings/apps/APP-SLUG`. For organization-owned apps, the settings page is `https://github.com/organizations/ORGANIZATION/settings/apps/APP-SLUG`. Replace `APP-SLUG` with the slugified name of your app. Replace `ORGANIZATION` with the slugified name of your organization. For example, `https://github.com/organizations/octo-org/settings/apps/octo-app`. +1. Generate a private key. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/managing-private-keys-for-github-apps)". +1. Get the webhook secret that you specified in your app's settings. +1. Import `App` from `octokit`. Create a new instance of `App`. In the following example, replace `APP_ID` with a reference to your app's ID. Replace `PRIVATE_KEY` with a reference to your app's private key. Replace `WEBHOOK_SECRET` with the your app's webhook secret. + + ```javascript{:copy} + import { App } from "octokit"; + + const app = new App({ + appId: APP_ID, + privateKey: PRIVATE_KEY, + webhooks: { WEBHOOK_SECRET }, + }); + ``` + +1. Use an `app.webhooks.*` method to handle webhook events. For more information, see [the Octokit.js README's Webhooks section](https://github.com/octokit/octokit.js#webhooks). For example, to create a comment on an issue when the issue is opened: + + ```javascript + app.webhooks.on("issues.opened", ({ octokit, payload }) => { + await octokit.request("POST /repos/{owner}/{repo}/issues/{issue_number}/comments", { + owner: payload.repository.owner.login, + repo: payload.repository.name, + issue_number: payload.issue.number, + body: `This is a bot post in response to this issue being opened.`, + {% ifversion api-date-versioning %} + headers: { + "x-github-api-version": "{{ allVersions[currentVersion].latestApiVersion }}", + },{% endif %} + } + ) + }); + ``` diff --git a/content/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app.md b/content/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app.md new file mode 100644 index 0000000000..81e50a9bd2 --- /dev/null +++ b/content/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app.md @@ -0,0 +1,67 @@ +--- +title: Authenticating as a GitHub App +intro: You can authenticate as a {% data variables.product.prodname_github_app %} in order to generate an installation access token or manage your app. +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: + - GitHub Apps +shortTitle: Authenticate as an app +--- + +## About authentication as a {% data variables.product.prodname_github_app %} + +You must authenticate as a {% data variables.product.prodname_github_app %} in order to make REST API requests as the application. For example, if you want to use the API to generate an installation access token for accessing organization resources, list installations across organizations for your app, or suspend an app installation, you must authenticate as an app. + +If a REST API endpoint requires you to authenticate as an app, the documentation for that endpoint will indicate that you must use a JWT to access the endpoint. The GraphQL API does not support any queries or mutations that require you to authenticate as an app. + +## Using a JSON Web Token (JWT) to authenticate as a {% data variables.product.prodname_github_app %} + +1. Generate a JSON Web Token (JWT) for your app. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app)." +1. Include the JWT in the `Authorization` header of your request. In the following example, replace `YOUR_JWT` with your JWT. + + ```shell + curl --request POST \ + --url "{% data variables.product.api_url_pre %}/app/installations" \ + --header "Accept: application/vnd.github+json" \ + --header "Authorization: Bearer YOUR_JWT"{% ifversion api-date-versioning %}\ + --header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"{% endif %} + ``` + +## Using the Octokit.js SDK to authenticate as a {% data variables.product.prodname_github_app %} + +You can use {% data variables.product.company_short %}'s Octokit.js SDK to authenticate as a {% data variables.product.prodname_github_app %}. One advantage of using the SDK to authenticate is that you do not need to generate a JSON web token (JWT) yourself. Additionally, the SDK will take care of regenerating the JWT when it expires. + +{% note %} + +**Note**: You must install and import `octokit` in order to use the Octokit.js library. The following example uses import statements in accordance with ES6. For more information about different installation and import methods, see [Usage](https://github.com/octokit/octokit.js/#usage) in the octokit/octokit repository. + +{% endnote %} + +1. On the settings page for your app, get the app's ID. + - For user-owned apps, the settings page is `https://github.com/settings/apps/APP-SLUG`. + - For organization-owned apps, the settings page is `https://github.com/organizations/ORGANIZATION/settings/apps/APP-SLUG`. + + Replace `APP-SLUG` with the sluggified name of your app and `ORGANIZATION` with the sluggified name of your organization. For example, `https://github.com/organizations/octo-org/settings/apps/octo-app`. +1. Generate a private key. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/managing-private-keys-for-github-apps)." +1. Import `App` from `octokit`. + + ```javascript{:copy} + import { App } from "octokit"; + ``` +1. Create a new instance of `App`. In the following example, replace `APP_ID` with a reference to your app's ID. Replace `PRIVATE_KEY` with a reference to the value of your app's private key. + + ```javascript{:copy} + const app = new App({ + appId: APP_ID, + privateKey: PRIVATE_KEY, + }); + ``` + +1. Use an `octokit` method to make a request to a REST API endpoint that requires a JWT. For example: + + ```javascript{:copy} + await app.octokit.request("/app") + ``` diff --git a/content/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app.md b/content/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app.md new file mode 100644 index 0000000000..594357149d --- /dev/null +++ b/content/apps/creating-github-apps/authenticating-with-a-github-app/generating-an-installation-access-token-for-a-github-app.md @@ -0,0 +1,26 @@ +--- +title: Generating an installation access token for a GitHub App +shortTitle: Installation access token +intro: Learn how to generate an installation access token for your {% data variables.product.prodname_github_app %}. +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: + - GitHub Apps +--- + +## About installation access tokens + +In order to authenticate as an app installation, you must generate an installation access token. For more information about authenticating as an app installation, see "[Authenticating as a GitHub App installation](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation)." + +{% note %} + +**Note**: Instead of generating an installation access token, you can use {% data variables.product.company_short %}'s Octokit SDKs to authenticate as an app. The SDK will take care of generating an installation access token for you and will regenerate the token once it expires. For more information about authenticating as an app installation, see "[Authenticating as a GitHub App installation](/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation)." + +{% endnote %} + +## Generating an installation access token + +{% data reusables.apps.generate-installation-access-token %} diff --git a/content/apps/creating-github-apps/authenticating-with-a-github-app/index.md b/content/apps/creating-github-apps/authenticating-with-a-github-app/index.md index a6dfafeace..0cb69b944e 100644 --- a/content/apps/creating-github-apps/authenticating-with-a-github-app/index.md +++ b/content/apps/creating-github-apps/authenticating-with-a-github-app/index.md @@ -9,9 +9,12 @@ versions: topics: - GitHub Apps children: - - /generating-a-json-web-token-jwt-for-a-github-app - /authenticating-with-github-apps + - /authenticating-as-a-github-app + - /authenticating-as-a-github-app-installation + - /managing-private-keys-for-github-apps + - /generating-a-json-web-token-jwt-for-a-github-app + - /generating-an-installation-access-token-for-a-github-app - /identifying-and-authorizing-users-for-github-apps - /refreshing-user-to-server-access-tokens - - /managing-private-keys-for-github-apps --- diff --git a/content/apps/using-github-apps/installing-an-app-in-your-organization.md b/content/apps/using-github-apps/installing-an-app-in-your-organization.md index db81c287b1..ef515c51bd 100644 --- a/content/apps/using-github-apps/installing-an-app-in-your-organization.md +++ b/content/apps/using-github-apps/installing-an-app-in-your-organization.md @@ -28,8 +28,7 @@ If you choose a paid plan, you'll pay for your app subscription on your organiza {% data reusables.marketplace.confirm-install-account-org %} {% data reusables.marketplace.add-payment-method-org %} {% data reusables.marketplace.complete-order-begin-installation %} -8. If the app requires access to repositories, decide whether to give the app access to all of your repositories or to certain repositories, then select **All repositories** or **Only select repositories**. - ![Radio buttons with options to install an app on all of your repositories or certain repositories](/assets/images/help/marketplace/marketplace-choose-repo-install-option.png) +1. If the app requires access to repositories, select **All repositories** or **Only select repositories**. {% data reusables.marketplace.select-installation-repos %} {% data reusables.marketplace.review-app-perms-install %} diff --git a/content/apps/using-github-apps/installing-an-app-in-your-personal-account.md b/content/apps/using-github-apps/installing-an-app-in-your-personal-account.md index ab66c84e76..2b71440fdc 100644 --- a/content/apps/using-github-apps/installing-an-app-in-your-personal-account.md +++ b/content/apps/using-github-apps/installing-an-app-in-your-personal-account.md @@ -27,7 +27,6 @@ If you choose a paid plan, you'll pay for your app subscription on your personal {% data reusables.marketplace.add-payment-method-personal %} {% data reusables.marketplace.complete-order-begin-installation %} 8. Decide whether to give the app access to all of your repositories, or to certain repositories, then select **All repositories** or **Only select repositories**. - ![Radio buttons with options to install an app on all of your repositories or certain repositories](/assets/images/help/marketplace/marketplace-choose-repo-install-option.png) {% data reusables.marketplace.select-installation-repos %} {% data reusables.marketplace.review-app-perms-install %} diff --git a/content/authentication/keeping-your-account-and-data-secure/sudo-mode.md b/content/authentication/keeping-your-account-and-data-secure/sudo-mode.md index 23fee56711..f648a2e4f5 100644 --- a/content/authentication/keeping-your-account-and-data-secure/sudo-mode.md +++ b/content/authentication/keeping-your-account-and-data-secure/sudo-mode.md @@ -32,6 +32,15 @@ After you authenticate to perform a sensitive action, your session is temporaril {% endnote %} +{% endif %} +{% ifversion ghec %} + +{% note %} + +**Note**: If your enterprise uses {% data variables.product.prodname_emus %}, you will not receive prompts to enter sudo mode, as your account doesn't have credentials stored on {% data variables.product.product_name %}. + +{% endnote %} + {% endif %} "sudo" is a reference to a program on Unix systems, where the name is short for "**su**peruser **do**." For more information, see [sudo](https://wikipedia.org/wiki/Sudo) on Wikipedia. diff --git a/content/authentication/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication.md b/content/authentication/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication.md index 053b42737e..d364563bc0 100644 --- a/content/authentication/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication.md +++ b/content/authentication/securing-your-account-with-two-factor-authentication-2fa/accessing-github-using-two-factor-authentication.md @@ -19,19 +19,19 @@ shortTitle: Access GitHub with 2FA {% ifversion 2fa-check-up-period %} -With two-factor authentication (2FA) enabled, you'll need to provide an authentication code when accessing {% data variables.product.product_name %} through your browser. When you first configure 2FA, your account will enter a check up period for 28 days, and 2FA will not be necessary in existing {% data variables.product.prodname_dotcom_the_website %} sessions. You can exit the check up period by successfully performing 2FA within 28 days. If you fail to authenticate within 28 days, you'll be asked to perform 2FA inside one of your existing {% data variables.product.prodname_dotcom_the_website %} sessions. If you cannot perform 2FA to pass the 28th day checkup, use the provided shortcut to reconfigure your 2FA settings and retain access to {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[AUTOTITLE](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication)." +With two-factor authentication (2FA) enabled, you'll need to use a second factor when accessing {% data variables.product.product_name %} through your browser. When you first configure 2FA, your account will enter a check up period for 28 days to ensure your account's 2FA methods are setup correctly. You can exit the check up period by successfully performing 2FA within 28 days. If you don't authenticate within 28 days, you'll be asked to perform 2FA inside one of your existing {% data variables.product.prodname_dotcom_the_website %} sessions. If you cannot perform 2FA to pass the 28th day checkup, use the provided shortcut to reconfigure your 2FA settings and retain access to {% data variables.product.prodname_dotcom_the_website %}. For more information, see "[AUTOTITLE](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication)." If you access {% data variables.product.product_name %} using other methods, such as the API or the command line, you'll authenticate using a token, application, or SSH key. For more information, see "[AUTOTITLE](/authentication/keeping-your-account-and-data-secure/about-authentication-to-github)." {% else %} -With two-factor authentication enabled, you'll need to provide an authentication code when accessing {% data variables.product.product_name %} through your browser. If you access {% data variables.product.product_name %} using other methods, such as the API or the command line, you'll need to use an alternative form of authentication. For more information, see "[AUTOTITLE](/authentication/keeping-your-account-and-data-secure/about-authentication-to-github)." +With two-factor authentication enabled, you'll need to provide an authentication code{% ifversion fpt or ghec %}, tap a notification in GitHub Mobile,{% endif %} or use a security key when accessing {% data variables.product.product_name %} through your browser. If you access {% data variables.product.product_name %} using other methods, such as the API or the command line, you'll need to use an alternative form of authentication. For more information, see "[AUTOTITLE](/authentication/keeping-your-account-and-data-secure/about-authentication-to-github)." {% endif %} -## Providing a 2FA code when signing in to the website +## Performing 2FA when signing in to the website -After you sign in to {% data variables.product.product_name %} using your password, you'll be prompted to provide an authentication code from {% ifversion fpt or ghec %}a text message or{% endif %} your TOTP app. +After you sign in to {% data variables.product.product_name %} using your password, you'll need to provide an authentication code{% ifversion fpt or ghec %}, tap a notification in {% data variables.product.prodname_mobile %},{% endif %} or use a security key to perform 2FA. {% data variables.product.product_name %} will only ask you to provide your 2FA authentication code again if you've logged out, are using a new device, are performing a sensitive action, or your session expires. For more information on 2FA for sensitive actions, see "[AUTOTITLE](/authentication/keeping-your-account-and-data-secure/sudo-mode)." @@ -41,6 +41,15 @@ If you chose to set up two-factor authentication using a TOTP application on you If you delete your authenticator application after configuring two-factor authentication, you'll need to provide your recovery code to get access to your account. Many TOTP apps support the secure backup of your authentication codes in the cloud and can be restored if you lose access to your device. For more information, see "[AUTOTITLE](/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials)." +### Using a security key + +If you've set up a security key on your account, and your browser supports security keys, you can use it to complete your sign in. + +1. Using your username and password, sign in to {% data variables.product.product_name %} through your browser. +1. If you use a physical security key, ensure it's connected to your device. +1. To trigger the security key prompt from your operating system, select "Use security key". +1. Select the appropriate option in the prompt. Depending on your security key configuration, you may type a PIN, complete a biometric prompt, or use a physical security key. + {% ifversion fpt or ghec %} ### Receiving a text message @@ -52,9 +61,6 @@ If you set up two-factor authentication via text messages, {% data variables.pro If you have installed and signed in to {% data variables.product.prodname_mobile %}, you may choose to authenticate with {% data variables.product.prodname_mobile %} for two-factor authentication. 1. Sign in to {% data variables.product.product_name %} with your browser, using your username and password. -1. If you have added a security key to your account, you'll first be prompted to insert and use a security key. To skip using a security key, click **Authenticate with {% data variables.product.prodname_mobile %}**. - - ![Screenshot of login options on the 2FA screen. A link, labeled "Authenticate with {% data variables.product.prodname_mobile %}", is outlined in orange.](/assets/images/help/2fa/2fa-select-mobile.png) 1. {% data variables.product.product_name %} will send you a push notification to verify your sign in attempt. Opening the push notification or opening the {% data variables.product.prodname_mobile %} app will display a prompt, asking you to approve or reject this sign in attempt. {% note %} diff --git a/content/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication-recovery-methods.md b/content/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication-recovery-methods.md index eb5403c3a1..70134e9257 100644 --- a/content/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication-recovery-methods.md +++ b/content/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication-recovery-methods.md @@ -18,7 +18,7 @@ topics: - 2FA shortTitle: Configure 2FA recovery --- -In addition to securely storing your two-factor authentication recovery codes, we strongly recommend configuring one or more additional recovery methods. +In addition to securely storing your two-factor authentication recovery codes, we strongly recommend configuring one or more additional authentication methods. ## Downloading your two-factor authentication recovery codes @@ -51,33 +51,6 @@ Once you use a recovery code to regain access to your account, it cannot be reus You can set up a security key as a secondary two-factor authentication method, and use the security key to regain access to your account. For more information, see "[AUTOTITLE](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-security-key)." -{% ifversion fpt or ghec %} - -## Setting a fallback authentication number - -You can provide a second number for a fallback device. If you lose access to both your preferred device and your recovery codes, a backup SMS number can get you back in to your account. - -You can use a fallback number regardless of whether you've configured authentication via text message or TOTP mobile application. - -{% warning %} - -**Warning:** Using a fallback number is a last resort. We recommend configuring additional recovery methods if you set a fallback authentication number. -- Bad actors may attack cell phone carriers, so SMS authentication is risky. -- SMS messages are only supported for certain countries outside the US; for the list, see "[AUTOTITLE](/authentication/securing-your-account-with-two-factor-authentication-2fa/countries-where-sms-authentication-is-supported)". - -{% endwarning %} - -{% data reusables.user-settings.access_settings %} -{% data reusables.user-settings.security %} -1. Next to "Fallback SMS number", click **Add**. - - ![Screenshot of account recovery options in the 2FA settings. A gray button, labeled "Add", is outlined in orange.](/assets/images/help/2fa/add-fallback-sms-number-button.png) -1. Select your country code and type your mobile phone number, including the area code. When your information is correct, click **Set fallback**. - - After setup, the backup device will receive a confirmation SMS. - -{% endif %} - ## Further reading - "[AUTOTITLE](/authentication/securing-your-account-with-two-factor-authentication-2fa/about-two-factor-authentication)" diff --git a/content/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication.md b/content/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication.md index c76e6eac21..43d0013d3f 100644 --- a/content/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication.md +++ b/content/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication.md @@ -57,7 +57,7 @@ A time-based one-time password (TOTP) application automatically generates an aut {% tip %} -**Tip**: To configure authentication via TOTP on multiple devices, during setup, scan the QR code using each device at the same time. If 2FA is already enabled and you want to add another device, you must re-configure 2FA from your security settings. +**Tip**: To configure authentication via TOTP on multiple devices, during setup, scan the QR code using each device at the same time. If 2FA is already enabled and you want to add another device, you must re-configure your TOTP app from your security settings. {% endtip %} @@ -88,7 +88,7 @@ A time-based one-time password (TOTP) application automatically generates an aut ## Configuring two-factor authentication using text messages -If you're unable to authenticate using a TOTP mobile app, you can authenticate using SMS messages. You can also provide a second number for a fallback device. If you lose access to both your preferred device and your recovery codes, a backup SMS number can get you back in to your account. +If you're unable to configure a TOTP mobile app, you can also register your phone number to receive SMS messages. Before using this method, be sure that you can receive text messages. Carrier rates may apply. diff --git a/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md b/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md index c1b4bb2fd4..1e2b13a020 100644 --- a/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md +++ b/content/authentication/securing-your-account-with-two-factor-authentication-2fa/recovering-your-account-if-you-lose-your-2fa-credentials.md @@ -48,17 +48,22 @@ Use one of your recovery codes to automatically regain entry into your account. 1. Under "Having problems?", click **Use a recovery code{% ifversion fpt or ghec %} or request a reset{% endif %}**. 1. Type one of your recovery codes, then click **Verify**. -{% ifversion fpt or ghec %} -## Authenticating with a fallback number - -If you lose access to your preferred TOTP app or phone number, you can provide a two-factor authentication code sent to your fallback number to automatically regain access to your account. -{% endif %} - ## Authenticating with a security key If you configured two-factor authentication using a security key, you can use your security key as a secondary authentication method to automatically regain access to your account. For more information, see "[AUTOTITLE](/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-security-key)." {% ifversion fpt or ghec %} + +## Authenticating with a fallback number + +{% note %} + +**Note:** Configuring a fallback SMS number in addition to your primary SMS number is no longer supported. Instead, we strongly recommend registering multiple authentication methods. + +{% endnote %} + +If you lose access to your preferred TOTP app or phone number, you can provide a two-factor authentication code sent to your fallback number to automatically regain access to your account. + ## Authenticating with a verified device, SSH token, or {% data variables.product.pat_generic %} If you know your password for {% data variables.location.product_location %} but don't have the two-factor authentication credentials or your two-factor authentication recovery codes, you can have a one-time password sent to your verified email address to begin the verification process and regain access to your account. diff --git a/content/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security.md b/content/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security.md index b4e2ba6714..85c91f89bd 100644 --- a/content/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security.md +++ b/content/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security.md @@ -23,7 +23,7 @@ shortTitle: Advanced Security billing {% ifversion fpt %} -If you want to use {% data variables.product.prodname_GH_advanced_security %} features on any repository apart from a public repository on {% data variables.product.prodname_dotcom_the_website %}, you will need a {% data variables.product.prodname_GH_advanced_security %} license, available with {% data variables.product.prodname_ghe_cloud %} or {% data variables.product.prodname_ghe_server %}. +If you want to use {% data variables.product.prodname_GH_advanced_security %} features on any repository apart from a public repository on {% data variables.product.prodname_dotcom_the_website %}, you will need a {% data variables.product.prodname_GH_advanced_security %} license, available with {% data variables.product.prodname_ghe_cloud %} or {% data variables.product.prodname_ghe_server %}. For information about billing for {% data variables.product.prodname_GH_advanced_security %}, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security). @@ -56,7 +56,11 @@ You can determine how many licenses you'll need for {% data variables.product.pr {% endif %} {% ifversion ghec %} -Enterprise account customers on GitHub Enterprise Cloud who pay with a credit card can purchase a GitHub Advanced Security license from their enterprise account settings. For more information, see "[AUTOTITLE](/billing/managing-billing-for-github-advanced-security/signing-up-for-github-advanced-security)." For customers who pay by invoice, contact {% data variables.contact.contact_enterprise_sales %} to discuss licensing {% data variables.product.prodname_GH_advanced_security %} for your enterprise. +If you use {% data variables.product.prodname_ghe_cloud %} with an enterprise account and pay with a credit card, you can purchase a {% data variables.product.prodname_GH_advanced_security %} license from your enterprise account settings. For more information, see "[AUTOTITLE](/billing/managing-billing-for-github-advanced-security/signing-up-for-github-advanced-security)." + +If you pay by invoice, contact {% data variables.contact.contact_enterprise_sales %} to discuss licensing {% data variables.product.prodname_GH_advanced_security %} for your enterprise. + +For other billing-related questions, contact {% data variables.contact.github_support %}. {% endif %} ## About committer numbers for {% data variables.product.prodname_GH_advanced_security %} @@ -88,7 +92,7 @@ As soon as you free up some {% ifversion ghas-billing-UI-update %}licenses{% els You can enforce policies to allow or disallow the use of {% data variables.product.prodname_advanced_security %} by organizations owned by your enterprise account. For more information, see "[Enforcing policies for {% data variables.product.prodname_advanced_security %} in your enterprise]({% ifversion fpt %}/enterprise-cloud@latest/{% endif %}/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-advanced-security-in-your-enterprise){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} {% ifversion fpt or ghes or ghec %} -For more information on viewing license usage, see "[AUTOTITLE](/billing/managing-billing-for-github-advanced-security/viewing-your-github-advanced-security-usage)." +For more information on viewing license usage, see "[AUTOTITLE](/billing/managing-billing-for-github-advanced-security/viewing-your-github-advanced-security-usage)." {% endif %} {% ifversion ghec %} @@ -99,12 +103,12 @@ For more information on managing the number of committers, see "[AUTOTITLE](/bil The following example timeline demonstrates how active committer count for {% data variables.product.prodname_GH_advanced_security %} could change over time in an enterprise. For each month, you will find events, along with the resulting committer count. -| Date | Events during the month | Total committers | -| :- | :- | -: | -| April 15 | A member of your enterprise enables {% data variables.product.prodname_GH_advanced_security %} for repository **X**. Repository **X** has 50 committers over the past 90 days. | **50** | +| Date | Events during the month | Total committers | +| :- | :- | -: | +| April 15 | A member of your enterprise enables {% data variables.product.prodname_GH_advanced_security %} for repository **X**. Repository **X** has 50 committers over the past 90 days. | **50** | | May 1 | Developer **A** leaves the team working on repository **X**. Developer **A**'s contributions continue to count for 90 days. | **50** | **50** | -| August 1 | Developer **A**'s contributions no longer count towards the licenses required, because 90 days have passed. | _50 - 1_
**49** | -| August 15 | A member of your enterprise enables {% data variables.product.prodname_GH_advanced_security %} for a second repository, repository **Y**. In the last 90 days, a total of 20 developers contributed to that repository. Of those 20 developers, 10 also recently worked on repo **X** and do not require additional licenses. | _49 + 10_
**59** | +| August 1 | Developer **A**'s contributions no longer count towards the licenses required, because 90 days have passed. | _50 - 1_
**49** | +| August 15 | A member of your enterprise enables {% data variables.product.prodname_GH_advanced_security %} for a second repository, repository **Y**. In the last 90 days, a total of 20 developers contributed to that repository. Of those 20 developers, 10 also recently worked on repo **X** and do not require additional licenses. | _49 + 10_
**59** | | August 16 | A member of your enterprise disables {% data variables.product.prodname_GH_advanced_security %} for repository **X**. Of the 49 developers who were working on repository **X**, 10 still also work on repository **Y**, which has a total of 20 developers contributing in the last 90 days. | _49 - 29_
**20** | {% note %} diff --git a/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning.md b/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning.md index f9e88bbaf1..5dbacf0bcb 100644 --- a/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning.md +++ b/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning.md @@ -402,12 +402,14 @@ In the following example, the `+` symbol ensures that the specified additional { packs: +scope/pack1,scope/pack2@1.2.3,scope/pack3@4.5.6:path/to/queries {%- endif %} ``` + + + + + ## Using a custom configuration file - - A custom configuration file is an alternative way to specify additional {% ifversion codeql-packs %}packs and {% endif %}queries to run. You can also use the file to disable the default queries{% ifversion code-scanning-exclude-queries-from-analysis %}, exclude or include specific queries,{% endif %} and to specify which directories to scan during analysis. In the workflow file, use the `config-file` parameter of the `init` action to specify the path to the configuration file you want to use. This example loads the configuration file _./.github/codeql/codeql-config.yml_. @@ -554,9 +556,6 @@ You can quickly analyze small portions of a monorepo when you modify code in spe ### Example configuration files - - {% data reusables.code-scanning.example-configuration-files %} ## Configuring {% data variables.product.prodname_code_scanning %} for compiled languages diff --git a/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases.md b/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases.md index 0022efaf7f..cbd6746cbc 100644 --- a/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases.md +++ b/content/code-security/codeql-cli/using-the-codeql-cli/creating-codeql-databases.md @@ -241,10 +241,11 @@ The following examples are designed to give you an idea of some of the build com This command runs a custom script that contains all of the commands required to build the project. -### Using indirect build tracing + - + + +### Using indirect build tracing If the {% data variables.product.prodname_codeql_cli %} autobuilders for compiled languages do not work with your CI workflow and you cannot wrap invocations of build commands with `codeql database trace-command`, you can use indirect build tracing to create a {% data variables.product.prodname_codeql %} database. To use indirect build tracing, your CI system must be able to set custom environment variables for each build action. diff --git a/content/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts.md b/content/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts.md index 79486f24e8..97cd060c7f 100644 --- a/content/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts.md +++ b/content/code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts.md @@ -147,7 +147,9 @@ For supported languages, {% data variables.product.prodname_dependabot %} detect 1. View the details for an alert. For more information, see "[Viewing {% data variables.product.prodname_dependabot_alerts %}](#viewing-dependabot-alerts)" (above). {% ifversion fpt or ghec or ghes %} 1. If you have {% data variables.product.prodname_dependabot_security_updates %} enabled, there may be a link to a pull request that will fix the dependency. Alternatively, you can click **Create {% data variables.product.prodname_dependabot %} security update** at the top of the alert details page to create a pull request. - ![Create {% data variables.product.prodname_dependabot %} security update button](/assets/images/help/repository/create-dependabot-security-update-button-ungrouped.png) + + ![Screenshot of a {% data variables.product.prodname_dependabot %} alert with the "Create {% data variables.product.prodname_dependabot %} security update" button highlighted with a dark orange outline.](/assets/images/help/repository/create-dependabot-security-update-button-ungrouped.png) + 1. Optionally, if you do not use {% data variables.product.prodname_dependabot_security_updates %}, you can use the information on the page to decide which version of the dependency to upgrade to and create a pull request to update the dependency to a secure version. {% elsif ghae %} 1. You can use the information on the page to decide which version of the dependency to upgrade to and create a pull request to the manifest or lock file to a secure version. @@ -201,12 +203,11 @@ You can view all open alerts, and you can reopen alerts that have been previousl 1. To just view closed alerts, click **Closed**. {%- ifversion dependabot-bulk-alerts %} - ![Screenshot showing the list of Dependabot alerts with the "Closed" tab highlighted with a dark orange outline.](/assets/images/help/repository/dependabot-alerts-closed-checkbox.png) - {%- else %} - ![Screenshot showing the list of Dependabot alerts with the "Closed" tab highlighted with a dark orange outline.](/assets/images/help/repository/dependabot-alerts-closed.png) + ![Screenshot showing the list of {% data variables.product.prodname_dependabot_alerts %} with the "Closed" tab highlighted with a dark orange outline.](/assets/images/help/repository/dependabot-alerts-closed-checkbox.png) {%- endif %} + 1. Click the alert that you would like to view or update. -2. Optionally, if the alert was dismissed and you wish to reopen it, click **Reopen**. Alerts that have already been fixed cannot be reopened. +1. Optionally, if the alert was dismissed and you wish to reopen it, click **Reopen**. Alerts that have already been fixed cannot be reopened. {% indented_data_reference reusables.enterprise.3-5-missing-feature spaces=3 %} ![Screenshot showing the "Reopen" button](/assets/images/help/repository/reopen-dismissed-alert.png) diff --git a/content/code-security/secret-scanning/about-secret-scanning.md b/content/code-security/secret-scanning/about-secret-scanning.md index 48e04ab1b6..c7ae15f570 100644 --- a/content/code-security/secret-scanning/about-secret-scanning.md +++ b/content/code-security/secret-scanning/about-secret-scanning.md @@ -81,7 +81,7 @@ If you're a repository administrator, you can enable {% data variables.secret-sc ### 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 of those commits 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 periodically runs a scan of all historical content in {% ifversion fpt %}public {% endif %}repositories with {% data variables.product.prodname_secret_scanning %} enabled.{% 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 of those commits 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 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%} If {% data variables.product.prodname_secret_scanning %} detects a secret, {% data variables.product.prodname_dotcom %} generates an alert. diff --git a/content/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories.md b/content/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories.md index 87f9163a66..107e35483f 100644 --- a/content/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories.md +++ b/content/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories.md @@ -49,10 +49,12 @@ You can enable {% data variables.secret-scanning.user_alerts %} for any {% ifver {% ifversion ghec %}![Enable {% data variables.product.prodname_GH_advanced_security %} for your repository](/assets/images/help/repository/enable-ghas-dotcom.png) {% elsif ghes or ghae %}![Enable {% data variables.product.prodname_GH_advanced_security %} for your repository](/assets/images/enterprise/3.1/help/repository/enable-ghas.png){% endif %} 1. Review the impact of enabling {% data variables.product.prodname_advanced_security %}, then click **Enable {% data variables.product.prodname_GH_advanced_security %} for this repository**. -1. When you enable {% data variables.product.prodname_advanced_security %}, {% data variables.product.prodname_secret_scanning %} may automatically be enabled for the repository due to the organization's settings. If "{% data variables.product.prodname_secret_scanning_caps %}" is shown with an **Enable** button, you still need to enable {% data variables.product.prodname_secret_scanning %} by clicking **Enable**. If you see a **Disable** button, {% data variables.product.prodname_secret_scanning %} is already enabled. - ![Enable {% data variables.product.prodname_secret_scanning %} for your repository](/assets/images/help/repository/enable-secret-scanning-ghec.png){% endif %}{% ifversion fpt %} -2. Scroll down to the bottom of the page, and click **Enable** for {% data variables.product.prodname_secret_scanning %}. If you see a **Disable** button, it means that {% data variables.product.prodname_secret_scanning %} is already enabled for the repository. - ![Enable {% data variables.product.prodname_secret_scanning %} for your repository](/assets/images/help/repository/enable-secret-scanning-alerts-fpt.png){% endif %} +1. When you enable {% data variables.product.prodname_advanced_security %}, {% data variables.product.prodname_secret_scanning %} may automatically be enabled for the repository due to the organization's settings. If "{% data variables.product.prodname_secret_scanning_caps %}" is shown with an **Enable** button, you still need to enable {% data variables.product.prodname_secret_scanning %} by clicking **Enable**. If you see a **Disable** button, {% data variables.product.prodname_secret_scanning %} is already enabled. + + ![Screenshot of the "{% data variables.product.prodname_secret_scanning_caps %}" section of the "Code security and analysis" page, with the "Enable" button highlighted in a dark orange outline.](/assets/images/help/repository/enable-secret-scanning-alerts.png){% endif %}{% ifversion fpt %} +1. Scroll down to the bottom of the page, and click **Enable** for {% data variables.product.prodname_secret_scanning %}. If you see a **Disable** button, it means that {% data variables.product.prodname_secret_scanning %} is already enabled for the repository. + + ![Screenshot of the "{% data variables.product.prodname_secret_scanning_caps %}" section of the "Code security and analysis" page, with the "Enable" button highlighted in a dark orange outline.](/assets/images/help/repository/enable-secret-scanning-alerts.png){% endif %} {% ifversion secret-scanning-push-protection %} 1. Optionally, if you want to enable push protection, click **Enable** to the right of "Push protection." {% data reusables.secret-scanning.push-protection-overview %} For more information, see "[AUTOTITLE](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)." diff --git a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph.md b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph.md index bc789e4766..c5214ea0dd 100644 --- a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph.md +++ b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph.md @@ -16,7 +16,6 @@ topics: - Repositories shortTitle: Dependency graph --- - ## About the dependency graph diff --git a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository.md b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository.md index 8271d041dd..d86f150fc4 100644 --- a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository.md +++ b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository.md @@ -21,7 +21,6 @@ topics: - Repositories shortTitle: Explore dependencies --- - ## Viewing the dependency graph diff --git a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/troubleshooting-the-dependency-graph.md b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/troubleshooting-the-dependency-graph.md index fda5c16a43..031ed2ab17 100644 --- a/content/code-security/supply-chain-security/understanding-your-software-supply-chain/troubleshooting-the-dependency-graph.md +++ b/content/code-security/supply-chain-security/understanding-your-software-supply-chain/troubleshooting-the-dependency-graph.md @@ -48,7 +48,7 @@ Yes, the dependency graph has two categories of limits: Manifests over 0.5 MB in size are only processed for enterprise accounts. For other accounts, manifests over 0.5 MB are ignored and will not create {% data variables.product.prodname_dependabot_alerts %}. - By default, {% data variables.product.prodname_dotcom %} will not process more than {% ifversion fpt %}150{% else %}600{% endif %} manifests per repository. {% data variables.product.prodname_dependabot_alerts %} are not created for manifests beyond this limit. If you need to increase the limit, contact {% data variables.contact.contact_support %}. + By default, {% data variables.product.prodname_dotcom %} will not process more than {% ifversion fpt or ghec %}150{% else %}600{% endif %} manifests per repository. {% data variables.product.prodname_dependabot_alerts %} are not created for manifests beyond this limit. If you need to increase the limit, contact {% data variables.contact.contact_support %}. Manifest files stored in directories with names that are typically used for vendored dependencies will not be processed. A directory whose name matches the following regular expressions is considered a vendored dependencies directory: - (3rd|[Tt]hird)[-_]?[Pp]arty/ diff --git a/content/codespaces/guides.md b/content/codespaces/guides.md index 4b777c6785..3951707c75 100644 --- a/content/codespaces/guides.md +++ b/content/codespaces/guides.md @@ -50,7 +50,7 @@ includeGuides: - /codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization - /codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces - /codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types - - /codespaces/managing-codespaces-for-your-organization/restricting-the-base-image-for-codespaces.md + - /codespaces/managing-codespaces-for-your-organization/restricting-the-base-image-for-codespaces - /codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period - /codespaces/managing-codespaces-for-your-organization/restricting-the-retention-period-for-codespaces - /codespaces/managing-codespaces-for-your-organization/restricting-the-visibility-of-forwarded-ports diff --git a/content/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam.md b/content/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam.md index 447a2066d6..2f6df72cae 100644 --- a/content/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam.md +++ b/content/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam.md @@ -32,32 +32,33 @@ Users in India can contact GitHub's Grievance Officer for India [here](https://s ## Reporting an issue or pull request 1. Navigate to the issue or pull request you'd like to report. -2. In the upper-right corner of the issue or pull request, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab octicon" %}, then click **Report content**. +1. In the upper-right corner of the issue or pull request, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab octicon" %}, then click **Report content**. ![Button to report a comment](/assets/images/help/repository/menu-report-issue-or-pr.png) {% data reusables.community.report-content %} ## Reporting a comment 1. Navigate to the comment you'd like to report. -2. In the upper-right corner of the comment, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab octicon" %}, then click **Report content**. +1. In the upper-right corner of the comment, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab octicon" %}, then click **Report content**. ![Kebab menu with option to report a comment](/assets/images/help/repository/menu-report-comment.png) {% data reusables.community.report-content %} ## Reporting an app in {% data variables.product.prodname_marketplace %} {% data reusables.marketplace.visit-marketplace %} -2. Browse to the app you'd like to report. -3. In the left sidebar, under the "Developer links" section, click {% octicon "report" aria-label="The report symbol" %} **Report abuse**. - ![Button to report an app in {% data variables.product.prodname_marketplace %}](/assets/images/help/marketplace/marketplace-report-app.png) -4. Complete the contact form to tell {% data variables.contact.contact_support %} about the app's behavior, then click **Send request**. +1. Browse to the app you'd like to report. +1. In the left sidebar, under the "Developer links" section, click **Report abuse**. + + ![Screenshot of the sidebar of a {% data variables.product.prodname_marketplace %} app. A link, labeled "Report abuse", is outlined in dark orange.](/assets/images/help/marketplace/marketplace-report-app.png) +1. Complete the contact form to tell {% data variables.contact.contact_support %} about the app's behavior, then click **Send request**. ## Reporting contact link abuse in the template chooser 1. Navigate to the repository that contains the contact link you'd like to report. -2. Under the repository name, click {% octicon "issue-opened" aria-label="The issues icon" %} **Issues**. -3. In the lower-right corner of the template chooser, click **Report abuse**. +1. Under the repository name, click {% octicon "issue-opened" aria-label="The issues icon" %} **Issues**. +1. In the lower-right corner of the template chooser, click **Report abuse**. ![Link to report an abuse](/assets/images/help/repository/template-chooser-report-abuse.png) -4. Complete the contact form to tell {% data variables.contact.contact_support %} about the contact link's behavior, then click **Send request**. +1. Complete the contact form to tell {% data variables.contact.contact_support %} about the contact link's behavior, then click **Send request**. ## Further reading diff --git a/content/copilot/configuring-github-copilot/configuring-github-copilot-in-visual-studio.md b/content/copilot/configuring-github-copilot/configuring-github-copilot-in-visual-studio.md index ec2a777e2b..9a0cf2484a 100644 --- a/content/copilot/configuring-github-copilot/configuring-github-copilot-in-visual-studio.md +++ b/content/copilot/configuring-github-copilot/configuring-github-copilot-in-visual-studio.md @@ -23,8 +23,8 @@ You can use the default keyboard shortcuts in {% data variables.product.prodname | Action | Shortcut | Command name | |:---|:---|:---| -|Show next inline suggestion|Ctrl+Alt+]|Tools.Nextsuggestion| -|Show previous inline suggestion|Ctrl+Alt+[|Tools.Previoussuggestion| +|Show next inline suggestion|Alt+.|Tools.Nextsuggestion| +|Show previous inline suggestion|Alt+,|Tools.Previoussuggestion| |Trigger inline suggestion|Ctrl+Alt+\|Edit.Copilot.TriggerInlineSuggestion| ## Rebinding keyboard shortcuts diff --git a/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio.md b/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio.md index 6716cc522b..22e22ae69b 100644 --- a/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio.md +++ b/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio.md @@ -21,7 +21,7 @@ If you use {% data variables.product.prodname_vs %}, you can view and incorporat {% data reusables.copilot.subscription-prerequisite %} -- To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vs %}, you must have {% data variables.product.prodname_vs %} 2022 17.2 or later installed. For more information, see the [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) documentation. +- To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vs %}, you must have {% data variables.product.prodname_vs %} 2022 17.4.4 or later installed. For more information, see the [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) documentation. {% note %} diff --git a/content/discussions/index.md b/content/discussions/index.md index 58e449560e..11efd3310d 100644 --- a/content/discussions/index.md +++ b/content/discussions/index.md @@ -24,7 +24,6 @@ featuredLinks: changelog: label: discussions examples_source: data/product-examples/discussions/community-examples.yml -product_video: 'https://www.youtube-nocookie.com/embed/IpBw2SJkFyk' layout: product-landing versions: feature: discussions @@ -37,4 +36,3 @@ children: - /collaborating-with-your-community-using-discussions - /managing-discussions-for-your-community --- - diff --git a/content/get-started/quickstart/git-and-github-learning-resources.md b/content/get-started/quickstart/git-and-github-learning-resources.md index cc3cce6c2f..574d3fecec 100644 --- a/content/get-started/quickstart/git-and-github-learning-resources.md +++ b/content/get-started/quickstart/git-and-github-learning-resources.md @@ -36,10 +36,6 @@ Become better acquainted with {% data variables.product.product_name %} through Learn about [Git branching](http://learngitbranching.js.org/) using an interactive tool. Read about [forks](/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks) and [pull requests](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) as well as [how we use pull requests](https://github.com/blog/1124-how-we-use-pull-requests-to-build-github) at {% data variables.product.prodname_dotcom %}. Access references about using {% data variables.product.prodname_dotcom %} from the [command line](https://cli.github.com/). -### Tune in - -Our {% data variables.product.prodname_dotcom %} [YouTube Training and Guides channel](https://youtube.com/githubguides) offers tutorials about [pull requests](https://www.youtube.com/watch?v=d5wpJ5VimSU&list=PLg7s6cbtAD15G8lNyoaYDuKZSKyJrgwB-&index=19), [forking](https://www.youtube.com/watch?v=5oJHRbqEofs), [rebase](https://www.youtube.com/watch?v=SxzjZtJwOgo&list=PLg7s6cbtAD15G8lNyoaYDuKZSKyJrgwB-&index=22), and [reset](https://www.youtube.com/watch?v=BKPjPMVB81g) functions. Each topic is covered in 5 minutes or less. - ## Training ### Free courses diff --git a/content/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-cloud.md b/content/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-cloud.md index 3d64f51b3d..bb1734e542 100644 --- a/content/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-cloud.md +++ b/content/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-cloud.md @@ -45,6 +45,7 @@ You do not need to provide a payment method during the trial. The following features are not included in the trial of {% data variables.product.prodname_ghe_cloud %}: +- {% data variables.product.prodname_github_codespaces %} - {% data variables.product.prodname_copilot_for_business %} - {% data variables.product.prodname_sponsors %} - {% data variables.product.prodname_marketplace %} apps @@ -54,6 +55,7 @@ The following features are not included in the trial of {% data variables.produc Before you can try {% data variables.product.prodname_ghe_cloud %}, you must be signed into a personal account. If you don't already have a personal account on {% data variables.product.prodname_dotcom_the_website %}, you must create one. For more information, see "[AUTOTITLE](/free-pro-team@latest/get-started/signing-up-for-github/signing-up-for-a-new-github-account)." {% data reusables.enterprise.create-enterprise-account %} + 1. Follow the prompts to configure your trial. ## Exploring {% data variables.product.prodname_ghe_cloud %} diff --git a/content/get-started/using-git/about-git.md b/content/get-started/using-git/about-git.md index d47ec5e759..55b44cb031 100644 --- a/content/get-started/using-git/about-git.md +++ b/content/get-started/using-git/about-git.md @@ -168,11 +168,4 @@ For an open source project, or for projects to which anyone can contribute, mana The {% data variables.product.product_name %} team has created a library of educational videos and guides to help users continue to develop their skills and build better software. - [Beginner projects to explore](https://github.com/showcases/great-for-new-contributors) -- [{% data variables.product.product_name %} video guides](https://youtube.com/githubguides) - -For a detailed look at Git practices, the videos below show how to get the most out of some Git commands. - -- [Working locally](https://www.youtube.com/watch?v=rBbbOouhI-s&index=2&list=PLg7s6cbtAD17Gw5u8644bgKhgRLiJXdX4) -- [`git status`](https://www.youtube.com/watch?v=SxmveNrZb5k&list=PLg7s6cbtAD17Gw5u8644bgKhgRLiJXdX4&index=3) -- [Two-step commits](https://www.youtube.com/watch?v=Vb0Ghkkc2hk&index=4&list=PLg7s6cbtAD17Gw5u8644bgKhgRLiJXdX4) -- [`git pull` and `git push`](https://www.youtube.com/watch?v=-uQHV9GOA0w&index=5&list=PLg7s6cbtAD17Gw5u8644bgKhgRLiJXdX4) +- [{% data variables.product.product_name %} video guides](https://youtube.com/githubguides) \ No newline at end of file diff --git a/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists.md b/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists.md index b8903f4499..a0f364ccf5 100644 --- a/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists.md +++ b/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists.md @@ -70,14 +70,10 @@ Alternatively, you can drag and drop a text file from your desktop directly into 1. Sign in to {% data variables.product.product_name %}. 2. Navigate to your {% data variables.gists.gist_homepage %}. -3. Type an optional description and name for your gist. -![Gist name description](/assets/images/help/gist/gist_name_description.png) +3. Optionally, in the "Gist description" field, type a description for your gist. +4. In the "Filename including extension" field, type a file name for your gist, including the file extensions. +5. In the file contents field, type the text of your gist. +6. Optionally, to create {% ifversion ghae %}an internal{% else %}a public{% endif %} gist, click {% octicon "triangle-down" aria-label="The downwards triangle icon" %}, then click **Create {% ifversion ghae %}internal{% else %}public{% endif %} gist**. -4. Type the text of your gist into the gist text box. -![Gist text box](/assets/images/help/gist/gist_text_box.png) - -5. Optionally, to create {% ifversion ghae %}an internal{% else %}a public{% endif %} gist, click {% octicon "triangle-down" aria-label="The downwards triangle icon" %}, then click **Create {% ifversion ghae %}internal{% else %}public{% endif %} gist**. -![Drop-down menu to select gist visibility]{% ifversion ghae %}(/assets/images/help/gist/gist-visibility-drop-down-ae.png){% else %}(/assets/images/help/gist/gist-visibility-drop-down.png){% endif %} - -6. Click **Create secret Gist** or **Create {% ifversion ghae %}internal{% else %}public{% endif %} gist**. - ![Button to create gist](/assets/images/help/gist/create-secret-gist-button.png) + ![Screenshot of the visibility dropdown menu for a new gist. Next to a button labeled "Create secret gist", a dropdown icon is outlined in dark orange.]{% ifversion ghae %}(/assets/images/help/gist/gist-visibility-drop-down-ae.png){% else %}(/assets/images/help/gist/gist-visibility-drop-down.png){% endif %} +7. Click **Create secret Gist** or **Create {% ifversion ghae %}internal{% else %}public{% endif %} gist**. diff --git a/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/forking-and-cloning-gists.md b/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/forking-and-cloning-gists.md index c63b174254..8066400be5 100644 --- a/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/forking-and-cloning-gists.md +++ b/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/forking-and-cloning-gists.md @@ -12,24 +12,23 @@ versions: ghae: '*' ghec: '*' --- + ## Forking gists Each gist indicates which forks have activity, making it easy to find interesting changes from others. -![Gist forks](/assets/images/help/gist/gist_forks.png) - ## Cloning gists If you want to make local changes to a gist and push them up to the web, you can clone a gist and make commits the same as you would with any Git repository. For more information, see "[AUTOTITLE](/repositories/creating-and-managing-repositories/cloning-a-repository)." -![Gist clone button](/assets/images/help/gist/gist_clone_btn.png) +To clone a gist, select the Embed dropdown menu, then click Clone via HTTPS or Clone via SSH. + +![Screenshot of the "Embed" dropdown menu in GitHub Gist. The dropdown is expanded, and an option labeled “Clone via HTTPS” is outlined in dark orange.](/assets/images/help/gist/gist_clone_btn.png) ## Viewing gist commit history To view a gist's full commit history, click the "Revisions" tab at the top of the gist. -![Gist revisions tab](/assets/images/help/gist/gist_revisions_tab.png) - You will see a full commit history for the gist with diffs. -![Gist revisions page](/assets/images/help/gist/gist_history.png) +![Screenshot of the "Revisions" page in GitHub Gist. A tab, labeled “Revisions”, is outlined in dark orange.](/assets/images/help/gist/gist_history.png) diff --git a/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/accessing-compliance-reports-for-your-organization.md b/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/accessing-compliance-reports-for-your-organization.md index e350dff9dd..3c2a4096ee 100644 --- a/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/accessing-compliance-reports-for-your-organization.md +++ b/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/accessing-compliance-reports-for-your-organization.md @@ -23,6 +23,7 @@ You can access {% data variables.product.company_short %}'s compliance reports i **Note:** To view compliance reports, your organization must use {% data variables.product.prodname_ghe_cloud %}. {% data reusables.enterprise.link-to-ghec-trial %} +If you are not using {% data variables.product.prodname_ghe_cloud %}, you can find similar reports at [GitHub Security](https://www.github.com/security). {% endnote %} {% data reusables.profile.access_org %} diff --git a/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization.md b/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization.md index 137f5630ef..db28b430a4 100644 --- a/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization.md +++ b/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization.md @@ -684,7 +684,7 @@ For more information, see "[AUTOTITLE](/organizations/managing-organization-sett | `create_actions_secret` |Triggered when a {% data variables.product.prodname_actions %} secret is created for a repository. For more information, see "[AUTOTITLE](/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository)."{% endif %} | `destroy` | Triggered when [a repository is deleted](/repositories/creating-and-managing-repositories/deleting-a-repository).{% ifversion fpt or ghec %} | `disable` | Triggered when a repository is disabled (e.g., for [insufficient funds](/billing/managing-your-github-billing-settings/unlocking-a-locked-account)).{% endif %} -| `download_zip` | A source code archive of a repository was downloaded as a ZIP file. +| `download_zip` | A source code archive of a repository was downloaded as a ZIP file. For more information, see "[AUTOTITLE](/repositories/working-with-files/using-files/downloading-source-code-archives)." | `enable` | Triggered when a repository is re-enabled.{% ifversion fpt or ghes or ghec %} | `remove_actions_secret` | Triggered when a {% data variables.product.prodname_actions %} secret is removed.{% endif %} | `remove_member` | Triggered when a user is [removed from a repository as a collaborator](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository). diff --git a/content/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators.md b/content/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators.md index 43c2116721..3062057b7a 100644 --- a/content/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators.md +++ b/content/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators.md @@ -15,6 +15,8 @@ topics: shortTitle: Set collaborator policy --- +{% data reusables.organizations.about-outside-collaborators %} For more information, see "[Adding outside collaborators to repositories in your organization](/organizations/managing-user-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization)." + By default, anyone with admin access to a repository can invite outside collaborators to work on the repository. You can choose to restrict the ability to add outside collaborators to organization owners only. {% ifversion ghec %} diff --git a/content/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on.md b/content/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on.md index 0896615ab4..67155da5b4 100644 --- a/content/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on.md +++ b/content/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on.md @@ -48,7 +48,7 @@ Organization members must also have an active SAML session to authorize an {% da Some IdPs support provisioning access to a {% data variables.product.prodname_dotcom %} organization via SCIM. For more information, see "[AUTOTITLE](/organizations/managing-saml-single-sign-on-for-your-organization/about-scim-for-organizations)." -{% data reusables.scim.enterprise-account-scim %} +{% data reusables.scim.enterprise-account-scim %} ## Adding members to an organization using SAML SSO @@ -66,8 +66,6 @@ If your IdP supports SCIM, {% data variables.product.prodname_dotcom %} can auto {% data reusables.organizations.team-synchronization %} -{% data reusables.saml.saml-single-logout-not-supported %} - ## Further reading - "[AUTOTITLE](/admin/identity-and-access-management/using-saml-for-enterprise-iam/saml-configuration-reference)" diff --git a/content/organizations/managing-user-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization.md b/content/organizations/managing-user-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization.md index c44f561ab9..0d1c626df3 100644 --- a/content/organizations/managing-user-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization.md +++ b/content/organizations/managing-user-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization.md @@ -19,7 +19,7 @@ permissions: People with admin access to a repository can add an outside collabo ## About outside collaborators -An outside collaborator is a person who is not a member of your organization, but has access to one or more of your organization's repositories. You can choose the level of access to grant for each outside collaborator. {% data reusables.organizations.outside_collaborator_forks %} +{% data reusables.organizations.about-outside-collaborators %} You can choose the level of access to grant for each outside collaborator. {% data reusables.organizations.outside_collaborator_forks %} {% data reusables.organizations.outside-collaborators-use-seats %} diff --git a/content/organizations/managing-user-access-to-your-organizations-repositories/setting-base-permissions-for-an-organization.md b/content/organizations/managing-user-access-to-your-organizations-repositories/setting-base-permissions-for-an-organization.md index 07949e84e3..7059828133 100644 --- a/content/organizations/managing-user-access-to-your-organizations-repositories/setting-base-permissions-for-an-organization.md +++ b/content/organizations/managing-user-access-to-your-organizations-repositories/setting-base-permissions-for-an-organization.md @@ -28,6 +28,12 @@ If someone with admin access to an organization's repository grants a member a h If you've created a custom repository role with an inherited role that is lower access than your organization's base permissions, any members assigned to that role will default to the organization's base permissions rather than the inherited role. For more information, see "[AUTOTITLE](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." {% endif %} +{% note %} + +**Note:** All changes to base permissions will affect both new and existing members. + +{% endnote %} + ## Setting base permissions {% data reusables.profile.access_org %} diff --git a/content/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site.md b/content/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site.md index 34ea242e85..c883e8b8fe 100644 --- a/content/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site.md +++ b/content/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site.md @@ -31,27 +31,39 @@ shortTitle: Configure publishing source {% data reusables.pages.sidebar-pages %} {% ifversion pages-custom-workflow %} 1. Under "Build and deployment", under "Source", select **Deploy from a branch**. -1. Under "Build and deployment", under "Branch", use the **None** or **Branch** drop-down menu and select a publishing source. +1. Under "Build and deployment", under "Branch", use the **None** or **Branch** dropdown menu and select a publishing source. + + ![Screenshot of the dropdown menu to select a publishing source](/assets/images/help/pages/publishing-source-drop-down.png) - ![Drop-down menu to select a publishing source](/assets/images/help/pages/publishing-source-drop-down.png) {% else %} 3. Under "{% data variables.product.prodname_pages %}", use the **None** or **Branch** drop-down menu and select a publishing source. - ![Drop-down menu to select a publishing source](/assets/images/help/pages/publishing-source-drop-down.png) + + ![Screenshot of the dropdown menu to select a publishing source](/assets/images/help/pages/publishing-source-drop-down.png) + {% endif %} -4. Optionally, use the drop-down menu to select a folder for your publishing source. - ![Drop-down menu to select a folder for publishing source](/assets/images/help/pages/publishing-source-folder-drop-down.png) -5. Click **Save**. - ![Button to save changes to publishing source settings](/assets/images/help/pages/publishing-source-save.png) +1. Optionally, use the drop-down menu to select a folder for your publishing source. + + ![Screenshot of the dropdown menu to select a folder for publishing source](/assets/images/help/pages/publishing-source-folder-drop-down.png) + +1. Click **Save**. + + ![Screenshot of the button to save changes to publishing source settings](/assets/images/help/pages/publishing-source-save.png) ### Troubleshooting publishing from a branch +{% ifversion pages-disable-symlinks-on-legacy-pages %} + +{% data reusables.pages.symlink-removal %} + +{% endif %} + {% data reusables.pages.admin-must-push %} If you choose the `docs` folder on any branch as your publishing source, then later remove the `/docs` folder from that branch in your repository, your site won't build and you'll get a page build error message for a missing `/docs` folder. For more information, see "[AUTOTITLE](/pages/setting-up-a-github-pages-site-with-jekyll/troubleshooting-jekyll-build-errors-for-github-pages-sites#missing-docs-folder)." {% ifversion build-pages-with-actions %} -Your {% data variables.product.prodname_pages %} site will always be deployed with a {% data variables.product.prodname_actions %} workflow run, even if you've configured your {% data variables.product.prodname_pages %} site to be built using a different CI tool. Most external CI workflows "deploy" to GitHub Pages by committing the build output to the `gh-pages` branch of the repository, and typically include a `.nojekyll` file. When this happens, the {% data variables.product.prodname_actions %} workflow will detect the state that the branch does not need a build step, and will execute only the steps necessary to deploy the site to {% data variables.product.prodname_pages %} servers. +Your {% data variables.product.prodname_pages %} site will always be deployed with a {% data variables.product.prodname_actions %} workflow run, even if you've configured your {% data variables.product.prodname_pages %} site to be built using a different CI tool. Most external CI workflows "deploy" to {% data variables.product.prodname_pages %} by committing the build output to the `gh-pages` branch of the repository, and typically include a `.nojekyll` file. When this happens, the {% data variables.product.prodname_actions %} workflow will detect the state that the branch does not need a build step, and will execute only the steps necessary to deploy the site to {% data variables.product.prodname_pages %} servers. To find potential errors with either the build or deployment, you can check the workflow run for your {% data variables.product.prodname_pages %} site by reviewing your repository's workflow runs. For more information, see "[AUTOTITLE](/actions/monitoring-and-troubleshooting-workflows/viewing-workflow-run-history)." For more information about how to re-run the workflow in case of an error, see "[AUTOTITLE](/actions/managing-workflow-runs/re-running-workflows-and-jobs)." @@ -68,7 +80,7 @@ To configure your site to publish with {% data variables.product.prodname_action {% data reusables.pages.navigate-site-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.pages.sidebar-pages %} -1. Under "Build and deployment", under "Source", select **GitHub Actions**. +1. Under "Build and deployment", under "Source", select **{% data variables.product.prodname_actions %}**. 1. {% data variables.product.product_name %} will suggest several starter workflows. If you already have a workflow to publish your site, you can skip this step. Otherwise, choose one of the options to create a {% data variables.product.prodname_actions %} workflow. For more information about creating your custom workflow, see "[Creating a custom {% data variables.product.prodname_actions %} workflow to publish your site](#creating-a-custom-github-actions-workflow-to-publish-your-site)." {% data variables.product.prodname_pages %} does not associate a specific workflow to the {% data variables.product.prodname_pages %} settings. However, the {% data variables.product.prodname_pages %} settings will link to the workflow run that most recently deployed your site. @@ -90,6 +102,7 @@ The starter workflows use a deployment environment called `github-pages`. If you {% ifversion fpt or ghec %} {% note %} + **Note**: A `CNAME` file in your repository file does not automatically add or remove a custom domain. Instead, you must configure the custom domain through your repository settings or through the API. For more information, see "[AUTOTITLE](/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#configuring-a-subdomain)" and the [Pages API reference documentation](/rest/pages#update-information-about-a-github-pages-site). {% endnote %} diff --git a/content/pages/setting-up-a-github-pages-site-with-jekyll/troubleshooting-jekyll-build-errors-for-github-pages-sites.md b/content/pages/setting-up-a-github-pages-site-with-jekyll/troubleshooting-jekyll-build-errors-for-github-pages-sites.md index e463a2443c..37f55b1c6d 100644 --- a/content/pages/setting-up-a-github-pages-site-with-jekyll/troubleshooting-jekyll-build-errors-for-github-pages-sites.md +++ b/content/pages/setting-up-a-github-pages-site-with-jekyll/troubleshooting-jekyll-build-errors-for-github-pages-sites.md @@ -60,6 +60,12 @@ To troubleshoot, make sure that your *_config.yml* file follows these rules: {% data reusables.pages.yaml-linter %} +{% ifversion pages-disable-symlinks-on-legacy-pages %} + +{% data reusables.pages.symlink-removal %} + +{% endif %} + ## Date is not a valid datetime This error means that one of the pages on your site includes an invalid datetime. @@ -72,11 +78,13 @@ This error means that your code references a file that doesn't exist in your *_i {% data reusables.pages.search-for-includes %} If any of the files you've referenced aren't in the *_includes* directory, copy or move the files into the *_includes* directory. +{% ifversion ghes < 3.9 %} ## File is a symlink This error means that your code references a symlinked file that does not exist in the published files for your site. {% data reusables.pages.search-for-includes %} If any of the files you've referenced are symlinked, copy or move the files into the *_includes* directory. +{% endif %} ## File is not properly UTF-8 encoded @@ -160,11 +168,13 @@ Permalinks are permanent URLs that reference a particular page on your site. Abs To troubleshoot, remove the `relative_permalinks` line from your *_config.yml* file and reformat any relative permalinks in your site with absolute permalinks. For more information, see "[AUTOTITLE](/repositories/working-with-files/managing-files/editing-files)." +{% ifversion ghes < 3.9 %} ## Symlink does not exist within your site's repository This error means that your site includes a symbolic link (symlink) that does not exist in the published files for your site. For more information about symlinks, see "[Symbolic link](https://en.wikipedia.org/wiki/Symbolic_link)" on Wikipedia. To troubleshoot, determine if the file in the error message is used to build your site. If not, or if you don't want the file to be a symlink, delete the file. If the symlinked file is necessary to build your site, make sure the file or directory the symlink references is in the published files for your site. To include external assets, consider using {% ifversion fpt or ghec %}`git submodule` or {% endif %}a third-party package manager such as [Bower](https://bower.io/).{% ifversion fpt or ghec %} For more information, see "[AUTOTITLE](/pages/getting-started-with-github-pages/using-submodules-with-github-pages)."{% endif %} +{% endif %} ## Syntax error in 'for' loop diff --git a/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md b/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md index a89811cb64..1a18adf982 100644 --- a/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md +++ b/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md @@ -56,6 +56,8 @@ To reduce the size of your CODEOWNERS file, consider using wildcard patterns to A CODEOWNERS file uses a pattern that follows most of the same rules used in [gitignore](https://git-scm.com/docs/gitignore#_pattern_format) files. The pattern is followed by one or more {% data variables.product.prodname_dotcom %} usernames or team names using the standard `@username` or `@org/team-name` format. Users and teams must have explicit `write` access to the repository, even if the team's members already have access. +If you want to match two or more code owners with the same pattern, all the code owners must be on the same line. If the code owners are not on the same line, the pattern matches only the last mentioned code owner. + {% ifversion fpt or ghec%}In most cases, you{% else %}You{% endif %} can also refer to a user by an email address that has been added to their account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}, for example `user@example.com`. {% ifversion fpt or ghec %} You cannot use an email address to refer to a {% data variables.enterprise.prodname_managed_user %}. For more information about {% data variables.enterprise.prodname_managed_users %}, see "[AUTOTITLE](/enterprise-cloud@latest/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users){% ifversion fpt %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %}{% endif %} CODEOWNERS paths are case sensitive, because {% data variables.product.prodname_dotcom %} uses a case sensitive file system. Since CODEOWNERS are evaluated by {% data variables.product.prodname_dotcom %}, even systems that are case insensitive (for example, macOS) must use paths and files that are cased correctly in the CODEOWNERS file. diff --git a/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository.md b/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository.md index aa2ded745b..dc32dc7918 100644 --- a/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository.md +++ b/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository.md @@ -8,8 +8,8 @@ redirect_from: - /github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/licensing-a-repository versions: fpt: '*' - ghes: '*' ghec: '*' + ghes: '*' topics: - Repositories --- @@ -84,9 +84,13 @@ If your repository is using a license that is listed on the Choose a License web ## Applying a license to a repository with an existing license -The license picker is only available when you create a new project on GitHub. You can manually add a license using the browser. For more information on adding a license to a repository, see "[AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository)." +{% ifversion fpt or ghec %} +The license picker is only available when you create a new project on GitHub. ![Screenshot of license picker on GitHub.com](/assets/images/help/repository/repository-license-picker.png) +{% endif %} + +You can manually add a license using the browser. For more information on adding a license to a repository, see "[AUTOTITLE](/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository)." ## Disclaimer diff --git a/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-git-lfs-objects-in-archives-of-your-repository.md b/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-git-lfs-objects-in-archives-of-your-repository.md index 10e5a52093..5720f28d22 100644 --- a/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-git-lfs-objects-in-archives-of-your-repository.md +++ b/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-git-lfs-objects-in-archives-of-your-repository.md @@ -14,7 +14,7 @@ redirect_from: --- ## About {% data variables.large_files.product_name_short %} objects in archives -{% data variables.product.product_name %} creates source code archives of your repository in the form of ZIP files and tarballs. People can download these archives on the main page of your repository or as release assets. By default, {% data variables.large_files.product_name_short %} objects are not included in these archives, only the pointer files to these objects. To improve the usability of archives for your repository, you can choose to include the {% data variables.large_files.product_name_short %} objects instead. To be included, the {% data variables.large_files.product_name_short %} objects must be covered by tracking rules in a *.gitattributes* file that has been committed to the repository. +{% data variables.product.product_name %} creates [source code archives](/repositories/working-with-files/using-files/downloading-source-code-archives) of your repository in the form of ZIP files and tarballs. People can download these archives on the main page of your repository or as release assets. By default, {% data variables.large_files.product_name_short %} objects are not included in these archives, only the pointer files to these objects. To improve the usability of archives for your repository, you can choose to include the {% data variables.large_files.product_name_short %} objects instead. To be included, the {% data variables.large_files.product_name_short %} objects must be covered by tracking rules in a *.gitattributes* file that has been committed to the repository. If you choose to include {% data variables.large_files.product_name_short %} objects in archives of your repository, every download of those archives will count towards bandwidth usage for your account. Each account receives {% data variables.large_files.initial_bandwidth_quota %} per month of bandwidth for free, and you can pay for additional usage. For more information, see "[AUTOTITLE](/repositories/working-with-files/managing-large-files/about-storage-and-bandwidth-usage)" and "[AUTOTITLE](/billing/managing-billing-for-git-large-file-storage)." diff --git a/content/repositories/working-with-files/managing-large-files/about-storage-and-bandwidth-usage.md b/content/repositories/working-with-files/managing-large-files/about-storage-and-bandwidth-usage.md index 5c9711fc53..68564466f1 100644 --- a/content/repositories/working-with-files/managing-large-files/about-storage-and-bandwidth-usage.md +++ b/content/repositories/working-with-files/managing-large-files/about-storage-and-bandwidth-usage.md @@ -24,7 +24,7 @@ For example: - If {% data variables.product.prodname_actions %} downloads a 500 MB file that is tracked with LFS, it will use 500 MB of the repository owner's allotted bandwidth. {% ifversion fpt or ghec %} -If {% data variables.large_files.product_name_long %} ({% data variables.large_files.product_name_short %}) objects are included in source code archives for your repository, downloads of those archives will count towards bandwidth usage for the repository. For more information, see "[AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-git-lfs-objects-in-archives-of-your-repository)." +If {% data variables.large_files.product_name_long %} ({% data variables.large_files.product_name_short %}) objects are included in [source code archives](/repositories/working-with-files/using-files/downloading-source-code-archives) for your repository, downloads of those archives will count towards bandwidth usage for the repository. For more information, see "[AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-git-lfs-objects-in-archives-of-your-repository)." {% endif %} {% tip %} diff --git a/content/repositories/working-with-files/using-files/downloading-source-code-archives.md b/content/repositories/working-with-files/using-files/downloading-source-code-archives.md new file mode 100644 index 0000000000..6e92ebcb51 --- /dev/null +++ b/content/repositories/working-with-files/using-files/downloading-source-code-archives.md @@ -0,0 +1,74 @@ +--- +title: Downloading source code archives +intro: 'You can download a snapshot of the code in your repository.' +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: + - Repositories +shortTitle: Source code archives +--- +## Overview of source code archives + +You can download a snapshot of any branch, tag, or specific commit from {% data variables.location.product_location %}. These snapshots are generated by the [`git archive` command](https://git-scm.com/docs/git-archive) in one of two formats: tarball or zipball. Snapshots don't contain the entire repository history. If you want the entire history, you can clone the repository. For more information, see "[AUTOTITLE](/repositories/creating-and-managing-repositories/cloning-a-repository)." + +## Downloading source code archives + +You can download the source code archives in three ways. + +### Downloading source code archives from the repository view + +{% data reusables.repositories.navigate-to-repo %} +1. Above the list of files, click {% octicon "download" aria-label="The download icon" %} **Code**. + + !["Code" button](/assets/images/help/repository/code-button.png) + +1. Click {% octicon "file-zip" aria-label="The ZIP icon" %} **Download ZIP**. + +### Downloading source code archives from a release + +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.releases %} +1. Scroll down to the "Assets" section of the release. +1. To download the source code, click {% octicon "file-zip" aria-label="The ZIP icon" %} **Source code (zip)** or {% octicon "file-zip" aria-label="The ZIP icon" %} **Source code (tar.gz)**. + +### Downloading source code archives from a tag + +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.releases %} +1. At the top of the Releases page, click **Tags**. +1. To download the source code, click {% octicon "file-zip" aria-label="The ZIP icon" %} **zip** or {% octicon "file-zip" aria-label="The ZIP icon" %} **tar.gz**. + + ![Screenshot of the "Tags" page of a repository. The zip and tar.gz options are outlined in dark orange.](/assets/images/help/repository/tags-download-zip-targz.png) + +## Source code archive URLs + +Source code archives are available at specific URLs for each repository. For example, consider the repository `github/codeql`. There are different URLs for downloading a branch, a tag, or a specific commit ID. + +| Type of archive | Example | URL | +|-----------------|---------|---------| +| Branch | `main` | [https://github.com/github/codeql/archive/refs/**heads/main**.tar.gz](https://github.com/github/codeql/archive/refs/heads/main.tar.gz) | +| Tag | `codeql-cli/latest` | [https://github.com/github/codeql/archive/refs/**tags/codeql-cli/latest**.zip](https://github.com/github/codeql/archive/refs/tags/codeql-cli/latest.zip) | +| Commit | `aef66c4` | [https://github.com/github/codeql/archive/**aef66c462abe817e33aad91d97aa782a1e2ad2c7**.zip](https://github.com/github/codeql/archive/aef66c462abe817e33aad91d97aa782a1e2ad2c7.zip) | + +{% note %} + +**Note**: You can use either `.zip` or `.tar.gz` in the URLs above to request a zipball or tarball respectively. + +{% endnote %} + +## Stability of source code archives + +Source code archives are generated on request, cached for a while, and then deleted. If the same archive is requested again in the future, it'll be regenerated. It's important to understand what guarantees {% data variables.product.company_short %} makes about source code archives. + +* An archive of a commit ID will always have the same file contents whenever it's requested, assuming the commit ID is still in the repository. +* Because branches and tags can move to different commit IDs, future downloads of an archive may have different contents than previously downloaded archives of the same branch or tag. Assuming the branch or tag still points at the same commit ID, it will have the same file contents. +* The exact compression settings used to generate a zipball or tarball may change over time. The extracted contents won't change if the branch or tag doesn't change, but the outer compressed archive may have a different byte layout. {% data variables.product.company_short %} will give at least six months' notice before changing compression settings. + +If you rely on stability of source code archives for reproducibility (ensuring you always get identical files inside the archive), we recommend using the [archives REST API](/rest/repos/contents#download-a-repository-archive-tar) with a commit ID for `:ref`. Using the commit ID ensures you'll always get the same file contents inside the archive and you’ll be immune to repositories rewriting tags or moving branch heads. + +If you rely on stability of archives for security (for example: to ensure you don't attempt to unzip a maliciously-crafted file), we recommend using releases instead of using source downloads. For more information, see "[AUTOTITLE](/repositories/releasing-projects-on-github/about-releases)." + +You can use something like [this third-party {% data variables.product.company_short %} action](https://github.com/softprops/action-gh-release) to create and push these files as part of your release process. The [Release Assets REST API](/rest/releases/assets#get-a-release-asset) can later be used to retrieve them. diff --git a/content/repositories/working-with-files/using-files/index.md b/content/repositories/working-with-files/using-files/index.md index 8fd80fa5d2..a55323280f 100644 --- a/content/repositories/working-with-files/using-files/index.md +++ b/content/repositories/working-with-files/using-files/index.md @@ -10,6 +10,7 @@ children: - /navigating-code-on-github - /viewing-a-file - /getting-permanent-links-to-files + - /downloading-source-code-archives - /working-with-non-code-files --- diff --git a/content/rest/actions/cache.md b/content/rest/actions/cache.md index 33d67f5388..43aac35efa 100644 --- a/content/rest/actions/cache.md +++ b/content/rest/actions/cache.md @@ -10,7 +10,7 @@ topics: versions: fpt: '*' ghec: '*' - ghes: '>3.4' + ghes: '>=3.5' autogenerated: rest --- diff --git a/content/rest/announcement-banners/organizations.md b/content/rest/announcement-banners/organizations.md index 3da576ecd2..89283d5e53 100644 --- a/content/rest/announcement-banners/organizations.md +++ b/content/rest/announcement-banners/organizations.md @@ -5,7 +5,6 @@ intro: >- The Organization Announcement Banners API allows you to get, set, and remove the announcement banner for your organization. versions: - ghae: '>=3.8' ghec: '*' ghes: '>=3.8' allowTitleToDifferFromFilename: true diff --git a/content/rest/apps/oauth-applications.md b/content/rest/apps/oauth-applications.md index d7a0931189..b748b05d9a 100644 --- a/content/rest/apps/oauth-applications.md +++ b/content/rest/apps/oauth-applications.md @@ -1,9 +1,7 @@ --- -title: OAuth Apps +title: OAuth Authorizations allowTitleToDifferFromFilename: true -intro: >- - Use the REST API to interact with {% data - variables.product.prodname_oauth_apps %} +intro: 'Use the REST API to interact with {% data variables.product.prodname_oauth_apps %} and OAuth authorizations of {% data variables.product.prodname_github_apps %}' topics: - API versions: @@ -14,9 +12,10 @@ versions: autogenerated: rest --- -## About {% data variables.product.prodname_oauth_apps %} +## About {% data variables.product.prodname_oauth_apps %} and OAuth authorizations of {% data variables.product.prodname_github_apps %} -You can use these endpoints to manage the OAuth tokens that {% data variables.product.prodname_oauth_app %} uses to access people's accounts on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. +You can use these endpoints to manage the OAuth tokens that {% data variables.product.prodname_oauth_apps %} or {% data variables.product.prodname_github_apps %} use to access people's accounts on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}. +Tokens for {% data variables.product.prodname_oauth_apps %} have the prefix `gho_`, while OAuth tokens for {% data variables.product.prodname_github_apps %}, used for authenticating on behalf of the user, have the prefix `ghu_`. You can use the following endpoints for both types of OAuth tokens. - + \ No newline at end of file diff --git a/content/rest/dependabot/alerts.md b/content/rest/dependabot/alerts.md index 14adf2fe21..146cfdb1ab 100644 --- a/content/rest/dependabot/alerts.md +++ b/content/rest/dependabot/alerts.md @@ -6,7 +6,9 @@ intro: >- Use the REST API to interact with {% data variables.product.prodname_dependabot %} alerts for a repository. versions: - feature: dependabot-alerts-rest-api + fpt: '*' + ghec: '*' + ghes: '>=3.8' topics: - API autogenerated: rest diff --git a/content/rest/dependency-graph/dependency-review.md b/content/rest/dependency-graph/dependency-review.md index 389a6b5667..655ed6b99b 100644 --- a/content/rest/dependency-graph/dependency-review.md +++ b/content/rest/dependency-graph/dependency-review.md @@ -3,7 +3,6 @@ title: Dependency review intro: Use the REST API to interact with dependency changes. versions: fpt: '*' - ghae: '>= 3.6' ghec: '*' ghes: '>=3.6' topics: diff --git a/content/rest/dependency-graph/dependency-submission.md b/content/rest/dependency-graph/dependency-submission.md index 8f1856f819..668f51f8f7 100644 --- a/content/rest/dependency-graph/dependency-submission.md +++ b/content/rest/dependency-graph/dependency-submission.md @@ -2,7 +2,9 @@ title: Dependency submission intro: Use the REST API to submit dependencies. versions: - feature: dependency-submission-api + fpt: '*' + ghec: '*' + ghes: '>=3.7' autogenerated: rest --- diff --git a/content/rest/orgs/security-managers.md b/content/rest/orgs/security-managers.md index 872f3cdb97..9b79e26233 100644 --- a/content/rest/orgs/security-managers.md +++ b/content/rest/orgs/security-managers.md @@ -3,7 +3,6 @@ title: Security Managers intro: Use the REST API to manage security managers in an organization. versions: fpt: '*' - ghae: '>= 3.7' ghec: '*' ghes: '>=3.7' topics: diff --git a/content/rest/repos/tags.md b/content/rest/repos/tags.md index 9a2743222f..acd76fce87 100644 --- a/content/rest/repos/tags.md +++ b/content/rest/repos/tags.md @@ -6,7 +6,7 @@ intro: Use the REST API to manage tags for a repository. versions: fpt: '*' ghec: '*' - ghes: '>3.4' + ghes: '>=3.5' topics: - API autogenerated: rest diff --git a/contributing/videos.md b/contributing/videos.md index 4b62864dbb..4091437740 100644 --- a/contributing/videos.md +++ b/contributing/videos.md @@ -196,94 +196,6 @@ Location: content/education/manage-coursework-with-github-classroom/get-started- Transcript: TBD ``` -``` -Title: Pull Requests • GitHub & Git Foundations -URL: https://www.youtube.com/watch?v=d5wpJ5VimSU&list=PLg7s6cbtAD15G8lNyoaYDuKZSKyJrgwB-&index=19 -Description: A 4.5 minute video introducing pull requests. -Product: Pull requests, getting started -Versions: All -Date added: ? -Location: content/get-started/quickstart/git-and-github-learning-resources.md -Transcript: TBD -``` - -``` -Title: Rebase • GitHub & Git Foundations -URL: https://www.youtube.com/watch?v=SxzjZtJwOgo&list=PLg7s6cbtAD15G8lNyoaYDuKZSKyJrgwB-&index=22 -Description: A 4.5 minute introduction to using Git Rebase. -Product: Getting started -Versions: All -Date added: ? -Location: content/get-started/quickstart/git-and-github-learning-resources.md -Transcript: TBD -``` - -``` -Title: Reset• GitHub & Git Foundations -URL: https://www.youtube.com/watch?v=BKPjPMVB81g -Description: A 4 minute introduction to using Git Reset. -Product: Getting started -Versions: All -Date added: ? -Location: content/get-started/quickstart/git-and-github-learning-resources.md -Transcript: TBD -``` - -``` -Title: Forking • GitHub & Git Foundations -URL: https://www.youtube.com/watch?v=5oJHRbqEofs -Description: A 2 minute introduction to forking projects on GitHub. -Product: Getting started -Versions: All -Date added: ? -Location: content/get-started/quickstart/git-and-github-learning-resources.md -Transcript: TBD -``` - -``` -Title: Git & GitHub: Working Locally -URL: https://www.youtube.com/watch?v=rBbbOouhI-s&index=2&list=PLg7s6cbtAD17Gw5u8644bgKhgRLiJXdX4 -Description: A 1.5 minute overview of working locally in the command line. -Product: Getting started -Versions: All -Date added: ? -Location: content/get-started/using-git/about-git.md -Transcript: TBD -``` - -``` -Title: Git & GitHub: Git Status -URL: https://www.youtube.com/watch?v=SxmveNrZb5k&list=PLg7s6cbtAD17Gw5u8644bgKhgRLiJXdX4&index=3 -Description: A 1 minute overview of the git status command. -Product: Getting started -Versions: All -Date added: ? -Location: content/get-started/using-git/about-git.md -Transcript: TBD -``` - -``` -Title: Git & GitHub: Git Pull and Git Push -URL: https://www.youtube.com/watch?v=-uQHV9GOA0w&index=5&list=PLg7s6cbtAD17Gw5u8644bgKhgRLiJXdX4 -Description: A 1 minute introduction to using Git Push and Git Pull. -Product: Getting started -Versions: All -Date added: ? -Location: content/get-started/using-git/about-git.md -Transcript: TBD -``` - -``` -Title: Git & GiHub: Saved Changes -URL: https://www.youtube.com/watch?v=Vb0Ghkkc2hk&index=4&list=PLg7s6cbtAD17Gw5u8644bgKhgRLiJXdX4 -Description: A 1.5 minute introduction to saving work and pushing commits. -Product: Getting started -Versions: All -Date added: ? -Location: content/get-started/using-git/about-git.md -Transcript: TBD -``` - ``` Title: Planning at scale with Issues – GitHub Universe 2021 URL: https://www.youtube-nocookie.com/embed/ha1KHcPMAEk diff --git a/data/features/actions-break-glass.yml b/data/features/actions-break-glass.yml new file mode 100644 index 0000000000..13626fc31a --- /dev/null +++ b/data/features/actions-break-glass.yml @@ -0,0 +1,5 @@ +# Reference: #9225 +# Documentation for Actions break glass feature (bypass branch protection rules) +versions: + fpt: '*' + ghec: '*' diff --git a/data/features/pages-disable-symlinks-on-legacy-pages.yml b/data/features/pages-disable-symlinks-on-legacy-pages.yml new file mode 100644 index 0000000000..4937db2212 --- /dev/null +++ b/data/features/pages-disable-symlinks-on-legacy-pages.yml @@ -0,0 +1,6 @@ +# Issue 9540 +# Disable symlinks on legacy pages build infrastructure +versions: + fpt: '*' + ghec: '*' + ghes: '>=3.9' diff --git a/data/graphql/ghae/schema.docs-ghae.graphql b/data/graphql/ghae/schema.docs-ghae.graphql index a3eb06147b..6aab86f390 100644 --- a/data/graphql/ghae/schema.docs-ghae.graphql +++ b/data/graphql/ghae/schema.docs-ghae.graphql @@ -1820,6 +1820,11 @@ type BranchProtectionRule implements Node { """ requiredApprovingReviewCount: Int + """ + List of required deployment environments that must be deployed successfully to update matching branches + """ + requiredDeploymentEnvironments: [String] + """ List of required status check contexts that must pass for commits to be accepted to matching branches. """ @@ -1850,6 +1855,11 @@ type BranchProtectionRule implements Node { """ requiresConversationResolution: Boolean! + """ + Does this branch require deployment to specific environments before merging + """ + requiresDeployments: Boolean! + """ Are merge commits prohibited from being pushed to this branch. """ @@ -5778,6 +5788,11 @@ input CreateBranchProtectionRuleInput { """ requiredApprovingReviewCount: Int + """ + The list of required deployment environments + """ + requiredDeploymentEnvironments: [String!] + """ List of required status check contexts that must pass for commits to be accepted to matching branches. """ @@ -5808,6 +5823,11 @@ input CreateBranchProtectionRuleInput { """ requiresConversationResolution: Boolean + """ + Are successful deployments required before merging. + """ + requiresDeployments: Boolean + """ Are merge commits prohibited from being pushed to this branch. """ @@ -41131,6 +41151,11 @@ input UpdateBranchProtectionRuleInput { """ requiredApprovingReviewCount: Int + """ + The list of required deployment environments + """ + requiredDeploymentEnvironments: [String!] + """ List of required status check contexts that must pass for commits to be accepted to matching branches. """ @@ -41161,6 +41186,11 @@ input UpdateBranchProtectionRuleInput { """ requiresConversationResolution: Boolean + """ + Are successful deployments required before merging. + """ + requiresDeployments: Boolean + """ Are merge commits prohibited from being pushed to this branch. """ @@ -44726,6 +44756,11 @@ type WorkflowRun implements Node & UniformResourceLocatable { """ last: Int ): DeploymentReviewConnection! + + """ + The event that triggered the workflow run + """ + event: String! id: ID! """ diff --git a/data/graphql/ghec/schema.docs.graphql b/data/graphql/ghec/schema.docs.graphql index 7dd4c7fb5a..6f1aa10151 100644 --- a/data/graphql/ghec/schema.docs.graphql +++ b/data/graphql/ghec/schema.docs.graphql @@ -2087,6 +2087,11 @@ type BranchProtectionRule implements Node { """ requiredApprovingReviewCount: Int + """ + List of required deployment environments that must be deployed successfully to update matching branches + """ + requiredDeploymentEnvironments: [String] + """ List of required status check contexts that must pass for commits to be accepted to matching branches. """ @@ -2117,6 +2122,11 @@ type BranchProtectionRule implements Node { """ requiresConversationResolution: Boolean! + """ + Does this branch require deployment to specific environments before merging + """ + requiresDeployments: Boolean! + """ Are merge commits prohibited from being pushed to this branch. """ @@ -6216,6 +6226,11 @@ input CreateBranchProtectionRuleInput { """ requiredApprovingReviewCount: Int + """ + The list of required deployment environments + """ + requiredDeploymentEnvironments: [String!] + """ List of required status check contexts that must pass for commits to be accepted to matching branches. """ @@ -6246,6 +6261,11 @@ input CreateBranchProtectionRuleInput { """ requiresConversationResolution: Boolean + """ + Are successful deployments required before merging. + """ + requiresDeployments: Boolean + """ Are merge commits prohibited from being pushed to this branch. """ @@ -51314,6 +51334,11 @@ input UpdateBranchProtectionRuleInput { """ requiredApprovingReviewCount: Int + """ + The list of required deployment environments + """ + requiredDeploymentEnvironments: [String!] + """ List of required status check contexts that must pass for commits to be accepted to matching branches. """ @@ -51344,6 +51369,11 @@ input UpdateBranchProtectionRuleInput { """ requiresConversationResolution: Boolean + """ + Are successful deployments required before merging. + """ + requiresDeployments: Boolean + """ Are merge commits prohibited from being pushed to this branch. """ @@ -55876,6 +55906,11 @@ type WorkflowRun implements Node & UniformResourceLocatable { """ last: Int ): DeploymentReviewConnection! + + """ + The event that triggered the workflow run + """ + event: String! id: ID! """ diff --git a/data/graphql/schema.docs.graphql b/data/graphql/schema.docs.graphql index 7dd4c7fb5a..6f1aa10151 100644 --- a/data/graphql/schema.docs.graphql +++ b/data/graphql/schema.docs.graphql @@ -2087,6 +2087,11 @@ type BranchProtectionRule implements Node { """ requiredApprovingReviewCount: Int + """ + List of required deployment environments that must be deployed successfully to update matching branches + """ + requiredDeploymentEnvironments: [String] + """ List of required status check contexts that must pass for commits to be accepted to matching branches. """ @@ -2117,6 +2122,11 @@ type BranchProtectionRule implements Node { """ requiresConversationResolution: Boolean! + """ + Does this branch require deployment to specific environments before merging + """ + requiresDeployments: Boolean! + """ Are merge commits prohibited from being pushed to this branch. """ @@ -6216,6 +6226,11 @@ input CreateBranchProtectionRuleInput { """ requiredApprovingReviewCount: Int + """ + The list of required deployment environments + """ + requiredDeploymentEnvironments: [String!] + """ List of required status check contexts that must pass for commits to be accepted to matching branches. """ @@ -6246,6 +6261,11 @@ input CreateBranchProtectionRuleInput { """ requiresConversationResolution: Boolean + """ + Are successful deployments required before merging. + """ + requiresDeployments: Boolean + """ Are merge commits prohibited from being pushed to this branch. """ @@ -51314,6 +51334,11 @@ input UpdateBranchProtectionRuleInput { """ requiredApprovingReviewCount: Int + """ + The list of required deployment environments + """ + requiredDeploymentEnvironments: [String!] + """ List of required status check contexts that must pass for commits to be accepted to matching branches. """ @@ -51344,6 +51369,11 @@ input UpdateBranchProtectionRuleInput { """ requiresConversationResolution: Boolean + """ + Are successful deployments required before merging. + """ + requiresDeployments: Boolean + """ Are merge commits prohibited from being pushed to this branch. """ @@ -55876,6 +55906,11 @@ type WorkflowRun implements Node & UniformResourceLocatable { """ last: Int ): DeploymentReviewConnection! + + """ + The event that triggered the workflow run + """ + event: String! id: ID! """ diff --git a/data/release-notes/enterprise-server/3-4/17.yml b/data/release-notes/enterprise-server/3-4/17.yml new file mode 100644 index 0000000000..ff62acecac --- /dev/null +++ b/data/release-notes/enterprise-server/3-4/17.yml @@ -0,0 +1,19 @@ +date: '2023-03-02' +sections: + bugs: + - When viewing a list of open sessions for the devices logged into a user account, the GitHub Enterprise Server web UI could display an incorrect location. + - | + In the rare case when primary shards for Elasticsearch were located on a replica node, the `ghe-repl-stop` command would fail with `ERROR: Running migrations`. + known_issues: + - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. + - Custom firewall rules are removed during the upgrade process. + - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. + - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. + - When "Users can search GitHub.com" is enabled with {% data variables.product.prodname_github_connect %}, issues in private and internal repositories are not included in {% data variables.product.prodname_dotcom_the_website %} search results. + - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. + - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. + - | + After registering a self-hosted runner with the `--ephemeral` parameter on more than one level (for example, both enterprise and organization), the runner may get stuck in an idle state and require re-registration. [Updated: 2022-06-17] + - After upgrading to {% data variables.product.prodname_ghe_server %} 3.4, releases may appear to be missing from repositories. This can occur when the required Elasticsearch index migrations have not successfully completed. + - '{% data reusables.release-notes.ghas-3.4-secret-scanning-known-issue %}' + - '{% data reusables.release-notes.2022-09-hotpatch-issue %}' diff --git a/data/release-notes/enterprise-server/3-5/14.yml b/data/release-notes/enterprise-server/3-5/14.yml new file mode 100644 index 0000000000..2d58311322 --- /dev/null +++ b/data/release-notes/enterprise-server/3-5/14.yml @@ -0,0 +1,17 @@ +date: '2023-03-02' +sections: + bugs: + - When viewing a list of open sessions for the devices logged into a user account, the GitHub Enterprise Server web UI could display an incorrect location. + - | + In the rare case when primary shards for Elasticsearch were located on a replica node, the `ghe-repl-stop` command would fail with `ERROR: Running migrations`. + known_issues: + - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. + - Custom firewall rules are removed during the upgrade process. + - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. + - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. + - When "Users can search GitHub.com" is enabled with GitHub Connect, issues in private and internal repositories are not included in GitHub.com search results. + - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. + - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. + - Actions services need to be restarted after restoring an appliance from a backup taken on a different host. + - '{% data reusables.release-notes.2022-09-hotpatch-issue %}' + - '{% data reusables.release-notes.babeld-max-threads-performance-issue %}' diff --git a/data/release-notes/enterprise-server/3-6/10.yml b/data/release-notes/enterprise-server/3-6/10.yml new file mode 100644 index 0000000000..2a1c03c22f --- /dev/null +++ b/data/release-notes/enterprise-server/3-6/10.yml @@ -0,0 +1,25 @@ +date: '2023-03-02' +sections: + bugs: + - When viewing a list of open sessions for the devices logged into a user account, the GitHub Enterprise Server web UI could display an incorrect location. + - | + In the rare case when primary shards for Elasticsearch were located on a replica node, the `ghe-repl-stop` command would fail with `ERROR: Running migrations`. + - The settings page for discussions in an organization returned a `500` error after a repository owned by the organization was deleted. + known_issues: + - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. + - Custom firewall rules are removed during the upgrade process. + - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. + - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. + - When "Users can search GitHub.com" is enabled with GitHub Connect, issues in private and internal repositories are not included in GitHub.com search results. + - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. + - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. + - Actions services need to be restarted after restoring an instance from a backup taken on a different host. + - In a repository's settings, enabling the option to allow users with read access to create discussions does not enable this functionality. + - In some cases, users cannot convert existing issues to discussions. + - Custom patterns for secret scanning have `.*` as an end delimiter, specifically in the "After secret" field. This delimiter causes inconsistencies in scans for secrets across repositories, and you may notice gaps in a repository's history where no scans completed. Incremental scans may also be impacted. To prevent issues with scans, modify the end of the pattern to remove the `.*` delimiter. + - | + Following an upgrade to GitHub Enterprise Server 3.6 or later, existing inconsistencies in a repository such as broken refs or missing objects, may now be reported as errors like `invalid sha1 pointer 0000000000000000000000000000000000000000`, `Zero-length loose reference file`, or `Zero-length loose object file`. Previously, these indicators of repository corruption may have been silently ignored. GitHub Enterprise Server now uses an updated Git version with more diligent error reporting enabled. For more information, see this [upstream commit](https://github.com/git/git/commit/968f12fdac) in the Git project. + + If you suspect a problem like this exists in one of your repositories, [contact GitHub Enterprise Support](/support/contacting-github-support/creating-a-support-ticket) for assistance. + - '{% data reusables.release-notes.babeld-max-threads-performance-issue %}' + - '{% data reusables.release-notes.stuck-discussion-conversion-issue %}' diff --git a/data/release-notes/enterprise-server/3-7/7.yml b/data/release-notes/enterprise-server/3-7/7.yml new file mode 100644 index 0000000000..8659e560c6 --- /dev/null +++ b/data/release-notes/enterprise-server/3-7/7.yml @@ -0,0 +1,24 @@ +date: '2023-03-02' +sections: + bugs: + - When viewing a list of open sessions for the devices logged into a user account, the GitHub Enterprise Server web UI could display an incorrect location. + - | + In the rare case when primary shards for Elasticsearch were located on a replica node, the `ghe-repl-stop` command would fail with `ERROR: Running migrations`. + known_issues: + - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. + - Custom firewall rules are removed during the upgrade process. + - Git LFS tracked files [uploaded through the web interface](https://github.com/blog/2105-upload-files-to-your-repositories) are incorrectly added directly to the repository. + - Issues cannot be closed if they contain a permalink to a blob in the same repository, where the blob's file path is longer than 255 characters. + - When "Users can search GitHub.com" is enabled with GitHub Connect, issues in private and internal repositories are not included in GitHub.com search results. + - The {% data variables.product.prodname_registry %} npm registry no longer returns a time value in metadata responses. This was done to allow for substantial performance improvements. We continue to have all the data necessary to return a time value as part of the metadata response and will resume returning this value in the future once we have solved the existing performance issues. + - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. + - Actions services need to be restarted after restoring an instance from a backup taken on a different host. + - In a repository's settings, enabling the option to allow users with read access to create discussions does not enable this functionality. + - In some cases, users cannot convert existing issues to discussions. + - During the validation phase of a configuration run, a `No such object` error may occur for the Notebook and Viewscreen services. This error can be ignored as the services should still correctly start. + - | + Following an upgrade to GitHub Enterprise Server 3.6 or later, existing inconsistencies in a repository such as broken refs or missing objects, may now be reported as errors like `invalid sha1 pointer 0000000000000000000000000000000000000000`, `Zero-length loose reference file`, or `Zero-length loose object file`. Previously, these indicators of repository corruption may have been silently ignored. GitHub Enterprise Server now uses an updated Git version with more diligent error reporting enabled. For more information, see this [upstream commit](https://github.com/git/git/commit/968f12fdac) in the Git project. + + If you suspect a problem like this exists in one of your repositories, [contact GitHub Enterprise Support](/support/contacting-github-support/creating-a-support-ticket) for assistance. + - '{% data reusables.release-notes.babeld-max-threads-performance-issue %}' + - '{% data reusables.release-notes.stuck-discussion-conversion-issue %}' diff --git a/data/reusables/actions/actions-importer-legal-notice.md b/data/reusables/actions/actions-importer-legal-notice.md new file mode 100644 index 0000000000..428fe20be3 --- /dev/null +++ b/data/reusables/actions/actions-importer-legal-notice.md @@ -0,0 +1,25 @@ +Portions have been adapted from https://github.com/github/gh-actions-importer/ under the MIT license: + +``` +MIT License + +Copyright (c) 2022 GitHub + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` diff --git a/data/reusables/actions/supported-github-runners.md b/data/reusables/actions/supported-github-runners.md index 6f1b790b0c..01e23745ff 100644 --- a/data/reusables/actions/supported-github-runners.md +++ b/data/reusables/actions/supported-github-runners.md @@ -65,10 +65,10 @@ Migrate to ubuntu-20.04 or ubuntu-22.04. For more info macOS Monterey 12 -macos-latest or macos-12 +macos-latest, macos-12, macos-latest-xl or macos-12-xl -The macos-latest label currently uses the macOS 12 runner image. +The macos-latest and macos-latest-xl workflow labels currently uses the macOS 12 runner image. diff --git a/data/reusables/apps/generate-installation-access-token.md b/data/reusables/apps/generate-installation-access-token.md new file mode 100644 index 0000000000..a31693cc0f --- /dev/null +++ b/data/reusables/apps/generate-installation-access-token.md @@ -0,0 +1,31 @@ +1. Generate a JSON web token (JWT) for your app. For more information, see "[AUTOTITLE](/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app)". +1. Get the ID of the installation that you want to authenticate as. + + If you are responding to a webhook event, the webhook payload will include the installation ID. + + You can also use the REST API to find the ID for an installation of your app. For example, you can get an installation ID with the `GET /users/{username}/installation`, `GET /repos/{owner}/{repo}/installation`, `GET /orgs/{org}/installation`, or `GET /app/installations` endpoints. For more information, see "[AUTOTITLE](/rest/apps/apps)". +1. Send a REST API `POST` request to `/app/installations/INSTALLATION_ID/access_tokens`. Include your JSON web token in the `Authorization` header of your request. Replace `INSTALLATION_ID` with the ID of the installation that you want to authenticate as. + + For example, send this curl request. Replace `INSTALLATION_ID` with the ID of the installation and `JWT` with your JSON web token: + + ```shell + curl --request POST \ + --url "{% data variables.product.api_url_pre %}app/installations/INSTALLATION_ID/access_tokens" \ + --header "Accept: application/vnd.github+json" \ + --header "Authorization: Bearer JWT"{% ifversion api-date-versioning %}\ + --header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"{% endif %} + ``` + + Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. + + Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted. + + The response will include an installation access token, the time that the token expires, the permissions that the token has, and the repositories that the token can access. The installation access token will expire after 1 hour. + + For more information about this endpoint, see "[AUTOTITLE](/rest/apps/apps)". + + {% note %} + + **Note:** {% data reusables.getting-started.bearer-vs-token %} + + {% endnote %} diff --git a/data/reusables/billing/billing-hosted-runners.md b/data/reusables/billing/billing-hosted-runners.md index 8e405b86dc..9c59cf9523 100644 --- a/data/reusables/billing/billing-hosted-runners.md +++ b/data/reusables/billing/billing-hosted-runners.md @@ -3,6 +3,7 @@ | Linux | 16 | $0.064 | | Linux | 32 | $0.128 | | Linux | 64 | $0.256 | +| macOS | 12 | $0.32 | | Windows | 8 | $0.064 | | Windows | 16 | $0.128 | | Windows | 32 | $0.256 | diff --git a/data/reusables/enterprise/saml-or-ldap.md b/data/reusables/enterprise/saml-or-ldap.md new file mode 100644 index 0000000000..b6b76ac1e5 --- /dev/null +++ b/data/reusables/enterprise/saml-or-ldap.md @@ -0,0 +1,5 @@ +{% note %} + +**Note:** You can use either SAML or LDAP, but not both. + +{% endnote %} \ No newline at end of file diff --git a/data/reusables/large_files/can-include-lfs-objects-archives.md b/data/reusables/large_files/can-include-lfs-objects-archives.md index baa4cb1917..215145ff14 100644 --- a/data/reusables/large_files/can-include-lfs-objects-archives.md +++ b/data/reusables/large_files/can-include-lfs-objects-archives.md @@ -1,3 +1,3 @@ {% ifversion fpt or ghec %} -You can choose whether {% data variables.large_files.product_name_short %} objects are included in source code archives, such as ZIP files and tarballs, that {% data variables.product.product_name %} creates for your repository. For more information, see "[AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-git-lfs-objects-in-archives-of-your-repository)." +You can choose whether {% data variables.large_files.product_name_short %} objects are included in [source code archives](/repositories/working-with-files/using-files/downloading-source-code-archives), such as ZIP files and tarballs, that {% data variables.product.product_name %} creates for your repository. For more information, see "[AUTOTITLE](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-git-lfs-objects-in-archives-of-your-repository)." {% endif %} diff --git a/data/reusables/marketplace/add-payment-method-org.md b/data/reusables/marketplace/add-payment-method-org.md index 2333ce3f96..c17e60e543 100644 --- a/data/reusables/marketplace/add-payment-method-org.md +++ b/data/reusables/marketplace/add-payment-method-org.md @@ -1,5 +1,3 @@ 1. If you chose a paid plan, review your payment method. - - To change the existing payment method on file for the organization, click **Edit...**, then complete the form to add a new payment method. After you successfully add a new payment method, you will automatically return to the order page. - ![Link to add a payment method to your organization](/assets/images/help/marketplace/marketplace-edit-payment-method-org.png) + - To change the existing payment method on file for the organization, click **Edit**, then complete the form to add a new payment method. - If there isn't a payment method on file for the organization, click **Add a Payment Method**, then complete the form to add a credit card or PayPal account. - ![Link to add a payment method to your organization](/assets/images/help/marketplace/marketplace-add-payment-method-org.png) diff --git a/data/reusables/marketplace/add-payment-method-personal.md b/data/reusables/marketplace/add-payment-method-personal.md index 06de54b358..981998d4d6 100644 --- a/data/reusables/marketplace/add-payment-method-personal.md +++ b/data/reusables/marketplace/add-payment-method-personal.md @@ -1,5 +1,3 @@ -1. If you chose a paid plan, review your payment method. - - To change the existing payment method on file for your personal account, click **Edit...**, then complete the form to add a new payment method. After you successfully add a new payment method, you will automatically return to the order page. - ![Link to add a payment method to your personal account](/assets/images/help/marketplace/marketplace-edit-payment-method-personal.png) - - If there isn't a payment method on file for your personal account, click **Add a Payment Method**, then complete the form to add a credit card or PayPal account. - ![Link to add a payment method to your personal account](/assets/images/help/marketplace/marketplace-add-payment-method-personal.png) +1. If you chose a paid plan, in the "Payment Method" section, review your payment method. + - To change the existing payment method on file for your personal account, click **Edit**, then complete the form to add a new payment method. + - If there isn't a payment method on file for your personal account, complete the form to add a credit card or PayPal account. diff --git a/data/reusables/marketplace/cancel-app-billing-settings.md b/data/reusables/marketplace/cancel-app-billing-settings.md index 4f3df262f2..0dedde4d94 100644 --- a/data/reusables/marketplace/cancel-app-billing-settings.md +++ b/data/reusables/marketplace/cancel-app-billing-settings.md @@ -1,2 +1 @@ -1. Next to the app you want to cancel, use the **Edit** drop-down and click **Cancel plan**. - ![Cancel link in the Marketplace Purchases section of your personal account's billing settings](/assets/images/help/marketplace/marketplace-edit-app-billing-settings.png) +1. Next to the app you want to cancel, select the **Edit** {% octicon "triangle-down" aria-label="" %} dropdown menu, then click **Cancel plan**. diff --git a/data/reusables/marketplace/choose-new-plan.md b/data/reusables/marketplace/choose-new-plan.md index 6871a7dbe5..2682ad5f41 100644 --- a/data/reusables/marketplace/choose-new-plan.md +++ b/data/reusables/marketplace/choose-new-plan.md @@ -1,2 +1 @@ -1. Under "Edit your plan," use the drop-down menu, and click on a new plan. - ![Drop-down menu listing all of the app's available plans](/assets/images/help/marketplace/marketplace-choose-new-plan.png) +1. Under "Edit your plan," select the dropdown menu, then click a new plan. diff --git a/data/reusables/marketplace/choose-new-quantity.md b/data/reusables/marketplace/choose-new-quantity.md index 8384c6b84f..6905ab9c77 100644 --- a/data/reusables/marketplace/choose-new-quantity.md +++ b/data/reusables/marketplace/choose-new-quantity.md @@ -1,2 +1 @@ 1. If you chose a unit plan, type a new quantity. - ![Field to enter a new quantity for a unit plan](/assets/images/help/marketplace/marketplace-new-quantity.png) diff --git a/data/reusables/marketplace/choose-plan.md b/data/reusables/marketplace/choose-plan.md index f5e02aff10..ae3cc3dbce 100644 --- a/data/reusables/marketplace/choose-plan.md +++ b/data/reusables/marketplace/choose-plan.md @@ -1,2 +1 @@ -1. On the app's page, under "Pricing and setup," click on the pricing plan you'd like to use. - ![List of the app's available pricing plans](/assets/images/help/marketplace/marketplace-choose-plan.png) +1. On the app's page, under "Pricing and setup," click the pricing plan you'd like to use. diff --git a/data/reusables/marketplace/complete-order-begin-installation.md b/data/reusables/marketplace/complete-order-begin-installation.md index a1e78a6a20..80c1aa5f4e 100644 --- a/data/reusables/marketplace/complete-order-begin-installation.md +++ b/data/reusables/marketplace/complete-order-begin-installation.md @@ -1,2 +1 @@ 1. Click **Complete order and begin installation**. - ![Complete order and begin installation button](/assets/images/help/marketplace/marketplace-complete-order-begin-installation-button.png) diff --git a/data/reusables/marketplace/confirm-install-account-org.md b/data/reusables/marketplace/confirm-install-account-org.md index 0b260c8b48..47d93cdda4 100644 --- a/data/reusables/marketplace/confirm-install-account-org.md +++ b/data/reusables/marketplace/confirm-install-account-org.md @@ -1,2 +1,9 @@ -1. Under "Billing information," use the Switch billing account drop-down menu, and choose the organization in which you'd like to install the app. - ![Drop-down menu to switch the billing account, and your chosen organization's name and avatar](/assets/images/help/marketplace/marketplace-confirm-org.png) +1. Choose an installation organization for the app. Depending on your organization's terms of service, this process will be slightly different. + + - If you have given {% data variables.product.prodname_dotcom %} permission to collect name and address information for your organization, in the "Billing information" section, select the **Switch billing account** {% octicon "triangle-down" aria-label="The downwards-facing triangle icon" %} dropdown menu, then click the organization in which you'd like to install the app. + + ![Screenshot of the {% data variables.product.prodname_marketplace %} app purchase screen. A collapsed blue dropdown menu labeled "Switch billing account" is outlined in dark orange.](/assets/images/help/marketplace/marketplace-confirm-org.png) + + - Otherwise, under "Review your order," select the **Account** dropdown menu, then click the organization in which you'd like to install the app. + + ![Screenshot of the {% data variables.product.prodname_marketplace %} app purchase screen. A collapsed gray dropdown menu labeled "Account" is outlined in dark orange.](/assets/images/help/marketplace/marketplace-confirm-org-no-org-details.png) diff --git a/data/reusables/marketplace/confirm-install-account-personal.md b/data/reusables/marketplace/confirm-install-account-personal.md index 3f365dd152..13e82a5eec 100644 --- a/data/reusables/marketplace/confirm-install-account-personal.md +++ b/data/reusables/marketplace/confirm-install-account-personal.md @@ -1,2 +1 @@ -1. Under "Billing information," confirm that you're installing the app for your personal account. - ![Your name, your avatar, the text "Personal account," and a drop-down menu to switch the billing account](/assets/images/help/marketplace/marketplace-confirm-personal-account.png) +1. Under "Review your order," in the **Account** dropdown menu, confirm that you're installing the app for your personal account. diff --git a/data/reusables/marketplace/downgrade-app-billing-settings.md b/data/reusables/marketplace/downgrade-app-billing-settings.md index 7aac24b6c0..88c0e0da3a 100644 --- a/data/reusables/marketplace/downgrade-app-billing-settings.md +++ b/data/reusables/marketplace/downgrade-app-billing-settings.md @@ -1,2 +1 @@ -1. Next to the app you'd like to downgrade, use the **Edit** drop-down and click **Change plan** or **Cancel plan**. - ![Edit link in the Marketplace Purchases section of your personal account's billing settings](/assets/images/help/marketplace/marketplace-edit-app-billing-settings.png) +1. Next to the app you'd like to downgrade, select the **Edit** {% octicon "triangle-down" aria-label="" %} dropdown menu, then click **Change plan** or **Cancel plan**. diff --git a/data/reusables/marketplace/install-buy.md b/data/reusables/marketplace/install-buy.md index 3fb9a930e9..9596c68b11 100644 --- a/data/reusables/marketplace/install-buy.md +++ b/data/reusables/marketplace/install-buy.md @@ -1,2 +1 @@ 1. Click **Install it for free**, **Buy with {% data variables.product.prodname_dotcom %}**, or **Try free for 14 days**. - ![Buy with {% data variables.product.prodname_dotcom %} button](/assets/images/help/marketplace/marketplace-buy-with-github-button.png) diff --git a/data/reusables/marketplace/issue-plan-changes.md b/data/reusables/marketplace/issue-plan-changes.md index 2dfc03b3ac..bca3334f73 100644 --- a/data/reusables/marketplace/issue-plan-changes.md +++ b/data/reusables/marketplace/issue-plan-changes.md @@ -1,2 +1 @@ 1. Review the information about your new plan and billing information, then click **Issue plan changes**. - ![Summary of your old plan, new plan, and billing information, and Issue plan changes button](/assets/images/help/marketplace/marketplace-issue-plan-changes.png) diff --git a/data/reusables/marketplace/select-installation-repos.md b/data/reusables/marketplace/select-installation-repos.md index a0673d48eb..5991f9d286 100644 --- a/data/reusables/marketplace/select-installation-repos.md +++ b/data/reusables/marketplace/select-installation-repos.md @@ -1,2 +1 @@ 1. If you chose to give the app access to limited repositories instead of all of your repositories, type the name of each repository you'd like to give the app access to, then click on the repository name to select it. - ![Field to select repositories you'd like to give to app access to](/assets/images/help/marketplace/marketplace-select-repo-field.png) diff --git a/data/reusables/marketplace/upgrade-app-billing-settings.md b/data/reusables/marketplace/upgrade-app-billing-settings.md index b6f6b04c03..2a9f337d13 100644 --- a/data/reusables/marketplace/upgrade-app-billing-settings.md +++ b/data/reusables/marketplace/upgrade-app-billing-settings.md @@ -1,2 +1 @@ -1. Next to the app you want to upgrade, use the **Edit** drop-down and click **Change plan**. - ![Edit drop-down in the Marketplace Purchases section of your personal account's billing settings](/assets/images/help/marketplace/marketplace-edit-app-billing-settings.png) +1. Next to the app you want to upgrade, select the **Edit** {% octicon "triangle-down" aria-label="" %} dropdown menu, then click **Change plan**. diff --git a/data/reusables/marketplace/visit-marketplace.md b/data/reusables/marketplace/visit-marketplace.md index 01acf2f8ce..43812a650c 100644 --- a/data/reusables/marketplace/visit-marketplace.md +++ b/data/reusables/marketplace/visit-marketplace.md @@ -1,2 +1,3 @@ -1. At the top of any page, click **Marketplace**. - ![Marketplace link in the global navigation menu at the top of every page](/assets/images/help/marketplace/marketplace-link-global-navigation.png) +1. In the navigation bar, at the top of any page, click **Marketplace**. + + ![Screenshot of the {% data variables.product.prodname_dotcom %} navigation bar. A link to {% data variables.product.prodname_marketplace %} is outlined in dark orange.](/assets/images/help/marketplace/marketplace-link-global-navigation.png) diff --git a/data/reusables/organizations/about-outside-collaborators.md b/data/reusables/organizations/about-outside-collaborators.md new file mode 100644 index 0000000000..19165c1f28 --- /dev/null +++ b/data/reusables/organizations/about-outside-collaborators.md @@ -0,0 +1 @@ +An outside collaborator is a person who is not a member of your organization, but has access to one or more of your organization's repositories. \ No newline at end of file diff --git a/data/reusables/organizations/ent-ownership-recommendation.md b/data/reusables/organizations/ent-ownership-recommendation.md new file mode 100644 index 0000000000..436a04770a --- /dev/null +++ b/data/reusables/organizations/ent-ownership-recommendation.md @@ -0,0 +1 @@ +If an enterprise only has one owner, the enterprise's resources can become inaccessible if the owner is unreachable. To protect access to your resources, we recommend that at least two people within the enterprise have the owner role. diff --git a/data/reusables/pages/admin-must-push.md b/data/reusables/pages/admin-must-push.md index 79f244c85a..d86b6257d2 100644 --- a/data/reusables/pages/admin-must-push.md +++ b/data/reusables/pages/admin-must-push.md @@ -1,5 +1,5 @@ -{% tip %} +{% note %} **Note**: {% ifversion pages-custom-workflow %}If you are publishing from a branch and{% else %}If{% endif %} your site has not published automatically, make sure someone with admin permissions and a verified email address has pushed to the publishing source. -{% endtip %} +{% endnote %} diff --git a/data/reusables/pages/pages-custom-workflow-beta.md b/data/reusables/pages/pages-custom-workflow-beta.md index 6cb0002083..71e293f877 100644 --- a/data/reusables/pages/pages-custom-workflow-beta.md +++ b/data/reusables/pages/pages-custom-workflow-beta.md @@ -2,7 +2,7 @@ {% note %} -Note: Publishing your {% data variables.product.prodname_pages %} site with a custom {% data variables.product.prodname_actions %} workflow is in beta and subject to change. +**Note:** Publishing your {% data variables.product.prodname_pages %} site with a custom {% data variables.product.prodname_actions %} workflow is in beta and subject to change. {% endnote %} diff --git a/data/reusables/pages/symlink-removal.md b/data/reusables/pages/symlink-removal.md new file mode 100644 index 0000000000..aa7dc8b995 --- /dev/null +++ b/data/reusables/pages/symlink-removal.md @@ -0,0 +1,5 @@ +{% note %} + +**Note:** If your repository contains symbolic links, you will need to publish your site using a {% data variables.product.prodname_actions %} workflow. For more information about {% data variables.product.prodname_actions %}, see "[Actions](/actions)." + +{% endnote %} \ No newline at end of file diff --git a/lib/excluded-links.js b/lib/excluded-links.js index e621deae57..b864a915c6 100644 --- a/lib/excluded-links.js +++ b/lib/excluded-links.js @@ -49,4 +49,6 @@ export default [ 'https://lastpass.com/auth/', 'https://zenodo.org/account/settings/github/', 'https://intellij-support.jetbrains.com/hc/en-us/articles/207241085-Locating-IDE-log-files', + 'https://developer.apple.com/documentation/swift_packages', + 'https://developer.android.com/studio/run/emulator-acceleration', ] diff --git a/lib/render-content/plugins/rewrite-asset-img-tags.js b/lib/render-content/plugins/rewrite-asset-img-tags.js index e17f5fb33a..a5bdac9974 100644 --- a/lib/render-content/plugins/rewrite-asset-img-tags.js +++ b/lib/render-content/plugins/rewrite-asset-img-tags.js @@ -22,8 +22,6 @@ function structuredClonePolyfill(obj) { } } -const SUPPORT_AVIF_ASSETS = Boolean(JSON.parse(process.env.SUPPORT_AVIF_ASSETS || 'false')) - // This number must match a width we're willing to accept in a dynamic // asset URL. const MAX_WIDTH = 1000 @@ -45,12 +43,9 @@ const matcher = (node) => * * * - * [] * Alternative text * * - * Note that the AVIF format is optional as it depends on the, off by - * default, `process.env.SUPPORT_AVIF_ASSETS`. * */ export default function rewriteAssetImgTags() { return (tree) => { @@ -58,33 +53,6 @@ export default function rewriteAssetImgTags() { if (node.properties.src.endsWith('.png')) { const copyPNG = structuredClonePolyfill(node) - /** - * If AVIF is support, we consider it "better" by injecting it first. - * If the user agent supports both WebP and AVIF and it gets - * HTML that looks like this: - * - * - * - * - * Alt text - * - * - * Then, browsers like Chrome will try the AVIF format first. - * Other browsers, that don't support AVIF will use WebP. - * */ - if (SUPPORT_AVIF_ASSETS) { - const sourceAVIF = { - type: 'element', - tagName: 'source', - properties: { - srcset: injectMaxWidth(node.properties.src.replace(/\.png$/, '.avif'), MAX_WIDTH), - type: 'image/avif', - }, - children: [], - } - node.children.push(sourceAVIF) - } - const sourceWEBP = { type: 'element', tagName: 'source', diff --git a/lib/update-internal-links.js b/lib/update-internal-links.js index ddaa92c1c4..3b7eb81804 100644 --- a/lib/update-internal-links.js +++ b/lib/update-internal-links.js @@ -1,8 +1,10 @@ import fs from 'fs' +import path from 'path' import { visit } from 'unist-util-visit' import { fromMarkdown } from 'mdast-util-from-markdown' import { toMarkdown } from 'mdast-util-to-markdown' +import yaml from 'js-yaml' import frontmatter from './read-frontmatter.js' import { @@ -18,6 +20,17 @@ import getRedirect, { splitPathByLanguage } from './get-redirect.js' import nonEnterpriseDefaultVersion from './non-enterprise-default-version.js' import { deprecated } from './enterprise-server-releases.js' +function objectClone(obj) { + try { + return structuredClone(obj) + } catch { + // Need to polyfill for Node 16 folks + // Using `yaml.load(yaml.dump(...))` is safe enough because this + // data itself came from the Yaml deserializing in frontmatter(). + return yaml.load(yaml.dump(obj)) + } +} + // That magical string that can be turned into th actual title when // we, at runtime, render out the links const AUTOTITLE = 'AUTOTITLE' @@ -65,12 +78,89 @@ async function updateFile(file, context, opts) { const rawContent = fs.readFileSync(file, 'utf8') const { data, content } = frontmatter(rawContent) + // Since this function can process both `.md` and `.yml` files, + // when treating a `.md` file, the `data` from `frontmatter(rawContent)` + // is easy. But when dealing a file like `data/learning-tracks/foo.yml` + // then the the `frontmatter(rawContent).data` always becomes `{}`. + // And since the Yaml file might contain arrays of internal linked + // pathnames, we have to re-read it fully. + if (file.endsWith('.yml')) { + Object.assign(data, yaml.load(content)) + } + let newContent = content const ast = fromMarkdown(newContent) const replacements = [] const skips = [] + // The day we know with confidence that everyone us on Node >=17, + // we can change this to use `structuredClone` without the polyfill + // technique. + const newData = objectClone(data) + + const ANY = Symbol('any') + const IS_ARRAY = Symbol('is array') + + // This configuration determines which nested things to bother looking + // into. + const HAS_LINKS = { + featuredLinks: ['gettingStarted', 'startHere', 'guideCards', 'popular'], + introLinks: ANY, + includeGuides: IS_ARRAY, + } + + if ( + file.split(path.sep).includes('data') && + file.split(path.sep).includes('learning-tracks') && + file.endsWith('.yml') + ) { + // data/learning-tracks/**/*.yml files are different because the keys + // are abitrary but what they might all have in common is a key + // there called `guides` + for (const key of Object.keys(data)) { + HAS_LINKS[key] = ['guides'] + } + } + + for (const [key, seek] of Object.entries(HAS_LINKS)) { + if (!(key in data)) { + continue + } + try { + if (Array.isArray(data[key])) { + if ((Array.isArray(seek) && seek.includes(key)) || seek === IS_ARRAY || seek === ANY) { + const better = getNewFrontmatterLinkList(data[key], context, opts, file) + if (!equalArray(better, data[key])) { + newData[key] = better + } + } + } else { + for (const [group, thing] of Object.entries(data[key])) { + if (Array.isArray(thing)) { + if ( + (Array.isArray(seek) && seek.includes(group)) || + seek === IS_ARRAY || + seek === ANY + ) { + const better = getNewFrontmatterLinkList(thing, context, opts, file) + if (!equalArray(better, thing)) { + newData[key][group] = better + } + } + } + } + } + } catch (error) { + // When in strict mode, if it throws an error that stacktrace will + // bubble up to the CLI. And the CLI will mention which file it + // was processing when it failed. But we have a valuable piece of + // information here about which frontmatter key it was that failed. + console.warn(`The frontmatter key it processed and failed was '${key}'`) + throw error + } + } + const lineOffset = rawContent.replace(content, '').split(/\n/g).length - 1 visit(ast, matcher, (node) => { @@ -121,16 +211,11 @@ async function updateFile(file, context, opts) { } } if (opts.fixHref) { - try { - const betterHref = getNewHref(node.url, context, opts) - // getNewHref() might return a deliberate `undefined` if the - // new href value could not be computed for some reason. - if (betterHref !== undefined) { - newHref = betterHref - } - } catch (err) { - console.error('File in process:', file) - throw err + const betterHref = getNewHref(node.url, context, opts, file) + // getNewHref() might return a deliberate `undefined` if the + // new href value could not be computed for some reason. + if (betterHref !== undefined) { + newHref = betterHref } } const newAsMarkdown = `[${newTitle}](${newHref})` @@ -156,8 +241,10 @@ async function updateFile(file, context, opts) { return { data, content, + rawContent, newContent, replacements, + newData, skips, } } @@ -205,7 +292,89 @@ function matcher(node) { return false } -function getNewHref(href, context, opts) { +function getNewFrontmatterLinkList(list, context, opts, file) { + /** + * The `list` is expected to all be strings. Sometimes they're like this: + * + * /search-github/searching-on-github/searching-for-repositories + * + * Sometimes they're like this: + * + * {% ifversion fpt or ghec or ghes > 3.4 %}/pages/getting-started-with-github-pages{% endif %} + * + * In the case of Liquid, we have to temporarily remove it to be able to + * test the path as a URL. + **/ + + const better = [] + for (const entry of list) { + if (/{%\s*else\s*%}/.test(entry)) { + console.warn(`Skipping frontmatter link with {% else %} in it: ${entry}. (file: ${file})`) + better.push(entry) + continue + } + const pure = stripLiquid(entry) + let asURL = '/en' + if (!pure.startsWith('/')) { + asURL += '/' + } + asURL += pure + if (asURL in context.pages) { + better.push(entry) + } else { + const redirected = getRedirect(asURL, context) + if (redirected === undefined) { + if (opts.strict) { + throw new Error( + `Neither redirecting nor findable '${asURL}' in frontmatter link. (file: ${file})` + ) + } + console.warn( + 'WARNING: A frontmatter link appears to be broken. ' + + `Neither redirect or a findable page: ${pure}. (file: ${file})` + ) + better.push(entry) + } else { + // Perhaps it just redirected to a specific version + const redirectedWithoutLanguage = getPathWithoutLanguage(redirected) + const asURLWithoutVersion = getPathWithoutVersion(redirectedWithoutLanguage) + if (asURLWithoutVersion === pure) { + better.push(entry) + } else { + better.push(entry.replace(pure, asURLWithoutVersion)) + } + } + } + } + return better +} + +const liquidStartRex = /^{%-?\s*ifversion .+?\s*%}/ +const liquidEndRex = /{%-?\s*endif\s*-?%}$/ + +// Return +// +// /foo/bar +// +// if the text input was +// +// {% ifversion ghes%}/foo/bar{%endif %} +// +// And if no liquid, just return as is. +function stripLiquid(text) { + if (liquidStartRex.test(text) && liquidEndRex.test(text)) { + return text.replace(liquidStartRex, '').replace(liquidEndRex, '').trim() + } else if (text.includes('{')) { + throw new Error(`Unsupported Liquid in frontmatter link list (${text})`) + } + return text +} + +function equalArray(arr1, arr2) { + return arr1.length === arr2.length && arr1.every((item, i) => item === arr2[i]) +} + +function getNewHref(href, context, opts, file) { const { currentLanguage } = context const parsed = new URL(href, 'https://docs.github.com') const hash = parsed.hash @@ -218,10 +387,11 @@ function getNewHref(href, context, opts) { const [language, withoutLanguage] = splitPathByLanguage(newHref, currentLanguage) if (withoutLanguage !== newHref) { // It means the link already had a language in it + const msg = `Unable to cope with internal links with hardcoded language '${newHref}' (file: ${file})` if (opts.strict) { - throw new Error(`Unable to cope with internal links with hardcoded language (${newHref})`) + throw new Error(msg) } else { - console.warn(`WARNING: Link had hardcoded language in it (${href})`) + console.warn(`WARNING: ${msg}`) return } } @@ -235,12 +405,11 @@ function getNewHref(href, context, opts) { if (redirected === undefined) { if (!context.pages[newHrefWithLanguage]) { // If this happens, it's very possible that it's a broken link + const msg = `A link appears to be broken. Neither redirect or a findable page '${href}' (${file})` if (opts.strict) { - throw new Error(`Neither redirecting nor findable '${href}'`) + throw new Error(msg) } else { - console.warn( - `WARNING: A link appears to be broken. Neither redirect or a findable page (${href})` - ) + console.warn(`WARNING: ${msg}`) return } } diff --git a/middleware/dynamic-assets.js b/middleware/dynamic-assets.js index a5e8467133..310c381b6f 100644 --- a/middleware/dynamic-assets.js +++ b/middleware/dynamic-assets.js @@ -114,39 +114,6 @@ export default async function dynamicAssets(req, res, next) { } } - // From PNG to AVIF, if the PNG exists - if (req.path.endsWith('.avif')) { - const { url, maxWidth, error } = deconstructImageURL(req.path) - if (error) { - return res.status(400).type('text/plain').send(error.toString()) - } - try { - const originalBuffer = await fs.readFile(url.slice(1).replace(/\.avif$/, '.png')) - const image = sharp(originalBuffer) - - if (maxWidth) { - const { width } = await image.metadata() - if (width > maxWidth) { - image.resize({ width: maxWidth }) - } - } - const buffer = await image - .avif({ - // The default is 4 (max is 9). Because this is a dynamic thing - // and AVIF encoding is slow for large images, go for a smaller - // effort to be sure it can't take too long on a busy server. - effort: 2, - }) - .toBuffer() - assetCacheControl(res) - return res.type('image/avif').send(buffer) - } catch (error) { - if (error.code !== 'ENOENT') { - throw error - } - } - } - // Cache the 404 so it won't be re-attempted over and over defaultCacheControl(res) diff --git a/package-lock.json b/package-lock.json index 680014bbdd..26cf04710f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -161,7 +161,7 @@ "rimraf": "^4.1.1", "robots-parser": "^3.0.0", "sass": "^1.52.3", - "start-server-and-test": "^1.14.0", + "start-server-and-test": "^2.0.0", "strip-ansi": "^7.0.1", "typescript": "^4.7.3" }, @@ -4726,23 +4726,6 @@ } } }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@typescript-eslint/parser": { "version": "5.53.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.53.0.tgz", @@ -4770,23 +4753,6 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@typescript-eslint/scope-manager": { "version": "5.53.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.53.0.tgz", @@ -4831,23 +4797,6 @@ } } }, - "node_modules/@typescript-eslint/type-utils/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@typescript-eslint/types": { "version": "5.53.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.53.0.tgz", @@ -4888,23 +4837,6 @@ } } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/@typescript-eslint/utils": { "version": "5.53.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.53.0.tgz", @@ -5338,6 +5270,12 @@ "node": ">= 8" } }, + "node_modules/arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, "node_modules/argparse": { "version": "2.0.1", "license": "Python-2.0" @@ -5431,6 +5369,12 @@ "node": ">=8" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, "node_modules/axe-core": { "version": "4.3.5", "dev": true, @@ -7231,6 +7175,18 @@ "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", "dev": true }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/comma-separated-tokens": { "version": "2.0.2", "license": "MIT", @@ -7576,8 +7532,9 @@ "integrity": "sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A==" }, "node_modules/debug": { - "version": "4.3.2", - "license": "MIT", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "dependencies": { "ms": "2.1.2" }, @@ -7699,6 +7656,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/dependency-graph": { "version": "0.11.0", "dev": true, @@ -9634,14 +9600,15 @@ "license": "W3C" }, "node_modules/follow-redirects": { - "version": "1.14.8", + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", "funding": [ { "type": "individual", "url": "https://github.com/sponsors/RubenVerborgh" } ], - "license": "MIT", "engines": { "node": ">=4.0" }, @@ -9670,6 +9637,20 @@ "node": ">=0.10.0" } }, + "node_modules/form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/form-data-encoder": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", @@ -13839,14 +13820,15 @@ } }, "node_modules/joi": { - "version": "17.6.0", + "version": "17.8.3", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.8.3.tgz", + "integrity": "sha512-q5Fn6Tj/jR8PfrLrx4fpGH4v9qM6o+vDUfD4/3vxxyg34OmKcNqYZ1qn2mpLza96S8tL0p0rIw2gOZX+/cTg9w==", "devOptional": true, - "license": "BSD-3-Clause", "dependencies": { "@hapi/hoek": "^9.0.0", "@hapi/topo": "^5.0.0", "@sideway/address": "^4.1.3", - "@sideway/formula": "^3.0.0", + "@sideway/formula": "^3.0.1", "@sideway/pinpoint": "^2.0.0" } }, @@ -14136,23 +14118,6 @@ "node": "^12.20.0 || >=14" } }, - "node_modules/lint-staged/node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, "node_modules/lint-staged/node_modules/execa": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", @@ -15573,8 +15538,12 @@ } }, "node_modules/minimist": { - "version": "1.2.6", - "license": "MIT" + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/minimist-options": { "version": "4.1.0", @@ -18180,9 +18149,10 @@ } }, "node_modules/rxjs": { - "version": "7.5.5", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", + "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", "dev": true, - "license": "Apache-2.0", "dependencies": { "tslib": "^2.1.0" } @@ -18874,17 +18844,19 @@ } }, "node_modules/start-server-and-test": { - "version": "1.14.0", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/start-server-and-test/-/start-server-and-test-2.0.0.tgz", + "integrity": "sha512-UqKLw0mJbfrsG1jcRLTUlvuRi9sjNuUiDOLI42r7R5fA9dsFoywAy9DoLXNYys9B886E4RCKb+qM1Gzu96h7DQ==", "dev": true, - "license": "MIT", "dependencies": { + "arg": "^5.0.2", "bluebird": "3.7.2", "check-more-types": "2.24.0", - "debug": "4.3.2", + "debug": "4.3.4", "execa": "5.1.1", "lazy-ass": "1.6.0", "ps-tree": "1.2.0", - "wait-on": "6.0.0" + "wait-on": "7.0.1" }, "bin": { "server-test": "src/bin/start.js", @@ -18895,22 +18867,33 @@ "node": ">=6" } }, - "node_modules/start-server-and-test/node_modules/wait-on": { - "version": "6.0.0", + "node_modules/start-server-and-test/node_modules/axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", "dev": true, - "license": "MIT", "dependencies": { - "axios": "^0.21.1", - "joi": "^17.4.0", + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "node_modules/start-server-and-test/node_modules/wait-on": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-7.0.1.tgz", + "integrity": "sha512-9AnJE9qTjRQOlTZIldAaf/da2eW0eSRSgcqq85mXQja/DW3MriHxkpODDSUEg+Gri/rKEcXUZHe+cevvYItaog==", + "dev": true, + "dependencies": { + "axios": "^0.27.2", + "joi": "^17.7.0", "lodash": "^4.17.21", - "minimist": "^1.2.5", - "rxjs": "^7.1.0" + "minimist": "^1.2.7", + "rxjs": "^7.8.0" }, "bin": { "wait-on": "bin/wait-on" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.0.0" } }, "node_modules/state-toggle": { @@ -24358,17 +24341,6 @@ "regexpp": "^3.2.0", "semver": "^7.3.7", "tsutils": "^3.21.0" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - } } }, "@typescript-eslint/parser": { @@ -24381,17 +24353,6 @@ "@typescript-eslint/types": "5.53.0", "@typescript-eslint/typescript-estree": "5.53.0", "debug": "^4.3.4" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - } } }, "@typescript-eslint/scope-manager": { @@ -24414,17 +24375,6 @@ "@typescript-eslint/utils": "5.53.0", "debug": "^4.3.4", "tsutils": "^3.21.0" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - } } }, "@typescript-eslint/types": { @@ -24446,17 +24396,6 @@ "is-glob": "^4.0.3", "semver": "^7.3.7", "tsutils": "^3.21.0" - }, - "dependencies": { - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - } } }, "@typescript-eslint/utils": { @@ -24805,6 +24744,12 @@ "picomatch": "^2.0.4" } }, + "arg": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.2.tgz", + "integrity": "sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==", + "dev": true + }, "argparse": { "version": "2.0.1" }, @@ -24863,6 +24808,12 @@ "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true + }, "axe-core": { "version": "4.3.5", "dev": true @@ -26206,6 +26157,15 @@ "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", "dev": true }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, "comma-separated-tokens": { "version": "2.0.2" }, @@ -26435,7 +26395,9 @@ "integrity": "sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A==" }, "debug": { - "version": "4.3.2", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", "requires": { "ms": "2.1.2" } @@ -26503,6 +26465,12 @@ "object-keys": "^1.1.1" } }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true + }, "dependency-graph": { "version": "0.11.0", "dev": true @@ -27842,7 +27810,9 @@ "version": "5.2.0" }, "follow-redirects": { - "version": "1.14.8" + "version": "1.15.2", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", + "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" }, "for-in": { "version": "1.0.2", @@ -27855,6 +27825,17 @@ "for-in": "^1.0.1" } }, + "form-data": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", + "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, "form-data-encoder": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-2.1.4.tgz", @@ -30904,13 +30885,15 @@ } }, "joi": { - "version": "17.6.0", + "version": "17.8.3", + "resolved": "https://registry.npmjs.org/joi/-/joi-17.8.3.tgz", + "integrity": "sha512-q5Fn6Tj/jR8PfrLrx4fpGH4v9qM6o+vDUfD4/3vxxyg34OmKcNqYZ1qn2mpLza96S8tL0p0rIw2gOZX+/cTg9w==", "devOptional": true, "requires": { "@hapi/hoek": "^9.0.0", "@hapi/topo": "^5.0.0", "@sideway/address": "^4.1.3", - "@sideway/formula": "^3.0.0", + "@sideway/formula": "^3.0.1", "@sideway/pinpoint": "^2.0.0" } }, @@ -31107,15 +31090,6 @@ "integrity": "sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==", "dev": true }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - } - }, "execa": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/execa/-/execa-6.1.0.tgz", @@ -31935,7 +31909,9 @@ } }, "minimist": { - "version": "1.2.6" + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" }, "minimist-options": { "version": "4.1.0", @@ -33650,7 +33626,9 @@ } }, "rxjs": { - "version": "7.5.5", + "version": "7.8.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.0.tgz", + "integrity": "sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==", "dev": true, "requires": { "tslib": "^2.1.0" @@ -34141,27 +34119,42 @@ } }, "start-server-and-test": { - "version": "1.14.0", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/start-server-and-test/-/start-server-and-test-2.0.0.tgz", + "integrity": "sha512-UqKLw0mJbfrsG1jcRLTUlvuRi9sjNuUiDOLI42r7R5fA9dsFoywAy9DoLXNYys9B886E4RCKb+qM1Gzu96h7DQ==", "dev": true, "requires": { + "arg": "^5.0.2", "bluebird": "3.7.2", "check-more-types": "2.24.0", - "debug": "4.3.2", + "debug": "4.3.4", "execa": "5.1.1", "lazy-ass": "1.6.0", "ps-tree": "1.2.0", - "wait-on": "6.0.0" + "wait-on": "7.0.1" }, "dependencies": { - "wait-on": { - "version": "6.0.0", + "axios": { + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", + "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", "dev": true, "requires": { - "axios": "^0.21.1", - "joi": "^17.4.0", + "follow-redirects": "^1.14.9", + "form-data": "^4.0.0" + } + }, + "wait-on": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-7.0.1.tgz", + "integrity": "sha512-9AnJE9qTjRQOlTZIldAaf/da2eW0eSRSgcqq85mXQja/DW3MriHxkpODDSUEg+Gri/rKEcXUZHe+cevvYItaog==", + "dev": true, + "requires": { + "axios": "^0.27.2", + "joi": "^17.7.0", "lodash": "^4.17.21", - "minimist": "^1.2.5", - "rxjs": "^7.1.0" + "minimist": "^1.2.7", + "rxjs": "^7.8.0" } } } diff --git a/package.json b/package.json index 1bb38a5a0c..45fbce8a68 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "rimraf": "^4.1.1", "robots-parser": "^3.0.0", "sass": "^1.52.3", - "start-server-and-test": "^1.14.0", + "start-server-and-test": "^2.0.0", "strip-ansi": "^7.0.1", "typescript": "^4.7.3" }, diff --git a/script/update-internal-links.js b/script/update-internal-links.js index 2549a590a4..caec25bceb 100755 --- a/script/update-internal-links.js +++ b/script/update-internal-links.js @@ -94,8 +94,10 @@ async function main(files, opts) { const results = await updateInternalLinks(actualFiles, options) let exitCheck = 0 - for (const { file, content, newContent, replacements, data } of results) { - if (content !== newContent) { + for (const { file, rawContent, content, newContent, replacements, data, newData } of results) { + const differentContent = content !== newContent + const differentData = !equalObject(data, newData) + if (differentContent || differentData) { if (opts.verbose || opts.check) { if (opts.check) { exitCheck++ @@ -104,7 +106,10 @@ async function main(files, opts) { console.log( opts.dryRun ? 'Would change...' : 'Will change...', chalk.bold(file), - chalk.dim(`${replacements.length} change${replacements.length !== 1 ? 's' : ''}`) + differentContent + ? chalk.dim(`${replacements.length} change${replacements.length !== 1 ? 's' : ''}`) + : '', + differentData ? chalk.dim('different data') : '' ) for (const { asMarkdown, newAsMarkdown, line, column } of replacements) { console.log(' ', chalk.red(asMarkdown)) @@ -112,6 +117,7 @@ async function main(files, opts) { console.log(' ', chalk.dim(`line ${line} column ${column}`)) console.log('') } + printObjectDifference(data, newData, rawContent) } } if (!opts.dryRun) { @@ -119,7 +125,7 @@ async function main(files, opts) { // Markdown page. To save it you need the frontmatter data too. fs.writeFileSync( file, - frontmatter.stringify(newContent, data, { lineWidth: 10000 }), + frontmatter.stringify(newContent, newData, { lineWidth: 10000 }), 'utf-8' ) } @@ -159,6 +165,74 @@ async function main(files, opts) { } } +function printObjectDifference(objFrom, objTo, rawContent, parentKey = '') { + // Assume both object are of the same shape, but if a key's value is + // an array, and it's different, print that difference. + for (const [key, value] of Object.entries(objFrom)) { + const combinedKey = `${parentKey}.${key}` + if (Array.isArray(value) && !equalArray(value, objTo[key])) { + console.log(`In frontmatter key: ${chalk.bold(combinedKey)}`) + value.forEach((entry, i) => { + if (entry !== objTo[key][i]) { + console.log(chalk.red(`- ${entry}`)) + console.log(chalk.green(`+ ${objTo[key][i]}`)) + const needle = new RegExp(`- ${entry}\\b`) + const index = rawContent.split(/\n/g).findIndex((line) => needle.test(line)) + console.log(' ', chalk.dim(`line ${(index && index + 1) || 'unknown'}`)) + console.log('') + } + }) + } else if (typeof value === 'object' && value !== null) { + printObjectDifference(value, objTo[key], rawContent, combinedKey) + } + } +} + +// This assumes them to be the same shape with possibly different node values +function equalObject(obj1, obj2) { + if (!equalSet(new Set(Object.keys(obj1)), new Set(Object.keys(obj2)))) { + return false + } + for (const [key, value] of Object.entries(obj1)) { + if (Array.isArray(value)) { + // Can't easily compare two arrays because the entries might be objects. + if (value.length !== obj2[key].length) return false + let i = 0 + for (const each of value) { + if (isObject(each)) { + if (!equalObject(each, obj2[key][i])) { + return false + } + } else { + if (each !== obj2[key][i]) { + return false + } + } + i++ + } + } else if (isObject(value)) { + if (!equalObject(value, obj2[key])) { + return false + } + } else if (value !== obj2[key]) { + return false + } + } + return true +} + +function isObject(thing) { + return typeof thing === 'object' && thing !== null && !Array.isArray(thing) +} + +function equalSet(set1, set2) { + return set1.size === set2.size && [...set1].every((x) => set2.has(x)) +} + +function equalArray(arr1, arr2) { + return arr1.length === arr2.length && arr1.every((item, i) => item === arr2[i]) +} + function countByTree(results) { const files = {} const changes = {} diff --git a/src/graphql/data/dotcom/changelog.json b/src/graphql/data/dotcom/changelog.json index af441ab650..ef6eaf87c0 100644 --- a/src/graphql/data/dotcom/changelog.json +++ b/src/graphql/data/dotcom/changelog.json @@ -1,4 +1,23 @@ [ + { + "schemaChanges": [ + { + "title": "The GraphQL schema includes these changes:", + "changes": [ + "

Field requiredDeploymentEnvironments was added to object type BranchProtectionRule

", + "

Field requiresDeployments was added to object type BranchProtectionRule

", + "

Input field requiredDeploymentEnvironments was added to input object type CreateBranchProtectionRuleInput

", + "

Input field requiresDeployments was added to input object type CreateBranchProtectionRuleInput

", + "

Input field requiredDeploymentEnvironments was added to input object type UpdateBranchProtectionRuleInput

", + "

Input field requiresDeployments was added to input object type UpdateBranchProtectionRuleInput

", + "

Field event was added to object type WorkflowRun

" + ] + } + ], + "previewChanges": [], + "upcomingChanges": [], + "date": "2023-03-01" + }, { "schemaChanges": [ { diff --git a/src/graphql/data/dotcom/previews.json b/src/graphql/data/dotcom/previews.json index 0bd68020a4..95e2ab937b 100644 --- a/src/graphql/data/dotcom/previews.json +++ b/src/graphql/data/dotcom/previews.json @@ -28,7 +28,7 @@ "href": "/graphql/overview/schema-previews#deployments-preview" }, { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -39,10 +39,10 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" }, { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -54,10 +54,10 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -74,7 +74,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, { "title": "Project event details preview", diff --git a/src/graphql/data/dotcom/schema.json b/src/graphql/data/dotcom/schema.json index daa3b7e2e7..38a90562a8 100644 --- a/src/graphql/data/dotcom/schema.json +++ b/src/graphql/data/dotcom/schema.json @@ -8192,7 +8192,7 @@ "description": "

Creates, updates and/or deletes multiple refs in a repository.

\n

This mutation takes a list of RefUpdates and performs these updates\non the repository. All updates are performed atomically, meaning that\nif one of them is rejected, no other ref will be modified.

\n

RefUpdate.beforeOid specifies that the given reference needs to point\nto the given value before performing any updates. A value of\n0000000000000000000000000000000000000000 can be used to verify that\nthe references should not exist.

\n

RefUpdate.afterOid specifies the value that the given reference\nwill point to after performing all updates. A value of\n0000000000000000000000000000000000000000 can be used to delete a\nreference.

\n

If RefUpdate.force is set to true, a non-fast-forward updates\nfor the given reference will be allowed.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -8204,7 +8204,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -10201,6 +10201,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#int" }, + { + "name": "requiredDeploymentEnvironments", + "description": "

List of required deployment environments that must be deployed successfully to update matching branches.

", + "type": "[String]", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, { "name": "requiredStatusCheckContexts", "description": "

List of required status check contexts that must pass for commits to be accepted to matching branches.

", @@ -10249,6 +10257,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#boolean" }, + { + "name": "requiresDeployments", + "description": "

Does this branch require deployment to specific environments before merging.

", + "type": "Boolean!", + "id": "boolean", + "kind": "scalars", + "href": "/graphql/reference/scalars#boolean" + }, { "name": "requiresLinearHistory", "description": "

Are merge commits prohibited from being pushed to this branch.

", @@ -15978,7 +15994,7 @@ "description": "

A dependency manifest entry.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -15995,7 +16011,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -16058,7 +16074,7 @@ "description": "

The connection type for DependencyGraphDependency.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -16075,7 +16091,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -16120,7 +16136,7 @@ "description": "

An edge in a connection.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -16137,7 +16153,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -16166,7 +16182,7 @@ "description": "

Dependency manifest for a repository.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -16183,7 +16199,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "implements": [ { @@ -16301,7 +16317,7 @@ "description": "

The connection type for DependencyGraphManifest.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -16318,7 +16334,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -16363,7 +16379,7 @@ "description": "

An edge in a connection.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -16380,7 +16396,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -45122,7 +45138,7 @@ "href": "/graphql/reference/scalars#boolean", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -45133,7 +45149,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -45752,7 +45768,7 @@ "href": "/graphql/reference/enums#mergestatestatus", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -45763,7 +45779,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -55383,7 +55399,7 @@ ], "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -55400,7 +55416,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" } }, { @@ -71019,6 +71035,14 @@ } ] }, + { + "name": "event", + "description": "

The event that triggered the workflow run.

", + "type": "String!", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, { "name": "pendingDeploymentRequests", "description": "

The pending deployment requests of all check runs in this workflow run.

", @@ -84443,6 +84467,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#int" }, + { + "name": "requiredDeploymentEnvironments", + "description": "

The list of required deployment environments.

", + "type": "[String!]", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, { "name": "requiredStatusCheckContexts", "description": "

List of required status check contexts that must pass for commits to be accepted to matching branches.

", @@ -84491,6 +84523,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#boolean" }, + { + "name": "requiresDeployments", + "description": "

Are successful deployments required before merging.

", + "type": "Boolean", + "id": "boolean", + "kind": "scalars", + "href": "/graphql/reference/scalars#boolean" + }, { "name": "requiresLinearHistory", "description": "

Are merge commits prohibited from being pushed to this branch.

", @@ -88883,7 +88923,7 @@ "description": "

A ref update.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -88895,7 +88935,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -91254,6 +91294,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#int" }, + { + "name": "requiredDeploymentEnvironments", + "description": "

The list of required deployment environments.

", + "type": "[String!]", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, { "name": "requiredStatusCheckContexts", "description": "

List of required status check contexts that must pass for commits to be accepted to matching branches.

", @@ -91302,6 +91350,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#boolean" }, + { + "name": "requiresDeployments", + "description": "

Are successful deployments required before merging.

", + "type": "Boolean", + "id": "boolean", + "kind": "scalars", + "href": "/graphql/reference/scalars#boolean" + }, { "name": "requiresLinearHistory", "description": "

Are merge commits prohibited from being pushed to this branch.

", @@ -93284,7 +93340,7 @@ "description": "

Autogenerated input type of UpdateRefs.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -93296,7 +93352,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -93965,7 +94021,7 @@ "description": "

A fully qualified reference name (e.g. refs/heads/master).

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -93977,7 +94033,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" } }, { diff --git a/src/graphql/data/ghae/previews.json b/src/graphql/data/ghae/previews.json index 0bd68020a4..95e2ab937b 100644 --- a/src/graphql/data/ghae/previews.json +++ b/src/graphql/data/ghae/previews.json @@ -28,7 +28,7 @@ "href": "/graphql/overview/schema-previews#deployments-preview" }, { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -39,10 +39,10 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" }, { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -54,10 +54,10 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -74,7 +74,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, { "title": "Project event details preview", diff --git a/src/graphql/data/ghae/schema.json b/src/graphql/data/ghae/schema.json index 9db278fa26..ce44ddbfa0 100644 --- a/src/graphql/data/ghae/schema.json +++ b/src/graphql/data/ghae/schema.json @@ -6219,7 +6219,7 @@ "description": "

Creates, updates and/or deletes multiple refs in a repository.

\n

This mutation takes a list of RefUpdates and performs these updates\non the repository. All updates are performed atomically, meaning that\nif one of them is rejected, no other ref will be modified.

\n

RefUpdate.beforeOid specifies that the given reference needs to point\nto the given value before performing any updates. A value of\n0000000000000000000000000000000000000000 can be used to verify that\nthe references should not exist.

\n

RefUpdate.afterOid specifies the value that the given reference\nwill point to after performing all updates. A value of\n0000000000000000000000000000000000000000 can be used to delete a\nreference.

\n

If RefUpdate.force is set to true, a non-fast-forward updates\nfor the given reference will be allowed.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -6231,7 +6231,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -8160,6 +8160,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#int" }, + { + "name": "requiredDeploymentEnvironments", + "description": "

List of required deployment environments that must be deployed successfully to update matching branches.

", + "type": "[String]", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, { "name": "requiredStatusCheckContexts", "description": "

List of required status check contexts that must pass for commits to be accepted to matching branches.

", @@ -8208,6 +8216,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#boolean" }, + { + "name": "requiresDeployments", + "description": "

Does this branch require deployment to specific environments before merging.

", + "type": "Boolean!", + "id": "boolean", + "kind": "scalars", + "href": "/graphql/reference/scalars#boolean" + }, { "name": "requiresLinearHistory", "description": "

Are merge commits prohibited from being pushed to this branch.

", @@ -13937,7 +13953,7 @@ "description": "

A dependency manifest entry.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -13954,7 +13970,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -14017,7 +14033,7 @@ "description": "

The connection type for DependencyGraphDependency.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -14034,7 +14050,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -14079,7 +14095,7 @@ "description": "

An edge in a connection.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -14096,7 +14112,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -14125,7 +14141,7 @@ "description": "

Dependency manifest for a repository.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -14142,7 +14158,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "implements": [ { @@ -14260,7 +14276,7 @@ "description": "

The connection type for DependencyGraphManifest.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -14277,7 +14293,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -14322,7 +14338,7 @@ "description": "

An edge in a connection.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -14339,7 +14355,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -36561,7 +36577,7 @@ "href": "/graphql/reference/scalars#boolean", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -36572,7 +36588,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -37191,7 +37207,7 @@ "href": "/graphql/reference/enums#mergestatestatus", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -37202,7 +37218,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -46661,7 +46677,7 @@ ], "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -46678,7 +46694,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" } }, { @@ -59470,6 +59486,14 @@ } ] }, + { + "name": "event", + "description": "

The event that triggered the workflow run.

", + "type": "String!", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, { "name": "pendingDeploymentRequests", "description": "

The pending deployment requests of all check runs in this workflow run.

", @@ -69309,6 +69333,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#int" }, + { + "name": "requiredDeploymentEnvironments", + "description": "

The list of required deployment environments.

", + "type": "[String!]", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, { "name": "requiredStatusCheckContexts", "description": "

List of required status check contexts that must pass for commits to be accepted to matching branches.

", @@ -69357,6 +69389,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#boolean" }, + { + "name": "requiresDeployments", + "description": "

Are successful deployments required before merging.

", + "type": "Boolean", + "id": "boolean", + "kind": "scalars", + "href": "/graphql/reference/scalars#boolean" + }, { "name": "requiresLinearHistory", "description": "

Are merge commits prohibited from being pushed to this branch.

", @@ -72674,7 +72714,7 @@ "description": "

A ref update.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -72686,7 +72726,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -74230,6 +74270,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#int" }, + { + "name": "requiredDeploymentEnvironments", + "description": "

The list of required deployment environments.

", + "type": "[String!]", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, { "name": "requiredStatusCheckContexts", "description": "

List of required status check contexts that must pass for commits to be accepted to matching branches.

", @@ -74278,6 +74326,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#boolean" }, + { + "name": "requiresDeployments", + "description": "

Are successful deployments required before merging.

", + "type": "Boolean", + "id": "boolean", + "kind": "scalars", + "href": "/graphql/reference/scalars#boolean" + }, { "name": "requiresLinearHistory", "description": "

Are merge commits prohibited from being pushed to this branch.

", @@ -75971,7 +76027,7 @@ "description": "

Autogenerated input type of UpdateRefs.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -75983,7 +76039,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -76534,7 +76590,7 @@ "description": "

A fully qualified reference name (e.g. refs/heads/master).

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -76546,7 +76602,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" } }, { diff --git a/src/graphql/data/ghec/previews.json b/src/graphql/data/ghec/previews.json index 0bd68020a4..95e2ab937b 100644 --- a/src/graphql/data/ghec/previews.json +++ b/src/graphql/data/ghec/previews.json @@ -28,7 +28,7 @@ "href": "/graphql/overview/schema-previews#deployments-preview" }, { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -39,10 +39,10 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" }, { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -54,10 +54,10 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -74,7 +74,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, { "title": "Project event details preview", diff --git a/src/graphql/data/ghec/schema.json b/src/graphql/data/ghec/schema.json index daa3b7e2e7..38a90562a8 100644 --- a/src/graphql/data/ghec/schema.json +++ b/src/graphql/data/ghec/schema.json @@ -8192,7 +8192,7 @@ "description": "

Creates, updates and/or deletes multiple refs in a repository.

\n

This mutation takes a list of RefUpdates and performs these updates\non the repository. All updates are performed atomically, meaning that\nif one of them is rejected, no other ref will be modified.

\n

RefUpdate.beforeOid specifies that the given reference needs to point\nto the given value before performing any updates. A value of\n0000000000000000000000000000000000000000 can be used to verify that\nthe references should not exist.

\n

RefUpdate.afterOid specifies the value that the given reference\nwill point to after performing all updates. A value of\n0000000000000000000000000000000000000000 can be used to delete a\nreference.

\n

If RefUpdate.force is set to true, a non-fast-forward updates\nfor the given reference will be allowed.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -8204,7 +8204,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -10201,6 +10201,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#int" }, + { + "name": "requiredDeploymentEnvironments", + "description": "

List of required deployment environments that must be deployed successfully to update matching branches.

", + "type": "[String]", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, { "name": "requiredStatusCheckContexts", "description": "

List of required status check contexts that must pass for commits to be accepted to matching branches.

", @@ -10249,6 +10257,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#boolean" }, + { + "name": "requiresDeployments", + "description": "

Does this branch require deployment to specific environments before merging.

", + "type": "Boolean!", + "id": "boolean", + "kind": "scalars", + "href": "/graphql/reference/scalars#boolean" + }, { "name": "requiresLinearHistory", "description": "

Are merge commits prohibited from being pushed to this branch.

", @@ -15978,7 +15994,7 @@ "description": "

A dependency manifest entry.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -15995,7 +16011,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -16058,7 +16074,7 @@ "description": "

The connection type for DependencyGraphDependency.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -16075,7 +16091,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -16120,7 +16136,7 @@ "description": "

An edge in a connection.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -16137,7 +16153,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -16166,7 +16182,7 @@ "description": "

Dependency manifest for a repository.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -16183,7 +16199,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "implements": [ { @@ -16301,7 +16317,7 @@ "description": "

The connection type for DependencyGraphManifest.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -16318,7 +16334,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -16363,7 +16379,7 @@ "description": "

An edge in a connection.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -16380,7 +16396,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -45122,7 +45138,7 @@ "href": "/graphql/reference/scalars#boolean", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -45133,7 +45149,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -45752,7 +45768,7 @@ "href": "/graphql/reference/enums#mergestatestatus", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -45763,7 +45779,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -55383,7 +55399,7 @@ ], "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -55400,7 +55416,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" } }, { @@ -71019,6 +71035,14 @@ } ] }, + { + "name": "event", + "description": "

The event that triggered the workflow run.

", + "type": "String!", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, { "name": "pendingDeploymentRequests", "description": "

The pending deployment requests of all check runs in this workflow run.

", @@ -84443,6 +84467,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#int" }, + { + "name": "requiredDeploymentEnvironments", + "description": "

The list of required deployment environments.

", + "type": "[String!]", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, { "name": "requiredStatusCheckContexts", "description": "

List of required status check contexts that must pass for commits to be accepted to matching branches.

", @@ -84491,6 +84523,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#boolean" }, + { + "name": "requiresDeployments", + "description": "

Are successful deployments required before merging.

", + "type": "Boolean", + "id": "boolean", + "kind": "scalars", + "href": "/graphql/reference/scalars#boolean" + }, { "name": "requiresLinearHistory", "description": "

Are merge commits prohibited from being pushed to this branch.

", @@ -88883,7 +88923,7 @@ "description": "

A ref update.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -88895,7 +88935,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -91254,6 +91294,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#int" }, + { + "name": "requiredDeploymentEnvironments", + "description": "

The list of required deployment environments.

", + "type": "[String!]", + "id": "string", + "kind": "scalars", + "href": "/graphql/reference/scalars#string" + }, { "name": "requiredStatusCheckContexts", "description": "

List of required status check contexts that must pass for commits to be accepted to matching branches.

", @@ -91302,6 +91350,14 @@ "kind": "scalars", "href": "/graphql/reference/scalars#boolean" }, + { + "name": "requiresDeployments", + "description": "

Are successful deployments required before merging.

", + "type": "Boolean", + "id": "boolean", + "kind": "scalars", + "href": "/graphql/reference/scalars#boolean" + }, { "name": "requiresLinearHistory", "description": "

Are merge commits prohibited from being pushed to this branch.

", @@ -93284,7 +93340,7 @@ "description": "

Autogenerated input type of UpdateRefs.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -93296,7 +93352,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -93965,7 +94021,7 @@ "description": "

A fully qualified reference name (e.g. refs/heads/master).

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -93977,7 +94033,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" } }, { diff --git a/src/graphql/data/ghes-3.4/previews.json b/src/graphql/data/ghes-3.4/previews.json index bc9a06987b..21c00fa217 100644 --- a/src/graphql/data/ghes-3.4/previews.json +++ b/src/graphql/data/ghes-3.4/previews.json @@ -28,7 +28,7 @@ "href": "/graphql/overview/schema-previews#deployments-preview" }, { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -39,10 +39,10 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" }, { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -54,7 +54,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, { "title": "Project event details preview", diff --git a/src/graphql/data/ghes-3.4/schema.json b/src/graphql/data/ghes-3.4/schema.json index f7a59e8e77..5b60cdb7d4 100644 --- a/src/graphql/data/ghes-3.4/schema.json +++ b/src/graphql/data/ghes-3.4/schema.json @@ -5821,7 +5821,7 @@ "description": "

Creates, updates and/or deletes multiple refs in a repository.

\n

This mutation takes a list of RefUpdates and performs these updates\non the repository. All updates are performed atomically, meaning that\nif one of them is rejected, no other ref will be modified.

\n

RefUpdate.beforeOid specifies that the given reference needs to point\nto the given value before performing any updates. A value of\n0000000000000000000000000000000000000000 can be used to verify that\nthe references should not exist.

\n

RefUpdate.afterOid specifies the value that the given reference\nwill point to after performing all updates. A value of\n0000000000000000000000000000000000000000 can be used to delete a\nreference.

\n

If RefUpdate.force is set to true, a non-fast-forward updates\nfor the given reference will be allowed.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -5833,7 +5833,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -35748,7 +35748,7 @@ "href": "/graphql/reference/scalars#boolean", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -35759,7 +35759,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -36367,7 +36367,7 @@ "href": "/graphql/reference/enums#mergestatestatus", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -36378,7 +36378,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -70326,7 +70326,7 @@ "description": "

A ref update.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -70338,7 +70338,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -73266,7 +73266,7 @@ "description": "

Autogenerated input type of UpdateRefs.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -73278,7 +73278,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -73770,7 +73770,7 @@ "description": "

A fully qualified reference name (e.g. refs/heads/master).

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -73782,7 +73782,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" } }, { diff --git a/src/graphql/data/ghes-3.5/previews.json b/src/graphql/data/ghes-3.5/previews.json index bc9a06987b..21c00fa217 100644 --- a/src/graphql/data/ghes-3.5/previews.json +++ b/src/graphql/data/ghes-3.5/previews.json @@ -28,7 +28,7 @@ "href": "/graphql/overview/schema-previews#deployments-preview" }, { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -39,10 +39,10 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" }, { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -54,7 +54,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, { "title": "Project event details preview", diff --git a/src/graphql/data/ghes-3.5/schema.json b/src/graphql/data/ghes-3.5/schema.json index c397bd6c48..0a1a9fa942 100644 --- a/src/graphql/data/ghes-3.5/schema.json +++ b/src/graphql/data/ghes-3.5/schema.json @@ -6093,7 +6093,7 @@ "description": "

Creates, updates and/or deletes multiple refs in a repository.

\n

This mutation takes a list of RefUpdates and performs these updates\non the repository. All updates are performed atomically, meaning that\nif one of them is rejected, no other ref will be modified.

\n

RefUpdate.beforeOid specifies that the given reference needs to point\nto the given value before performing any updates. A value of\n0000000000000000000000000000000000000000 can be used to verify that\nthe references should not exist.

\n

RefUpdate.afterOid specifies the value that the given reference\nwill point to after performing all updates. A value of\n0000000000000000000000000000000000000000 can be used to delete a\nreference.

\n

If RefUpdate.force is set to true, a non-fast-forward updates\nfor the given reference will be allowed.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -6105,7 +6105,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -36045,7 +36045,7 @@ "href": "/graphql/reference/scalars#boolean", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -36056,7 +36056,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -36675,7 +36675,7 @@ "href": "/graphql/reference/enums#mergestatestatus", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -36686,7 +36686,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -71316,7 +71316,7 @@ "description": "

A ref update.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -71328,7 +71328,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -74507,7 +74507,7 @@ "description": "

Autogenerated input type of UpdateRefs.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -74519,7 +74519,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -75011,7 +75011,7 @@ "description": "

A fully qualified reference name (e.g. refs/heads/master).

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -75023,7 +75023,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" } }, { diff --git a/src/graphql/data/ghes-3.6/previews.json b/src/graphql/data/ghes-3.6/previews.json index bc9a06987b..21c00fa217 100644 --- a/src/graphql/data/ghes-3.6/previews.json +++ b/src/graphql/data/ghes-3.6/previews.json @@ -28,7 +28,7 @@ "href": "/graphql/overview/schema-previews#deployments-preview" }, { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -39,10 +39,10 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" }, { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -54,7 +54,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, { "title": "Project event details preview", diff --git a/src/graphql/data/ghes-3.6/schema.json b/src/graphql/data/ghes-3.6/schema.json index a844450d2d..ad7a8ac64b 100644 --- a/src/graphql/data/ghes-3.6/schema.json +++ b/src/graphql/data/ghes-3.6/schema.json @@ -6177,7 +6177,7 @@ "description": "

Creates, updates and/or deletes multiple refs in a repository.

\n

This mutation takes a list of RefUpdates and performs these updates\non the repository. All updates are performed atomically, meaning that\nif one of them is rejected, no other ref will be modified.

\n

RefUpdate.beforeOid specifies that the given reference needs to point\nto the given value before performing any updates. A value of\n0000000000000000000000000000000000000000 can be used to verify that\nthe references should not exist.

\n

RefUpdate.afterOid specifies the value that the given reference\nwill point to after performing all updates. A value of\n0000000000000000000000000000000000000000 can be used to delete a\nreference.

\n

If RefUpdate.force is set to true, a non-fast-forward updates\nfor the given reference will be allowed.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -6189,7 +6189,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -36456,7 +36456,7 @@ "href": "/graphql/reference/scalars#boolean", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -36467,7 +36467,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -37086,7 +37086,7 @@ "href": "/graphql/reference/enums#mergestatestatus", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -37097,7 +37097,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -71949,7 +71949,7 @@ "description": "

A ref update.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -71961,7 +71961,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -75166,7 +75166,7 @@ "description": "

Autogenerated input type of UpdateRefs.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -75178,7 +75178,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -75713,7 +75713,7 @@ "description": "

A fully qualified reference name (e.g. refs/heads/master).

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -75725,7 +75725,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" } }, { diff --git a/src/graphql/data/ghes-3.7/previews.json b/src/graphql/data/ghes-3.7/previews.json index bc9a06987b..21c00fa217 100644 --- a/src/graphql/data/ghes-3.7/previews.json +++ b/src/graphql/data/ghes-3.7/previews.json @@ -28,7 +28,7 @@ "href": "/graphql/overview/schema-previews#deployments-preview" }, { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -39,10 +39,10 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" }, { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -54,7 +54,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, { "title": "Project event details preview", diff --git a/src/graphql/data/ghes-3.7/schema.json b/src/graphql/data/ghes-3.7/schema.json index c7d6ee6a29..0c46a44ea4 100644 --- a/src/graphql/data/ghes-3.7/schema.json +++ b/src/graphql/data/ghes-3.7/schema.json @@ -6525,7 +6525,7 @@ "description": "

Creates, updates and/or deletes multiple refs in a repository.

\n

This mutation takes a list of RefUpdates and performs these updates\non the repository. All updates are performed atomically, meaning that\nif one of them is rejected, no other ref will be modified.

\n

RefUpdate.beforeOid specifies that the given reference needs to point\nto the given value before performing any updates. A value of\n0000000000000000000000000000000000000000 can be used to verify that\nthe references should not exist.

\n

RefUpdate.afterOid specifies the value that the given reference\nwill point to after performing all updates. A value of\n0000000000000000000000000000000000000000 can be used to delete a\nreference.

\n

If RefUpdate.force is set to true, a non-fast-forward updates\nfor the given reference will be allowed.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -6537,7 +6537,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -39704,7 +39704,7 @@ "href": "/graphql/reference/scalars#boolean", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -39715,7 +39715,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -40334,7 +40334,7 @@ "href": "/graphql/reference/enums#mergestatestatus", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -40345,7 +40345,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -77138,7 +77138,7 @@ "description": "

A ref update.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -77150,7 +77150,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -80626,7 +80626,7 @@ "description": "

Autogenerated input type of UpdateRefs.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -80638,7 +80638,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -81232,7 +81232,7 @@ "description": "

A fully qualified reference name (e.g. refs/heads/master).

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -81244,7 +81244,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" } }, { diff --git a/src/graphql/data/ghes-3.8/previews.json b/src/graphql/data/ghes-3.8/previews.json index 0bd68020a4..95e2ab937b 100644 --- a/src/graphql/data/ghes-3.8/previews.json +++ b/src/graphql/data/ghes-3.8/previews.json @@ -28,7 +28,7 @@ "href": "/graphql/overview/schema-previews#deployments-preview" }, { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -39,10 +39,10 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" }, { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -54,10 +54,10 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -74,7 +74,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, { "title": "Project event details preview", diff --git a/src/graphql/data/ghes-3.8/schema.json b/src/graphql/data/ghes-3.8/schema.json index f463ab2b77..33058f633f 100644 --- a/src/graphql/data/ghes-3.8/schema.json +++ b/src/graphql/data/ghes-3.8/schema.json @@ -6873,7 +6873,7 @@ "description": "

Creates, updates and/or deletes multiple refs in a repository.

\n

This mutation takes a list of RefUpdates and performs these updates\non the repository. All updates are performed atomically, meaning that\nif one of them is rejected, no other ref will be modified.

\n

RefUpdate.beforeOid specifies that the given reference needs to point\nto the given value before performing any updates. A value of\n0000000000000000000000000000000000000000 can be used to verify that\nthe references should not exist.

\n

RefUpdate.afterOid specifies the value that the given reference\nwill point to after performing all updates. A value of\n0000000000000000000000000000000000000000 can be used to delete a\nreference.

\n

If RefUpdate.force is set to true, a non-fast-forward updates\nfor the given reference will be allowed.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -6885,7 +6885,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -14625,7 +14625,7 @@ "description": "

A dependency manifest entry.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -14642,7 +14642,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -14705,7 +14705,7 @@ "description": "

The connection type for DependencyGraphDependency.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -14722,7 +14722,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -14767,7 +14767,7 @@ "description": "

An edge in a connection.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -14784,7 +14784,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -14813,7 +14813,7 @@ "description": "

Dependency manifest for a repository.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -14830,7 +14830,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "implements": [ { @@ -14948,7 +14948,7 @@ "description": "

The connection type for DependencyGraphManifest.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -14965,7 +14965,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -15010,7 +15010,7 @@ "description": "

An edge in a connection.

", "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -15027,7 +15027,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" }, "fields": [ { @@ -41282,7 +41282,7 @@ "href": "/graphql/reference/scalars#boolean", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -41293,7 +41293,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -41912,7 +41912,7 @@ "href": "/graphql/reference/enums#mergestatestatus", "isDeprecated": false, "preview": { - "title": "Merge info preview", + "title": "Merge info preview more detailed information about a pull request's merge state preview", "description": "This preview adds support for accessing fields that provide more detailed information about a pull request's merge state.", "toggled_by": "merge-info-preview", "toggled_on": [ @@ -41923,7 +41923,7 @@ "@github/pe-pull-requests" ], "accept_header": "application/vnd.github.merge-info-preview+json", - "href": "/graphql/overview/schema-previews#merge-info-preview" + "href": "/graphql/overview/schema-previews#merge-info-preview-more-detailed-information-about-a-pull-requests-merge-state-preview" } }, { @@ -51482,7 +51482,7 @@ ], "isDeprecated": false, "preview": { - "title": "Access to a repository s dependency graph preview", + "title": "Access to a repository's dependency graph preview", "description": "This preview adds support for reading a dependency graph for a repository.", "toggled_by": "hawkgirl-preview", "toggled_on": [ @@ -51499,7 +51499,7 @@ "@github/dependency-graph" ], "accept_header": "application/vnd.github.hawkgirl-preview+json", - "href": "/graphql/overview/schema-previews#access-to-a-repository-s-dependency-graph-preview" + "href": "/graphql/overview/schema-previews#access-to-a-repositorys-dependency-graph-preview" } }, { @@ -79467,7 +79467,7 @@ "description": "

A ref update.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -79479,7 +79479,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -83092,7 +83092,7 @@ "description": "

Autogenerated input type of UpdateRefs.

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -83104,7 +83104,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" }, "inputFields": [ { @@ -83706,7 +83706,7 @@ "description": "

A fully qualified reference name (e.g. refs/heads/master).

", "isDeprecated": false, "preview": { - "title": "Update refs preview", + "title": "Update refs preview update multiple refs in a single operation preview", "description": "This preview adds support for updating multiple refs in a single operation.", "toggled_by": "update-refs-preview", "toggled_on": [ @@ -83718,7 +83718,7 @@ "@github/reponauts" ], "accept_header": "application/vnd.github.update-refs-preview+json", - "href": "/graphql/overview/schema-previews#update-refs-preview" + "href": "/graphql/overview/schema-previews#update-refs-preview-update-multiple-refs-in-a-single-operation-preview" } }, { diff --git a/src/graphql/scripts/utils/process-previews.js b/src/graphql/scripts/utils/process-previews.js index 96df6d8b6d..ac532a350b 100644 --- a/src/graphql/scripts/utils/process-previews.js +++ b/src/graphql/scripts/utils/process-previews.js @@ -7,8 +7,10 @@ const inputOrPayload = /(Input|Payload)$/m export default function processPreviews(previews) { // clean up raw yml data previews.forEach((preview) => { - // remove any extra info that follows a hyphen - preview.title = sentenceCase(preview.title.replace(/ -.+/, '')).replace('it hub', 'itHub') // fix overcorrected `git hub` from sentenceCasing + preview.title = sentenceCase(preview.title) + .replace(/ -.+/, '') // remove any extra info that follows a hyphen + .replace('it hub', 'itHub') // fix overcorrected `git hub` from sentenceCasing + .replace(' s ', "'s ") // sentenceCase replaces apostrophes with spaces // Add `preview` to the end of titles if needed preview.title = preview.title.endsWith('preview') ? preview.title : `${preview.title} preview` diff --git a/src/rest/data/client-side-rest-api-redirects.json b/src/rest/data/client-side-rest-api-redirects.json index b195b0fd64..cf2a31b697 100644 --- a/src/rest/data/client-side-rest-api-redirects.json +++ b/src/rest/data/client-side-rest-api-redirects.json @@ -155,9 +155,13 @@ "/rest/enterprise-admin#update-a-self-hosted-runner-group-for-an-enterprise": "/rest/actions/self-hosted-runner-groups#update-a-self-hosted-runner-group-for-an-enterprise", "/rest/orgs#list-custom-repository-roles-in-an-organization": "/rest/orgs/custom-roles#list-custom-repository-roles-in-an-organization", "/rest/apps/oauth-applications#create-a-scoped-access-token": "/rest/apps/apps#create-a-scoped-access-token", + "/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise": "/rest/enterprise-admin/code-security-and-analysis#get-code-security-analysis-features-for-an-enterprise", + "/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise": "/rest/enterprise-admin/code-security-and-analysis#update-code-security-and-analysis-features-for-an-enterprise", + "/rest/enterprise-admin#enable-or-disable-a-security-feature": "/rest/enterprise-admin/code-security-and-analysis#enable-or-disable-a-security-feature", "/rest/repos#deploy-keys": "/rest/deploy-keys", "/rest/deployments#deploy-keys": "/rest/deploy-keys", "/rest/repos#statuses": "/rest/commits/statuses", + "/rest/enterprise-admin#code-security-and-analysis": "/rest/enterprise-admin/code-security-and-analysis", "/rest/apps#get-the-authenticated-app": "/rest/apps/apps#get-the-authenticated-app", "/rest/apps#create-a-github-app-from-a-manifest": "/rest/apps/apps#create-a-github-app-from-a-manifest", "/rest/apps#get-a-webhook-configuration-for-an-app": "/rest/apps/webhooks#get-a-webhook-configuration-for-an-app", @@ -783,7 +787,6 @@ "/rest/repos#get-a-repository-readme": "/rest/repos/contents#get-a-repository-readme", "/rest/repos#get-a-repository-directory-readme": "/rest/repos/contents#get-a-repository-directory-readme", "/rest/repos#releases": "/rest/repos/releases", - "/rest/releases/releases#create-a-release": "/rest/repos/releases#create-a-release", "/rest/activity#list-stargazers": "/rest/activity/starring#list-stargazers", "/rest/activity#starring": "/rest/activity/starring", "/rest/metrics/statistics#get-the-weekly-commit-activity": "/rest/metrics/statistics#get-the-weekly-commit-activity", @@ -1072,9 +1075,6 @@ "/rest/announcement-banners#enterprises": "/rest/announcement-banners/enterprises", "/rest/announcement-banners/enterprises#set-announcement-banner-for-enterprise": "/rest/announcement-banners/enterprises#set-announcement-banner-for-enterprise", "/rest/announcement-banners/enterprises#remove-announcement-banner-from-enterprise": "/rest/announcement-banners/enterprises#remove-announcement-banner-from-enterprise", - "/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise": "/rest/enterprise-admin/code-security-and-analysis#get-code-security-analysis-features-for-an-enterprise", - "/rest/enterprise-admin#code-security-and-analysis": "/rest/enterprise-admin/code-security-and-analysis", - "/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise": "/rest/enterprise-admin/code-security-and-analysis#update-code-security-and-analysis-features-for-an-enterprise", "/rest/enterprise-admin#list-enterprise-consumed-licenses": "/rest/enterprise-admin/license#list-enterprise-consumed-licenses", "/rest/enterprise-admin#get-a-license-sync-status": "/rest/enterprise-admin/license#get-a-license-sync-status", "/rest/billing#get-github-actions-billing-for-an-enterprise": "/rest/enterprise-admin/billing#get-github-actions-billing-for-an-enterprise", @@ -1082,7 +1082,6 @@ "/rest/billing#export-advanced-security-active-committers-data-for-enterprise": "/rest/enterprise-admin/billing#export-advanced-security-active-committers-data-for-enterprise", "/rest/billing#get-github-packages-billing-for-an-enterprise": "/rest/enterprise-admin/billing#get-github-packages-billing-for-an-enterprise", "/rest/billing#get-shared-storage-billing-for-an-enterprise": "/rest/enterprise-admin/billing#get-shared-storage-billing-for-an-enterprise", - "/rest/enterprise-admin#enable-or-disable-a-security-feature": "/rest/enterprise-admin/code-security-and-analysis#enable-or-disable-a-security-feature", "/rest/orgs#custom_roles": "/rest/orgs/custom_roles", "/rest/actions#list-repository-access-to-a-self-hosted-runner-group-in-an-organization": "/rest/actions/self-hosted-runner-groups#list-repository-access-to-a-self-hosted-runner-group-in-an-organization", "/rest/actions#set-repository-access-to-a-self-hosted-runner-group-in-an-organization": "/rest/actions/self-hosted-runner-groups#set-repository-access-to-a-self-hosted-runner-group-in-an-organization", diff --git a/src/rest/data/fpt-2022-11-28/schema.json b/src/rest/data/fpt-2022-11-28/schema.json index df8f935e09..4f97410105 100644 --- a/src/rest/data/fpt-2022-11-28/schema.json +++ b/src/rest/data/fpt-2022-11-28/schema.json @@ -207717,6 +207717,15 @@ "type": "string" } }, + { + "name": "committer", + "description": "

GitHub username or email address to use to filter by commit committer.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "since", "description": "

Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

", diff --git a/src/rest/data/ghae/schema.json b/src/rest/data/ghae/schema.json index 149a3d3696..ba3c787cce 100644 --- a/src/rest/data/ghae/schema.json +++ b/src/rest/data/ghae/schema.json @@ -120388,6 +120388,15 @@ "type": "string" } }, + { + "name": "committer", + "description": "

GitHub username or email address to use to filter by commit committer.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "since", "description": "

Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

", diff --git a/src/rest/data/ghec-2022-11-28/schema.json b/src/rest/data/ghec-2022-11-28/schema.json index c79319096c..fcc928540e 100644 --- a/src/rest/data/ghec-2022-11-28/schema.json +++ b/src/rest/data/ghec-2022-11-28/schema.json @@ -219152,6 +219152,15 @@ "type": "string" } }, + { + "name": "committer", + "description": "

GitHub username or email address to use to filter by commit committer.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "since", "description": "

Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

", diff --git a/src/rest/data/ghes-3.4/schema.json b/src/rest/data/ghes-3.4/schema.json index 827b3234bc..201386bac5 100644 --- a/src/rest/data/ghes-3.4/schema.json +++ b/src/rest/data/ghes-3.4/schema.json @@ -147146,6 +147146,15 @@ "type": "string" } }, + { + "name": "committer", + "description": "

GitHub username or email address to use to filter by commit committer.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "since", "description": "

Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

", diff --git a/src/rest/data/ghes-3.5/schema.json b/src/rest/data/ghes-3.5/schema.json index 9f51bb3e8d..459c08d8ab 100644 --- a/src/rest/data/ghes-3.5/schema.json +++ b/src/rest/data/ghes-3.5/schema.json @@ -154292,6 +154292,15 @@ "type": "string" } }, + { + "name": "committer", + "description": "

GitHub username or email address to use to filter by commit committer.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "since", "description": "

Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

", diff --git a/src/rest/data/ghes-3.6/schema.json b/src/rest/data/ghes-3.6/schema.json index feb1747edc..3bef12babf 100644 --- a/src/rest/data/ghes-3.6/schema.json +++ b/src/rest/data/ghes-3.6/schema.json @@ -156909,6 +156909,15 @@ "type": "string" } }, + { + "name": "committer", + "description": "

GitHub username or email address to use to filter by commit committer.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "since", "description": "

Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

", diff --git a/src/rest/data/ghes-3.7/schema.json b/src/rest/data/ghes-3.7/schema.json index e50b7f67d1..fcd83845c4 100644 --- a/src/rest/data/ghes-3.7/schema.json +++ b/src/rest/data/ghes-3.7/schema.json @@ -159341,6 +159341,15 @@ "type": "string" } }, + { + "name": "committer", + "description": "

GitHub username or email address to use to filter by commit committer.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "since", "description": "

Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

", diff --git a/src/rest/data/ghes-3.8/schema.json b/src/rest/data/ghes-3.8/schema.json index bbd8f3d562..f39e0a4859 100644 --- a/src/rest/data/ghes-3.8/schema.json +++ b/src/rest/data/ghes-3.8/schema.json @@ -174851,6 +174851,15 @@ "type": "string" } }, + { + "name": "committer", + "description": "

GitHub username or email address to use to filter by commit committer.

", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "since", "description": "

Only show notifications updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.

", diff --git a/src/rest/lib/rest-api-overrides.json b/src/rest/lib/rest-api-overrides.json index ebded4e1eb..21f2f844f5 100644 --- a/src/rest/lib/rest-api-overrides.json +++ b/src/rest/lib/rest-api-overrides.json @@ -784,11 +784,27 @@ "category": "apps", "subcategory": "apps", "originalUrl": "/rest/apps/oauth-applications#create-a-scoped-access-token" + }, + "secret-scanning/get-security-analysis-settings-for-enterprise": { + "category": "enterprise-admin", + "subcategory": "code-security-and-analysis", + "originalUrl": "/rest/enterprise-admin#get-code-security-analysis-features-for-an-enterprise" + }, + "secret-scanning/patch-security-analysis-settings-for-enterprise": { + "category": "enterprise-admin", + "subcategory": "code-security-and-analysis", + "originalUrl": "/rest/enterprise-admin#update-code-security-and-analysis-features-for-an-enterprise" + }, + "secret-scanning/post-security-product-enablement-for-enterprise": { + "category": "enterprise-admin", + "subcategory": "code-security-and-analysis", + "originalUrl": "/rest/enterprise-admin#enable-or-disable-a-security-feature" } }, "sectionUrls": { "/rest/repos#deploy-keys": "/rest/deploy-keys", "/rest/deployments#deploy-keys": "/rest/deploy-keys", - "/rest/repos#statuses": "/rest/commits/statuses" + "/rest/repos#statuses": "/rest/commits/statuses", + "/rest/enterprise-admin#code-security-and-analysis": "/rest/enterprise-admin/code-security-and-analysis" } } diff --git a/src/rest/scripts/update-files.js b/src/rest/scripts/update-files.js index f7863f1ff0..9bdf0980d9 100755 --- a/src/rest/scripts/update-files.js +++ b/src/rest/scripts/update-files.js @@ -21,7 +21,7 @@ import { validateVersionsOptions } from './utils/get-openapi-schemas.js' import { allVersions } from '../../../lib/all-versions.js' import { syncWebhookData } from '../../webhooks/scripts/sync.js' import { syncGitHubAppsData } from '../../github-apps/scripts/sync.js' -import { syncRestRedirects } from './utils/getRedirects.js' +import { syncRestRedirects } from './utils/get-redirects.js' const __dirname = path.dirname(fileURLToPath(import.meta.url)) const TEMP_OPENAPI_DIR = path.join(__dirname, '../../../openApiTemp') diff --git a/src/rest/scripts/utils/getRedirects.js b/src/rest/scripts/utils/get-redirects.js similarity index 78% rename from src/rest/scripts/utils/getRedirects.js rename to src/rest/scripts/utils/get-redirects.js index 5ffff4d5d4..718af21aed 100644 --- a/src/rest/scripts/utils/getRedirects.js +++ b/src/rest/scripts/utils/get-redirects.js @@ -60,8 +60,36 @@ async function decorateRedirects(operation, clientSideRedirects) { if (!externalDocs) { return } + const oldUrl = `/rest${externalDocs.url.replace('/rest/reference', '/rest').split('/rest')[1]}` + // Because we generate a list of redirect programmatically which sprung + // from a large move of operations from /rest/reference to /rest on + // docs.github.com, we only want to programmatically generate redirects + // for those cases. I've noticed that sometimes someone will come along and + // update the url in the OpenAPI but they don't update the category + // and subcategory to match. So the url is accurate and category/subcategory + // are out-of-date. + // + // This logic roughly checks to see if the url looks up-to-date by + // seeing if the category and subcategory are in it. If they are not + // it indicates that the url is newer than the category/subcategory and + // we can skip generating a redirect. + if ( + category && + subcategory && + !oldUrl.includes(`${category}/${subcategory}`) && + !externalDocs.url.includes('/rest/reference') + ) { + return + } else if ( + category && + !oldUrl.includes(`${category}`) && + !externalDocs.url.includes('/rest/reference') + ) { + return + } + if (!(oldUrl in clientSideRedirects)) { // There are some operations that aren't nested in the sidebar // For these, don't need to add a client-side redirect, the @@ -69,9 +97,9 @@ async function decorateRedirects(operation, clientSideRedirects) { if (categoriesWithoutSubcategories.includes(category)) { return } - const anchor = oldUrl.split('#')[1] - const fragment = anchor ? `#${oldUrl.split('#')[1]}` : '' + const anchor = oldUrl.split('#')[1] + const fragment = anchor ? `#${anchor}` : '' // If there is no subcategory, a new page with the same name as the // category was created. That page name may change going forward. const redirectTo = subcategory diff --git a/src/rest/scripts/utils/update-markdown.js b/src/rest/scripts/utils/update-markdown.js index f56a85d836..39a7310cf9 100644 --- a/src/rest/scripts/utils/update-markdown.js +++ b/src/rest/scripts/utils/update-markdown.js @@ -1,9 +1,11 @@ import path from 'path' +import mkdirp from 'mkdirp' +import rimraf from 'rimraf' import { existsSync } from 'fs' import walk from 'walk-sync' import matter from 'gray-matter' import { difference } from 'lodash-es' -import { readFile, writeFile, unlink } from 'fs/promises' +import { readFile, writeFile, unlink, readdir } from 'fs/promises' import { allVersions, getDocsVersion } from '../../../../lib/all-versions.js' import { REST_DATA_DIR, REST_SCHEMA_FILENAME } from '../../lib/index.js' @@ -40,7 +42,16 @@ export async function updateMarkdownFiles() { // Markdown files that need to be deleted for (const file of filesToRemove) { await unlink(file) - await updateIndexFile(file, 'remove') + // If after removing the file, the directory only contains an index.md file, + // the whole directory can be removed and the index.md file one level up + // needs to be updated to remove the deleted directory from its children + const directoryFiles = await readdir(path.dirname(file)) + if (directoryFiles.length === 1 && directoryFiles[0] === 'index.md') { + rimraf.sync(path.dirname(file)) + await updateIndexFile(path.dirname(file), 'remove') + } else { + await updateIndexFile(file, 'remove') + } } // Markdown files that need to be added or updated @@ -52,21 +63,40 @@ export async function updateMarkdownFiles() { data.versions = newFrontmatter.versions await writeFile(file, matter.stringify(content, data)) } else { - // create a new file placeholder metadata + // When a new category is added with more than one subcategory, + // a new directory with the category name needs to be created + // and added to the content/rest/index.md file + if (!existsSync(path.dirname(file))) { + await mkdirp(path.dirname(file)) + updateIndexFile(path.dirname(file), 'add') + } await writeFile(file, matter.stringify('', newFrontmatter)) - updateIndexFile(file, 'add') + updateIndexFile(file, 'add', newFrontmatter.versions) } } } // Adds or removes children properties from index.md pages -async function updateIndexFile(file, changeType) { +async function updateIndexFile(file, changeType, versions = null) { const filename = path.basename(file, '.md') const indexDirectory = path.basename(path.dirname(file)) - const rootDir = file.split(indexDirectory)[0] - const indexFilePath = path.join(rootDir, indexDirectory, 'index.md') + const indexFilePath = path.join(path.dirname(file), 'index.md') - const { data, content } = matter(await readFile(indexFilePath, 'utf-8')) + // A default index file to use as a placeholder when one doesn't exist + const newIndexFile = { + data: { + title: indexDirectory, + shortTitle: indexDirectory, + intro: '', + versions, + ...frontmatterDefaults, + children: [], + }, + content: '', + } + const { data, content } = existsSync(indexFilePath) + ? matter(await readFile(indexFilePath, 'utf-8')) + : newIndexFile if (changeType === 'remove') { const index = data.children.indexOf(`/${filename}`) diff --git a/tests/fixtures/content/index.md b/tests/fixtures/content/index.md index 8759ab07a4..363b24a1c0 100644 --- a/tests/fixtures/content/index.md +++ b/tests/fixtures/content/index.md @@ -2,7 +2,7 @@ title: '{% data variables.product.product_name %}{% ifversion fpt or ghec%}.com{% endif %} Fixture Documentation' featuredLinks: gettingStarted: - - /get-started/foo/hello-world + - /get-started/quickstart/hello-world popular: - get-started redirect_from: diff --git a/tests/helpers/schemas/release-notes-schema.js b/tests/helpers/schemas/release-notes-schema.js index c43bc62ee9..db4f3f5533 100644 --- a/tests/helpers/schemas/release-notes-schema.js +++ b/tests/helpers/schemas/release-notes-schema.js @@ -6,17 +6,20 @@ const section = { minItems: 1, }, { - type: 'object', - properties: { - heading: { - type: 'string', - required: true, - }, - notes: { - type: 'array', - items: { type: 'string' }, - required: true, - minItems: 1, + type: 'array', + items: { + type: 'object', + properties: { + heading: { + type: 'string', + required: true, + }, + notes: { + type: 'array', + items: { type: 'string' }, + required: true, + minItems: 1, + }, }, }, }, diff --git a/tests/rendering-fixtures/dynamic-assets.js b/tests/rendering-fixtures/dynamic-assets.js index 4fd6cca5fd..b554553bae 100644 --- a/tests/rendering-fixtures/dynamic-assets.js +++ b/tests/rendering-fixtures/dynamic-assets.js @@ -5,66 +5,53 @@ import { fileTypeFromBuffer } from 'file-type' import { SURROGATE_ENUMS } from '../../middleware/set-fastly-surrogate-key.js' import { get, head } from '../helpers/e2etest.js' -const POSSIBLE_EXTENSIONS = ['webp', 'avif'] - -const EXPECTED_MIMETYPES = { - webp: 'image/webp', - avif: 'image/avif', -} - describe('dynamic assets', () => { jest.setTimeout(3 * 60 * 1000) - test.each(POSSIBLE_EXTENSIONS)('GET PNG as a %s', async (extension) => { - const res = await get(`/assets/images/_fixtures/screenshot.${extension}`, { + test('GET PNG as a WebP', async () => { + const res = await get('/assets/images/_fixtures/screenshot.webp', { responseType: 'buffer', }) expect(res.statusCode).toBe(200) - expect(res.headers['content-type']).toBe(EXPECTED_MIMETYPES[extension]) + expect(res.headers['content-type']).toBe('image/webp') const { mime } = await fileTypeFromBuffer(res.text) - if (extension === 'webp') { - expect(mime).toBe('image/webp') - } else if (extension === 'avif') { - expect(mime).toBe('image/avif') - } else { - throw new Error('unrecognized test') - } + expect(mime).toBe('image/webp') }) - test.each(POSSIBLE_EXTENSIONS)('HEAD PNG as a %s', async (extension) => { - const res = await head(`/assets/images/_fixtures/screenshot.${extension}`) + test('HEAD PNG as a WebP', async () => { + const res = await head('/assets/images/_fixtures/screenshot.webp') expect(res.statusCode).toBe(200) - expect(res.headers['content-type']).toBe(EXPECTED_MIMETYPES[extension]) + expect(res.headers['content-type']).toBe('image/webp') }) - test.each(POSSIBLE_EXTENSIONS)('get PNG as a %s with cache busting prefix', async (extension) => { - const res = await get(`/assets/cb-12345/images/_fixtures/screenshot.${extension}`) + test('get PNG as a WebP with cache busting prefix', async () => { + const res = await get('/assets/cb-12345/images/_fixtures/screenshot.webp') expect(res.statusCode).toBe(200) expect(res.headers['cache-control']).toContain('public') expect(res.headers['cache-control']).toMatch(/max-age=[1-9]/) expect(res.headers['surrogate-key']).toBe(SURROGATE_ENUMS.MANUAL) }) - test.each(POSSIBLE_EXTENSIONS)('max-width=1000 as a %s', async (extension) => { + test('max-width=1000 as a WebP', async () => { // The _fixtures/screenshot.png is 2000(x1494) which is *more than 1000* - const res = await get(`/assets/images/mw-1000/_fixtures/screenshot.${extension}`, { + const res = await get('/assets/images/mw-1000/_fixtures/screenshot.webp', { responseType: 'buffer', }) expect(res.statusCode).toBe(200) - expect(res.headers['content-type']).toBe(EXPECTED_MIMETYPES[extension]) + expect(res.headers['content-type']).toBe('image/webp') const image = sharp(res.text) const { width, height } = await image.metadata() expect(width).toBe(1000) expect(height).toBe(747) }) - test.each(POSSIBLE_EXTENSIONS)('max-width not necessary as a %s', async (extension) => { + test('max-width not necessary as a WebP', async () => { // The _fixtures/electrocat.png is 448(x448) which is *less than 1000* - const res = await get(`/assets/images/mw-1000/_fixtures/electrocat.${extension}`, { + const res = await get('/assets/images/mw-1000/_fixtures/electrocat.webp', { responseType: 'buffer', }) expect(res.statusCode).toBe(200) - expect(res.headers['content-type']).toBe(EXPECTED_MIMETYPES[extension]) + expect(res.headers['content-type']).toBe('image/webp') const image = sharp(res.text) const { width, height } = await image.metadata() expect(width).toBe(448) @@ -76,25 +63,22 @@ describe('dynamic assets', () => { expect(res.statusCode).toBe(404) }) - test.each(POSSIBLE_EXTENSIONS)( - 'max-width has to be a valid number when converting to %s', - async (extension) => { - // 0 is too small - { - const res = await get(`/assets/images/mw-0/_fixtures/screenshot.${extension}`) - expect(res.statusCode).toBe(400) - expect(res.headers['content-type']).toMatch('text/plain') - expect(res.text).toMatch('Error: width number (0) is not a valid number') - } - // 1234 is not a number that is recognized - { - const res = await get(`/assets/images/mw-1234/_fixtures/screenshot.${extension}`) - expect(res.statusCode).toBe(400) - expect(res.headers['content-type']).toMatch('text/plain') - expect(res.text).toMatch('Error: width number (1234) is not a valid number') - } + test('max-width has to be a valid number when converting to WebP', async () => { + // 0 is too small + { + const res = await get('/assets/images/mw-0/_fixtures/screenshot.webp') + expect(res.statusCode).toBe(400) + expect(res.headers['content-type']).toMatch('text/plain') + expect(res.text).toMatch('Error: width number (0) is not a valid number') } - ) + // 1234 is not a number that is recognized + { + const res = await get('/assets/images/mw-1234/_fixtures/screenshot.webp') + expect(res.statusCode).toBe(400) + expect(res.headers['content-type']).toMatch('text/plain') + expect(res.text).toMatch('Error: width number (1234) is not a valid number') + } + }) test('unrecognized extensions get a 404', async () => { const res = await get('/assets/images/_fixtures/screenshot.xxx') diff --git a/tests/rendering-fixtures/images.js b/tests/rendering-fixtures/images.js index 98de501a77..9d08316e11 100644 --- a/tests/rendering-fixtures/images.js +++ b/tests/rendering-fixtures/images.js @@ -10,8 +10,6 @@ describe('render Markdown image tags', () => { expect(pictures.length).toBe(1) const sources = $('source', pictures) - // Note: We might support AVIF too at some point, then - // this test needs to change. expect(sources.length).toBe(1) const srcset = sources.attr('srcset') expect(srcset).toBe('/assets/cb-914945/mw-1000/images/_fixtures/screenshot.webp')