diff --git a/content/code-security/codeql-cli/codeql-cli-manual/github-upload-results.md b/content/code-security/codeql-cli/codeql-cli-manual/github-upload-results.md index 32f847f270d7..6f68c4ebd623 100644 --- a/content/code-security/codeql-cli/codeql-cli-manual/github-upload-results.md +++ b/content/code-security/codeql-cli/codeql-cli-manual/github-upload-results.md @@ -32,8 +32,7 @@ codeql github upload-results --sarif= [--github-auth-stdin] [--github-url= Uploads a SARIF file to GitHub code scanning. -See: - +See: [AUTOTITLE](/code-security/codeql-cli/getting-started-with-the-codeql-cli/uploading-codeql-analysis-results-to-github). A GitHub Apps token or personal access token must be set. For best security practices, it is recommended to set the `--github-auth-stdin` @@ -51,8 +50,7 @@ This token must have the `security_events` scope. \[Mandatory] Path to the SARIF file to upload. This should be the output of [codeql database analyze](/code-security/codeql-cli/codeql-cli-manual/database-analyze) (or [codeql database interpret-results](/code-security/codeql-cli/codeql-cli-manual/database-interpret-results)) with `--format sarif-latest` for upload to github.com or GitHub AE, or the appropriate supported format tag for GitHub Enterprise -Server instances (see for the right value for -your release). +Server instances (see [AUTOTITLE](/enterprise-server@latest/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning#sariflog-object) for SARIF versions supported by your release). #### `-r, --repository=` @@ -97,8 +95,7 @@ upload. `json`: Print the response body of the SARIF upload API request. -See also: - +See also: [AUTOTITLE](/rest/code-scanning/code-scanning?apiVersion=2022-11-28#upload-an-analysis-as-sarif-data). ### Options to configure where to upload SARIF files. diff --git a/content/contributing/style-guide-and-content-model/style-guide.md b/content/contributing/style-guide-and-content-model/style-guide.md index 85d13bdb2c24..1e377fffae70 100644 --- a/content/contributing/style-guide-and-content-model/style-guide.md +++ b/content/contributing/style-guide-and-content-model/style-guide.md @@ -534,7 +534,15 @@ Formatting unordered lists: - If the order of items in the list is not important, alphabetize the list items. - If the order is important, then order the list by the importance to the reader (for example, moving from broadest audience and applicability to a more specialized audience). -When introducing a list, avoid phrasing like “the following” or “these”, terms which are difficult to localize. Instead, be descriptive, yet general enough to allow a list to scale or change without having to update the description. +When introducing a list, avoid short, nonspecific sentences using terms like “the following” or “these”, which are difficult to localize without context. Instead, create a descriptive sentence that clearly conveys the subject of the list, yet allows the list to scale or change without having to update the description. + +**Use:** +- For an introduction to {% data variables.product.prodname_dotcom %}, see the following articles: +- SMS authentication is supported in these countries: + +**Avoid:** +- There are several articles that provide an introduction to {% data variables.product.prodname_dotcom %}. See the following: +- SMS authentication is supported in 50 countries. These include: ## Placeholders diff --git a/content/rest/overview/resources-in-the-rest-api.md b/content/rest/overview/resources-in-the-rest-api.md index 9e5234a49d17..dd4c86f3a5c9 100644 --- a/content/rest/overview/resources-in-the-rest-api.md +++ b/content/rest/overview/resources-in-the-rest-api.md @@ -390,6 +390,8 @@ If you exceed the rate limit, the response will have a `403` status and the `x-r > } ``` +For requests using the Git LFS API (that is, the one used by the Git LFS client), the response will instead have a `429` status. + If you are rate limited, you should not try your request until after the time specified by the `x-ratelimit-reset` time. ### Increasing the unauthenticated rate limit for {% data variables.product.prodname_oauth_apps %} diff --git a/contributing/content-model.md b/contributing/content-model.md index 2c6435c4f0a4..1db2142ac580 100644 --- a/contributing/content-model.md +++ b/contributing/content-model.md @@ -1,6 +1,6 @@ # Content model for GitHub Docs -**Note:** This version of the content model is no longer maintained and will be deprecated. See the [style guide](https://docs.github.com/en/contributing/writing-for-github-docs/style-guide) on docs.github.com for the most up to date version. Open any pull requests against the `contributing/writing-for-github-docs/style-guide.md` file. +**Note:** This version of the content model is no longer maintained and will be deprecated. See the [content model](https://docs.github.com/contributing/style-guide-and-content-model/content-model) on docs.github.com for the most up-to-date version. Open any pull requests against the `contributing/style-guide-and-content-model/content-model.md` file. _Full TOC :arrow_upper_left:_ @@ -36,7 +36,7 @@ The homepage includes all top-level doc sets and some categories. Content on the The goal of the homepage is to help people find information about the GitHub feature or product that they want to learn about. Every item on the homepage dilutes the discoverability of every other item, so we limit the number of doc sets included on the homepage. -If a new top-level doc set is created, it is added to the homepage. +If a new top-level doc set is created, it is added to the homepage. If a category serves as the starting point for using a GitHub product or feature, it can be added to the homepage. @@ -71,7 +71,7 @@ Categories are usually organized around a feature or a discrete set of tasks wit - Examples - [Setting up and managing your GitHub user account](https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account) - [Installing GitHub Enterprise](https://docs.github.com/en/enterprise-server@3.0/admin/installation) - + #### Intros for categories All categories have intros. Keep the intros one sentence long, and general or high-level enough to scale with future product changes without having to remember to update the intro. If you significantly change a category’s structure, check its intro for needed updates. @@ -106,12 +106,12 @@ We organize content predictably within categories, map topics, and articles, fro - Procedural content on using a feature - Procedural content on managing a feature or setting - Procedural content on disabling a feature or setting -- Procedural content on destructive actions (e.g. deletion) +- Procedural content on destructive actions (e.g. deletion) - Troubleshooting information ### Titles -Titles fully describe what a page is about, and what a user will know by reading it. +Titles fully describe what a page is about, and what a user will know by reading it. Titles are challenging! Use these general guidelines to help create clear, helpful, and descriptive titles. See below for specific guidelines for each content type. @@ -121,7 +121,7 @@ Titles are challenging! Use these general guidelines to help create clear, helpf - Use: Example of configuring a codespace - Avoid: Using the workflow editor sidebar - Avoid: Example - - Titles have hard limits for length to keep them easy to understand (and easier to render on the site): + - Titles have hard limits for length to keep them easy to understand (and easier to render on the site): - Category titles: 67 characters and [`shortTitle`](https://github.com/github/docs/tree/main/content#shorttitle) < 27 characters - Map topic titles: 63 characters and [`shortTitle`](https://github.com/github/docs/tree/main/content#shorttitle) < 30 characters - Article titles: 80 characters, 60 if possible, and [`shortTitle`](https://github.com/github/docs/tree/main/content#shorttitle) < 31 characters, ideally 20-25 characters @@ -195,7 +195,7 @@ Conceptual content helps people understand a feature or topic by providing a cle We create conceptual articles and conceptual sections within other articles. Most major products, features, or subjects have their own conceptual article. #### How to write conceptual content -Use the [conceptual content template](https://github.com/github/docs/blob/main/contributing/content-templates.md#conceptual) to write a conceptual article. +Use the [conceptual content template](https://github.com/github/docs/blob/main/contributing/content-templates.md#conceptual) to write a conceptual article. - Describe in plain language what the feature, product, or topic is - Describe its purpose and why it’s useful to the reader @@ -288,11 +288,11 @@ Use the [procedural content template](https://github.com/github/docs/blob/main/c ### Release notes -Release notes enable readers to understand and prepare for the customer-facing changes in each release of GitHub's versioned enterprise products (e.g., GitHub Enterprise Server). Good release notes provide administrators the necessary information to plan system upgrades in environments that require change control, and support end users who want to understand and prepare to use new GitHub features and functionality. +Release notes enable readers to understand and prepare for the customer-facing changes in each release of GitHub's versioned enterprise products (e.g., GitHub Enterprise Server). Good release notes provide administrators the necessary information to plan system upgrades in environments that require change control, and support end users who want to understand and prepare to use new GitHub features and functionality. Writers source, edit, and publish release notes in collaboration with product DRIs, feature owners, and individual engineers at GitHub. For each individual release, we group release notes by predefined types. -We publish the release notes for [GitHub Enterprise Server](https://docs.github.com/enterprise-server/admin/release-notes) (GHES) and [GitHub AE](https://docs.github.com/github-ae@latest/admin/release-notes) (GHAE) on GitHub Docs, in the "Enterprise administrators" documentation set. +We publish the release notes for [GitHub Enterprise Server](https://docs.github.com/enterprise-server/admin/release-notes) (GHES) and [GitHub AE](https://docs.github.com/github-ae@latest/admin/release-notes) (GHAE) on GitHub Docs, in the "Enterprise administrators" documentation set. #### Types of releases @@ -321,7 +321,7 @@ Use known issues to explain the following situations. - Behavior that regularly prevents the use of the product or feature for a common purpose. - Rare or severe bugs that GitHub has not yet prioritized fixing, and that are not explained in the product or by existing content on GitHub Docs. -#### How to write troubleshooting content +#### How to write troubleshooting content - Use any GitHub Docs content type to create troubleshooting sections. - Whenever possible, keep troubleshooting content contained within procedural content or guides. - You can create a troubleshooting article when it makes sense to keep it separate, such as when there’s a large amount of troubleshooting content on a particular topic. @@ -405,7 +405,7 @@ Tutorials help people learn about products and solve real world problems by guid Tutorials are useful when someone has a basic understanding of the product and is interested in extending their understanding to solve a specific problem. Tutorials are for people who want expert advice and a detailed discussion of best practices related to their problem. Tutorials also help people who've implemented similar solutions in the past with other products use GitHub. Tutorials can also help people validate whether the solution is appropriate for their needs. #### How to write a tutorial -Use the [tutorial template](https://github.com/github/docs/blob/main/contributing/content-templates.md#tutorial) to create a tutorial. +Use the [tutorial template](https://github.com/github/docs/blob/main/contributing/content-templates.md#tutorial) to create a tutorial. Contents of tutorials: - Introduction @@ -481,7 +481,7 @@ Use the product callout when a feature is available in specific products only an All product callouts are stored as reusables in [`gated-features`](https://github.com/github/docs/tree/main/data/reusables/gated-features) and added in YAML frontmatter for relevant articles. #### How to write a product callout -- Product callouts follow a strict format, clearly identifying the feature and which products it’s available in. +- Product callouts follow a strict format, clearly identifying the feature and which products it’s available in. - Product callouts also include a link to "GitHub’s products” and occasionally to another relevant article. - Examples: - [Feature name] is available in [product(s)]. For more information, see "GitHub’s products.” @@ -502,10 +502,10 @@ The top of every page has an intro that provides context and sets expectations, - Map topic and category intros are one sentence long. - API reference intros are one sentence long. - The intro for an API page should define the feature so that a user knows whether the feature meets their needs without reading the entire article. -- Intros contain a high-level summary of the page’s content, developing the idea presented in a title with more detail. - - Use approachable synonyms of words in the page’s title to help readers understand the article’s purpose differently. Avoid repeating words from the title when possible. +- Intros contain a high-level summary of the page’s content, developing the idea presented in a title with more detail. + - Use approachable synonyms of words in the page’s title to help readers understand the article’s purpose differently. Avoid repeating words from the title when possible. - Intros are relatively evergreen and high-level, so they can scale with future changes to the content on the page without needing to be frequently updated. -- For searchability, include keywords on the page's subject in the intro. +- For searchability, include keywords on the page's subject in the intro. - When a term in the intro has an acronym we’ll use elsewhere in the article, indicate the acronym. - Intros generally don't contain permissions for any tasks contained within the article. @@ -516,8 +516,8 @@ Every procedure includes a permissions statement explaining the role required to Occasionally, it's relevant to mention required permissions in conceptual content, especially in standalone conceptual articles. Make sure to also include a permissions statement in related procedures (or write a longer article combining all of the content). #### How to write a permissions statement -- When a single set of permissions applies to all procedures in an article, use the [permissions frontmatter](https://github.com/github/docs/tree/main/content#permissions). -- When an article contains multiple procedures and different permissions apply, include a separate permissions statement under each relevant header, before each procedure. +- When a single set of permissions applies to all procedures in an article, use the [permissions frontmatter](https://github.com/github/docs/tree/main/content#permissions). +- When an article contains multiple procedures and different permissions apply, include a separate permissions statement under each relevant header, before each procedure. - Don't include permissions in an article’s intro. - Roles exist at different levels. Refer only to the role at the same level as the action. For example, you need admin access to a repository (repository-level role) to configure protected branches. You can get admin access to a repository by being an organization owner (organization-level role), but the repository-level role is what actually governs your ability to take the action, so that is the only role that should be mentioned in the permissions statement. - Language to use in a permissions statement: @@ -573,7 +573,7 @@ Troubleshooting content helps people avoid or work through errors. See "[Trouble Further reading sections highlight additional targeted articles that aren’t already included within the article’s content or sidebar. Use further reading sections sparingly when they provide real value. #### How to write a further reading section -- Use a bulleted list. +- Use a bulleted list. - Use further reading sections sparingly and when they provide high value - see style guide for guidelines on linking. #### Title and format for further reading sections diff --git a/contributing/content-style-guide.md b/contributing/content-style-guide.md index f3970976319e..df281e65410e 100644 --- a/contributing/content-style-guide.md +++ b/contributing/content-style-guide.md @@ -1,6 +1,6 @@ # Content style guide for GitHub Docs -**Note:** This version of the style guide is no longer maintained and will be deprecated. See the [content model](https://docs.github.com/en/contributing/writing-for-github-docs/content-model) on docs.github.com for the most up to date version. Open any pull requests against the `contributing/writing-for-github-docs/content-model.md` file. +**Note:** This version of the style guide is no longer maintained and will be deprecated. See the [style guide](https://docs.github.com/contributing/style-guide-and-content-model/style-guide) on docs.github.com for the most up-to-date version. Open any pull requests against the `contributing/style-guide-and-content-model/style-guide.md` file. Welcome to the content style guide for [GitHub Docs](https://docs.github.com/). diff --git a/data/learning-tracks/admin.yml b/data/learning-tracks/admin.yml index 3d523a5006fc..1e252e8781cd 100644 --- a/data/learning-tracks/admin.yml +++ b/data/learning-tracks/admin.yml @@ -8,10 +8,10 @@ get_started_with_github_ae: guides: - /admin/overview/about-github-ae - /admin/overview/about-data-residency - - /admin/configuration/configuring-your-enterprise/deploying-github-ae - - /admin/configuration/configuring-your-enterprise/initializing-github-ae + - /admin/overview/deploying-github-ae + - /admin/overview/initializing-github-ae - >- - /admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise-with-an-ip-allow-list + /admin/configuration/hardening-security-for-your-enterprise/restricting-network-traffic-to-your-enterprise-with-an-ip-allow-list - >- /admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-ae deploy_an_instance: @@ -25,10 +25,12 @@ deploy_an_instance: - /admin/overview/system-overview - /admin/installation - >- - /admin/configuration/administering-your-instance-from-the-management-console - - /admin/configuration/configuring-network-settings/configuring-a-hostname + /admin/administering-your-instance/administering-your-instance-from-the-web-ui + - >- + /admin/configuration/configuring-network-settings/configuring-the-hostname-for-your-instance - /admin/identity-and-access-management/using-saml-for-enterprise-iam - - /admin/configuration/configuring-your-enterprise/site-admin-dashboard + - >- + /admin/administering-your-instance/administering-your-instance-from-the-web-ui/site-admin-dashboard upgrade_your_instance: title: Upgrade your instance description: >- @@ -38,17 +40,17 @@ upgrade_your_instance: ghes: '*' guides: - >- - /admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/enabling-automatic-update-checks + /admin/monitoring-managing-and-updating-your-instance/updating-the-virtual-machine-and-physical-resources/enabling-automatic-update-checks - >- /admin/installation/setting-up-a-github-enterprise-server-instance/setting-up-a-staging-instance - >- - /admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrade-requirements + /admin/monitoring-managing-and-updating-your-instance/updating-the-virtual-machine-and-physical-resources/upgrade-requirements - >- - /admin/user-management/managing-users-in-your-enterprise/customizing-user-messages-for-your-enterprise + /admin/managing-accounts-and-repositories/communicating-information-to-users-in-your-enterprise/customizing-user-messages-for-your-enterprise - >- - /admin/configuration/configuring-your-enterprise/enabling-and-scheduling-maintenance-mode + /admin/administering-your-instance/configuring-maintenance-mode/enabling-and-scheduling-maintenance-mode - >- - /admin/enterprise-management/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server + /admin/monitoring-managing-and-updating-your-instance/updating-the-virtual-machine-and-physical-resources/upgrading-github-enterprise-server adopting_github_actions_for_your_enterprise_ghec: title: Adopt GitHub Actions for your enterprise description: >- @@ -104,13 +106,13 @@ increase_fault_tolerance: ghes: '*' guides: - >- - /admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh + /admin/administering-your-instance/administering-your-instance-from-the-command-line/accessing-the-administrative-shell-ssh - >- - /admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance + /admin/backing-up-and-restoring-your-instance/configuring-backups-on-your-instance - >- - /admin/enterprise-management/configuring-high-availability/about-high-availability-configuration + /admin/monitoring-managing-and-updating-your-instance/configuring-high-availability/about-high-availability-configuration - >- - /admin/enterprise-management/configuring-high-availability/creating-a-high-availability-replica + /admin/monitoring-managing-and-updating-your-instance/configuring-high-availability/creating-a-high-availability-replica - >- /admin/configuration/configuring-network-settings/using-github-enterprise-server-with-a-load-balancer improve_security_of_your_instance: @@ -122,21 +124,23 @@ improve_security_of_your_instance: versions: ghes: '*' guides: - - /admin/configuration/configuring-your-enterprise/enabling-private-mode - - /admin/configuration/configuring-network-settings/configuring-tls - >- - /admin/configuration/configuring-your-enterprise/troubleshooting-tls-errors + /admin/configuration/hardening-security-for-your-enterprise/enabling-private-mode + - >- + /admin/configuration/hardening-security-for-your-enterprise/configuring-tls - >- - /admin/configuration/configuring-network-settings/enabling-subdomain-isolation + /admin/configuration/hardening-security-for-your-enterprise/troubleshooting-tls-errors - >- - /admin/configuration/configuring-your-enterprise/accessing-the-administrative-shell-ssh + /admin/configuration/hardening-security-for-your-enterprise/enabling-subdomain-isolation + - >- + /admin/administering-your-instance/administering-your-instance-from-the-command-line/accessing-the-administrative-shell-ssh - /admin/configuration/configuring-network-settings/network-ports - >- /admin/configuration/configuring-network-settings/configuring-built-in-firewall-rules - >- - /admin/user-management/managing-users-in-your-enterprise/best-practices-for-user-security + /admin/managing-accounts-and-repositories/managing-users-in-your-enterprise/best-practices-for-user-security - >- - /admin/user-management/managing-users-in-your-enterprise/promoting-or-demoting-a-site-administrator + /admin/managing-accounts-and-repositories/managing-users-in-your-enterprise/promoting-or-demoting-a-site-administrator configure_github_actions: title: Configure {% data variables.product.prodname_actions %} description: >- @@ -189,12 +193,11 @@ get_started_with_your_enterprise_account: ghec: '*' guides: - /admin/overview/about-enterprise-accounts + - /billing/managing-your-github-billing-settings/about-billing-for-your-enterprise - >- - /billing/managing-the-plan-for-your-github-account/about-billing-for-your-enterprise - - >- - /admin/user-management/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise + /admin/managing-accounts-and-repositories/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise - >- - /admin/user-management/managing-organizations-in-your-enterprise/adding-organizations-to-your-enterprise + /admin/managing-accounts-and-repositories/managing-organizations-in-your-enterprise/adding-organizations-to-your-enterprise - >- /admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-saml-single-sign-on-for-your-enterprise - >- diff --git a/data/learning-tracks/code-security.yml b/data/learning-tracks/code-security.yml index e0a7e7e30be1..cf386a738f66 100644 --- a/data/learning-tracks/code-security.yml +++ b/data/learning-tracks/code-security.yml @@ -51,7 +51,7 @@ dependabot_alerts: - >- /code-security/dependabot/dependabot-alerts/viewing-and-updating-dependabot-alerts - >- - /code-security/dependabot/dependabot-alerts/using-alert-rules-to-prioritize-dependabot-alerts + /code-security/dependabot/dependabot-alert-rules/about-dependabot-alert-rules - >- /code-security/dependabot/dependabot-alerts/configuring-notifications-for-dependabot-alerts - >- @@ -131,12 +131,11 @@ secret_scanning: - /code-security/secret-scanning/secret-scanning-patterns - >- {% ifversion secret-scanning-push-protection - %}/code-security/secret-scanning/protecting-pushes-with-secret-scanning{% + %}/code-security/secret-scanning/push-protection-for-repositories-and-organizations{% endif %} - >- {% ifversion secret-scanning-push-protection-for-users - %}/code-security/secret-scanning/push-protection-for-users{% - endif %} + %}/code-security/secret-scanning/push-protection-for-users{% endif %} - >- {% ifversion secret-scanning-push-protection %}/code-security/secret-scanning/pushing-a-branch-blocked-by-push-protection{% @@ -151,8 +150,8 @@ security_alerts: %}/code-security/security-overview/about-security-overview {% endif %} - >- {% ifversion ghec or ghes - %}/code-security/security-overview/assessing-adoption-code-security {% endif - %} + %}/code-security/security-overview/assessing-adoption-code-security {% + endif %} - >- {% ifversion ghec or ghes %}/code-security/security-overview/assessing-code-security-risk {% endif @@ -163,11 +162,11 @@ security_alerts: endif %} - >- {% ifversion ghec or ghes - %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository{% + %}/code-security/code-scanning/managing-code-scanning-alerts/managing-code-scanning-alerts-for-your-repository{% endif %} - >- {% ifversion ghec or ghes - %}/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests{% + %}/code-security/code-scanning/managing-code-scanning-alerts/triaging-code-scanning-alerts-in-pull-requests{% endif %} - >- {% ifversion ghec or ghes @@ -183,19 +182,18 @@ code_security_actions: errors out of your repository. guides: - >- - /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning - - >- - /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning-for-a-repository + /code-security/code-scanning/introduction-to-code-scanning/about-code-scanning - >- - /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning + /code-security/code-scanning/enabling-code-scanning/configuring-default-setup-for-code-scanning - >- - /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/codeql-code-scanning-for-compiled-languages + /code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning - >- - /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/running-codeql-code-scanning-in-a-container + /code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages - >- - /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow + /code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/running-codeql-code-scanning-in-a-container + - /code-security/code-scanning/troubleshooting-code-scanning - >- - /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-the-tool-status-page + /code-security/code-scanning/managing-your-code-scanning-configuration/about-the-tool-status-page code_security_integration: title: Integrate with code scanning description: Upload code analysis results from third-party systems to GitHub using SARIF. diff --git a/data/reusables/repositories/sidebar-pr.md b/data/reusables/repositories/sidebar-pr.md index 2f970b48adec..d16a2b03afec 100644 --- a/data/reusables/repositories/sidebar-pr.md +++ b/data/reusables/repositories/sidebar-pr.md @@ -1,7 +1,7 @@ 1. Under your repository name, click {% octicon "git-pull-request" aria-hidden="true" %} **Pull requests**. {% ifversion global-nav-update %} - ![Screenshot of the main page of a repository. In the horizontal navigation bar, a tab, labeled "Pull requests," is outlined in dark orange.](assets/images/help/repository/repo-tabs-pull-requests-global-nav-update.png) + ![Screenshot of the main page of a repository. In the horizontal navigation bar, a tab, labeled "Pull requests," is outlined in dark orange.](/assets/images/help/repository/repo-tabs-pull-requests-global-nav-update.png) {% else %} diff --git a/src/audit-logs/lib/config.json b/src/audit-logs/lib/config.json index 6b2c8bb4fb2a..9b6258b83a79 100644 --- a/src/audit-logs/lib/config.json +++ b/src/audit-logs/lib/config.json @@ -1,3 +1,3 @@ { - "sha": "e8dc31f0ffdd4e9421af51d68da1f61db2250029" + "sha": "5da93c1a00fb9175a56d717e5dbcf089708cbe47" } \ No newline at end of file diff --git a/src/content-linter/tests/lint-frontmatter.js b/src/content-linter/tests/lint-frontmatter.js index eebb2f361269..5cbc21605eb7 100644 --- a/src/content-linter/tests/lint-frontmatter.js +++ b/src/content-linter/tests/lint-frontmatter.js @@ -1,59 +1,12 @@ import { loadPages, loadPageMap } from '../../../lib/page-data.js' -import getRedirect from '#src/redirects/lib/get-redirect.js' import loadRedirects from '#src/redirects/lib/precompile.js' -import { getPathWithoutLanguage, getPathWithoutVersion } from '../../../lib/path-utils.js' +import { checkURL } from '../../../tests/helpers/check-url.js' const pageList = await loadPages(undefined, ['en']) const pages = await loadPageMap(pageList) const redirects = await loadRedirects(pageList) -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 -} - describe('front matter', () => { - // Given a URI that does not start with a specific language, - // return undefined if it can found as a known page. - // Otherwise, return an object with information that is used to - // print a useful jest error message in the assertion. - function checkURL(uri, index, redirectsContext) { - const url = `/en${stripLiquid(uri).split('#')[0]}` - if (!(url in pages)) { - // Some are written without a version, but don't work with the - // default version. - let redirects = getRedirect(url, redirectsContext) - // If it does indeed redirect to a different version, - // strip that and compare again. - if (redirects) { - const withoutVersion = getPathWithoutVersion(redirects) - if (withoutVersion === url) { - // That means, it's actually fine - return null - } - redirects = getPathWithoutLanguage(withoutVersion) - } - return { uri, index, redirects } - } - return null // Falsy value will be filtered out later - } - function makeCustomErrorMessage(page, trouble, key) { let customErrorMessage = `In the front matter of ${page.relativePath} ` if (trouble.length > 0) { diff --git a/src/github-apps/lib/config.json b/src/github-apps/lib/config.json index 61527baec6d5..d16d65789dfb 100644 --- a/src/github-apps/lib/config.json +++ b/src/github-apps/lib/config.json @@ -60,5 +60,5 @@ "2022-11-28" ] }, - "sha": "da0d1d1b5e111057b120425fc23d6ff891b29aba" + "sha": "85de871f74feaf766d5201a86fbba490d6cc6290" } \ No newline at end of file diff --git a/src/learning-track/tests/lint-data.js b/src/learning-track/tests/lint-data.js new file mode 100644 index 000000000000..fb7305b90335 --- /dev/null +++ b/src/learning-track/tests/lint-data.js @@ -0,0 +1,47 @@ +import { loadPages, loadPageMap } from '../../../lib/page-data.js' +import loadRedirects from '#src/redirects/lib/precompile.js' +import { getDeepDataByLanguage } from '../../../lib/get-data.js' +import { checkURL } from '../../../tests/helpers/check-url.js' + +const pageList = await loadPages(undefined, ['en']) +const pages = await loadPageMap(pageList) +const redirects = await loadRedirects(pageList) + +describe('learning tracks', () => { + const allLearningTracks = getDeepDataByLanguage('learning-tracks', 'en') + const topLevels = Object.keys(allLearningTracks) + + test.each(topLevels)('learning-track in data/learning-tracks/%s.yml', (topLevel) => { + const learningTracks = allLearningTracks[topLevel] + const redirectsContext = { redirects, pages } + const troubles = Object.entries(learningTracks) + .map(([learningTrackKey, learningTrack]) => { + return [ + learningTrackKey, + learningTrack.guides + .map((guide, i) => checkURL(guide, i, redirectsContext)) + .filter(Boolean), + ] + }) + .filter(([, trouble]) => trouble.length > 0) + + let errorMessage = `In data/learning-tracks/${topLevel}.yml there are ${troubles.length} guides that are not correct.\n` + let fixables = 0 + for (const [key, guides] of troubles) { + errorMessage += `Under "${key}"...\n` + for (const { uri, index, redirects } of guides) { + if (redirects) { + fixables += 1 + errorMessage += ` guide: #${index + 1} ${uri} redirects to ${redirects}\n` + } else { + errorMessage += ` guide: #${index + 1} ${uri} is broken.\n` + } + } + } + if (fixables) { + errorMessage += `\nNOTE! To automatically fix the redirects run this command:\n` + errorMessage += `\n\t./src/links/scripts/update-internal-links.js data/learning-tracks/${topLevel}.yml\n` + } + expect(troubles.length, errorMessage).toEqual(0) + }) +}) diff --git a/src/rest/data/fpt-2022-11-28/schema.json b/src/rest/data/fpt-2022-11-28/schema.json index baf9f95f9714..01ae3a1ff1a9 100644 --- a/src/rest/data/fpt-2022-11-28/schema.json +++ b/src/rest/data/fpt-2022-11-28/schema.json @@ -188282,7 +188282,7 @@ } ], "previews": [], - "descriptionHTML": "

Lists the codespaces associated to a specified organization.

\n

You must authenticate using an access token with the admin:org scope to use this endpoint.

", + "descriptionHTML": "

Lists the codespaces associated to a specified organization.

\n

You must authenticate using an access token with the admin:org scope or the Organization codespaces read permission to use this endpoint.

", "statusCodes": [ { "httpStatusCode": "200", @@ -188375,7 +188375,7 @@ } ], "previews": [], - "descriptionHTML": "

Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces access permissions for users according to the visibility.\nYou must authenticate using an access token with the admin:org scope to use this endpoint.

", + "descriptionHTML": "

Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces access permissions for users according to the visibility.\nYou must authenticate using an access token with the admin:org scope or the Organization codespaces settings write permission to use this endpoint.

", "statusCodes": [ { "httpStatusCode": "204", @@ -188455,7 +188455,7 @@ } ], "previews": [], - "descriptionHTML": "

Codespaces for the specified users will be billed to the organization.

\n

To use this endpoint, the access settings for the organization must be set to selected_members.\nFor information on how to change this setting, see \"Manage access control for organization codespaces.\"

\n

You must authenticate using an access token with the admin:org scope to use this endpoint.

", + "descriptionHTML": "

Codespaces for the specified users will be billed to the organization.

\n

To use this endpoint, the access settings for the organization must be set to selected_members.\nFor information on how to change this setting, see \"Manage access control for organization codespaces.\"

\n

You must authenticate using an access token with the admin:org scope or the Organization codespaces settings write permission to use this endpoint.

", "statusCodes": [ { "httpStatusCode": "204", @@ -188535,7 +188535,7 @@ } ], "previews": [], - "descriptionHTML": "

Codespaces for the specified users will no longer be billed to the organization.

\n

To use this endpoint, the access settings for the organization must be set to selected_members.\nFor information on how to change this setting, see \"Manage access control for organization codespaces.\"

\n

You must authenticate using an access token with the admin:org scope to use this endpoint.

", + "descriptionHTML": "

Codespaces for the specified users will no longer be billed to the organization.

\n

To use this endpoint, the access settings for the organization must be set to selected_members.\nFor information on how to change this setting, see \"Manage access control for organization codespaces.\"

\n

You must authenticate using an access token with the admin:org scope or the Organization codespaces settings write permission to use this endpoint.

", "statusCodes": [ { "httpStatusCode": "204", @@ -190589,7 +190589,7 @@ } ], "previews": [], - "descriptionHTML": "

Lists the codespaces that a member of an organization has for repositories in that organization.

\n

You must authenticate using an access token with the admin:org scope to use this endpoint.

", + "descriptionHTML": "

Lists the codespaces that a member of an organization has for repositories in that organization.

\n

You must authenticate using an access token with the admin:org scope or the Organization codespaces read permission to use this endpoint.

", "statusCodes": [ { "httpStatusCode": "200", @@ -190679,7 +190679,7 @@ } ], "previews": [], - "descriptionHTML": "

Deletes a user's codespace.

\n

You must authenticate using an access token with the admin:org scope to use this endpoint.

", + "descriptionHTML": "

Deletes a user's codespace.

\n

To use this endpoint you must authenticate using one of the following methods:

\n
    \n
  • An access token with the admin:org scope
  • \n
  • An access token with write permissions for Codespaces on the specific repository and write permissions for Organization codespaces
  • \n
", "statusCodes": [ { "httpStatusCode": "202", @@ -192423,7 +192423,7 @@ } ], "previews": [], - "descriptionHTML": "

Stops a user's codespace.

\n

You must authenticate using an access token with the admin:org scope to use this endpoint.

", + "descriptionHTML": "

Stops a user's codespace.

\n

To use this endpoint you must authenticate using one of the following methods:

\n
    \n
  • An access token with the admin:org scope
  • \n
  • An access token with write permissions for Codespaces lifecycle admin on the specific repository and write permissions for Organization codespaces
  • \n
", "statusCodes": [ { "httpStatusCode": "200", @@ -501987,6 +501987,15 @@ "schema": { "type": "string" } + }, + { + "name": "validity", + "in": "query", + "description": "

A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are active, inactive, and unknown.

", + "required": false, + "schema": { + "type": "string" + } } ], "bodyParameters": [], @@ -502127,7 +502136,8 @@ }, "push_protection_bypassed": true, "push_protection_bypassed_at": "2020-11-06T21:48:51Z", - "resolution_comment": "Example comment" + "resolution_comment": "Example comment", + "validity": "active" }, { "number": 1, @@ -502212,7 +502222,8 @@ "push_protection_bypassed_by": null, "push_protection_bypassed": false, "push_protection_bypassed_at": null, - "resolution_comment": null + "resolution_comment": null, + "validity": "unknown" } ], "schema": { @@ -503203,6 +503214,15 @@ "null" ], "description": "The comment that was optionally added when this alert was closed" + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] } } } @@ -503338,6 +503358,15 @@ "schema": { "type": "string" } + }, + { + "name": "validity", + "in": "query", + "description": "

A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are active, inactive, and unknown.

", + "required": false, + "schema": { + "type": "string" + } } ], "bodyParameters": [], @@ -503478,7 +503507,8 @@ }, "push_protection_bypassed": true, "push_protection_bypassed_at": "2020-11-06T21:48:51Z", - "resolution_comment": "Example comment" + "resolution_comment": "Example comment", + "validity": "active" }, { "number": 1, @@ -503563,7 +503593,8 @@ "push_protection_bypassed_by": null, "push_protection_bypassed": false, "push_protection_bypassed_at": null, - "resolution_comment": null + "resolution_comment": null, + "validity": "unknown" } ], "schema": { @@ -504554,6 +504585,15 @@ "null" ], "description": "The comment that was optionally added when this alert was closed" + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] } } } @@ -504698,6 +504738,15 @@ "schema": { "type": "string" } + }, + { + "name": "validity", + "in": "query", + "description": "

A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are active, inactive, and unknown.

", + "required": false, + "schema": { + "type": "string" + } } ], "bodyParameters": [], @@ -504772,7 +504821,8 @@ }, "push_protection_bypassed": true, "push_protection_bypassed_at": "2020-11-06T21:48:51Z", - "resolution_comment": "Example comment" + "resolution_comment": "Example comment", + "validity": "inactive" }, { "number": 1, @@ -504790,7 +504840,8 @@ "push_protection_bypassed_by": null, "push_protection_bypassed": false, "push_protection_bypassed_at": null, - "resolution_comment": null + "resolution_comment": null, + "validity": "unknown" } ], "schema": { @@ -505238,6 +505289,15 @@ ], "format": "date-time", "description": "The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`." + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] } } } @@ -505334,7 +505394,8 @@ "push_protection_bypassed_by": null, "push_protection_bypassed": false, "push_protection_bypassed_at": null, - "resolution_comment": null + "resolution_comment": null, + "validity": "unknown" }, "schema": { "type": "object", @@ -505779,6 +505840,15 @@ ], "format": "date-time", "description": "The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`." + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] } } } @@ -505933,7 +506003,8 @@ "push_protection_bypassed": false, "push_protection_bypassed_by": null, "push_protection_bypassed_at": null, - "resolution_comment": "Example comment" + "resolution_comment": "Example comment", + "validity": "unknown" }, "schema": { "type": "object", @@ -506378,6 +506449,15 @@ ], "format": "date-time", "description": "The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`." + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] } } } diff --git a/src/rest/data/ghae/schema.json b/src/rest/data/ghae/schema.json index 1812f2947786..706b2c2b1d7e 100644 --- a/src/rest/data/ghae/schema.json +++ b/src/rest/data/ghae/schema.json @@ -370010,6 +370010,15 @@ "schema": { "type": "string" } + }, + { + "name": "validity", + "in": "query", + "description": "

A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are active, inactive, and unknown.

", + "required": false, + "schema": { + "type": "string" + } } ], "bodyParameters": [], @@ -371195,6 +371204,15 @@ "null" ], "description": "The comment that was optionally added when this alert was closed" + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] } } } @@ -371615,6 +371633,15 @@ "secret": { "type": "string", "description": "The secret that was detected." + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] } } } @@ -371703,7 +371730,8 @@ "locations_url": "https://api.github.com/repos/owner/private-repo/secret-scanning/alerts/42/locations", "state": "open", "secret_type": "mailchimp_api_key", - "secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2" + "secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2", + "validity": "unknown" }, "schema": { "type": "object", @@ -371961,6 +371989,15 @@ "secret": { "type": "string", "description": "The secret that was detected." + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] } } } @@ -372111,7 +372148,8 @@ }, "secret_type": "mailchimp_api_key", "secret": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-us2", - "resolution_comment": "Example comment" + "resolution_comment": "Example comment", + "validity": "unknown" }, "schema": { "type": "object", @@ -372369,6 +372407,15 @@ "secret": { "type": "string", "description": "The secret that was detected." + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] } } } diff --git a/src/rest/data/ghec-2022-11-28/schema.json b/src/rest/data/ghec-2022-11-28/schema.json index fb177a6c60b1..6303d32ad2d3 100644 --- a/src/rest/data/ghec-2022-11-28/schema.json +++ b/src/rest/data/ghec-2022-11-28/schema.json @@ -199991,7 +199991,7 @@ } ], "previews": [], - "descriptionHTML": "

Lists the codespaces associated to a specified organization.

\n

You must authenticate using an access token with the admin:org scope to use this endpoint.

", + "descriptionHTML": "

Lists the codespaces associated to a specified organization.

\n

You must authenticate using an access token with the admin:org scope or the Organization codespaces read permission to use this endpoint.

", "statusCodes": [ { "httpStatusCode": "200", @@ -200084,7 +200084,7 @@ } ], "previews": [], - "descriptionHTML": "

Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces access permissions for users according to the visibility.\nYou must authenticate using an access token with the admin:org scope to use this endpoint.

", + "descriptionHTML": "

Sets which users can access codespaces in an organization. This is synonymous with granting or revoking codespaces access permissions for users according to the visibility.\nYou must authenticate using an access token with the admin:org scope or the Organization codespaces settings write permission to use this endpoint.

", "statusCodes": [ { "httpStatusCode": "204", @@ -200164,7 +200164,7 @@ } ], "previews": [], - "descriptionHTML": "

Codespaces for the specified users will be billed to the organization.

\n

To use this endpoint, the access settings for the organization must be set to selected_members.\nFor information on how to change this setting, see \"Manage access control for organization codespaces.\"

\n

You must authenticate using an access token with the admin:org scope to use this endpoint.

", + "descriptionHTML": "

Codespaces for the specified users will be billed to the organization.

\n

To use this endpoint, the access settings for the organization must be set to selected_members.\nFor information on how to change this setting, see \"Manage access control for organization codespaces.\"

\n

You must authenticate using an access token with the admin:org scope or the Organization codespaces settings write permission to use this endpoint.

", "statusCodes": [ { "httpStatusCode": "204", @@ -200244,7 +200244,7 @@ } ], "previews": [], - "descriptionHTML": "

Codespaces for the specified users will no longer be billed to the organization.

\n

To use this endpoint, the access settings for the organization must be set to selected_members.\nFor information on how to change this setting, see \"Manage access control for organization codespaces.\"

\n

You must authenticate using an access token with the admin:org scope to use this endpoint.

", + "descriptionHTML": "

Codespaces for the specified users will no longer be billed to the organization.

\n

To use this endpoint, the access settings for the organization must be set to selected_members.\nFor information on how to change this setting, see \"Manage access control for organization codespaces.\"

\n

You must authenticate using an access token with the admin:org scope or the Organization codespaces settings write permission to use this endpoint.

", "statusCodes": [ { "httpStatusCode": "204", @@ -202298,7 +202298,7 @@ } ], "previews": [], - "descriptionHTML": "

Lists the codespaces that a member of an organization has for repositories in that organization.

\n

You must authenticate using an access token with the admin:org scope to use this endpoint.

", + "descriptionHTML": "

Lists the codespaces that a member of an organization has for repositories in that organization.

\n

You must authenticate using an access token with the admin:org scope or the Organization codespaces read permission to use this endpoint.

", "statusCodes": [ { "httpStatusCode": "200", @@ -202388,7 +202388,7 @@ } ], "previews": [], - "descriptionHTML": "

Deletes a user's codespace.

\n

You must authenticate using an access token with the admin:org scope to use this endpoint.

", + "descriptionHTML": "

Deletes a user's codespace.

\n

To use this endpoint you must authenticate using one of the following methods:

\n
    \n
  • An access token with the admin:org scope
  • \n
  • An access token with write permissions for Codespaces on the specific repository and write permissions for Organization codespaces
  • \n
", "statusCodes": [ { "httpStatusCode": "202", @@ -204132,7 +204132,7 @@ } ], "previews": [], - "descriptionHTML": "

Stops a user's codespace.

\n

You must authenticate using an access token with the admin:org scope to use this endpoint.

", + "descriptionHTML": "

Stops a user's codespace.

\n

To use this endpoint you must authenticate using one of the following methods:

\n
    \n
  • An access token with the admin:org scope
  • \n
  • An access token with write permissions for Codespaces lifecycle admin on the specific repository and write permissions for Organization codespaces
  • \n
", "statusCodes": [ { "httpStatusCode": "200", @@ -526897,6 +526897,15 @@ "schema": { "type": "string" } + }, + { + "name": "validity", + "in": "query", + "description": "

A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are active, inactive, and unknown.

", + "required": false, + "schema": { + "type": "string" + } } ], "bodyParameters": [], @@ -527037,7 +527046,8 @@ }, "push_protection_bypassed": true, "push_protection_bypassed_at": "2020-11-06T21:48:51Z", - "resolution_comment": "Example comment" + "resolution_comment": "Example comment", + "validity": "active" }, { "number": 1, @@ -527122,7 +527132,8 @@ "push_protection_bypassed_by": null, "push_protection_bypassed": false, "push_protection_bypassed_at": null, - "resolution_comment": null + "resolution_comment": null, + "validity": "unknown" } ], "schema": { @@ -528113,6 +528124,15 @@ "null" ], "description": "The comment that was optionally added when this alert was closed" + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] } } } @@ -528248,6 +528268,15 @@ "schema": { "type": "string" } + }, + { + "name": "validity", + "in": "query", + "description": "

A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are active, inactive, and unknown.

", + "required": false, + "schema": { + "type": "string" + } } ], "bodyParameters": [], @@ -528388,7 +528417,8 @@ }, "push_protection_bypassed": true, "push_protection_bypassed_at": "2020-11-06T21:48:51Z", - "resolution_comment": "Example comment" + "resolution_comment": "Example comment", + "validity": "active" }, { "number": 1, @@ -528473,7 +528503,8 @@ "push_protection_bypassed_by": null, "push_protection_bypassed": false, "push_protection_bypassed_at": null, - "resolution_comment": null + "resolution_comment": null, + "validity": "unknown" } ], "schema": { @@ -529464,6 +529495,15 @@ "null" ], "description": "The comment that was optionally added when this alert was closed" + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] } } } @@ -529608,6 +529648,15 @@ "schema": { "type": "string" } + }, + { + "name": "validity", + "in": "query", + "description": "

A comma-separated list of validities that, when present, will return alerts that match the validities in this list. Valid options are active, inactive, and unknown.

", + "required": false, + "schema": { + "type": "string" + } } ], "bodyParameters": [], @@ -529682,7 +529731,8 @@ }, "push_protection_bypassed": true, "push_protection_bypassed_at": "2020-11-06T21:48:51Z", - "resolution_comment": "Example comment" + "resolution_comment": "Example comment", + "validity": "inactive" }, { "number": 1, @@ -529700,7 +529750,8 @@ "push_protection_bypassed_by": null, "push_protection_bypassed": false, "push_protection_bypassed_at": null, - "resolution_comment": null + "resolution_comment": null, + "validity": "unknown" } ], "schema": { @@ -530148,6 +530199,15 @@ ], "format": "date-time", "description": "The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`." + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] } } } @@ -530244,7 +530304,8 @@ "push_protection_bypassed_by": null, "push_protection_bypassed": false, "push_protection_bypassed_at": null, - "resolution_comment": null + "resolution_comment": null, + "validity": "unknown" }, "schema": { "type": "object", @@ -530689,6 +530750,15 @@ ], "format": "date-time", "description": "The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`." + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] } } } @@ -530843,7 +530913,8 @@ "push_protection_bypassed": false, "push_protection_bypassed_by": null, "push_protection_bypassed_at": null, - "resolution_comment": "Example comment" + "resolution_comment": "Example comment", + "validity": "unknown" }, "schema": { "type": "object", @@ -531288,6 +531359,15 @@ ], "format": "date-time", "description": "The time that push protection was bypassed in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`." + }, + "validity": { + "type": "string", + "description": "The token status as of the latest validity check.", + "enum": [ + "active", + "inactive", + "unknown" + ] } } } diff --git a/src/rest/lib/config.json b/src/rest/lib/config.json index 1bc9704f2035..e7980b45d10d 100644 --- a/src/rest/lib/config.json +++ b/src/rest/lib/config.json @@ -36,5 +36,5 @@ ] } }, - "sha": "da0d1d1b5e111057b120425fc23d6ff891b29aba" + "sha": "85de871f74feaf766d5201a86fbba490d6cc6290" } \ No newline at end of file diff --git a/src/search/components/Search.tsx b/src/search/components/Search.tsx index 02ded05158fd..f966ae0898d5 100644 --- a/src/search/components/Search.tsx +++ b/src/search/components/Search.tsx @@ -57,21 +57,23 @@ export function Search() { >{t`placeholder`} - (e.target as HTMLInputElement).setCustomValidity('Please enter a search query.') - } - onInput={(e) => (e.target as HTMLInputElement).setCustomValidity('')} + onInvalid={(e) => { + e.currentTarget.setCustomValidity('Please enter a search query.') + }} data-testid="site-search-input" // This adds focus in particular for iOS to focus and bring up the keyboard when you touch the search input text area ref={(inputRef) => !atMediumViewport && inputRef && inputRef.focus()} type="search" placeholder={t`placeholder`} - autoComplete={localQuery ? 'on' : 'off'} + autoComplete="off" autoCorrect="off" autoCapitalize="off" spellCheck="false" maxLength={512} - onChange={(e) => setLocalQuery(e.target.value)} + onChange={(e) => { + setLocalQuery(e.target.value) + e.currentTarget.setCustomValidity('') + }} value={localQuery} aria-label={t`label`} aria-describedby={t`description`} diff --git a/src/webhooks/lib/config.json b/src/webhooks/lib/config.json index f7fffb18a28a..1cd4db30c281 100644 --- a/src/webhooks/lib/config.json +++ b/src/webhooks/lib/config.json @@ -1,3 +1,3 @@ { - "sha": "da0d1d1b5e111057b120425fc23d6ff891b29aba" + "sha": "85de871f74feaf766d5201a86fbba490d6cc6290" } \ No newline at end of file diff --git a/tests/helpers/check-url.js b/tests/helpers/check-url.js new file mode 100644 index 000000000000..47bcb99eaae7 --- /dev/null +++ b/tests/helpers/check-url.js @@ -0,0 +1,48 @@ +import getRedirect from '#src/redirects/lib/get-redirect.js' +import { getPathWithoutLanguage, getPathWithoutVersion } from '../../lib/path-utils.js' + +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 +} + +// Given a URI that does not start with a specific language, +// return undefined if it can found as a known page. +// Otherwise, return an object with information that is used to +// print a useful jest error message in the assertion. +export function checkURL(uri, index, redirectsContext) { + const url = `/en${stripLiquid(uri).split('#')[0]}` + if (!(url in redirectsContext.pages)) { + // Some are written without a version, but don't work with the + // default version. + let redirects = getRedirect(url, redirectsContext) + // If it does indeed redirect to a different version, + // strip that and compare again. + if (redirects) { + const withoutVersion = getPathWithoutVersion(redirects) + if (withoutVersion === url) { + // That means, it's actually fine + return null + } + redirects = getPathWithoutLanguage(withoutVersion) + } + return { uri, index, redirects } + } + return null // Falsy value will be filtered out later +}