1
0
mirror of synced 2025-12-21 02:46:50 -05:00

Merge branch 'main' of github.com:github/docs-internal into hidden-docs-alt

This commit is contained in:
Sarah Schneider
2020-12-03 12:06:18 -05:00
33 changed files with 178 additions and 93 deletions

View File

@@ -7,13 +7,13 @@ labels:
assignees: ''
---
<!--
HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN ISSUE IN GITHUB/DOCS-CONTENT https://github.com/github/docs-content/issues/new/choose INSTEAD.
HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN ISSUE IN GITHUB/DOCS-CONTENT INSTEAD.
-->
<!--
For questions, ask in Discussions: https://github.com/github/docs/discussions
Before you file an issue read the:
Before you file an issue read the:
- Code of Conduct: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md
- Contributing guide: https://github.com/github/docs/blob/main/CONTRIBUTING.md

View File

@@ -7,13 +7,13 @@ assignees: ''
---
<!--
HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN ISSUE IN GITHUB/DOCS-CONTENT https://github.com/github/docs-content/issues/new/choose INSTEAD.
HUBBERS BEWARE! THE GITHUB/DOCS REPO IS PUBLIC TO THE ENTIRE INTERNET. OPEN AN ISSUE IN GITHUB/DOCS-CONTENT INSTEAD.
-->
<!--
For questions, ask in Discussions: https://github.com/github/docs/discussions
Before you file an issue read the:
Before you file an issue read the:
- Code of Conduct: https://github.com/github/docs/blob/main/CODE_OF_CONDUCT.md
- Contributing guide: https://github.com/github/docs/blob/main/CONTRIBUTING.md

View File

@@ -0,0 +1,39 @@
name: Close unwanted pull requests
on:
pull_request:
paths:
- '.github/workflows/**'
- '.github/CODEOWNERS'
- 'translations/**'
- 'assets/fonts/**'
- 'data/graphql/**'
- 'lib/graphql/**'
- 'lib/redirects/**'
- 'lib/webhooks/**'
jobs:
close_unwanted_pull_requests:
if: github.repository == 'github/docs'
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
with:
script: |
await github.issues.createComment({
...context.repo,
issue_number: context.payload.pull_request.number,
body:
`Thanks for contributing! We do not accept community changes to these files at this time.
- '.github/workflows/**'
- '.github/CODEOWNERS'
- 'translations/**'
- 'assets/fonts/**'
- 'data/graphql/**'
- 'lib/graphql/**'
- 'lib/redirects/**'
- 'lib/webhooks/**'`
})
await github.issues.update({
...context.repo,
issue_number: context.payload.pull_request.number,
state: 'closed'
})

View File

@@ -37,4 +37,4 @@ jobs:
if: failure()
env:
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
SLACK_MESSAGE: The last Algolia workflow run for ${{github.repository}} failed. See https://github.com/github/docs-internal/actions?query=workflow%3AAlgolia
SLACK_MESSAGE: The last Algolia workflow run for ${{github.repository}} failed. Search actions for `workflow:Algolia`

View File

