зеркало из https://github.com/github/docs.git
Clean up redundant ifversion statements (1) (#49670)
Co-authored-by: mc <42146119+mchammer01@users.noreply.github.com>
This commit is contained in:
Родитель
05ded54947
Коммит
1b29d6ac58
|
@ -392,7 +392,7 @@ You can use the `ignore` option to customize which dependencies are updated. The
|
|||
|
||||
| Option | Description |
|
||||
|--------|-------------|
|
||||
|<code><span style="white-space: nowrap;">dependency-name</span></code> | Use to ignore updates for dependencies with matching names, optionally using `*` to match zero or more characters.</br>For Java dependencies, the format of the `dependency-name` attribute is: `groupId:artifactId` (for example: `org.kohsuke:github-api`).</br>{% ifversion dependabot-grouped-dependencies %} To prevent {% data variables.product.prodname_dependabot %} from automatically updating TypeScript type definitions from DefinitelyTyped, use `@types/*`.{% endif %} |
|
||||
|<code><span style="white-space: nowrap;">dependency-name</span></code> | Use to ignore updates for dependencies with matching names, optionally using `*` to match zero or more characters.</br>For Java dependencies, the format of the `dependency-name` attribute is: `groupId:artifactId` (for example: `org.kohsuke:github-api`).</br> To prevent {% data variables.product.prodname_dependabot %} from automatically updating TypeScript type definitions from DefinitelyTyped, use `@types/*`. |
|
||||
| `versions` | Use to ignore specific versions or ranges of versions. If you want to define a range, use the standard pattern for the package manager.</br>For example, for npm, use `^1.0.0`; for Bundler, use `~> 2.0`; for Docker, use Ruby version syntax; for NuGet, use `7.*`. |
|
||||
| <code><span style="white-space: nowrap;">update-types</span></code> | Use to ignore types of updates, such as semver `major`, `minor`, or `patch` updates on version updates (for example: `version-update:semver-patch` will ignore patch updates). You can combine this with `dependency-name: "*"` to ignore particular `update-types` for all dependencies.</br>Currently, `version-update:semver-major`, `version-update:semver-minor`, and `version-update:semver-patch` are the only supported options. |
|
||||
|
||||
|
@ -971,7 +971,6 @@ The `docker-registry` type supports username and password. {% data reusables.dep
|
|||
|
||||
{% data reusables.dependabot.dependabot-updates-path-match %}
|
||||
|
||||
{% ifversion dependabot-private-registries %}
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
|
@ -985,23 +984,9 @@ registries:
|
|||
```
|
||||
|
||||
{% endraw %}
|
||||
{% else %}
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
registries:
|
||||
dockerhub:
|
||||
type: docker-registry
|
||||
url: https://registry.hub.docker.com
|
||||
username: octocat
|
||||
password: ${{secrets.MY_DOCKERHUB_PASSWORD}}
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
{% endif %}
|
||||
|
||||
The `docker-registry` type can also be used to pull from private Amazon ECR using static AWS credentials.
|
||||
{% ifversion dependabot-private-registries %}
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
|
@ -1015,20 +1000,6 @@ registries:
|
|||
```
|
||||
|
||||
{% endraw %}
|
||||
{% else %}
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
registries:
|
||||
ecr-docker:
|
||||
type: docker-registry
|
||||
url: https://1234567890.dkr.ecr.us-east-1.amazonaws.com
|
||||
username: ${{secrets.ECR_AWS_ACCESS_KEY_ID}}
|
||||
password: ${{secrets.ECR_AWS_SECRET_ACCESS_KEY}}
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
{% endif %}
|
||||
|
||||
### `git`
|
||||
|
||||
|
@ -1095,7 +1066,6 @@ The `maven-repository` type supports username and password. {% data reusables.de
|
|||
|
||||
{% data reusables.dependabot.dependabot-updates-path-match %}
|
||||
|
||||
{% ifversion dependabot-private-registries %}
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
|
@ -1108,19 +1078,6 @@ registries:
|
|||
```
|
||||
|
||||
{% endraw %}
|
||||
{% else %}
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
registries:
|
||||
maven-artifactory:
|
||||
type: maven-repository
|
||||
url: https://acme.jfrog.io/artifactory/my-maven-registry
|
||||
username: octocat
|
||||
password: ${{secrets.MY_ARTIFACTORY_PASSWORD}}
|
||||
```
|
||||
|
||||
{% endraw %}{% endif %}
|
||||
|
||||
### `npm-registry`
|
||||
|
||||
|
@ -1134,7 +1091,6 @@ When using username and password, your `.npmrc`'s auth token may contain a `base
|
|||
|
||||
{% endnote %}
|
||||
|
||||
{% ifversion dependabot-private-registries %}
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
|
@ -1161,33 +1117,8 @@ registries:
|
|||
```
|
||||
|
||||
{% endraw %}
|
||||
{% else %}
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
registries:
|
||||
npm-npmjs:
|
||||
type: npm-registry
|
||||
url: https://registry.npmjs.org
|
||||
username: octocat
|
||||
password: ${{secrets.MY_NPM_PASSWORD}} # Must be an unencoded password
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
registries:
|
||||
npm-github:
|
||||
type: npm-registry
|
||||
url: https://npm.pkg.github.com
|
||||
token: ${{secrets.MY_GITHUB_PERSONAL_TOKEN}}
|
||||
```
|
||||
|
||||
{% endraw %} {% endif %}
|
||||
{% ifversion dependabot-yarn-v3-update %}
|
||||
For security reasons, {% data variables.product.prodname_dependabot %} does not set environment variables. Yarn (v2 and later) requires that any accessed environment variables are set. When accessing environment variables in your `.yarnrc.yml` file, you should provide a fallback value such as {% raw %}`${ENV_VAR-fallback}`{% endraw %} or {% raw %}`${ENV_VAR:-fallback}`{% endraw %}. For more information, see [Yarnrc files](https://yarnpkg.com/configuration/yarnrc) in the Yarn documentation.{% endif %}
|
||||
For security reasons, {% data variables.product.prodname_dependabot %} does not set environment variables. Yarn (v2 and later) requires that any accessed environment variables are set. When accessing environment variables in your `.yarnrc.yml` file, you should provide a fallback value such as {% raw %}`${ENV_VAR-fallback}`{% endraw %} or {% raw %}`${ENV_VAR:-fallback}`{% endraw %}. For more information, see [Yarnrc files](https://yarnpkg.com/configuration/yarnrc) in the Yarn documentation.
|
||||
|
||||
### `nuget-feed`
|
||||
|
||||
|
@ -1286,7 +1217,6 @@ The `rubygems-server` type supports username and password, or token. {% data reu
|
|||
|
||||
{% data reusables.dependabot.dependabot-updates-path-match %}
|
||||
|
||||
{% ifversion dependabot-private-registries %}
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
|
@ -1313,31 +1243,6 @@ registries:
|
|||
```
|
||||
|
||||
{% endraw %}
|
||||
{% else %}
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
registries:
|
||||
ruby-example:
|
||||
type: rubygems-server
|
||||
url: https://rubygems.example.com
|
||||
username: octocat@example.com
|
||||
password: ${{secrets.MY_RUBYGEMS_PASSWORD}}
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
registries:
|
||||
ruby-github:
|
||||
type: rubygems-server
|
||||
url: https://rubygems.pkg.github.com/octocat/github_api
|
||||
token: ${{secrets.MY_GITHUB_PERSONAL_TOKEN}}
|
||||
```
|
||||
|
||||
{% endraw %}{% endif %}
|
||||
|
||||
### `terraform-registry`
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ You can also customize your automated release notes, using labels to create cust
|
|||
{% data reusables.releases.create-release %}
|
||||
{% data reusables.releases.previous-release-tag %}
|
||||
{% data reusables.releases.release-title %}
|
||||
1. Above the description field, click {% ifversion previous-release-tag %}**Generate release notes**{% else %}**Auto-generate release notes**{% endif %}.
|
||||
1. Above the description field, click **Generate release notes**.
|
||||
1. Check the generated notes to ensure they include all (and only) the information you want to include.
|
||||
{% data reusables.releases.finish-release %}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ You can choose whether {% data variables.large_files.product_name_long %} ({% da
|
|||
{% data reusables.releases.release-title %}
|
||||
1. In the "Describe this release" field, type a description for your release.
|
||||
If you @mention anyone in the description, the published release will include a **Contributors** section with an avatar list of all the mentioned users.
|
||||
Alternatively, you can automatically generate your release notes by clicking {% ifversion previous-release-tag %}**Generate release notes**{% else %}**Auto-generate release notes**{% endif %}.
|
||||
Alternatively, you can automatically generate your release notes by clicking **Generate release notes**.
|
||||
{% data reusables.releases.finish-release %}
|
||||
|
||||
{% endwebui %}
|
||||
|
|
|
@ -61,8 +61,6 @@ Within the blame view, you can view the line-by-line revision history for an ent
|
|||
![Screenshot of the "Blame" view of a file. To the right of a commit message, the versions icon is outlined in dark orange.](/assets/images/enterprise/repository/git-blame.png)
|
||||
{% endif %}
|
||||
|
||||
{% ifversion blame-ignore-revs %}
|
||||
|
||||
## Ignore commits in the blame view
|
||||
|
||||
All revisions specified in the `.git-blame-ignore-revs` file, which must be in the root directory of your repository, are hidden from the blame view using Git's `git blame --ignore-revs-file` configuration setting. For more information, see [`git blame --ignore-revs-file`](https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt) in the Git documentation.
|
||||
|
@ -102,8 +100,6 @@ You can also configure your local git so it always ignores the revs in that file
|
|||
git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
```
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Bypassing `.git-blame-ignore-revs` in the blame view
|
||||
|
||||
If the blame view for a file shows **Ignoring revisions in .git-blame-ignore-revs**, you can still bypass `.git-blame-ignore-revs` and see the normal blame view. In the URL, append a `~` to the SHA and the **Ignoring revisions in .git-blame-ignore-revs** banner will disappear.
|
||||
|
|
|
@ -115,12 +115,9 @@ By default, the embedded renderer is 420 pixels wide by 620 pixels high, but you
|
|||
|
||||
{% endtip %}
|
||||
|
||||
{% ifversion mermaid %}
|
||||
|
||||
### Rendering in Markdown
|
||||
|
||||
You can embed ASCII STL syntax directly in Markdown. For more information, see "[AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams#creating-stl-3d-models)."
|
||||
{% endif %}
|
||||
|
||||
## Rendering CSV and TSV data
|
||||
|
||||
|
@ -265,14 +262,11 @@ By default, the embedded map 420px x 620px, but you can customize the output by
|
|||
|
||||
{% endtip %}
|
||||
|
||||
{% ifversion mermaid %}
|
||||
|
||||
### Mapping in Markdown
|
||||
|
||||
You can embed GeoJSON and TopoJSON directly in Markdown. For more information, see "[AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/creating-diagrams#creating-geojson-and-topojson-maps)."
|
||||
|
||||
{% data reusables.advanced-formatting.administrator-must-enable-mapping %}
|
||||
{% endif %}
|
||||
|
||||
### Clustering
|
||||
|
||||
|
@ -323,8 +317,6 @@ jupyter nbconvert --to html NOTEBOOK-NAME.ipynb
|
|||
- [Jupyter Notebook's GitHub repository](https://github.com/jupyter/jupyter_notebook)
|
||||
- [Gallery of Jupyter Notebooks](https://github.com/jupyter/jupyter/wiki)
|
||||
|
||||
{% ifversion mermaid %}
|
||||
|
||||
## Displaying Mermaid files on {% data variables.product.prodname_dotcom %}
|
||||
|
||||
{% data variables.product.product_name %} supports rendering Mermaid files within repositories. Commit the file as you would normally using a `.mermaid` or `.mmd` extension. Then, navigate to the path of the Mermaid file on {% data variables.product.prodname_dotcom %}.
|
||||
|
@ -364,4 +356,3 @@ You can embed Mermaid syntax directly in Markdown. For more information, see "[A
|
|||
|
||||
- [Mermaid.js documentation](https://mermaid-js.github.io/mermaid/#/)
|
||||
- [Mermaid.js live editor](https://mermaid.live/edit)
|
||||
{% endif %}
|
||||
|
|
|
@ -16,6 +16,6 @@ autogenerated: rest
|
|||
|
||||
## About the cache in {% data variables.product.prodname_actions %}
|
||||
|
||||
You can use the REST API to query and manage the cache for repositories in {% data variables.product.prodname_actions %}. {% ifversion actions-cache-management %}You can also install a {% data variables.product.prodname_cli %} extension to manage your caches from the command line. {% endif %}For more information, see "[AUTOTITLE](/actions/using-workflows/caching-dependencies-to-speed-up-workflows#managing-caches)."
|
||||
You can use the REST API to query and manage the cache for repositories in {% data variables.product.prodname_actions %}. You can also install a {% data variables.product.prodname_cli %} extension to manage your caches from the command line. For more information, see "[AUTOTITLE](/actions/using-workflows/caching-dependencies-to-speed-up-workflows#managing-caches)."
|
||||
|
||||
<!-- Content after this section is automatically generated -->
|
||||
|
|
|
@ -53,7 +53,7 @@ Don't share your {% data variables.product.pat_generic %} with others. Instead o
|
|||
|
||||
If you need to share credentials with a team, store the credentials in a secure shared system. For example, you could store and share passwords securely using [1Password](https://1password.com/), or you could store keys in [Azure KeyVault](https://azure.microsoft.com/en-gb/products/key-vault) and manage access with your IAM (Identity and access management).
|
||||
|
||||
If you're creating a {% data variables.product.prodname_actions %} workflow that needs to access the API, you can store your credentials in an encrypted secret, and access the encrypted secret from the workflow. For more information, see "[AUTOTITLE](/actions/security-guides/encrypted-secrets)"{% ifversion projects-v2 %} and "[AUTOTITLE](/apps/creating-github-apps/guides/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow)"{% endif %}.
|
||||
If you're creating a {% data variables.product.prodname_actions %} workflow that needs to access the API, you can store your credentials in an encrypted secret, and access the encrypted secret from the workflow. For more information, see "[AUTOTITLE](/actions/security-guides/encrypted-secrets)" and "[AUTOTITLE](/apps/creating-github-apps/guides/making-authenticated-api-requests-with-a-github-app-in-a-github-actions-workflow)".
|
||||
|
||||
## Use authentication credentials securely in your code
|
||||
|
||||
|
|
|
@ -96,9 +96,6 @@ When a user clicks the button, {% data variables.product.prodname_dotcom %} send
|
|||
|
||||
For a detailed example of how to set up requested actions with the REST API, see "[AUTOTITLE](/apps/creating-github-apps/guides/creating-ci-tests-with-the-checks-api#part-2-creating-the-octo-rubocop-ci-test)."
|
||||
|
||||
{% ifversion status-check-retention %}
|
||||
|
||||
## Retention of checks data
|
||||
|
||||
{% data reusables.pull_requests.retention-checks-data %}
|
||||
{% endif %}
|
||||
|
|
|
@ -20,7 +20,7 @@ autogenerated: rest
|
|||
|
||||
You can use the API to:
|
||||
|
||||
- Enable or disable {% data variables.product.prodname_secret_scanning %}{% ifversion secret-scanning-push-protection %} and push protection{% endif %} for a repository. For more information, see "[AUTOTITLE](/rest/repos/repos#update-a-repository)" and expand the "Properties of the `security_and_analysis` object" section.
|
||||
- Enable or disable {% data variables.product.prodname_secret_scanning %} and push protection for a repository. For more information, see "[AUTOTITLE](/rest/repos/repos#update-a-repository)" and expand the "Properties of the `security_and_analysis` object" section.
|
||||
- Retrieve and update {% data variables.secret-scanning.alerts %} from a repository. For further details, see the sections below.
|
||||
|
||||
For more information about {% data variables.product.prodname_secret_scanning %}, see "[AUTOTITLE](/code-security/secret-scanning/about-secret-scanning)."
|
||||
|
|
|
@ -16,7 +16,7 @@ topics:
|
|||
|
||||
**Tips:**
|
||||
|
||||
- By default, file finder results exclude some directories like `build`, `log`, `tmp`, and `vendor`. To search for files in these directories, {% ifversion code-search-code-view %}use the [`path` code search qualifier](/search-github/github-code-search/understanding-github-code-search-syntax#path-qualifier){% else %}use the [`filename` code search qualifier](/search-github/searching-on-github/searching-code#search-by-filename){% endif %}.{% ifversion file-finder-exclusion-controls %} Alternatively, you can customize which directories are excluded by default [using a `.gitattributes` file](#customizing-excluded-files).{% endif %}
|
||||
- By default, file finder results exclude some directories like `build`, `log`, `tmp`, and `vendor`. To search for files in these directories, {% ifversion code-search-code-view %}use the [`path` code search qualifier](/search-github/github-code-search/understanding-github-code-search-syntax#path-qualifier){% else %}use the [`filename` code search qualifier](/search-github/searching-on-github/searching-code#search-by-filename){% endif %}. Alternatively, you can customize which directories are excluded by default [using a `.gitattributes` file](#customizing-excluded-files).
|
||||
- You can also open the file finder by pressing `t` on your keyboard. For more information, see "[AUTOTITLE](/get-started/accessibility/keyboard-shortcuts)."
|
||||
|
||||
{% endtip %}
|
||||
|
@ -39,8 +39,6 @@ topics:
|
|||
1. In the list of results, click the file you wanted to find.
|
||||
{% endif %}
|
||||
|
||||
{% ifversion file-finder-exclusion-controls %}
|
||||
|
||||
## Customizing excluded files
|
||||
|
||||
By default, file finder results do not include files in the following directories if they exist at your repository root:
|
||||
|
@ -67,10 +65,8 @@ build/** linguist-generated=false
|
|||
|
||||
Note that this override requires the use of the recursive glob pattern (`**`). For more information, see "[pattern format](https://git-scm.com/docs/gitignore#_pattern_format)" in the Git documentation. More complex overrides of subdirectories within excluded-by-default directories are not supported.
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[AUTOTITLE](/search-github/getting-started-with-searching-on-github/about-searching-on-github)"{% ifversion file-finder-exclusion-controls %}
|
||||
- "[AUTOTITLE](/search-github/getting-started-with-searching-on-github/about-searching-on-github)"
|
||||
- "[AUTOTITLE](/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github)"
|
||||
- [`.gitattributes`](https://git-scm.com/docs/gitattributes) in the Git documentation{% endif %}
|
||||
- [`.gitattributes`](https://git-scm.com/docs/gitattributes) in the Git documentation
|
||||
|
|
|
@ -83,8 +83,6 @@ You can also use the `is` qualifier to find pull requests that are queued to mer
|
|||
|
||||
{% endif %}
|
||||
|
||||
{% ifversion issue-close-reasons %}
|
||||
|
||||
## Search by the reason an issue was closed
|
||||
|
||||
You can filter issues based on the reason given when the issue was closed, using the `reason` qualifier.
|
||||
|
@ -94,8 +92,6 @@ You can filter issues based on the reason given when the issue was closed, using
|
|||
| `reason:completed` | [**libraries is:closed reason:completed**](https://github.com/search?q=libraries+is%3Aclosed+reason%3Acompleted&type=Issues) matches issues with the word "libraries" that were closed as "completed."
|
||||
| `reason:"not planned"` | [**libraries is:closed reason:"not planned"**](https://github.com/search?q=libraries+is%3Aclosed+reason%3A%22not+planned%22&type=Issues) matches issues with the word "libraries" that were closed as "not planned."
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Filter by repository visibility
|
||||
|
||||
You can filter by the visibility of the repository containing the issues and pull requests using the `is` qualifier. For more information, see "[AUTOTITLE](/repositories/creating-and-managing-repositories/about-repositories#about-repository-visibility)."
|
||||
|
|
Загрузка…
Ссылка в новой задаче