@@ -1,16 +0,0 @@
## Importing Aftermarket Octicons
#### Background
Some octicons are missing from the project's current version of the `octicons` gem. Because this project is being replaced soon and updating `octicons` would require [significant changes](https://github.com/github/docs-internal/issues/6250#issuecomment-339730405), new octicons should be added manually as needed, via the following process:
#### How to add
1. Locate the missing octicon `.svg` in [primer/octions](https://github.com/primer/octicons/tree/master/lib/svg) and download it to your local `app/assets/images/octions` folder
1. Add a line to `app/assets/stylesheets/shared/_octicons.scss` for the new octicon, like so:
```apple css
.octicon-<YOUR OCTICON NAME>:before {
content: url("#{$new-octicons-path}/<YOUR OCTICON FILENAME>.svg")
}
```
You may now use the new octicon in your content as normal! :tada:

View File

@@ -46,16 +46,16 @@ typing `git remote -v`:
```shell
$ git remote -v
# View existing remotes
> origin https://github.com/github/reactivecocoa.git (fetch)
> origin https://github.com/github/reactivecocoa.git (push)
> origin https://github.com/ghost/reactivecocoa.git (fetch)
> origin https://github.com/ghost/reactivecocoa.git (push)
$ git remote set-url origin https://github.com/github/ReactiveCocoa.git
$ git remote set-url origin https://github.com/ghost/ReactiveCocoa.git
# Change the 'origin' remote's URL
$ git remote -v
# Verify new remote URL
> origin https://github.com/github/ReactiveCocoa.git (fetch)
> origin https://github.com/github/ReactiveCocoa.git (push)
> origin https://github.com/ghost/ReactiveCocoa.git (fetch)
> origin https://github.com/ghost/ReactiveCocoa.git (push)
```
Alternatively, you can change the URL through our
@@ -73,7 +73,7 @@ When prompted for a username and password, make sure you use an account that has
{% tip %}
**Tip**: If you don't want to enter your credentials every time you interact with the remote repository, you can turn on [credential caching](/github/using-git/caching-your-github-credentials-in-git). If you are already using credential caching, please make sure that your computer has the correct credentials cached. Incorrect or out of date credentials will cause authentication to fail.
**Tip**: If you don't want to enter your credentials every time you interact with the remote repository, you can turn on [credential caching](/github/using-git/caching-your-github-credentials-in-git). If you are already using credential caching, please make sure that your computer has the correct credentials cached. Incorrect or out of date credentials will cause authentication to fail.
{% endtip %}

View File

@@ -44,11 +44,11 @@ Scanning code when someone pushes a change, and whenever a pull request is creat
#### Scanning on push
By default, the {% data variables.product.prodname_codeql_workflow %} uses the `on.push` event to trigger a code scan on every push to the default branch of the repository and any protected branches. For {% data variables.product.prodname_code_scanning %} to be triggered on a specified branch, the workflow must exist in that branch. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#on)."
By default, the {% data variables.product.prodname_codeql_workflow %} uses the `on.push` event to trigger a code scan on every push to the default branch of the repository and any protected branches. For {% data variables.product.prodname_code_scanning %} to be triggered on a specified branch, the workflow must exist in that branch. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#on)."
#### Scanning pull requests
The default {% data variables.product.prodname_codeql_workflow %} uses the `pull_request` event to trigger a code scan on pull requests targeted against the default branch. {% if currentVersion ver_gt "enterprise-server@2.21" %}The `pull_request` event is not triggered if the pull request was opened from a private fork.{% else %}If a pull request is from a private fork, the `pull_request` event will only be triggered if you've selected the "Run workflows from fork pull requests" option in the repository settings. For more information, see "[Disabling or limiting {% data variables.product.prodname_actions %} for a repository](/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository#enabling-workflows-for-private-repository-forks)."{% endif %}
The default {% data variables.product.prodname_codeql_workflow %} uses the `pull_request` event to trigger a code scan on pull requests targeted against the default branch. {% if currentVersion ver_gt "enterprise-server@2.21" %}The `pull_request` event is not triggered if the pull request was opened from a private fork.{% else %}If a pull request is from a private fork, the `pull_request` event will only be triggered if you've selected the "Run workflows from fork pull requests" option in the repository settings. For more information, see "[Disabling or limiting {% data variables.product.prodname_actions %} for a repository](/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository#enabling-workflows-for-private-repository-forks)."{% endif %}
For more information about the `pull_request` event, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags)."
@@ -148,14 +148,14 @@ jobs:
matrix:
language: ['javascript', 'python']
```
If your workflow does not contain a matrix called `language`, then {% data variables.product.prodname_codeql %} is configured to run analysis sequentially. If you don't specify languages in the workflow, {% data variables.product.prodname_codeql %} automatically detects, and attempts to analyze, any supported languages in the repository. If you want to choose which languages to analyze, without using a matrix, you can use the `languages` parameter under the `init` action.
```yaml
- uses: github/codeql-action/init@v1
with:
languages: cpp, csharp, python
```
```
{% if currentVersion == "free-pro-team@latest" %}
### Analyzing Python dependencies
@@ -183,7 +183,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ];
if [ -f requirements.txt ];
then pip install -r requirements.txt;
fi
# Set the `CODEQL-PYTHON` environment variable to the Python executable
@@ -193,10 +193,10 @@ jobs:
uses: github/codeql-action/init@v1
with:
languages: python
# Override the default behavior so that the action doesn't attempt
# Override the default behavior so that the action doesn't attempt
# to auto-install Python dependencies
setup-python-dependencies: false
```
```
{% endif %}
### Running additional queries
@@ -239,7 +239,7 @@ In the workflow file, use the `config-file` parameter of the `init` action to sp
```
The configuration file can be located within the local repository, or in a public, remote repository. For remote repositories, you can use the _owner/repository/file.yml@branch_ syntax. The settings in the file are written in YAML format.
#### Specifying additional queries
You specify additional queries in a `queries` array. Each element of the array contains a `uses` parameter with a value that identifies a single query file, a directory containing query files, or a query suite definition file.
@@ -265,15 +265,15 @@ For the interpreted languages that {% data variables.product.prodname_codeql %}
``` yaml
paths:
- src
paths-ignore:
- src
paths-ignore:
- src/node_modules
- '**/*.test.js'
```
{% note %}
**Note**:
**Note**:
* The `paths` and `paths-ignore` keywords, used in the context of the {% data variables.product.prodname_code_scanning %} configuration file, should not be confused with the same keywords when used for `on.<push|pull_request>.paths` in a workflow. When they are used to modify `on.<push|pull_request>` in a workflow, they determine whether the actions will be run when someone modifies code in the specified directories. For more information, see "[Workflow syntax for {% data variables.product.prodname_actions %}](/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths)."
* `**` characters can only be at the start or end of a line, or surrounded by slashes, and you can't mix `**` and other characters. For example, `foo/**`, `**/foo`, and `foo/**/bar` are all allowed syntax, but `**foo` isn't. However you can use single stars along with other characters, as shown in the example. You'll need to quote anything that contains a `*` character.
@@ -298,7 +298,7 @@ You can quickly analyze small portions of a monorepo when you modify code in spe
If your workflow for {% data variables.product.prodname_code_scanning %} accesses a private repository, other than the repository that contains the workflow, you'll need to configure Git to authenticate with a personal access token. Define the secret in the runner environment by using `jobs.<job_id>.steps.env` in your workflow before any {% data variables.product.prodname_codeql %} actions. For more information, see "[Creating a personal access token for the command line](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)" and "[Creating and storing encrypted secrets](/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets)."
For example, the following configuration has Git replace the full URLs to the `github/foo`, `github/bar`, and `github/baz` repositories on {% data variables.product.prodname_dotcom_the_website %} with URLs that include the personal access token that you store in the `ACCESS_TOKEN` environment variable.
For example, the following configuration has Git replace the full URLs to the `ghost/foo`, `ghost/bar`, and `ghost/baz` repositories on {% data variables.product.prodname_dotcom_the_website %} with URLs that include the personal access token that you store in the `ACCESS_TOKEN` environment variable.
{% raw %}
```yaml
@@ -307,9 +307,9 @@ steps:
env:
TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
git config --global url."https://${TOKEN}@github.com/github/foo".insteadOf "https://github.com/github/foo"
git config --global url."https://${TOKEN}@github.com/github/bar".insteadOf "https://github.com/github/bar"
git config --global url."https://${TOKEN}@github.com/github/baz".insteadOf "https://github.com/github/baz"
git config --global url."https://${TOKEN}@github.com/ghost/foo".insteadOf "https://github.com/ghost/foo"
git config --global url."https://${TOKEN}@github.com/ghost/bar".insteadOf "https://github.com/ghost/bar"
git config --global url."https://${TOKEN}@github.com/ghost/baz".insteadOf "https://github.com/ghost/baz"
```
{% endraw %}

View File

@@ -14,7 +14,7 @@ versions:
### About SARIF support
SARIF (Static Analysis Results Interchange Format) is an [OASIS Standard](https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html) that defines an output file format. The SARIF standard is used to streamline how static analysis tools share their results. {% data variables.product.prodname_code_scanning_capc %} supports a subset of the SARIF 2.1.0 JSON schema.
SARIF (Static Analysis Results Interchange Format) is an [OASIS Standard](https://docs.oasis-open.org/sarif/sarif/v2.1.0/sarif-v2.1.0.html) that defines an output file format. The SARIF standard is used to streamline how static analysis tools share their results. {% data variables.product.prodname_code_scanning_capc %} supports a subset of the SARIF 2.1.0 JSON schema.
To upload a SARIF file from a third-party static code analysis engine, you'll need to ensure that uploaded files use the SARIF 2.1.0 version. {% data variables.product.prodname_dotcom %} will parse the SARIF file and show alerts using the results in your repository as a part of the {% data variables.product.prodname_code_scanning %} experience. For more information, see "[Uploading a SARIF file to {% data variables.product.prodname_dotcom %}](/github/finding-security-vulnerabilities-and-errors-in-your-code/uploading-a-sarif-file-to-github)." For more information about the SARIF 2.1.0 JSON schema, see [`sarif-schema-2.1.0.json`](https://github.com/oasis-tcs/sarif-spec/blob/master/Schemata/sarif-schema-2.1.0.json).
@@ -51,7 +51,7 @@ Any valid SARIF 2.1.0 output file can be uploaded, however, {% data variables.pr
| Name | Description |
|----|----|
| `$schema` | **Required.** The URI of the SARIF JSON schema for version 2.1.0. For example, `https://raw.githubusercontent.com/oasis-tcs/sarif-spec/master/Schemata/sarif-schema-2.1.0.json`. |
| `version` | **Required.** {% data variables.product.prodname_code_scanning_capc %} only supports SARIF version `2.1.0`.
| `version` | **Required.** {% data variables.product.prodname_code_scanning_capc %} only supports SARIF version `2.1.0`.
| `runs[]` | **Required.** A SARIF file contains an array of one or more runs. Each run represents a single run of an analysis tool. For more information about a `run`, see the [`run` object](#run-object).
#### `run` object
@@ -61,7 +61,7 @@ Any valid SARIF 2.1.0 output file can be uploaded, however, {% data variables.pr
| Name | Description |
|----|----|
| `tool.driver.name` | **Required.** The name of the analysis tool. {% data variables.product.prodname_code_scanning_capc %} displays the name on {% data variables.product.prodname_dotcom %} to allow you to filter results by tool. |
| `tool.driver.version` | **Optional.** The version of the analysis tool. {% data variables.product.prodname_code_scanning_capc %} uses the version number to track when results may have changed due to a tool version change rather than a change in the code being analyzed. If the SARIF file includes the `semanticVersion` field, `version` is not used by {% data variables.product.prodname_code_scanning %}. |
| `tool.driver.version` | **Optional.** The version of the analysis tool. {% data variables.product.prodname_code_scanning_capc %} uses the version number to track when results may have changed due to a tool version change rather than a change in the code being analyzed. If the SARIF file includes the `semanticVersion` field, `version` is not used by {% data variables.product.prodname_code_scanning %}. |
| `tool.driver.semanticVersion` | **Optional.** The version of the analysis tool, specified by the Semantic Versioning 2.0 format. {% data variables.product.prodname_code_scanning_capc %} uses the version number to track when results may have changed due to a tool version change rather than a change in the code being analyzed. If the SARIF file includes the `semanticVersion` field, `version` is not used by {% data variables.product.prodname_code_scanning %}. For more information, see "[Semantic Versioning 2.0.0](https://semver.org/)" in the Semantic Versioning documentation. |
| `tool.driver.rules[]` | **Required.** An array of `reportingDescriptor` objects that represent rules. The analysis tool uses rules to find problems in the code being analyzed. For more information, see the [`reportingDescriptor` object](#reportingdescriptor-object). |
| `results[]` | **Required.** The results of the analysis tool. {% data variables.product.prodname_code_scanning_capc %} displays the results on {% data variables.product.prodname_dotcom %}. For more information, see the [`result` object](#result-object).
@@ -73,12 +73,12 @@ Any valid SARIF 2.1.0 output file can be uploaded, however, {% data variables.pr
| `id` | **Required.** A unique identifier for the rule. The `id` is referenced from other parts of the SARIF file and may be used by {% data variables.product.prodname_code_scanning %} to display URLs on {% data variables.product.prodname_dotcom %}. |
| `name` | **Optional.** The name of the rule. {% data variables.product.prodname_code_scanning_capc %} displays the name to allow results to be filtered by rule on {% data variables.product.prodname_dotcom %}. |
| `shortDescription.text` | **Required.** A concise description of the rule. {% data variables.product.prodname_code_scanning_capc %} displays the short description on {% data variables.product.prodname_dotcom %} next to the associated results.
| `fullDescription.text` | **Required.** A description of the rule. {% data variables.product.prodname_code_scanning_capc %} displays the full description on {% data variables.product.prodname_dotcom %} next to the associated results. The max number of characters is limited to 1000.
| `fullDescription.text` | **Required.** A description of the rule. {% data variables.product.prodname_code_scanning_capc %} displays the full description on {% data variables.product.prodname_dotcom %} next to the associated results. The max number of characters is limited to 1000.
| `defaultConfiguration.level` | **Optional.** Default severity level of the rule. {% data variables.product.prodname_code_scanning_capc %} uses severity levels to help you understand how critical the result is for a given rule. This value can be overridden by the `level` attribute in the `result` object. For more information, see the [`result` object](#result-object). Default: `warning`.
| `help.text` | **Required.** Documentation for the rule using text format. {% data variables.product.prodname_code_scanning_capc %} displays this help documentation next to the associated results.
| `help.markdown` | **Recommended.** Documentation for the rule using Markdown format. {% data variables.product.prodname_code_scanning_capc %} displays this help documentation next to the associated results. When `help.markdown` is available, it is displayed instead of `help.text`.
| `properties.tags[]` | **Optional.** An array of strings. {% data variables.product.prodname_code_scanning_capc %} uses `tags` to allow you to filter results on {% data variables.product.prodname_dotcom %}. For example, it is possible to filter to all results that have the tag `security`.
| `properties.precision` | **Recommended.** A string that indicates how often the results indicated by this rule are true. For example, if a rule has a known high false-positive rate, the precision should be `low`. {% data variables.product.prodname_code_scanning_capc %} orders results by precision on {% data variables.product.prodname_dotcom %} so that the results with the highest `level`, and highest `precision` are shown first. Can be one of: `very-high`, `high`, `medium`, or `low`.
| `properties.precision` | **Recommended.** A string that indicates how often the results indicated by this rule are true. For example, if a rule has a known high false-positive rate, the precision should be `low`. {% data variables.product.prodname_code_scanning_capc %} orders results by precision on {% data variables.product.prodname_dotcom %} so that the results with the highest `level`, and highest `precision` are shown first. Can be one of: `very-high`, `high`, `medium`, or `low`.
#### `result` object
@@ -88,7 +88,7 @@ Any valid SARIF 2.1.0 output file can be uploaded, however, {% data variables.pr
| `ruleIndex`| **Optional.** The index of the associated rule (`reportingDescriptor` object) in the tool component `rules` array. For more information, see the [`run` object](#run-object).
| `rule`| **Optional.** A reference used to locate the rule (reporting descriptor) for this result. For more information, see the [`reportingDescriptor` object](#reportingdescriptor-object).
| `level`| **Optional.** The severity of the result. This level overrides the default severity defined by the rule. {% data variables.product.prodname_code_scanning_capc %} uses the level to filter results by severity on {% data variables.product.prodname_dotcom %}.
| `message.text`| **Required.** A message that describes the result. {% data variables.product.prodname_code_scanning_capc %} displays the message text as the title of the result. Only the first sentence of the message will be displayed when visible space is limited.
| `message.text`| **Required.** A message that describes the result. {% data variables.product.prodname_code_scanning_capc %} displays the message text as the title of the result. Only the first sentence of the message will be displayed when visible space is limited.
| `locations[]`| **Required.** The set of locations where the result was detected. Only one location should be included unless the problem can only be corrected by making a change at every specified location. **Note:** At least one location is required for {% data variables.product.prodname_code_scanning %} to display a result. {% data variables.product.prodname_code_scanning_capc %} will use this property to decide which file to annotate with the result. Only the first value of this array is used. All other values are ignored.
| `partialFingerprints`| **Required.** A set of strings used to track the unique identity of the result. {% data variables.product.prodname_code_scanning_capc %} uses `partialFingerprints` to accurately identify which results are the same across commits and branches. {% data variables.product.prodname_code_scanning_capc %} will attempt to use `partialFingerprints` if they exist. If you are uploading third-party SARIF files with the `upload-action`, the action will create `partialFingerprints` for you when they are not included in the SARIF file. For more information, see "[Preventing duplicate alerts using fingerprints](#preventing-duplicate-alerts-using-fingerprints)." **Note:** {% data variables.product.prodname_code_scanning_capc %} only uses the `primaryLocationLineHash`.
| `codeFlows[].threadFlows[].locations[]`| **Optional.** An array of `location` objects for a `threadFlow` object, which describes the progress of a program through a thread of execution. A `codeFlow` object describes a pattern of code execution used to detect a result. If code flows are provided, {% data variables.product.prodname_code_scanning %} will expand code flows on {% data variables.product.prodname_dotcom %} for the relevant result. For more information, see the [`location` object](#location-object).
@@ -97,7 +97,7 @@ Any valid SARIF 2.1.0 output file can be uploaded, however, {% data variables.pr
#### `location` object
A location within a programming artifact, such as a file in the repository or a file that was generated during a build.
A location within a programming artifact, such as a file in the repository or a file that was generated during a build.
| Name | Description |
|----|----|
@@ -109,7 +109,7 @@ A location within a programming artifact, such as a file in the repository or a
| Name | Description |
|----|----|
| `artifactLocation.uri`| **Required.** A URI indicating the location of an artifact, usually a file either in the repository or generated during a build. If the URI is relative, it should be relative to the root of the {% data variables.product.prodname_dotcom %} repository being analyzed. For example, main.js or src/script.js are relative to the root of the repository. If the URI is absolute, {% data variables.product.prodname_code_scanning %} can use the URI to checkout the artifact and match up files in the repository. For example, `https://github.com/github/example/blob/00/src/promiseUtils.js`.
| `artifactLocation.uri`| **Required.** A URI indicating the location of an artifact, usually a file either in the repository or generated during a build. If the URI is relative, it should be relative to the root of the {% data variables.product.prodname_dotcom %} repository being analyzed. For example, main.js or src/script.js are relative to the root of the repository. If the URI is absolute, {% data variables.product.prodname_code_scanning %} can use the URI to checkout the artifact and match up files in the repository. For example, `https://github.com/ghost/example/blob/00/src/promiseUtils.js`.
| `region.startLine` | **Required.** The line number of the first character in the region.
| `region.startColumn` | **Required.** The column number of the first character in the region.
| `region.endLine` | **Required.** The line number of the last character in the region.

View File

@@ -27,7 +27,7 @@ If you want to explore repositories about a certain topic, find projects to cont
The `is:featured` search qualifier will narrow search results to the topics with the most repositories on {% data variables.product.product_name %}. These topics are also featured at https://github.com/topics/.
The `is:curated` search qualifier will narrow search results to topics that community members have added extra information to. For more information, see the explore repository at https://github.com/github/explore.
The `is:curated` search qualifier will narrow search results to topics that community members have added extra information to. For more information, see the [explore repository](https://github.com/github/explore).
You can filter topics based when they were created using the date parameter and `created:` or based on how many repositories are associated with this topic using `repositories:n`. Both of these qualifiers can use the [greater than and less than range qualifiers](/articles/understanding-the-search-syntax).

View File

@@ -5,14 +5,14 @@ by [automation](../script/graphql/README.md). These files **should not** be edit
Dotcom source files:
```
https://github.com/github/github/tree/master/config/schema.docs.graphql
https://github.com/github/github/tree/master/config/graphql_previews.yml
https://github.com/github/github/tree/master/config/graphql_upcoming_changes.yml
config/schema.docs.graphql
config/graphql_previews.yml
graphql_upcoming_changes.yml
```
Enterprise source files:
```
https://github.com/github/github/tree/enterprise-VERSION-release/config/schema.docs-enterprise.graphql
https://github.com/github/github/tree/enterprise-VERSION-release/config/graphql_previews.enterprise.yml
https://github.com/github/github/tree/enterprise-VERSION-release/config/graphql_upcoming_changes.public-enterprise.yml
enterprise-VERSION-release/config/schema.docs-enterprise.graphql
enterprise-VERSION-release/config/graphql_previews.enterprise.yml
enterprise-VERSION-release/config/graphql_upcoming_changes.public-enterprise.yml
```

View File

@@ -1,4 +1,4 @@
1. From the application server, navigate to the latest release of {% data variables.product.prodname_insights %} on the [Releases page](https://github.com/github/insights-releases/releases/latest) for `github/insights-releases`.
1. From the application server, navigate to the latest release of {% data variables.product.prodname_insights %} on the Releases page for `github/insights-releases`.
2. To download the latest release, under "Assets", click `insights-VERSION.tar.gz`.
![Installation assset](/assets/images/help/insights/installation-tgz.png)
3. Unzip the directory.

View File

@@ -1,4 +1,4 @@
# Use this variable wherever backticks are necessary: https://github.com/github/docs-internal/pull/1176#discussion-diff-19853931
# Use this variable wherever backticks are necessary
backticks: >-
{% if currentVersion == "free-pro-team@latest" %}github.com{% else %}[hostname]{% endif %}

View File

@@ -2,5 +2,4 @@
export default function () {
// TODO support "Run in Explorer" links in GraphQL guides
// will need to handle query params separately from search queries
// see JS block at https://github.com/github/internal-developer.github.com/blob/master/assets/javascripts/documentation.js#L230
}

View File

@@ -6,7 +6,7 @@ const s3ConfigPath = path.join(homedir, '.s3cfg')
// check for config files
if (!(fs.existsSync(awsCredsPath) || fs.existsSync(s3ConfigPath))) {
console.error('You need to set up awssume and s3cmd. Follow the steps at https://github.com/github/product-documentation/blob/master/doc-team-workflows/workflow-information-for-all-writers/setting-up-awssume-and-s3cmd.md')
console.error('You need to set up awssume and s3cmd. Follow the steps at docs-content/doc-team-workflows/workflow-information-for-all-writers/setting-up-awssume-and-s3cmd.md')
process.exit(1)
}

View File

@@ -1,7 +1,7 @@
const versionSatisfiesRange = require('./version-satisfies-range')
// GHES Release Lifecycle Dates:
// https://github.com/github/enterprise-releases/blob/master/docs/supported-versions.md#release-lifecycle-dates
// enterprise-releases/docs/supported-versions.md#release-lifecycle-dates
const dates = require('../lib/enterprise-dates.json')
const supported = [

View File

@@ -104,7 +104,7 @@ function frontmatter (markdown, opts = {}) {
const defaults = {
schema,
validateKeyNames: true,
validateKeyOrder: false // TODO: enable this once we've sorted all the keys. See https://github.com/github/docs-internal/issues/9658
validateKeyOrder: false // TODO: enable this once we've sorted all the keys. See issue 9658
}
return parse(markdown, Object.assign({}, defaults, opts))

View File

@@ -32,7 +32,7 @@ class Page {
this.fullPath = slash(path.join(this.basePath, this.relativePath))
this.raw = fs.readFileSync(this.fullPath, 'utf8')
// TODO remove this when https://github.com/github/crowdin-support/issues/66 has been resolved
// TODO remove this when crowdin-support issue 66 has been resolved
if (this.languageCode !== 'en' && this.raw.includes(': verdadero')) {
this.raw = this.raw.replace(': verdadero', ': true')
}

View File

@@ -5,7 +5,7 @@ const got = require('got')
// This module handles requests for the CSS and JS assets for
// deprecated GitHub Enterprise versions by routing them to static content in
// https://github.com/github/help-docs-archived-enterprise-versions
// help-docs-archived-enterprise-versions
//
// See also ./archived-enterprise-versions.js for non-CSS/JS paths

View File

@@ -8,8 +8,7 @@ const got = require('got')
const findPage = require('../lib/find-page')
// This module handles requests for deprecated GitHub Enterprise versions
// by routing them to static content in
// https://github.com/github/help-docs-archived-enterprise-versions
// by routing them to static content in help-docs-archived-enterprise-versions
module.exports = async (req, res, next) => {
const { isArchived, requestedVersion } = isArchivedVersion(req)

View File

@@ -8,7 +8,7 @@ ownership:
team: github/docs-engineering
maintainer: zeke
exec_sponsor: danaiszuul
product_manager: jwargo
product_manager: simpsoka
mention: github/docs-engineering
qos: critical
dependencies: []

View File

@@ -73,7 +73,7 @@ This script is run automatically when you run the server locally. It checks whet
### [`check-s3-images.js`](check-s3-images.js)
Run this script in your branch to check whether any images referenced in content are not in an expected S3 bucket. You will need to authenticate to S3 via `awssume` to use this script. Instructions for the one-time setup are [here](https://github.com/github/product-documentation/blob/master/doc-team-workflows/workflow-information-for-all-writers/setting-up-awssume-and-s3cmd.md).
Run this script in your branch to check whether any images referenced in content are not in an expected S3 bucket. You will need to authenticate to S3 via `awssume` to use this script.
---
@@ -304,14 +304,14 @@ This script is run as a git precommit hook (installed by husky after npm install
### [`purge-fastly`](purge-fastly)
Run this script to manually purge the [Fastly cache](https://github.com/github/docs-internal#fastly-cdn). Note this script requires a `FASTLY_SERVICE_ID` and `FASTLY_TOKEN` in your `.env` file.
Run this script to manually purge the Fastly cache. Note this script requires a `FASTLY_SERVICE_ID` and `FASTLY_TOKEN` in your `.env` file.
---
### [`purge-fastly-by-url.js`](purge-fastly-by-url.js)
Run this script to manually purge the [Fastly cache](https://github.com/github/docs-internal#fastly-cdn) for all language variants of a single URL or for a batch of URLs in a file. This script does not require authentication.
Run this script to manually purge the Fastly cache for all language variants of a single URL or for a batch of URLs in a file. This script does not require authentication.
---
@@ -362,11 +362,11 @@ Examples:
reset a single translated file using a relative path: $ script/reset-translated-file.js translations/es-XL/content/actions/index.md
reset a single translated file using a full path: $ script/reset-translated-file.js /Users/z/git/github/docs-internal/translations/es-XL/content/actions/index.md
reset a single translated file using a full path: $ script/reset-translated-file.js /Users/z/git/github/docs/translations/es-XL/content/actions/index.md
reset all language variants of a single English file (using a relative path): $ script/reset-translated-file.js content/actions/index.md $ script/reset-translated-file.js data/ui.yml
reset all language variants of a single English file (using a full path): $ script/reset-translated-file.js /Users/z/git/github/docs-internal/content/desktop/index.md $ script/reset-translated-file.js /Users/z/git/github/docs-internal/data/ui.yml
reset all language variants of a single English file (using a full path): $ script/reset-translated-file.js /Users/z/git/github/docs/content/desktop/index.md $ script/reset-translated-file.js /Users/z/git/github/docs/data/ui.yml
---
@@ -422,7 +422,7 @@ Starts the local development server with all of the available languages enabled.
### [`standardize-frontmatter-order.js`](standardize-frontmatter-order.js)
Run this script to standardize frontmatter fields in all content files, per the order decided in https://github.com/github/docs-internal/issues/9658#issuecomment-485536265.
Run this script to standardize frontmatter fields in all content files.
---
@@ -443,7 +443,7 @@ List all the TODOs in our JavaScript files and stylesheets.
### [`update-enterprise-dates.js`](update-enterprise-dates.js)
Run this script during Enterprise releases and deprecations. It uses the GitHub API to get dates from [`enterprise-releases`](https://github.com/github/enterprise-releases/blob/master/releases.json) and updates `lib/enterprise-dates.json`. The help site uses this JSON to display dates at the top of some Enterprise versions.
Run this script during Enterprise releases and deprecations. It uses the GitHub API to get dates from `enterprise-releases` and updates `lib/enterprise-dates.json`. The help site uses this JSON to display dates at the top of some Enterprise versions.
This script requires that you have a GitHub Personal Access Token in a `.env` file. If you don't have a token, get one [here](https://github.com/settings/tokens/new?scopes=repo&description=docs-dev). If you don't have an `.env` file in your docs checkout, run this command in Terminal:
@@ -465,7 +465,7 @@ This script crawls the script directory, hooks on special comment markers in eac
### [`update-s3cmd-config.js`](update-s3cmd-config.js)
This script is used by other scripts to update temporary AWS credentials and authenticate to S3. See docs at [Setting up awssume and S3cmd](https://github.com/github/product-documentation/tree/master/doc-team-workflows/workflow-information-for-all-writers/setting-up-awssume-and-s3cmd.md).
This script is used by other scripts to update temporary AWS credentials and authenticate to S3.
---

View File

@@ -22,7 +22,7 @@ const versionsToCheck = Object.keys(allVersions)
//
// Run this script in your branch to check whether any images referenced in content are
// not in an expected S3 bucket. You will need to authenticate to S3 via `awssume` to use this script.
// Instructions for the one-time setup are [here](https://github.com/github/product-documentation/blob/master/doc-team-workflows/workflow-information-for-all-writers/setting-up-awssume-and-s3cmd.md).
// Instructions for the one-time setup are at docs-content/doc-team-workflows/workflow-information-for-all-writers/setting-up-awssume-and-s3cmd.md
//
// [end-readme]

View File

@@ -180,7 +180,6 @@ async function createRedirectPages (permalinks, pages, finalDirectory) {
console.log('done creating redirect files!\n')
}
// prior art: https://github.com/github/help-docs-archived-enterprise-versions/blob/master/2.12/user/leave-a-repo/index.html
// redirect html files already exist in <=2.12 because these versions were deprecated on the old static site
function getRedirectHtml (newPath) {
return `<!DOCTYPE html>

View File

@@ -9,4 +9,4 @@ These scripts update the [static JSON files](../../lib/graphql/static) used to
render GraphQL docs. See the [`lib/graphql/README`](../../lib/graphql/README.md)
for more info.
**Note**: The changelog script pulls content from [the internal-developer repo](https://github.com/github/internal-developer.github.com/tree/master/content/v4/changelog). It relies on [graphql-docs automation](https://github.com/github/graphql-docs/blob/master/lib/graphql_docs/update_internal_developer/change_log.rb) running daily to update the changelog files in internal-developer.
**Note**: The changelog script pulls content from the internal-developer repo. It relies on graphql-docs automation running daily to update the changelog files in internal-developer.

View File

@@ -127,7 +127,7 @@ function cleanPreviewTitle (title) {
/**
* Turn the given title into an HTML-ready anchor.
* (ported from https://github.com/github/graphql-docs/blob/master/lib/graphql_docs/update_internal_developer/change_log.rb#L281)
* (ported from graphql-docs/lib/graphql_docs/update_internal_developer/change_log.rb#L281)
* @param {string} [previewTitle]
* @return {string}
*/
@@ -155,7 +155,7 @@ function cleanMessagesFromChanges (changes) {
* Split `changesToReport` into two parts,
* one for changes in the main schema,
* and another for changes that are under preview.
* (Ported from https://github.com/github/graphql-docs/blob/7e6a5ccbf13cc7d875fee65527b25bc49e886b41/lib/graphql_docs/update_internal_developer/change_log.rb#L230)
* (Ported from /graphql-docs/lib/graphql_docs/update_internal_developer/change_log.rb#L230)
* @param {Array<object>} changesToReport
* @param {object} previews
* @return {object}
@@ -203,7 +203,7 @@ function segmentPreviewChanges (changesToReport, previews) {
// Deprecations are covered by "upcoming changes."
// By listing the changes explicitly here, we can make sure that,
// if the library changes, we don't miss publishing anything that we mean to.
// This was originally ported from https://github.com/github/graphql-docs/blob/7e6a5ccbf13cc7d875fee65527b25bc49e886b41/lib/graphql_docs/update_internal_developer/change_log.rb#L35-L103
// This was originally ported from graphql-docs/lib/graphql_docs/update_internal_developer/change_log.rb#L35-L103
const CHANGES_TO_REPORT = [
ChangeType.FieldArgumentDefaultChanged,
ChangeType.FieldArgumentTypeChanged,

View File

@@ -8,7 +8,7 @@ if ARGV.empty?
exit 1
end
# borrowed from https://github.com/github/graphql-docs/blob/master/lib/graphql_docs/update_internal_developer/idl.rb
# borrowed from graphql-docs/lib/graphql_docs/update_internal_developer/idl.rb
class Printer < GraphQL::Language::DocumentFromSchemaDefinition
def build_object_type_node(object_type)
apply_directives_to_node(object_type, super)

View File

@@ -2,7 +2,7 @@
# [start-readme]
#
# Run this script to manually purge the [Fastly cache](https://github.com/github/docs-internal#fastly-cdn).
# Run this script to manually purge the Fastly cache.
# Note this script requires a `FASTLY_SERVICE_ID` and `FASTLY_TOKEN` in your `.env` file.
#
# [end-readme]

View File

@@ -9,7 +9,7 @@ const { getPathWithoutLanguage } = require('../lib/path-utils')
// [start-readme]
//
// Run this script to manually purge the [Fastly cache](https://github.com/github/docs-internal#fastly-cdn)
// Run this script to manually purge the Fastly cache
// for all language variants of a single URL or for a batch of URLs in a file. This script does
// not require authentication.
//

View File

@@ -14,7 +14,15 @@ const contentFiles = walk(contentDir, { includeBasePath: true })
// [start-readme]
//
// Run this script to standardize frontmatter fields in all content files,
// per the order decided in https://github.com/github/docs-internal/issues/9658#issuecomment-485536265.
// per the order:
// - title
// - intro
// - product callout
// - productVersion
// - map topic status
// - hidden status
// - layout
// - redirect
//
// [end-readme]

View File

@@ -9,7 +9,7 @@ const jsonFile = require(filename)
// [start-readme]
//
// Run this script during Enterprise releases and deprecations.
// It uses the GitHub API to get dates from [`enterprise-releases`](https://github.com/github/enterprise-releases/blob/master/releases.json) and updates `lib/enterprise-dates.json`.
// It uses the GitHub API to get dates from enterprise-releases and updates `lib/enterprise-dates.json`.
// The help site uses this JSON to display dates at the top of some Enterprise versions.
//
// This script requires that you have a GitHub Personal Access Token in a `.env` file.
@@ -26,8 +26,7 @@ const jsonFile = require(filename)
main()
// GHE Release Lifecycle Dates:
// https://github.com/github/enterprise-releases/blob/master/releases.json
// GHE Release Lifecycle Dates
async function main () {
let raw
try {
@@ -38,7 +37,7 @@ async function main () {
}
const json = prepareData(raw)
if (json === prettify(jsonFile)) {
console.log('This repo is already in sync with https://github.com/github/enterprise-releases/blob/master/releases.json!')
console.log('This repo is already in sync with enterprise-releases!')
} else {
fs.writeFileSync(filename, json, 'utf8')
console.log(`${filename} has been updated!`)

View File

@@ -5,7 +5,6 @@ const authenticateToAWS = require('../lib/authenticate-to-aws.js')
// [start-readme]
//
// This script is used by other scripts to update temporary AWS credentials and authenticate to S3.
// See docs at [Setting up awssume and S3cmd](https://github.com/github/product-documentation/tree/master/doc-team-workflows/workflow-information-for-all-writers/setting-up-awssume-and-s3cmd.md).
//
// [end-readme]

View File

@@ -0,0 +1,59 @@
const walkSync = require('walk-sync')
const fs = require('fs').promises
const REPO_REGEXP = /\/\/github\.com\/github\/(?!docs[/'"\n])([\w-.]+)/gi
// These are a list of known public repositories in the GitHub organization
const ALLOW_LIST = new Set([
'site-policy',
'roadmap',
'linguist',
'super-linter',
'backup-utils',
'codeql-action-sync-tool',
'codeql-action',
'platform-samples',
'github-services',
'explore',
'markup',
'hubot',
'VisualStudio',
'codeql',
'gitignore',
'feedback',
'semantic',
'git-lfs',
'git-sizer',
'dmca',
'gov-takedowns',
'janky',
'rest-api-description',
'smimesign',
'tweetsodium',
'choosealicense.com'
])
describe('check for repository references', () => {
const filenames = walkSync(process.cwd(), {
directories: false,
ignore: [
'.git',
'dist',
'node_modules',
'translations',
'lib/rest/**/*.json',
'lib/webhooks/**/*.json',
'ownership.yaml',
'docs/index.yaml',
'lib/excluded-links.js'
]
})
test.each(filenames)('in file %s', async (filename) => {
const file = await fs.readFile(filename, 'utf8')
const matches = Array.from(file.matchAll(REPO_REGEXP))
.map(([, repoName]) => repoName)
.filter(repoName => !ALLOW_LIST.has(repoName))
expect(matches).toHaveLength(0)
})
})

View File

@@ -91,7 +91,7 @@ describe('server', () => {
expect($.res.statusCode).toBe(400)
})
// see https://github.com/github/docs-internal/issues/12427
// see issue 12427
test('renders a 404 for leading slashes', async () => {
let $ = await getDOM('//foo.com/enterprise')
expect($('h1').text()).toBe('Ooops!')
@@ -131,7 +131,7 @@ describe('server', () => {
expect($('div.permissions-statement').text()).toContain('GitHub Pages site')
})
// see https://github.com/github/docs-internal/issues/9678
// see issue 9678
test('does not use cached intros in map topics', async () => {
let $ = await getDOM('/en/github/importing-your-projects-to-github/importing-a-git-repository-using-the-command-line')
const articleIntro = $('.lead-mktg').text()