@@ -668,7 +668,6 @@ translations/zh-CN/content/authentication/troubleshooting-ssh/using-ssh-over-the
|
||||
translations/zh-CN/content/billing/managing-billing-for-github-actions/about-billing-for-github-actions.md,rendering error
|
||||
translations/zh-CN/content/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security.md,broken liquid tags
|
||||
translations/zh-CN/content/billing/managing-billing-for-github-advanced-security/viewing-your-github-advanced-security-usage.md,rendering error
|
||||
translations/zh-CN/content/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces.md,rendering error
|
||||
translations/zh-CN/content/billing/managing-billing-for-github-copilot/about-billing-for-github-copilot.md,broken liquid tags
|
||||
translations/zh-CN/content/billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription.md,broken liquid tags
|
||||
translations/zh-CN/content/billing/managing-billing-for-github-packages/about-billing-for-github-packages.md,rendering error
|
||||
@@ -733,6 +732,7 @@ translations/zh-CN/content/code-security/security-overview/viewing-the-security-
|
||||
translations/zh-CN/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-accounts.md,rendering error
|
||||
translations/zh-CN/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-code.md,rendering error
|
||||
translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review.md,rendering error
|
||||
translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-supply-chain-security.md,broken liquid tags
|
||||
translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph.md,rendering error
|
||||
translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph.md,broken liquid tags
|
||||
translations/zh-CN/content/codespaces/codespaces-reference/security-in-github-codespaces.md,broken liquid tags
|
||||
@@ -743,13 +743,11 @@ translations/zh-CN/content/codespaces/developing-in-codespaces/the-codespace-lif
|
||||
translations/zh-CN/content/codespaces/prebuilding-your-codespaces/configuring-prebuilds.md,rendering error
|
||||
translations/zh-CN/content/codespaces/setting-up-your-project-for-codespaces/adding-a-codespaces-badge.md,rendering error
|
||||
translations/zh-CN/content/codespaces/setting-up-your-project-for-codespaces/adding-features-to-a-devcontainer-file.md,broken liquid tags
|
||||
translations/zh-CN/content/codespaces/the-githubdev-web-based-editor.md,rendering error
|
||||
translations/zh-CN/content/codespaces/troubleshooting/troubleshooting-prebuilds.md,rendering error
|
||||
translations/zh-CN/content/communities/documenting-your-project-with-wikis/about-wikis.md,rendering error
|
||||
translations/zh-CN/content/communities/documenting-your-project-with-wikis/changing-access-permissions-for-wikis.md,rendering error
|
||||
translations/zh-CN/content/communities/documenting-your-project-with-wikis/editing-wiki-content.md,rendering error
|
||||
translations/zh-CN/content/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors.md,rendering error
|
||||
translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-a-jetbrains-ide.md,broken liquid tags
|
||||
translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-neovim.md,broken liquid tags
|
||||
translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio-code.md,broken liquid tags
|
||||
translations/zh-CN/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio.md,broken liquid tags
|
||||
@@ -765,7 +763,6 @@ translations/zh-CN/content/developers/apps/building-github-apps/rate-limits-for-
|
||||
translations/zh-CN/content/developers/apps/building-oauth-apps/scopes-for-oauth-apps.md,rendering error
|
||||
translations/zh-CN/content/developers/apps/getting-started-with-apps/about-apps.md,rendering error
|
||||
translations/zh-CN/content/developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app.md,rendering error
|
||||
translations/zh-CN/content/developers/apps/guides/creating-ci-tests-with-the-checks-api.md,rendering error
|
||||
translations/zh-CN/content/developers/apps/guides/using-the-github-api-in-your-app.md,rendering error
|
||||
translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/requirements-for-listing-an-app.md,rendering error
|
||||
translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/security-best-practices-for-apps.md,broken liquid tags
|
||||
@@ -816,7 +813,6 @@ translations/zh-CN/content/get-started/quickstart/contributing-to-projects.md,re
|
||||
translations/zh-CN/content/get-started/quickstart/create-a-repo.md,rendering error
|
||||
translations/zh-CN/content/get-started/quickstart/fork-a-repo.md,rendering error
|
||||
translations/zh-CN/content/get-started/quickstart/git-and-github-learning-resources.md,broken liquid tags
|
||||
translations/zh-CN/content/get-started/quickstart/github-glossary.md,broken liquid tags
|
||||
translations/zh-CN/content/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-cloud.md,rendering error
|
||||
translations/zh-CN/content/get-started/signing-up-for-github/verifying-your-email-address.md,rendering error
|
||||
translations/zh-CN/content/get-started/using-git/about-git-rebase.md,rendering error
|
||||
@@ -843,12 +839,11 @@ translations/zh-CN/content/graphql/reference/unions.md,rendering error
|
||||
translations/zh-CN/content/issues/organizing-your-work-with-project-boards/managing-project-boards/changing-project-board-visibility.md,rendering error
|
||||
translations/zh-CN/content/issues/organizing-your-work-with-project-boards/managing-project-boards/copying-a-project-board.md,rendering error
|
||||
translations/zh-CN/content/issues/organizing-your-work-with-project-boards/managing-project-boards/creating-a-project-board.md,rendering error
|
||||
translations/zh-CN/content/issues/planning-and-tracking-with-projects/creating-projects/migrating-from-projects-classic.md,broken liquid tags
|
||||
translations/zh-CN/content/issues/planning-and-tracking-with-projects/creating-projects/migrating-from-projects-classic.md,rendering error
|
||||
translations/zh-CN/content/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue.md,rendering error
|
||||
translations/zh-CN/content/organizations/collaborating-with-groups-in-organizations/about-your-organizations-news-feed.md,rendering error
|
||||
translations/zh-CN/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/about-two-factor-authentication-and-saml-single-sign-on.md,rendering error
|
||||
translations/zh-CN/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization.md,rendering error
|
||||
translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/accessing-compliance-reports-for-your-organization.md,rendering error
|
||||
translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization.md,rendering error
|
||||
translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization.md,rendering error
|
||||
translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization.md,rendering error
|
||||
@@ -969,6 +964,7 @@ translations/zh-CN/content/rest/overview/resources-in-the-rest-api.md,rendering
|
||||
translations/zh-CN/content/rest/overview/troubleshooting.md,broken liquid tags
|
||||
translations/zh-CN/content/rest/packages.md,broken liquid tags
|
||||
translations/zh-CN/content/rest/projects/projects.md,broken liquid tags
|
||||
translations/zh-CN/content/rest/pulls/comments.md,broken liquid tags
|
||||
translations/zh-CN/content/rest/scim.md,rendering error
|
||||
translations/zh-CN/content/rest/teams/team-sync.md,rendering error
|
||||
translations/zh-CN/content/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment.md,rendering error
|
||||
@@ -1016,7 +1012,6 @@ translations/zh-CN/data/reusables/actions/jobs/section-defining-outputs-for-jobs
|
||||
translations/zh-CN/data/reusables/actions/jobs/section-running-jobs-in-a-container.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/actions/more-resources-for-ghes.md,rendering error
|
||||
translations/zh-CN/data/reusables/actions/moving-a-runner-to-a-group.md,rendering error
|
||||
translations/zh-CN/data/reusables/actions/ref_name-description.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/actions/reusable-workflow-artifacts.md,rendering error
|
||||
translations/zh-CN/data/reusables/actions/reusable-workflow-calling-syntax.md,rendering error
|
||||
translations/zh-CN/data/reusables/actions/reusable-workflows.md,rendering error
|
||||
@@ -1065,7 +1060,6 @@ translations/zh-CN/data/reusables/command_line/provide-an-access-token.md,broken
|
||||
translations/zh-CN/data/reusables/copilot/install-copilot-in-neovim.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/dependabot/beta-security-and-version-updates.md,rendering error
|
||||
translations/zh-CN/data/reusables/dependabot/default-dependencies-allow-ignore.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/dependabot/dependabot-alerts-dependency-scope.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/dependabot/dependabot-alerts-filters.md,rendering error
|
||||
translations/zh-CN/data/reusables/dependabot/enabling-disabling-dependency-graph-private-repo.md,rendering error
|
||||
translations/zh-CN/data/reusables/dependabot/sidebar-secret.md,rendering error
|
||||
@@ -1183,6 +1177,7 @@ translations/zh-CN/data/reusables/scim/supported-idps.md,rendering error
|
||||
translations/zh-CN/data/reusables/search/syntax_tips.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/secret-scanning/enterprise-enable-secret-scanning.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/secret-scanning/partner-secret-list-private-repo.md,rendering error
|
||||
translations/zh-CN/data/reusables/secret-scanning/partner-secret-list-public-repo.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/secret-scanning/secret-list-private-push-protection.md,rendering error
|
||||
translations/zh-CN/data/reusables/security-overview/permissions.md,rendering error
|
||||
translations/zh-CN/data/reusables/shortdesc/rate_limits_github_apps.md,rendering error
|
||||
@@ -1191,6 +1186,7 @@ translations/zh-CN/data/reusables/ssh/about-ssh.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/ssh/key-type-support.md,rendering error
|
||||
translations/zh-CN/data/reusables/ssh/rsa-sha-1-connection-failure-criteria.md,rendering error
|
||||
translations/zh-CN/data/reusables/support/help_resources.md,rendering error
|
||||
translations/zh-CN/data/reusables/support/scope-of-support.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/support/submit-a-ticket.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/user-settings/access_applications.md,rendering error
|
||||
translations/zh-CN/data/reusables/user-settings/account_settings.md,rendering error
|
||||
|
||||
|
@@ -581,7 +581,7 @@ translations/pt-BR/content/admin/identity-and-access-management/using-built-in-a
|
||||
translations/pt-BR/content/admin/identity-and-access-management/using-built-in-authentication/inviting-people-to-use-your-instance.md,rendering error
|
||||
translations/pt-BR/content/admin/identity-and-access-management/using-cas-for-enterprise-iam/index.md,rendering error
|
||||
translations/pt-BR/content/admin/identity-and-access-management/using-cas-for-enterprise-iam/using-cas.md,rendering error
|
||||
translations/pt-BR/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users.md,broken liquid tags
|
||||
translations/pt-BR/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users.md,rendering error
|
||||
translations/pt-BR/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-support-for-your-idps-conditional-access-policy.md,rendering error
|
||||
translations/pt-BR/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-oidc-for-enterprise-managed-users.md,rendering error
|
||||
translations/pt-BR/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-saml-single-sign-on-for-enterprise-managed-users.md,rendering error
|
||||
@@ -729,6 +729,7 @@ translations/pt-BR/content/code-security/secret-scanning/protecting-pushes-with-
|
||||
translations/pt-BR/content/code-security/secret-scanning/pushing-a-branch-blocked-by-push-protection.md,rendering error
|
||||
translations/pt-BR/content/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database.md,rendering error
|
||||
translations/pt-BR/content/code-security/security-advisories/guidance-on-reporting-and-writing/managing-privately-reported-security-vulnerabilities.md,rendering error
|
||||
translations/pt-BR/content/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability.md,rendering error
|
||||
translations/pt-BR/content/code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository.md,rendering error
|
||||
translations/pt-BR/content/code-security/security-overview/about-the-security-overview.md,rendering error
|
||||
translations/pt-BR/content/code-security/security-overview/filtering-alerts-in-the-security-overview.md,rendering error
|
||||
@@ -736,6 +737,7 @@ translations/pt-BR/content/code-security/security-overview/viewing-the-security-
|
||||
translations/pt-BR/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-accounts.md,rendering error
|
||||
translations/pt-BR/content/code-security/supply-chain-security/end-to-end-supply-chain/securing-code.md,rendering error
|
||||
translations/pt-BR/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review.md,rendering error
|
||||
translations/pt-BR/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-supply-chain-security.md,broken liquid tags
|
||||
translations/pt-BR/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph.md,rendering error
|
||||
translations/pt-BR/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph.md,broken liquid tags
|
||||
translations/pt-BR/content/codespaces/codespaces-reference/security-in-github-codespaces.md,broken liquid tags
|
||||
@@ -790,7 +792,7 @@ translations/pt-BR/content/education/manage-coursework-with-github-classroom/int
|
||||
translations/pt-BR/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/integrate-github-classroom-with-an-ide.md,broken liquid tags
|
||||
translations/pt-BR/content/education/manage-coursework-with-github-classroom/learn-with-github-classroom/view-autograding-results.md,rendering error
|
||||
translations/pt-BR/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/create-a-group-assignment.md,rendering error
|
||||
translations/pt-BR/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/create-an-individual-assignment.md,broken liquid tags
|
||||
translations/pt-BR/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/create-an-individual-assignment.md,rendering error
|
||||
translations/pt-BR/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/manage-classrooms.md,broken liquid tags
|
||||
translations/pt-BR/content/education/manage-coursework-with-github-classroom/teach-with-github-classroom/use-the-git-and-github-starter-assignment.md,broken liquid tags
|
||||
translations/pt-BR/content/get-started/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations.md,rendering error
|
||||
@@ -847,12 +849,13 @@ translations/pt-BR/content/graphql/reference/unions.md,rendering error
|
||||
translations/pt-BR/content/issues/organizing-your-work-with-project-boards/managing-project-boards/changing-project-board-visibility.md,rendering error
|
||||
translations/pt-BR/content/issues/organizing-your-work-with-project-boards/managing-project-boards/copying-a-project-board.md,rendering error
|
||||
translations/pt-BR/content/issues/organizing-your-work-with-project-boards/managing-project-boards/creating-a-project-board.md,rendering error
|
||||
translations/pt-BR/content/issues/planning-and-tracking-with-projects/creating-projects/migrating-from-projects-classic.md,broken liquid tags
|
||||
translations/pt-BR/content/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue.md,rendering error
|
||||
translations/pt-BR/content/organizations/collaborating-with-groups-in-organizations/about-your-organizations-news-feed.md,rendering error
|
||||
translations/pt-BR/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/about-two-factor-authentication-and-saml-single-sign-on.md,rendering error
|
||||
translations/pt-BR/content/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization.md,rendering error
|
||||
translations/pt-BR/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/accessing-compliance-reports-for-your-organization.md,rendering error
|
||||
translations/pt-BR/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization.md,broken liquid tags
|
||||
translations/pt-BR/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization.md,rendering error
|
||||
translations/pt-BR/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization.md,rendering error
|
||||
translations/pt-BR/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization.md,rendering error
|
||||
translations/pt-BR/content/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities.md,broken liquid tags
|
||||
@@ -940,6 +943,7 @@ translations/pt-BR/content/repositories/releasing-projects-on-github/managing-re
|
||||
translations/pt-BR/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md,rendering error
|
||||
translations/pt-BR/content/repositories/working-with-files/managing-large-files/about-large-files-on-github.md,rendering error
|
||||
translations/pt-BR/content/repositories/working-with-files/using-files/getting-permanent-links-to-files.md,rendering error
|
||||
translations/pt-BR/content/repositories/working-with-files/using-files/viewing-a-file.md,rendering error
|
||||
translations/pt-BR/content/rest/activity/notifications.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/apps/oauth-applications.md,rendering error
|
||||
translations/pt-BR/content/rest/codespaces/codespaces.md,broken liquid tags
|
||||
@@ -971,6 +975,7 @@ translations/pt-BR/content/rest/overview/resources-in-the-rest-api.md,rendering
|
||||
translations/pt-BR/content/rest/overview/troubleshooting.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/packages.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/projects/projects.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/pulls/comments.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/scim.md,rendering error
|
||||
translations/pt-BR/content/rest/teams/team-sync.md,rendering error
|
||||
translations/pt-BR/content/search-github/getting-started-with-searching-on-github/enabling-githubcom-repository-search-from-your-private-enterprise-environment.md,rendering error
|
||||
@@ -1143,6 +1148,7 @@ translations/pt-BR/data/reusables/organizations/billing_plans.md,rendering error
|
||||
translations/pt-BR/data/reusables/organizations/github-apps-settings-sidebar.md,rendering error
|
||||
translations/pt-BR/data/reusables/organizations/member-privileges.md,rendering error
|
||||
translations/pt-BR/data/reusables/organizations/navigate-to-org.md,rendering error
|
||||
translations/pt-BR/data/reusables/organizations/organization-wide-project.md,broken liquid tags
|
||||
translations/pt-BR/data/reusables/organizations/repository-defaults.md,rendering error
|
||||
translations/pt-BR/data/reusables/organizations/security-and-analysis.md,rendering error
|
||||
translations/pt-BR/data/reusables/organizations/security.md,rendering error
|
||||
@@ -1189,6 +1195,7 @@ translations/pt-BR/data/reusables/scim/supported-idps.md,rendering error
|
||||
translations/pt-BR/data/reusables/search/syntax_tips.md,broken liquid tags
|
||||
translations/pt-BR/data/reusables/secret-scanning/enterprise-enable-secret-scanning.md,broken liquid tags
|
||||
translations/pt-BR/data/reusables/secret-scanning/partner-secret-list-private-repo.md,rendering error
|
||||
translations/pt-BR/data/reusables/secret-scanning/partner-secret-list-public-repo.md,broken liquid tags
|
||||
translations/pt-BR/data/reusables/secret-scanning/secret-list-private-push-protection.md,rendering error
|
||||
translations/pt-BR/data/reusables/security-overview/permissions.md,rendering error
|
||||
translations/pt-BR/data/reusables/shortdesc/rate_limits_github_apps.md,rendering error
|
||||
@@ -1197,6 +1204,7 @@ translations/pt-BR/data/reusables/ssh/about-ssh.md,broken liquid tags
|
||||
translations/pt-BR/data/reusables/ssh/key-type-support.md,rendering error
|
||||
translations/pt-BR/data/reusables/ssh/rsa-sha-1-connection-failure-criteria.md,rendering error
|
||||
translations/pt-BR/data/reusables/support/help_resources.md,rendering error
|
||||
translations/pt-BR/data/reusables/support/scope-of-support.md,broken liquid tags
|
||||
translations/pt-BR/data/reusables/support/submit-a-ticket.md,broken liquid tags
|
||||
translations/pt-BR/data/reusables/user-settings/access_applications.md,rendering error
|
||||
translations/pt-BR/data/reusables/user-settings/account_settings.md,rendering error
|
||||
|
||||
|
@@ -42,8 +42,11 @@ After you configure {% data variables.location.product_location %} to use {% dat
|
||||
|
||||
Any VM that you use for {% data variables.product.prodname_dependabot %} runners must meet the requirements for self-hosted runners. In addition, they must meet the following requirements.
|
||||
|
||||
- Linux operating system{% ifversion ghes < 3.5 %}
|
||||
- Git installed{% endif %}
|
||||
- Linux operating system
|
||||
- x64 architecture
|
||||
{%- ifversion ghes < 3.5 %}
|
||||
- Git installed
|
||||
{%- endif %}
|
||||
- Docker installed with access for the runner users:
|
||||
- We recommend installing Docker in rootless mode and configuring the runners to access Docker without `root` privileges.
|
||||
- Alternatively, install Docker and give the runner users raised privileges to run Docker.
|
||||
|
||||
@@ -50,6 +50,8 @@ You can enable a related feature, {% data variables.product.prodname_dependabot_
|
||||
|
||||
{% data reusables.dependabot.dependabot-updates-and-actions %}
|
||||
|
||||
{% data reusables.dependabot.dependabot-actions-support %}
|
||||
|
||||
## About pull requests for security updates
|
||||
|
||||
Each pull request contains everything you need to quickly and safely review and merge a proposed fix into your project. This includes information about the vulnerability like release notes, changelog entries, and commit details. Details of which vulnerability a pull request resolves are hidden from anyone who does not have access to {% data variables.product.prodname_dependabot_alerts %} for the repository.
|
||||
|
||||
@@ -841,6 +841,27 @@ registries:
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
{% ifversion dependabot-hex-self-hosted-support %}
|
||||
### `hex-repository`
|
||||
|
||||
The `hex-repository` type supports an authentication key.
|
||||
|
||||
`repo` is a required field, which must match the name of the repository used in your dependency declaration.
|
||||
|
||||
The `public-key-fingerprint` is an optional configuration field, representing the fingerprint of the public key for the Hex repository. `public-key-fingerprint` is used by Hex to establish trust with the private repository. The `public-key-fingerprint` field can be either listed in plaintext or stored as a {% data variables.product.prodname_dependabot %} secret.
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
registries:
|
||||
github-hex-repository:
|
||||
type: hex-repository
|
||||
repo: private-repo
|
||||
url: https://private-repo.example.com
|
||||
auth-key: ${{secrets.MY_AUTH_KEY}}
|
||||
public-key-fingerprint: ${{secrets.MY_PUBLIC_KEY_FINGERPRINT}}
|
||||
```
|
||||
{% endraw %}{% endif %}
|
||||
|
||||
### `maven-repository`
|
||||
|
||||
The `maven-repository` type supports username and password.
|
||||
|
||||
@@ -30,6 +30,8 @@ If a contributor bypasses a push protection block for a secret, {% data variable
|
||||
- adds the bypass event to the audit log.{% ifversion secret-scanning-push-protection-email %}
|
||||
- sends an email alert to organization owners, security managers, and repository administrators, with a link to the related secret and the reason why it was allowed.{% endif %}
|
||||
|
||||
{% data reusables.secret-scanning.bypass-reasons-and-alerts %}
|
||||
|
||||
For information on the secrets and service providers supported for push protection, see "[{% data variables.product.prodname_secret_scanning_caps %} patterns](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-push-protection)."
|
||||
|
||||
## Enabling {% data variables.product.prodname_secret_scanning %} as a push protection
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
---
|
||||
title: Privately reporting a security vulnerability
|
||||
intro: Some public repositories configure security advisories so that anyone can report security vulnerabilities directly and privately to the maintainers.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
type: how_to
|
||||
miniTocMaxHeadingLevel: 3
|
||||
topics:
|
||||
- Security advisories
|
||||
- Vulnerabilities
|
||||
shortTitle: Privately reporting
|
||||
---
|
||||
|
||||
{% data reusables.security-advisory.private-vulnerability-reporting-beta %}
|
||||
|
||||
{% data reusables.security-advisory.private-vulnerability-reporting-enable %}
|
||||
|
||||
## About privately reporting a security vulnerability
|
||||
|
||||
Security researchers often feel responsible for alerting users to a vulnerability that could be exploited. If there are no clear instuctions about contacting maintainers of the repository containing the vulnerability, security researchers may have no other choice but to post about the vulnerability on social media, send direct messages to the maintainer, or even create public issues. This situation can potentially lead to a public disclosure of the vulnerability details.
|
||||
|
||||
Private vulnerability reporting makes it easy for security researchers to report vulnerabilities directly to repository maintainer using a simple form.
|
||||
|
||||
For security researchers, the benefits of using private vulnerability reporting are:
|
||||
- Less frustration, and less time spent trying to figure out how to contact the maintainer.
|
||||
- A smoother process for disclosing and discussing vulnerability details.
|
||||
- The opportunity to discuss vulnerability details privately with repository maintainer.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If the repository doesn't have private vulnerabiliy reporting enabled, you need to initiate the reporting process by following the instructions in the security policy for the repository, or create an issue asking the maintainers for a preferred security contact. For more information, see "[About coordinated disclosure of security vulnerabilities](/code-security/security-advisories/guidance-on-reporting-and-writing/about-coordinated-disclosure-of-security-vulnerabilities#about-reporting-and-disclosing-vulnerabilities-in-projects-on-github)."
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## Privately reporting a security vulnerability
|
||||
|
||||
Security researchers can privately report a security vulnerability to repository maintainers.
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.sidebar-security %}
|
||||
{% data reusables.repositories.sidebar-advisories %}
|
||||
1. Click **Report a vulnerability** to open the advisory form.
|
||||
|
||||

|
||||
|
||||
2. Fill in the advisory details form.
|
||||
{% tip %}
|
||||
|
||||
**Tip:** In this form, only the title and description are mandatory. (In the general draft security advisory form, which the repository maintainer initiates, specifying the ecosystem is also required.) However, we recommend security researchers provide as much information as possible on the form so that the maintainers can make an informed decision about the submitted report. You can adopt the template used by our security researchers from the {% data variables.product.prodname_security %}, which is available on the [`github/securitylab` repository](https://github.com/github/securitylab/blob/main/docs/report-template.md)."
|
||||
|
||||
{% endtip %}
|
||||
|
||||
For more information about the fields available and guidance on filling in the form, see "[Creating a repository security advisory](/code-security/security-advisories/repository-security-advisories/creating-a-repository-security-advisory)" and "[Best practices for writing repository security advisories](/code-security/security-advisories/guidance-on-reporting-and-writing/best-practices-for-writing-repository-security-advisories)."
|
||||
|
||||
1. At the bottom of the form, click **Submit report**. {% data variables.product.prodname_dotcom %} will display a message letting you know that maintainers have been notified and that you have a pending credit for this security advisory.
|
||||
|
||||

|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** When the report is submitted, {% data variables.product.prodname_dotcom %} automatically adds the reporter of the vulnerability as a collaborator and as a credited user on the proposed advisory.
|
||||
|
||||
{% endtip %}
|
||||
|
||||
1. Optionally, click **Start a temporary private fork** if you want to start to fix the issue. Note that only the repository maintainer can merge that private fork.
|
||||
|
||||

|
||||
|
||||
The next steps depend on the action taken by the repository maintainer. For more information, see "[Managing privately reported security vulnerabilities](/code-security/security-advisories/guidance-on-reporting-and-writing/managing-privately-reported-security-vulnerabilities)."
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Sobre a segurança da cadeia de suprimento
|
||||
intro: 'O {% data variables.product.product_name %} ajuda você a proteger a cadeia de fornecedores, oferecendo desde o entendimento das dependências do ambiente até a identificação de vulnerabilidades nessas dependências{% ifversion fpt or ghec or ghes %} e aplicação de patch nelas{% endif %}.'
|
||||
title: About supply chain security
|
||||
intro: '{% data variables.product.product_name %} helps you secure your supply chain, from understanding the dependencies in your environment, to knowing about vulnerabilities in those dependencies{% ifversion fpt or ghec or ghes %}, and patching them{% endif %}.'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
shortTitle: Supply chain security
|
||||
redirect_from:
|
||||
@@ -19,151 +19,160 @@ topics:
|
||||
- Dependencies
|
||||
- Pull requests
|
||||
- Repositories
|
||||
ms.openlocfilehash: 7c059876a27969b4664d5c8d94dec357a135c2de
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148106498'
|
||||
---
|
||||
## Sobre a segurança da cadeia de suprimentos no GitHub
|
||||
|
||||
Com o uso acelerado de código aberto, a maioria dos projetos depende de centenas de dependências de código aberto. Isso coloca um problema de segurança: e se as dependências que você estiver usando forem vulneráveis? Você poderia colocar os seus usuários em risco de ataque da cadeia de suprimentos. Uma das coisas mais importantes que você pode fazer para proteger a cadeia de fornecedores é corrigir as dependências vulneráveis{% ifversion GH-advisory-db-supports-malware %} e substituir os malwares{% endif %}.
|
||||
## About supply chain security at GitHub
|
||||
|
||||
Você adiciona dependências diretamente à sua cadeia de suprimentos ao especificá-las em um arquivo de manifesto ou um arquivo de bloqueio. As dependências também podem ser incluídas transitoriamente, ou seja, até mesmo se você não especificar uma dependência em particular, mas a sua dependência a usa, portanto, você também depende dessa dependência.
|
||||
With the accelerated use of open source, most projects depend on hundreds of open-source dependencies. This poses a security problem: what if the dependencies you're using are vulnerable? You could be putting your users at risk of a supply chain attack. One of the most important things you can do to protect your supply chain is to patch your vulnerable dependencies{% ifversion GH-advisory-db-supports-malware %} and replace any malware{% endif %}.
|
||||
|
||||
O {% data variables.product.product_name %} oferece uma variedade de recursos para ajudar você a entender as dependências do ambiente{% ifversion ghae %} e conhecer as vulnerabilidades dessas dependências{% endif %}{% ifversion fpt or ghec or ghes %}, conhecer as vulnerabilidades nessas dependências e aplicar patch nelas{% endif %}.
|
||||
You add dependencies directly to your supply chain when you specify them in a manifest file or a lockfile. Dependencies can also be included transitively, that is, even if you don’t specify a particular dependency, but a dependency of yours uses it, then you’re also dependent on that dependency.
|
||||
|
||||
As funcionalidades da cadeia de suprimentos em {% data variables.product.product_name %} são:
|
||||
- **Grafo de dependência**
|
||||
- **Revisão de dependência**
|
||||
- **{% data variables.product.prodname_dependabot_alerts %} ** {% ifversion fpt or ghec or ghes %}- **{% data variables.product.prodname_dependabot_updates %}**
|
||||
{% data variables.product.product_name %} offers a range of features to help you understand the dependencies in your environment{% ifversion ghae %} and know about vulnerabilities in those dependencies{% endif %}{% ifversion fpt or ghec or ghes %}, know about vulnerabilities in those dependencies, and patch them{% endif %}.
|
||||
|
||||
The supply chain features on {% data variables.product.product_name %} are:
|
||||
- **Dependency graph**
|
||||
- **Dependency review**
|
||||
- **{% data variables.product.prodname_dependabot_alerts %} **
|
||||
{% ifversion fpt or ghec or ghes %}- **{% data variables.product.prodname_dependabot_updates %}**
|
||||
- **{% data variables.product.prodname_dependabot_security_updates %}**
|
||||
- **{% data variables.product.prodname_dependabot_version_updates %}** {% endif %}
|
||||
- **{% data variables.product.prodname_dependabot_version_updates %}**{% endif %}
|
||||
|
||||
O gráfico de dependências é fundamental para fornecer segurança da cadeia de suprimentos. O gráfico de dependências identifica todas as dependências a montante e as dependências públicas a jusante de um repositório ou pacote. É possível ver as dependências e algumas de suas propriedades, como informações de vulnerabilidade, no gráfico de dependências do repositório.
|
||||
The dependency graph is central to supply chain security. The dependency graph identifies all upstream dependencies and public downstream dependents of a repository or package. You can see your repository’s dependencies and some of their properties, like vulnerability information, on the dependency graph for the repository.
|
||||
|
||||
As outras funcionalidades da cadeia de suprimentos em {% data variables.product.prodname_dotcom %} dependem das informações fornecidas pelo gráfico de dependências.
|
||||
Other supply chain features on {% data variables.product.prodname_dotcom %} rely on the information provided by the dependency graph.
|
||||
|
||||
- A revisão de dependências usa o gráfico de dependências para identificar mudanças de dependências e ajuda você a entender o impacto de segurança dessas alterações ao revisar pull requests.
|
||||
- O {% data variables.product.prodname_dependabot %} faz a referência cruzada dos dados de dependência fornecidos pelo grafo de dependência com a lista de avisos publicadas no {% data variables.product.prodname_advisory_database %}, verifica as dependências e gera {% data variables.product.prodname_dependabot_alerts %} quando é detectada uma possível vulnerabilidade {% ifversion GH-advisory-db-supports-malware %}ou malware{% endif %}.
|
||||
{% ifversion fpt or ghec or ghes %}– As {% data variables.product.prodname_dependabot_security_updates %} usam o grafo de dependência e os {% data variables.product.prodname_dependabot_alerts %} para ajudar você a atualizar as dependências com vulnerabilidades conhecidas no repositório.
|
||||
- Dependency review uses the dependency graph to identify dependency changes and help you understand the security impact of these changes when you review pull requests.
|
||||
- {% data variables.product.prodname_dependabot %} cross-references dependency data provided by the dependency graph with the list of advisories published in the {% data variables.product.prodname_advisory_database %}, scans your dependencies and generates {% data variables.product.prodname_dependabot_alerts %} when a potential vulnerability {% ifversion GH-advisory-db-supports-malware %}or malware{% endif %} is detected.
|
||||
{% ifversion fpt or ghec or ghes %}- {% data variables.product.prodname_dependabot_security_updates %} use the dependency graph and {% data variables.product.prodname_dependabot_alerts %} to help you update dependencies with known vulnerabilities in your repository.
|
||||
|
||||
{% data variables.product.prodname_dependabot_version_updates %} não usa o gráfico de dependências e confia na versão semântica das dependências. {% data variables.product.prodname_dependabot_version_updates %} ajuda você a manter suas dependências atualizadas, mesmo quando elas não têm nenhuma vulnerabilidade.
|
||||
{% data variables.product.prodname_dependabot_version_updates %} don't use the dependency graph and rely on the semantic versioning of dependencies instead. {% data variables.product.prodname_dependabot_version_updates %} help you keep your dependencies updated, even when they don’t have any vulnerabilities.
|
||||
{% endif %}
|
||||
|
||||
{% ifversion fpt or ghec or ghes %} Para obter guias de melhores práticas sobre a segurança da cadeia de suprimentos de ponta a ponta, incluindo a proteção de contas pessoais, códigos e processos de build, confira "[Como proteger sua cadeia de suprimentos de ponta a ponta](/code-security/supply-chain-security/end-to-end-supply-chain/end-to-end-supply-chain-overview)".
|
||||
{% ifversion fpt or ghec or ghes %}
|
||||
For best practice guides on end-to-end supply chain security including the protection of personal accounts, code, and build processes, see "[Securing your end-to-end supply chain](/code-security/supply-chain-security/end-to-end-supply-chain/end-to-end-supply-chain-overview)."
|
||||
{% endif %}
|
||||
|
||||
## Visão geral do recurso
|
||||
## Feature overview
|
||||
|
||||
### Qual é o gráfico de dependências
|
||||
### What is the dependency graph
|
||||
|
||||
Para gerar o gráfico de dependência, {% data variables.product.company_short %} analisa as dependências explícitas de um repositório declaradas no manifesto e no arquivo de bloqueio. Quando habilitado, o gráfico de dependências analisa automaticamente todos os arquivos de manifesto de pacote conhecidos no repositório, e usa isto para construir um gráfico com nomes e versões conhecidas das dependências.
|
||||
To generate the dependency graph, {% data variables.product.company_short %} looks at a repository’s explicit dependencies declared in the manifest and lockfiles. When enabled, the dependency graph automatically parses all known package manifest files in the repository, and uses this to construct a graph with known dependency names and versions.
|
||||
|
||||
- O grafo de dependência inclui informações sobre as dependências _diretas_ e as dependências _transitivas_.
|
||||
- O gráfico de dependência é atualizado automaticamente quando você faz push de um commit para {% data variables.product.company_short %} que altera ou adiciona um manifesto compatível ou um arquivo de bloqueio para o branch padrão, e quando alguém fizer uma alteração no repositório de uma de suas dependências.
|
||||
- Veja o grafo de dependência abrindo a página principal do repositório no {% data variables.product.product_name %} e acessando a guia **Insights**.
|
||||
- The dependency graph includes information on your _direct_ dependencies and _transitive_ dependencies.
|
||||
- The dependency graph is automatically updated when you push a commit to {% data variables.product.company_short %} that changes or adds a supported manifest or lock file to the default branch, and when anyone pushes a change to the repository of one of your dependencies.
|
||||
- You can see the dependency graph by opening the repository's main page on {% data variables.product.product_name %}, and navigating to the **Insights** tab.
|
||||
|
||||
{% ifversion dependency-submission-api %} {% data reusables.dependency-submission.dependency-submission-link %} {% endif %}
|
||||
{% ifversion dependency-submission-api %}
|
||||
{% data reusables.dependency-submission.dependency-submission-link %}
|
||||
{% endif %}
|
||||
|
||||
Para obter mais informações sobre o grafo de dependência, confira "[Sobre o grafo de dependência](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph)".
|
||||
For more information about the dependency graph, see "[About the dependency graph](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph)."
|
||||
|
||||
### O que é revisão de dependências
|
||||
### What is dependency review
|
||||
|
||||
A revisão de dependências ajuda os revisores e colaboradores a entenderem as mudanças de dependência e seu impacto de segurança em cada pull request.
|
||||
Dependency review helps reviewers and contributors understand dependency changes and their security impact in every pull request.
|
||||
|
||||
- A revisão de dependências informa quais dependências foram adicionadas, removidas ou atualizadas em um pull request. Você pode usar as datas de versão, a popularidade das dependências e informações de vulnerabilidade para ajudar você a decidir se deseja aceitar a alteração.
|
||||
- Veja a revisão de dependência para uma solicitação de pull mostrando a comparação avançada na guia **Arquivos Alterados**.
|
||||
- Dependency review tells you which dependencies were added, removed, or updated, in a pull request. You can use the release dates, popularity of dependencies, and vulnerability information to help you decide whether to accept the change.
|
||||
- You can see the dependency review for a pull request by showing the rich diff on the **Files Changed** tab.
|
||||
|
||||
Para obter mais informações sobre a revisão de dependência, confira "[Sobre a revisão de dependência](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review)".
|
||||
For more information about dependency review, see "[About dependency review](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review)."
|
||||
|
||||
### O que é o Dependabot
|
||||
### What is Dependabot
|
||||
|
||||
O {% data variables.product.prodname_dependabot %} mantém as dependências atualizadas informando sobre as vulnerabilidades de segurança nas dependências{% ifversion fpt or ghec or ghes %} e abre solicitações de pull automaticamente a fim de atualizar as dependências para a próxima versão segura disponível quando um alerta do {% data variables.product.prodname_dependabot %} é disparado ou para a última versão quando um lançamento é publicado{% else %}, para que você possa atualizar essa dependência{% endif %}.
|
||||
{% data variables.product.prodname_dependabot %} keeps your dependencies up to date by informing you of any security vulnerabilities in your dependencies{% ifversion fpt or ghec or ghes %}, and automatically opens pull requests to upgrade your dependencies to the next available secure version when a {% data variables.product.prodname_dependabot %} alert is triggered, or to the latest version when a release is published{% else %} so that you can update that dependency{% endif %}.
|
||||
|
||||
{% ifversion fpt or ghec or ghes %} O termo "{% data variables.product.prodname_dependabot %}" engloba os seguintes recursos:
|
||||
- {% data variables.product.prodname_dependabot_alerts %} – Notificação exibida na guia **Segurança** do repositório e no grafo de dependência do repositório. O alerta inclui um link para o arquivo afetado no projeto, e informações sobre uma versão corrigida.
|
||||
{% ifversion fpt or ghec or ghes %}
|
||||
The term "{% data variables.product.prodname_dependabot %}" encompasses the following features:
|
||||
- {% data variables.product.prodname_dependabot_alerts %}—Displayed notification on the **Security** tab for the repository, and in the repository's dependency graph. The alert includes a link to the affected file in the project, and information about a fixed version.
|
||||
- {% data variables.product.prodname_dependabot_updates %}:
|
||||
- {% data variables.product.prodname_dependabot_security_updates %}—Atualizações acionadas para atualizar suas dependências para uma versão segura quando um alerta é acionado.
|
||||
- {% data variables.product.prodname_dependabot_version_updates %}— Atualizações agendadas para manter suas dependências atualizadas com a versão mais recente.
|
||||
- {% data variables.product.prodname_dependabot_security_updates %}—Triggered updates to upgrade your dependencies to a secure version when an alert is triggered.
|
||||
- {% data variables.product.prodname_dependabot_version_updates %}—Scheduled updates to keep your dependencies up to date with the latest version.
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
{% data variables.product.prodname_dependabot_alerts %}, {% data variables.product.prodname_dependabot_security_updates %}, e {% data variables.product.prodname_dependabot_version_updates %} não usam {% data variables.product.prodname_actions %} quando são executados no {% data variables.product.product_name %}. No entanto, as solicitações de pull abertas pelo {% data variables.product.prodname_dependabot %} podem disparar fluxos de trabalho que executam ações. Para obter mais informações, confira "[Como automatizar o {% data variables.product.prodname_dependabot %} com o {% data variables.product.prodname_actions %}](/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions)".
|
||||
{% data variables.product.prodname_dependabot_alerts %}, {% data variables.product.prodname_dependabot_security_updates %}, and {% data variables.product.prodname_dependabot_version_updates %} do not use {% data variables.product.prodname_actions %} when they run on {% data variables.product.product_name %}. However, pull requests opened by {% data variables.product.prodname_dependabot %} can trigger workflows that run actions. For more information, see "[Automating {% data variables.product.prodname_dependabot %} with {% data variables.product.prodname_actions %}](/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions)."
|
||||
|
||||
{% elsif ghes %}
|
||||
|
||||
{% data variables.product.prodname_dependabot_security_updates %} e {% data variables.product.prodname_dependabot_version_updates %} exigem que o {% data variables.product.prodname_actions %} seja executado no {% data variables.product.product_name %}. {% data variables.product.prodname_dependabot_alerts %} não exigem {% data variables.product.prodname_actions %}. Para obter mais informações, confira "[Como habilitar o {% data variables.product.prodname_dependabot %} para sua empresa](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)".
|
||||
{% data variables.product.prodname_dependabot_security_updates %} and {% data variables.product.prodname_dependabot_version_updates %} require {% data variables.product.prodname_actions %} to run on {% data variables.product.product_name %}. {% data variables.product.prodname_dependabot_alerts %} do not require {% data variables.product.prodname_actions %}. For more information, see "[Enabling {% data variables.product.prodname_dependabot %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)."
|
||||
|
||||
{% elsif ghae %}
|
||||
|
||||
O {% data variables.product.prodname_actions %} não é necessário para que os {% data variables.product.prodname_dependabot_alerts %} sejam executados no {% data variables.product.product_name %}.
|
||||
{% data variables.product.prodname_actions %} is not required for {% data variables.product.prodname_dependabot_alerts %} to run on {% data variables.product.product_name %}.
|
||||
|
||||
{% endif %}
|
||||
|
||||
#### Quais são os alertas do Dependabot
|
||||
{% ifversion dependabot-actions-support %}
|
||||
|
||||
O {% data variables.product.prodname_dependabot_alerts %} destaca os repositórios afetados por uma vulnerabilidade recém-descoberta com base no grafo de dependência e no {% data variables.product.prodname_advisory_database %}, que contém os avisos de vulnerabilidades conhecidas {% ifversion GH-advisory-db-supports-malware %} e malwares{% endif %}.
|
||||
{% data reusables.dependabot.dependabot-actions-support %} For more information, see "[About {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates)."
|
||||
|
||||
- O {% data variables.product.prodname_dependabot %} faz a verificação para detectar dependências não seguras e envia {% data variables.product.prodname_dependabot_alerts %} quando: {% ifversion fpt or ghec %}
|
||||
- Um novo aviso é adicionado ao {% data variables.product.prodname_advisory_database %}.{% else %}
|
||||
- Os novos dados de aviso são sincronizados do {% data variables.product.prodname_dotcom_the_website %} com o {% data variables.location.product_location %} por hora. {% data reusables.security-advisory.link-browsing-advisory-db %}{% endif %}
|
||||
- O gráfico de dependências para as alterações no repositório.
|
||||
- Os {% data variables.product.prodname_dependabot_alerts %} são exibidos {% ifversion fpt or ghec or ghes %} na guia **Segurança** do repositório e{% endif %} no grafo de dependência do repositório. O alerta inclui {% ifversion fpt or ghec or ghes %}um link para o arquivo afetado no projeto e {% endif %}informações sobre uma versão corrigida.
|
||||
{% endif %}
|
||||
|
||||
Para obter mais informações, confira "[Sobre os {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies)".
|
||||
#### What are Dependabot alerts
|
||||
|
||||
{% data variables.product.prodname_dependabot_alerts %} highlight repositories affected by a newly discovered vulnerability based on the dependency graph and the {% data variables.product.prodname_advisory_database %}, which contains advisories for known vulnerabilities{% ifversion GH-advisory-db-supports-malware %} and malware{% endif %}.
|
||||
|
||||
- {% data variables.product.prodname_dependabot %} performs a scan to detect insecure dependencies and sends {% data variables.product.prodname_dependabot_alerts %} when:
|
||||
{% ifversion fpt or ghec %}
|
||||
- A new advisory is added to the {% data variables.product.prodname_advisory_database %}.{% else %}
|
||||
- New advisory data is synchronized to {% data variables.location.product_location %} each hour from {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.security-advisory.link-browsing-advisory-db %}{% endif %}
|
||||
- The dependency graph for the repository changes.
|
||||
- {% data variables.product.prodname_dependabot_alerts %} are displayed {% ifversion fpt or ghec or ghes %} on the **Security** tab for the repository and{% endif %} in the repository's dependency graph. The alert includes {% ifversion fpt or ghec or ghes %}a link to the affected file in the project, and {% endif %}information about a fixed version.
|
||||
|
||||
For more information, see "[About {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies)."
|
||||
|
||||
{% ifversion fpt or ghec or ghes %}
|
||||
#### Quais são as atualizações do Dependabot
|
||||
#### What are Dependabot updates
|
||||
|
||||
Há dois tipos de {% data variables.product.prodname_dependabot_updates %}: atualizações de _segurança_ e atualizações de _versão_ do {% data variables.product.prodname_dependabot %}. {% data variables.product.prodname_dependabot %} gera pull requests automáticos para atualizar suas dependências em ambos os casos, mas existem várias diferenças.
|
||||
There are two types of {% data variables.product.prodname_dependabot_updates %}: {% data variables.product.prodname_dependabot %} _security_ updates and _version_ updates. {% data variables.product.prodname_dependabot %} generates automatic pull requests to update your dependencies in both cases, but there are several differences.
|
||||
|
||||
{% data variables.product.prodname_dependabot_security_updates %}:
|
||||
- Acionado por um alerta de {% data variables.product.prodname_dependabot %}
|
||||
- Atualizar dependências para a versão mínima que resolve uma vulnerabilidade conhecida
|
||||
- Compatível para os ecossistemas que o gráfico de dependências suporta
|
||||
- Não requer um arquivo de configuração, mas você pode usar um para substituir o comportamento padrão
|
||||
- Triggered by a {% data variables.product.prodname_dependabot %} alert
|
||||
- Update dependencies to the minimum version that resolves a known vulnerability
|
||||
- Supported for ecosystems the dependency graph supports
|
||||
- Does not require a configuration file, but you can use one to override the default behavior
|
||||
|
||||
{% data variables.product.prodname_dependabot_version_updates %}:
|
||||
- Requer um arquivo de configuração
|
||||
- Executar em um calendário que você configura
|
||||
- Atualizar dependências para a última versão que corresponde à configuração
|
||||
- Compatível para um grupo diferente de ecossistemas
|
||||
- Requires a configuration file
|
||||
- Run on a schedule you configure
|
||||
- Update dependencies to the latest version that matches the configuration
|
||||
- Supported for a different group of ecosystems
|
||||
|
||||
Para obter mais informações sobre as {% data variables.product.prodname_dependabot_updates %}, confira "[Sobre as {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates)" e "[Sobre as {% data variables.product.prodname_dependabot_version_updates %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates)".
|
||||
For more information about {% data variables.product.prodname_dependabot_updates %}, see "[About {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates)" and "[About {% data variables.product.prodname_dependabot_version_updates %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates)."
|
||||
{% endif %}
|
||||
|
||||
## Disponibilidade de recursos
|
||||
## Feature availability
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
Repositórios públicos:
|
||||
- **Grafo de dependência** – habilitado por padrão, não podendo ser desabilitado.
|
||||
- **Revisão de dependência** – habilitada por padrão, não podendo ser desabilitada.
|
||||
- **{% data variables.product.prodname_dependabot_alerts %}** : não habilitado por padrão. O {% data variables.product.prodname_dotcom %} detecta dependências não seguras e exibe informações no grafo de dependência, mas não gera {% data variables.product.prodname_dependabot_alerts %} por padrão. Os proprietários do repositório ou pessoas com acesso de administrador podem habilitar {% data variables.product.prodname_dependabot_alerts %}.
|
||||
Você também pode habilitar ou desabilitar alertas do Dependabot para todos os repositórios pertencentes à sua conta de usuário ou organização. Para obter mais informações, confira "[Como gerenciar as configurações de segurança e análise da sua conta de usuário](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account)" ou "[Como gerenciar as configurações de segurança e análise da sua organização](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization)".
|
||||
Public repositories:
|
||||
- **Dependency graph**—enabled by default and cannot be disabled.
|
||||
- **Dependency review**—enabled by default and cannot be disabled.
|
||||
- **{% data variables.product.prodname_dependabot_alerts %}**—not enabled by default. {% data variables.product.prodname_dotcom %} detects insecure dependencies and displays information in the dependency graph, but does not generate {% data variables.product.prodname_dependabot_alerts %} by default. Repository owners or people with admin access can enable {% data variables.product.prodname_dependabot_alerts %}.
|
||||
You can also enable or disable Dependabot alerts for all repositories owned by your user account or organization. For more information, see "[Managing security and analysis settings for your user account](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account)" or "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization)."
|
||||
|
||||
Repositórios privados:
|
||||
- **Grafo de dependência** – não habilitado por padrão. O recurso pode ser habilitado pelos administradores do repositório. Para obter mais informações, confira "[Como explorar as dependências de um repositório](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)".
|
||||
Private repositories:
|
||||
- **Dependency graph**—not enabled by default. The feature can be enabled by repository administrators. For more information, see "[Exploring the dependencies of a repository](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)."
|
||||
{% ifversion fpt %}
|
||||
- **Revisão de dependência** – disponível em repositórios privados pertencentes a organizações que usam o {% data variables.product.prodname_ghe_cloud %} e têm uma licença do {% data variables.product.prodname_GH_advanced_security %}. Para obter mais informações, confira a [documentação do {% data variables.product.prodname_ghe_cloud %}](/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review).
|
||||
- **Dependency review**—available in private repositories owned by organizations that use {% data variables.product.prodname_ghe_cloud %} and have a license for {% data variables.product.prodname_GH_advanced_security %}. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review).
|
||||
{% elsif ghec %}
|
||||
- **Revisão de dependência** – disponível em repositórios privados pertencentes a organizações, desde que você tenha uma licença do {% data variables.product.prodname_GH_advanced_security %} e o grafo de dependência habilitado. Para obter mais informações, confira "[Sobre o {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)" e "[Como explorar as dependências de um repositório](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)". {% endif %}
|
||||
- **{% data variables.product.prodname_dependabot_alerts %}** : não habilitado por padrão. Os proprietários de repositórios privados ou pessoas com acesso de administrador, podem habilitar o {% data variables.product.prodname_dependabot_alerts %} ativando o gráfico de dependências e {% data variables.product.prodname_dependabot_alerts %} para seus repositórios.
|
||||
Você também pode habilitar ou desabilitar alertas do Dependabot para todos os repositórios pertencentes à sua conta de usuário ou organização. Para obter mais informações, confira "[Como gerenciar as configurações de segurança e análise da sua conta de usuário](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account)" ou "[Como gerenciar as configurações de segurança e análise da sua organização](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization)".
|
||||
- **Dependency review**—available in private repositories owned by organizations provided you have a license for {% data variables.product.prodname_GH_advanced_security %} and the dependency graph enabled. For more information, see "[About {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)" and "[Exploring the dependencies of a repository](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)."
|
||||
{% endif %}
|
||||
- **{% data variables.product.prodname_dependabot_alerts %}**—not enabled by default. Owners of private repositories, or people with admin access, can enable {% data variables.product.prodname_dependabot_alerts %} by enabling the dependency graph and {% data variables.product.prodname_dependabot_alerts %} for their repositories.
|
||||
You can also enable or disable Dependabot alerts for all repositories owned by your user account or organization. For more information, see "[Managing security and analysis settings for your user account](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account)" or "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization)."
|
||||
|
||||
Qualquer tipo de repositório:
|
||||
- **{% data variables.product.prodname_dependabot_security_updates %}** : não habilitado por padrão. É possível habilitar o {% data variables.product.prodname_dependabot_security_updates %} para qualquer repositório que use {% data variables.product.prodname_dependabot_alerts %} e o gráfico de dependências. Para obter informações sobre como habilitar as atualizações de segurança, confira "[Como configurar as {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates)".
|
||||
- **{% data variables.product.prodname_dependabot_version_updates %}** : não habilitado por padrão. As pessoas com permissões de gravação em um repositório podem habilitar {% data variables.product.prodname_dependabot_version_updates %}. Para obter informações sobre como habilitar as atualizações de versão, confira "[Como configurar as {% data variables.product.prodname_dependabot_version_updates %}](/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)".
|
||||
Any repository type:
|
||||
- **{% data variables.product.prodname_dependabot_security_updates %}**—not enabled by default. You can enable {% data variables.product.prodname_dependabot_security_updates %} for any repository that uses {% data variables.product.prodname_dependabot_alerts %} and the dependency graph. For information about enabling security updates, see "[Configuring {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates)."
|
||||
- **{% data variables.product.prodname_dependabot_version_updates %}**—not enabled by default. People with write permissions to a repository can enable {% data variables.product.prodname_dependabot_version_updates %}. For information about enabling version updates, see "[Configuring {% data variables.product.prodname_dependabot_version_updates %}](/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)."
|
||||
{% endif %}
|
||||
|
||||
{% ifversion ghes or ghae %}
|
||||
- **Grafo de dependência** e **{% data variables.product.prodname_dependabot_alerts %}** – não habilitados por padrão. Ambas as funcionalidades são configuradas a nível empresarial pelo proprietário da empresa. Para obter mais informações, confira {% ifversion ghes %}"[Como habilitar o grafo de dependência para sua empresa](/admin/code-security/managing-supply-chain-security-for-your-enterprise/enabling-the-dependency-graph-for-your-enterprise)" e {% endif %}"[Como habilitar o {% data variables.product.prodname_dependabot %} para sua empresa](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)".
|
||||
- **Revisão de dependência** – Disponível quando o grafo de dependência está habilitado para a {% data variables.location.product_location %} e o {% data variables.product.prodname_advanced_security %} está habilitada para a organização ou o repositório. Para obter mais informações, confira "[Sobre o {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)".
|
||||
{% endif %} {% ifversion ghes %}
|
||||
- **{% data variables.product.prodname_dependabot_security_updates %}** : não habilitado por padrão. É possível habilitar o {% data variables.product.prodname_dependabot_security_updates %} para qualquer repositório que use {% data variables.product.prodname_dependabot_alerts %} e o gráfico de dependências. Para obter informações sobre como habilitar as atualizações de segurança, confira "[Como configurar as {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates)".
|
||||
- **{% data variables.product.prodname_dependabot_version_updates %}** : não habilitado por padrão. As pessoas com permissões de gravação em um repositório podem habilitar {% data variables.product.prodname_dependabot_version_updates %}. Para obter informações sobre como habilitar as atualizações de versão, confira "[Como configurar as {% data variables.product.prodname_dependabot_version_updates %}](/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)".
|
||||
- **Dependency graph** and **{% data variables.product.prodname_dependabot_alerts %}**—not enabled by default. Both features are configured at an enterprise level by the enterprise owner. For more information, see {% ifversion ghes %}"[Enabling the dependency graph for your enterprise](/admin/code-security/managing-supply-chain-security-for-your-enterprise/enabling-the-dependency-graph-for-your-enterprise)" and {% endif %}"[Enabling {% data variables.product.prodname_dependabot %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)."
|
||||
- **Dependency review**—available when dependency graph is enabled for {% data variables.location.product_location %} and {% data variables.product.prodname_advanced_security %} is enabled for the organization or repository. For more information, see "[About {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)."
|
||||
{% endif %}
|
||||
{% ifversion ghes %}
|
||||
- **{% data variables.product.prodname_dependabot_security_updates %}**—not enabled by default. You can enable {% data variables.product.prodname_dependabot_security_updates %} for any repository that uses {% data variables.product.prodname_dependabot_alerts %} and the dependency graph. For information about enabling security updates, see "[Configuring {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates)."
|
||||
- **{% data variables.product.prodname_dependabot_version_updates %}**—not enabled by default. People with write permissions to a repository can enable {% data variables.product.prodname_dependabot_version_updates %}. For information about enabling version updates, see "[Configuring {% data variables.product.prodname_dependabot_version_updates %}](/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)."
|
||||
{% endif %}
|
||||
|
||||
@@ -12,11 +12,11 @@ children:
|
||||
- /security-in-github-codespaces
|
||||
- /performing-a-full-rebuild-of-a-container
|
||||
- /disaster-recovery-for-github-codespaces
|
||||
ms.openlocfilehash: 87692cd862e791f3e6ffa2be2b07f34c6158e617
|
||||
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
|
||||
ms.openlocfilehash: 223d3b146d829f129de39b43b51b6ab9e8aef411
|
||||
ms.sourcegitcommit: 3ff64a8c8cf70e868c10105aa6bbf6cd4f78e4d3
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 11/09/2022
|
||||
ms.locfileid: '148159194'
|
||||
ms.lasthandoff: 11/22/2022
|
||||
ms.locfileid: '148180800'
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 'Migrar de {% data variables.product.prodname_projects_v1 %}'
|
||||
intro: 'Você pode migrar seu {% data variables.projects.projects_v1_board %} para a nova experiência de {% data variables.product.prodname_projects_v2 %}.'
|
||||
title: 'Migrating from {% data variables.product.prodname_projects_v1 %}'
|
||||
intro: 'You can migrate your {% data variables.projects.projects_v1_board %} to the new {% data variables.product.prodname_projects_v2 %} experience.'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
versions:
|
||||
feature: projects-v2
|
||||
@@ -10,53 +10,57 @@ type: tutorial
|
||||
topics:
|
||||
- Projects
|
||||
allowTitleToDifferFromFilename: true
|
||||
ms.openlocfilehash: 2efe16be4b865e4315bce1fee633c313a3d7e512
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148108232'
|
||||
---
|
||||
{% note %}
|
||||
|
||||
**Observações:**
|
||||
|
||||
- Se o projeto que você está migrando contiver mais de 1.200 itens, os problemas abertos serão priorizados seguidos por solicitações de pull abertas e, em seguida, anotações. O espaço restante será usado para problemas fechados, solicitações de pull mescladas e solicitações de pull fechadas. Os itens que não podem ser migrados devido a esse limite serão movidos para a camada de armazenamento de arquivos. Se o limite de arquivamento de 10.000 itens for atingido, os itens adicionais não serão migrados.
|
||||
- Os cartões de observação são convertidos em problemas de rascunho e o conteúdo é salvo no corpo do problema do rascunho. Se informações parecerem ausentes, torne os campos ocultos visíveis. Para ver mais informações, confira "[Como mostrar e ocultar campos](/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/customizing-a-view#showing-and-hiding-fields)".
|
||||
- A automação não será migrada.
|
||||
- A triagem, arquivação e a atividade não serão migrados.
|
||||
- Após a migração, o novo projeto migrado e o projeto antigo não serão mantidos em sincronia.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## Sobre a migração de projeto
|
||||
|
||||
Você pode migrar seus quadros de projetos para a nova experiência de {% data variables.product.prodname_projects_v2 %} e experimentar tabelas, várias exibições, novas opções de automação e tipos de campo avançados. Para obter mais informações, confira "[Sobre projetos](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects)".
|
||||
|
||||
## Como migrar um painel de projetos da organização
|
||||
|
||||
{% data reusables.projects.enable-migration %} {% data reusables.profile.access_org %} {% data reusables.user-settings.access_org %} {% data reusables.organizations.organization-wide-project %}
|
||||
1. À esquerda, clique em **Projetos (clássico)** .
|
||||
{% data reusables.projects.migrate-project-steps %}
|
||||
|
||||
## Como migrar um painel de projetos de usuário
|
||||
|
||||
{% data reusables.projects.enable-migration %} {% data reusables.profile.access_profile %}
|
||||
1. Na parte superior da página de perfil, no menu de navegação principal, clique em {% octicon "project" aria-label="The project board icon" %} **Projetos**.
|
||||

|
||||
1. Acima da lista de projetos, clique em **Projetos (clássico)** .
|
||||
{% data reusables.projects.migrate-project-steps %}
|
||||
|
||||
## Como migrar um painel de projetos do repositório
|
||||
|
||||
{% note %}
|
||||
|
||||
**Observação:** o {% data variables.projects.projects_v2_caps %} não dá suporte a projetos de nível de repositório. Ao migrar um painel de projeto de repositório, ele será migrado para a organização ou conta pessoal proprietária do projeto de repositório, e o projeto migrado será fixado no repositório original.
|
||||
**Notes:**
|
||||
|
||||
- If the project you are migrating contains more than {% data variables.projects.item_limit %} items, open issues will be prioritized followed by open pull requests and then notes. Remaining space will be used for closed issues, merged pull requested, and closed pull requests. Items that cannot be migrated due to this limit will be moved to the archive. If the archive limit of {% data variables.projects.archived_item_limit %} items is reached, additional items will not be migrated.
|
||||
- Note cards are converted to draft issues, and the contents are saved to the body of the draft issue. If information appears to be missing, make any hidden fields visible. For more information, see "[Showing and hiding fields](/issues/planning-and-tracking-with-projects/customizing-views-in-your-project/customizing-a-view#showing-and-hiding-fields)."
|
||||
- Automation will not be migrated.
|
||||
- Triage, archive, and activity will not be migrated.
|
||||
- After migration, the new migrated project and old project will not be kept in sync.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.projects.enable-migration %} {% data reusables.repositories.navigate-to-repo %}
|
||||
1. Abaixo do nome do repositório, clique em {% octicon "project" aria-label="The project board icon" %} **Projetos**.
|
||||

|
||||
1. Clique **em Projetos (clássico)** .
|
||||
{% data reusables.projects.migrate-project-steps %}
|
||||
## About project migration
|
||||
|
||||
You can migrate your project boards to the new {% data variables.product.prodname_projects_v2 %} experience and try out tables, multiple views, new automation options, and powerful field types. For more information, see "[About projects](/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects)."
|
||||
|
||||
## Migrating an organization project board
|
||||
|
||||
{% data reusables.projects.enable-migration %}
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.user-settings.access_org %}
|
||||
{% data reusables.organizations.organization-wide-project %}
|
||||
1. On the left, click **Projects (classic)**.
|
||||

|
||||
{% data reusables.projects.migrate-project-steps %}
|
||||
|
||||
## Migrating a user project board
|
||||
|
||||
{% data reusables.projects.enable-migration %}
|
||||
{% data reusables.profile.access_profile %}
|
||||
1. On the top of your profile page, in the main navigation, click {% octicon "table" aria-label="The project board icon" %} **Projects**.
|
||||

|
||||
1. Above the list of projects, click **Projects (classic)**.
|
||||

|
||||
{% data reusables.projects.migrate-project-steps %}
|
||||
|
||||
## Migrating a repository project board
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data variables.projects.projects_v2_caps %} does not support repository level projects. When you migrate a repository project board, it will migrate to either the organization or personal account that owns the repository project, and the migrated project will be pinned to the original repository.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.projects.enable-migration %}
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
1. Under your repository name, click {% octicon "table" aria-label="The project board icon" %} **Projects**.
|
||||

|
||||
1. Click **Projects (classic)**.
|
||||

|
||||
{% data reusables.projects.migrate-project-steps %}
|
||||
|
||||
@@ -10,12 +10,12 @@ redirect_from:
|
||||
type: overview
|
||||
topics:
|
||||
- Projects
|
||||
ms.openlocfilehash: 768234aa5e6c9cfbca6a6144a80ac2868f3316ce
|
||||
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
|
||||
ms.openlocfilehash: 3190379652fe1c95b8ea6ec7f864c44b72d9a7f7
|
||||
ms.sourcegitcommit: f5ec7f52d2945ba8b7c14f8f604e4784a8feda19
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 11/09/2022
|
||||
ms.locfileid: '148158858'
|
||||
ms.lasthandoff: 11/22/2022
|
||||
ms.locfileid: '148180758'
|
||||
---
|
||||
## Sobre {% data variables.product.prodname_projects_v2 %}
|
||||
|
||||
@@ -43,7 +43,7 @@ Você pode usar campos personalizados para adicionar metadados aos seus problema
|
||||
|
||||
Você pode usar listas de tarefas para criar hierarquias de problemas, dividir seus problemas em subtarefas menores e criar relações entre seus problemas. Para obter mais informações, confira "[Sobre listas de tarefas](/issues/tracking-your-work-with-issues/about-tasklists)".
|
||||
|
||||
Essas relações são exibidas no problema, bem como os campos Acompanhado por e Acompanha em seus projetos. Você pode filtrar por problemas que são acompanhados por outro problema e também pode agrupar suas exibições de tabela pelo campo Acompanhado por para mostrar todos os problemas pai com uma lista das respectivas subtarefas.
|
||||
Essas relações são exibidas no problema, bem como os campos Acompanhado por e Acompanhamentos em seus projetos. Você pode filtrar por problemas que são acompanhados por outro problema e também pode agrupar as exibições da sua tabela pelo campo Acompanhado por para mostrar todos os problemas pai com uma lista das respectivas subtarefas.
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
@@ -46,15 +46,15 @@ To set up a `www` or custom subdomain, such as `www.example.com` or `blog.exampl
|
||||
{% data reusables.repositories.sidebar-settings %}
|
||||
{% data reusables.pages.sidebar-pages %}
|
||||
4. Under "Custom domain", type your custom domain, then click **Save**. If you are publishing your site from a branch, this will create a commit that adds a `CNAME` file to the root of your source branch. If you are publishing your site with a custom {% data variables.product.prodname_actions %} workflow , no `CNAME` file is created. For more information about your publishing source, see "[Configuring a publishing source for your GitHub Pages site](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)."
|
||||

|
||||

|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If your custom domain is an internationalized domain name, you must enter the Punycode encoded version.
|
||||
|
||||
For more information on Punycodes, see [Internationalized domain name](https://en.wikipedia.org/wiki/Internationalized_domain_name).
|
||||
|
||||
{% endnote %}
|
||||
{% note %}
|
||||
|
||||
**Note:** If your custom domain is an internationalized domain name, you must enter the Punycode encoded version.
|
||||
|
||||
For more information on Punycodes, see [Internationalized domain name](https://en.wikipedia.org/wiki/Internationalized_domain_name).
|
||||
|
||||
{% endnote %}
|
||||
|
||||
5. Navigate to your DNS provider and create a `CNAME` record that points your subdomain to the default domain for your site. For example, if you want to use the subdomain `www.example.com` for your user site, create a `CNAME` record that points `www.example.com` to `<user>.github.io`. If you want to use the subdomain `another.example.com` for your organization site, create a `CNAME` record that points `another.example.com` to `<organization>.github.io`. The `CNAME` record should always point to `<user>.github.io` or `<organization>.github.io`, excluding the repository name. {% data reusables.pages.contact-dns-provider %} {% data reusables.pages.default-domain-information %}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Visualizando um arquivo
|
||||
intro: Você pode visualizar o conteúdo do arquivo sem processamento ou rastrear alterações nas linhas em um arquivo e descobrir como as partes do arquivo evoluíram ao longo do tempo.
|
||||
title: Viewing a file
|
||||
intro: You can view raw file content or trace changes to lines in a file and discover how parts of the file evolved over time.
|
||||
redirect_from:
|
||||
- /articles/using-git-blame-to-trace-changes-in-a-file
|
||||
- /articles/tracing-changes-in-a-file
|
||||
@@ -16,54 +16,48 @@ versions:
|
||||
topics:
|
||||
- Repositories
|
||||
shortTitle: View files and track file changes
|
||||
ms.openlocfilehash: bc27fc67cfd18eb20f8c612b81f4d6dd5da20913
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '146680986'
|
||||
---
|
||||
## Visualizando ou copiando o conteúdo do arquivo sem processamento
|
||||
## Viewing or copying the raw file content
|
||||
|
||||
Com a visualização sem processamento, você pode visualizar ou copiar o conteúdo não processado de um arquivo sem qualquer estilo.
|
||||
With the raw view, you can view or copy the raw content of a file without any styling.
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
1. Clique no arquivo que você deseja visualizar.
|
||||
2. No canto superior direito da exibição de arquivo, clique em **Bruto**.
|
||||

|
||||
3. Opcionalmente, para copiar o conteúdo do arquivo bruto, no canto superior direito da exibição de arquivo, clique em **{% octicon "copy" aria-label="The copy icon" %}** .
|
||||
1. Click the file that you want to view.
|
||||
2. In the upper-right corner of the file view, click **Raw**.
|
||||

|
||||
3. Optionally, to copy the raw file content, in the upper-right corner of the file view, click **{% octicon "copy" aria-label="The copy icon" %}**.
|
||||
|
||||
## Visualizando o histórico de revisão linha por linha para um arquivo
|
||||
## Viewing the line-by-line revision history for a file
|
||||
|
||||
Com a exibição de blame, você pode ver o histórico de revisão linha a linha de um arquivo inteiro ou o histórico de revisão de uma única linha em um arquivo clicando em {% octicon "versions" aria-label="The prior blame icon" %}. Sempre que você clicar em {% octicon "versions" aria-label="The prior blame icon" %}, verá as informações da revisão anterior dessa linha, incluindo quem fez o commit da alteração e quando.
|
||||
With the blame view, you can view the line-by-line revision history for an entire file, or view the revision history of a single line within a file by clicking {% octicon "versions" aria-label="The prior blame icon" %}. Each time you click {% octicon "versions" aria-label="The prior blame icon" %}, you'll see the previous revision information for that line, including who committed the change and when.
|
||||
|
||||

|
||||

|
||||
|
||||
Em um arquivo ou em uma solicitação de pull, use também o menu {% octicon "kebab-horizontal" aria-label="The horizontal kebab octicon" %} para ver o blame do Git para uma linha ou um intervalo de linhas selecionado.
|
||||
In a file or pull request, you can also use the {% octicon "kebab-horizontal" aria-label="The horizontal kebab octicon" %} menu to view Git blame for a selected line or range of lines.
|
||||
|
||||

|
||||

|
||||
|
||||
{% tip %}
|
||||
|
||||
**Dica:** na linha de comando, use também `git blame` para ver o histórico de revisão de linhas em um arquivo. Para obter mais informações, confira a [documentação do `git blame` do Git](https://git-scm.com/docs/git-blame).
|
||||
**Tip:** On the command line, you can also use `git blame` to view the revision history of lines within a file. For more information, see [Git's `git blame` documentation](https://git-scm.com/docs/git-blame).
|
||||
|
||||
{% endtip %}
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
2. Clique para abrir o arquivo cujo histórico de linhas você deseja exibir.
|
||||
3. No canto superior direito da exibição de arquivo, clique em **Blame** para abrir a exibição de blame.
|
||||

|
||||
4. Para ver as revisões anteriores de uma linha específica ou um novo blame, clique em {% octicon "versions" aria-label="The prior blame icon" %} até encontrar as alterações em que está interessado em ver.
|
||||

|
||||
2. Click to open the file whose line history you want to view.
|
||||
3. In the upper-right corner of the file view, click **Blame** to open the blame view.
|
||||

|
||||
4. To see earlier revisions of a specific line, or reblame, click {% octicon "versions" aria-label="The prior blame icon" %} until you've found the changes you're interested in viewing.
|
||||

|
||||
|
||||
{% ifversion blame-ignore-revs %}
|
||||
|
||||
## Ignorar os commits na exibição de blame
|
||||
## Ignore commits in the blame view
|
||||
|
||||
Todas as revisões especificadas no arquivo `.git-blame-ignore-revs`, que precisam estar no diretório raiz do repositório, ficam ocultas na exibição de blame usando a definição de configuração `git blame --ignore-revs-file` do Git. Para obter mais informações, confira [`git blame --ignore-revs-file`](https://git-scm.com/docs/git-blame#Documentation/git-blame.txt---ignore-revs-fileltfilegt) na documentação do Git.
|
||||
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.
|
||||
|
||||
1. No diretório raiz do repositório, crie um arquivo chamado `.git-blame-ignore-revs`.
|
||||
2. Adicione os hashes de commit que deseja excluir da exibição de blame desse arquivo. Recomendamos que o arquivo seja estruturado da seguinte maneira, incluindo os comentários:
|
||||
1. In the root directory of your repository, create a file named `.git-blame-ignore-revs`.
|
||||
2. Add the commit hashes you want to exclude from the blame view to that file. We recommend the file to be structured as follows, including comments:
|
||||
|
||||
```ini
|
||||
# .git-blame-ignore-revs
|
||||
@@ -73,22 +67,26 @@ Todas as revisões especificadas no arquivo `.git-blame-ignore-revs`, que precis
|
||||
69d029cec8337c616552756310748c4a507bd75a
|
||||
```
|
||||
|
||||
3. Faça commit e efetue push das alterações.
|
||||
3. Commit and push the changes.
|
||||
|
||||
Agora, quando você acessar a exibição de blame, as revisões listadas não serão incluídas no blame. Você verá uma faixa **Ignorando revisões em .git-blame-ignore-revs**, indicando que alguns commits podem estar ocultos:
|
||||
Now when you visit the blame view, the listed revisions will not be included in the blame. You'll see an **Ignoring revisions in .git-blame-ignore-revs** banner indicating that some commits may be hidden:
|
||||
|
||||

|
||||

|
||||
|
||||
Isso pode ser útil quando alguns commits fazem alterações extensas no código. Use também o arquivo ao executar `git blame` localmente:
|
||||
This can be useful when a few commits make extensive changes to your code. You can use the file when running `git blame` locally as well:
|
||||
|
||||
```shell
|
||||
git blame --ignore-revs-file .git-blame-ignore-revs
|
||||
```
|
||||
|
||||
Você também pode configurar seu git local para que ele sempre ignore as revisões nesse arquivo:
|
||||
You can also configure your local git so it always ignores the revs in that file:
|
||||
|
||||
```shell
|
||||
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** will disappear.
|
||||
|
||||
@@ -6,6 +6,7 @@ intro: 'A API do OIDC do {% data variables.product.prodname_actions %} permite p
|
||||
topics:
|
||||
- API
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '>=3.7'
|
||||
ms.openlocfilehash: 6857081d29bd89e59c4f6c7ff458fd0afc2cf6ef
|
||||
|
||||
@@ -21,6 +21,6 @@ When you create a new repository on {% ifversion ghae %}{% data variables.produc
|
||||
|
||||
You can use this custom media type when getting a gitignore template.
|
||||
|
||||
application/vnd.github.VERSION.raw
|
||||
application/vnd.github.raw
|
||||
|
||||
For more information, see "[Media types](/rest/overview/media-types)."
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Comentários das revisões de pull request
|
||||
title: Pull request review comments
|
||||
shortTitle: Review comments
|
||||
intro: ''
|
||||
versions:
|
||||
@@ -11,24 +11,10 @@ topics:
|
||||
- API
|
||||
miniTocMaxHeadingLevel: 3
|
||||
allowTitleToDifferFromFilename: true
|
||||
ms.openlocfilehash: 6d49aa3d5bca7f74a21c1cce32cecd38abe9366d
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147067727'
|
||||
---
|
||||
## Sobre a API de comentários de revisão de solicitação pull
|
||||
|
||||
Os comentários de revisão de pull request são comentários em uma parte do diff unificado feitos durante uma revisão de pull request. Comentários de commit e comentários de problemas são são diferentes dos comentários de revisão de pull request. Você aplica comentários de submissão diretamente para um commit e aplica comentários de problema sem fazer referência a uma parte do diff unificado. Para obter mais informações, confira "[Criar um comentário sobre um commit](/rest/reference/commits#create-a-commit-comment)" e "[Criar um comentário sobre um problema](/rest/reference/issues#create-an-issue-comment)".
|
||||
## About the Pull request review comments API
|
||||
|
||||
### Tipos de mídia personalizados para comentários de revisão de pull request
|
||||
Pull request review comments are comments on a portion of the unified diff made during a pull request review. Commit comments and issue comments are different from pull request review comments. You apply commit comments directly to a commit and you apply issue comments without referencing a portion of the unified diff. For more information, see "[Create a commit comment](/rest/reference/commits#create-a-commit-comment)" and "[Create an issue comment](/rest/reference/issues#create-an-issue-comment)."
|
||||
|
||||
Estes são os tipos de mídia compatíveis com os comentários de revisão de pull request.
|
||||
|
||||
application/vnd.github.VERSION.raw+json
|
||||
application/vnd.github.VERSION.text+json
|
||||
application/vnd.github.VERSION.html+json
|
||||
application/vnd.github.VERSION.full+json
|
||||
|
||||
Para obter mais informações, confira "[Tipos de mídia personalizados](/rest/overview/media-types)".
|
||||
{% data reusables.pull_requests.issues-media-types %}
|
||||
|
||||
@@ -1,10 +1,2 @@
|
||||
---
|
||||
ms.openlocfilehash: 55a01fbe1358fc0fffc11f146b973d79242c5235
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: "148107999"
|
||||
---
|
||||
1. Abaixo do nome da organização, clique em {% octicon "project" aria-label="The Projects icon" %} **Projetos**.
|
||||
{% ifversion fpt or ghes or ghec %}  {% else %}  {% endif %}
|
||||
1. Under your organization name, click {% ifversion projects-v2 %}{% octicon "table" aria-label="The Projects icon" %}{% else %}{% octicon "project" aria-label="The Projects icon" %}{% endif %} **Projects**.
|
||||
{% ifversion projects-v2 %}{% else %}{% endif %}
|
||||
|
||||
@@ -64,6 +64,8 @@ Dynatrace | Dynatrace Internal Token | dynatrace_internal_token
|
||||
EasyPost | EasyPost Production API Key | easypost_production_api_key
|
||||
EasyPost | EasyPost Test API Key | easypost_test_api_key
|
||||
Fastly | Fastly API Token | fastly_api_token
|
||||
{%- ifversion fpt or ghec or ghes > 3.7 or ghae > 3.7 %}
|
||||
Figma | Figma {% data variables.product.pat_generic_title_case %} | figma_pat{% endif %}
|
||||
Finicity | Finicity App Key | finicity_app_key
|
||||
Flutterwave | Flutterwave Live API Secret Key | flutterwave_live_api_secret_key
|
||||
Flutterwave | Flutterwave Test API Secret Key | flutterwave_test_api_secret_key
|
||||
@@ -91,7 +93,12 @@ Google | Google OAuth Access Token | google_oauth_access_token{% endif %}
|
||||
Google | Google OAuth Client ID with Google OAuth Client Secret | google_oauth_client_id </br>google_oauth_client_secret{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %}
|
||||
Google | Google OAuth Refresh Token | google_oauth_refresh_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.7 or ghae > 3.7 %}
|
||||
Grafana | Grafana API Key | grafana_api_key
|
||||
Grafana | Grafana Cloud API Key | grafana_cloud_api_key
|
||||
Grafana | Grafana Cloud API Token | grafana_cloud_api_token
|
||||
Grafana | Grafana Project API Key | grafana_project_api_key
|
||||
Grafana | Grafana Project Service Account Token | grafana_project_service_account_token{% endif %}
|
||||
HashiCorp | Terraform Cloud / Enterprise API Token | terraform_api_token
|
||||
HashiCorp | HashiCorp Vault Batch Token | hashicorp_vault_batch_token
|
||||
{%- ifversion fpt or ghec or ghes > 3.8 or ghae > 3.8 %}
|
||||
@@ -198,6 +205,8 @@ Stripe | Stripe Webhook Signing Secret | stripe_webhook_signing_secret
|
||||
Supabase | Supabase Service Key | supabase_service_key{% endif %}
|
||||
Tableau | Tableau {% data variables.product.pat_generic_title_case %} | tableau_personal_access_token
|
||||
Telegram | Telegram Bot Token | telegram_bot_token
|
||||
{%- ifversion fpt or ghec or ghes > 3.7 or ghae > 3.7 %}
|
||||
Telnyx | Telnyx API V2 Key | telnyx_api_v2_key{% endif %}
|
||||
Tencent Cloud | Tencent Cloud Secret ID | tencent_cloud_secret_id
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %}
|
||||
Twilio | Twilio Access Token | twilio_access_token{% endif %}
|
||||
|
||||
@@ -1,130 +1,127 @@
|
||||
---
|
||||
ms.openlocfilehash: cd91a98e6cb0da73a24f7f6e682b67ec25b406d4
|
||||
ms.sourcegitcommit: 24427fe609677b2c58137b1d9d63869d0872daf4
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 11/04/2022
|
||||
ms.locfileid: "148134789"
|
||||
---
|
||||
Partner (parceiro) | Segredo compatível
|
||||
Partner | Supported secret
|
||||
--- | ---
|
||||
Adafruit IO | Chave de IO de Adafruit
|
||||
Adobe | Token de dispositivo do Adobe
|
||||
Adobe | Token de serviço do Adobe
|
||||
Adobe | Token de acesso de curta duração do Adobe
|
||||
Adobe | Token Web JSON do Adobe
|
||||
Alibaba Cloud | Par de ID e segredo da chave de acesso à nuvem do Alibaba
|
||||
AWS (Amazon Web Services) | Par do ID de segredo da chave de acesso ao AWS da Amazon
|
||||
Atlassian | Token da API de Atlassian
|
||||
Atlassian | Token web de JSON de Atlassian
|
||||
Azure | Segredo do aplicativo do Azure Active Directory
|
||||
Azure | Chave identificável do Lote do Azure
|
||||
Azure | Chave identificável do Azure Cosmos DB
|
||||
Adafruit IO | Adafruit IO Key
|
||||
Adobe | Adobe Device Token
|
||||
Adobe | Adobe Service Token
|
||||
Adobe | Adobe Short-Lived Access Token
|
||||
Adobe | Adobe JSON Web Token
|
||||
Alibaba Cloud | Alibaba Cloud Access Key ID and Access Key Secret pair
|
||||
Amazon Web Services (AWS) | Amazon AWS Access Key ID and Secret Access Key pair
|
||||
Atlassian | Atlassian API Token
|
||||
Atlassian | Atlassian JSON Web Token
|
||||
Azure | Azure Active Directory Application Secret
|
||||
Azure | Azure Batch Key Identifiable
|
||||
Azure | Azure CosmosDB Key Identifiable
|
||||
Azure | Azure DevOps {% data variables.product.pat_generic_title_case %}
|
||||
Azure | Chave de serviço Web do Azure ML Studio (clássico)
|
||||
Azure | Token do Azure SAS
|
||||
Azure | Certificado de Gerenciamento de Serviços do Azure
|
||||
Azure | Cadeia de conexão do SQL do Azure
|
||||
Azure | Chave de conta de armazenamento do Azure
|
||||
Checkout.com | Chave secreta de produção do Checkout.com
|
||||
Checkout.com | Chave secreta de teste do Checkout.com
|
||||
Chief | Token de ferramentas principais
|
||||
Clojars | Token de implantação de Clojars
|
||||
CloudBees CodeShip | Credencial de Coadship de CloudBees
|
||||
Sistemas de contribuição | Credenciais de sistemas de contribuição
|
||||
Databricks | Token de acesso de Databricks
|
||||
Datadog | Chave de API de Datadog
|
||||
DevCycle | Chave de API do cliente do DevCycle
|
||||
DevCycle | Chave de API do servidor do DevCycle
|
||||
Azure | Azure ML Studio (classic) Web Service Key
|
||||
Azure | Azure SAS Token
|
||||
Azure | Azure Search Admin Key
|
||||
Azure | Azure Search Query Key
|
||||
Azure | Azure Service Management Certificate
|
||||
Azure | Azure SQL Connection String
|
||||
Azure | Azure Storage Account Key
|
||||
Checkout.com | Checkout.com Production Secret Key
|
||||
Checkout.com | Checkout.com Test Secret Key
|
||||
Chief | Chief Tools Token
|
||||
Clojars | Clojars Deploy Token
|
||||
CloudBees CodeShip | CloudBees CodeShip Credential
|
||||
Contributed Systems | Contributed Systems Credentials
|
||||
Databricks | Databricks Access Token
|
||||
Datadog | Datadog API Key
|
||||
DevCycle | DevCycle Client API Key
|
||||
DevCycle | DevCycle Server API Key
|
||||
DigitalOcean | DigitalOcean {% data variables.product.pat_generic_title_case %}
|
||||
DigitalOcean | DigitalOcean OAuth Token
|
||||
DigitalOcean | DigitalOcean Refresh Token
|
||||
DigitalOcean | DigitalOcean System Token
|
||||
Discord | Token de Bot de Discord
|
||||
Doppler | Token pessoal de Doppler
|
||||
Doppler | Token de serviço de Doppler
|
||||
Doppler | Token de CLI de Doppler
|
||||
Doppler | Token de SCIM de Doppler
|
||||
Doppler | Token de auditoria do Doppler
|
||||
Dropbox | Token de Acesso de Dropbox
|
||||
Dropbox | Token de acesso à vida curta do Dropbox
|
||||
Dynatrace | Token de acesso de Dynatrace
|
||||
Dynatrace | Token interno de Dynatrace
|
||||
Finicity | Chave do aplicativo de Finicity
|
||||
Frame.io | Token web do JSON de Frame.io
|
||||
Frame.io| Token do desenvolvedor de Frame.io
|
||||
FullStory| Chave de API do FullStory
|
||||
Discord | Discord Bot Token
|
||||
Doppler | Doppler Personal Token
|
||||
Doppler | Doppler Service Token
|
||||
Doppler | Doppler CLI Token
|
||||
Doppler | Doppler SCIM Token
|
||||
Doppler | Doppler Audit Token
|
||||
Dropbox | Dropbox Access Token
|
||||
Dropbox | Dropbox Short Lived Access Token
|
||||
Dynatrace | Dynatrace Access Token
|
||||
Dynatrace | Dynatrace Internal Token
|
||||
Figma | Figma {% data variables.product.pat_generic_title_case %}
|
||||
Finicity | Finicity App Key
|
||||
Frame.io | Frame.io JSON Web Token
|
||||
Frame.io| Frame.io Developer Token
|
||||
FullStory| FullStory API Key
|
||||
GitHub | GitHub {% data variables.product.pat_generic_title_case %}
|
||||
GitHub | Token de acesso OAuth do GitHub
|
||||
GitHub | Token de atualização do GitHub
|
||||
GitHub | Token de acesso à instalação do aplicativo GitHub
|
||||
GitHub | Chave privada de SSH do GitHub
|
||||
GoCardless | Token de acesso ao vivo ao GoCardless
|
||||
GoCardless | Token de acesso de GoCardless Sandbox
|
||||
Google Cloud | Chave da API do GOogle
|
||||
Google Cloud | ID da chave privada do Google Cloud
|
||||
Hashicorp Terraform | Token da API de Terraform Cloud / Enterprise
|
||||
Hubspot | Chave da API de Hubspot
|
||||
GitHub | GitHub OAuth Access Token
|
||||
GitHub | GitHub Refresh Token
|
||||
GitHub | GitHub App Installation Access Token
|
||||
GitHub | GitHub SSH Private Key
|
||||
GoCardless | GoCardless Live Access Token
|
||||
GoCardless | GoCardless Sandbox Access Token
|
||||
Google Cloud | Google API Key
|
||||
Google Cloud | Google Cloud Private Key ID
|
||||
Hashicorp Terraform | Terraform Cloud / Enterprise API Token
|
||||
Hubspot | Hubspot API Key
|
||||
Hubspot | Hubspot API Personal Access Key
|
||||
Ionic | Ionic {% data variables.product.pat_generic_title_case %}
|
||||
Ionic | Token de atualização do Ionic
|
||||
Ionic | Ionic Refresh Token
|
||||
JD Cloud | JD Cloud Access Key
|
||||
Linear | Chave de API do Linear
|
||||
Linear | Token de acesso OAuth do Linear
|
||||
Mailchimp | Chave da API de Mailchimp
|
||||
Mailchimp | Chave da API de Mandrill
|
||||
Mailgun | Chave da API de Mailgun
|
||||
MessageBird | Chave da API de MessageBird
|
||||
Meta | Token de acesso do Facebook
|
||||
npm | Token de acesso de npm
|
||||
NuGet | Chave de API de NuGet
|
||||
Implantação do Octopus | Chave de API de implantação do Octopus
|
||||
OpenAI | Chave de API do OpenAI
|
||||
Palantir | Token web de JSON de Palantir
|
||||
PlanetScale | Senha do banco de dados do PlanetScale
|
||||
PlanetScale | Token OAuth do PlanetScale
|
||||
PlanetScale | Token de serviço do PlanetScale
|
||||
Plivo | ID de autenticação e token do Plivo
|
||||
postman | Chave da API de Postman
|
||||
Prefect | Chave da API do Servidor do Prefect
|
||||
Prefect | Token de API de Usuário do Prefect
|
||||
Proctorio | Chave de Consumidor de Proctorio
|
||||
Proctorio | Chave de vínculo de Proctorio
|
||||
Proctorio | Chave de registro de Proctorio
|
||||
Proctorio | Chave de segredo de Proctorio
|
||||
Pulumi | Token de acesso de Pulumi
|
||||
PyPI | Token de API do PyPI
|
||||
ReadMe | Chave de Acesso à API do ReadMe
|
||||
redirect.pizza | Token de API redirect.pizza
|
||||
RubyGems | Chave de API do RubyGems
|
||||
Samsara | Token de API de Samsara
|
||||
Samsara | Token de acesso de OAuth de Samsara
|
||||
SendGrid | Chave de API do SendGrid
|
||||
Sendinblue | Chave de API do Sendinblue
|
||||
Sendinblue | Chave SMTP do Sendinblue
|
||||
Shopify | Segredo compartilhado do aplicativo Shopify
|
||||
Shopify | Token de acesso de Shopify
|
||||
Shopify | Token de acesso do aplicativo personalizado Shopify
|
||||
Shopify | Senha do aplicativo privado Shopify
|
||||
Slack | Token da API de Slack
|
||||
Slack | URL de entrada do webhook de Slack
|
||||
Slack | URL do fluxo de trabalho do webhook de Slack
|
||||
SSLMate | Chave da API de SSLMate
|
||||
SSLMate | Segredo do cluster de SSLMate
|
||||
Stripe | Chave de segredo Stripe Live
|
||||
Stripe | Chave secreta da API de Teste de Stripe
|
||||
Stripe | Chave restrita da API de Stripe Live
|
||||
Stripe | Chave restrita da API de testes de Stripe
|
||||
Supabase | Chave de serviço do Supabase
|
||||
Tencent Cloud | ID de segredot de Tencent Cloud
|
||||
Twilio | Identificador de string de conta de Twilio
|
||||
Twilio | Chave da API de Twilio
|
||||
Linear | Linear API Key
|
||||
Linear | Linear OAuth Access Token
|
||||
Mailchimp | Mailchimp API Key
|
||||
Mailchimp | Mandrill API Key
|
||||
Mailgun | Mailgun API Key
|
||||
MessageBird | MessageBird API Key
|
||||
Meta | Facebook Access Token
|
||||
npm | npm Access Token
|
||||
NuGet | NuGet API Key
|
||||
Octopus Deploy | Octopus Deploy API Key
|
||||
OpenAI | OpenAI API Key
|
||||
Palantir | Palantir JSON Web Token
|
||||
PlanetScale | PlanetScale Database Password
|
||||
PlanetScale | PlanetScale OAuth Token
|
||||
PlanetScale | PlanetScale Service Token
|
||||
Plivo | Plivo Auth ID and Token
|
||||
Postman | Postman API Key
|
||||
Prefect | Prefect Server API Key
|
||||
Prefect | Prefect User API Token
|
||||
Proctorio | Proctorio Consumer Key
|
||||
Proctorio | Proctorio Linkage Key
|
||||
Proctorio | Proctorio Registration Key
|
||||
Proctorio | Proctorio Secret Key
|
||||
Pulumi | Pulumi Access Token
|
||||
PyPI | PyPI API Token
|
||||
ReadMe | ReadMe API Access Key
|
||||
redirect.pizza | redirect.pizza API Token
|
||||
RubyGems | RubyGems API Key
|
||||
Samsara | Samsara API Token
|
||||
Samsara | Samsara OAuth Access Token
|
||||
SendGrid | SendGrid API Key
|
||||
Sendinblue | Sendinblue API Key
|
||||
Sendinblue | Sendinblue SMTP Key
|
||||
Shopify | Shopify App Shared Secret
|
||||
Shopify | Shopify Access Token
|
||||
Shopify | Shopify Custom App Access Token
|
||||
Shopify | Shopify Private App Password
|
||||
Slack | Slack API Token
|
||||
Slack | Slack Incoming Webhook URL
|
||||
Slack | Slack Workflow Webhook URL
|
||||
SSLMate | SSLMate API Key
|
||||
SSLMate | SSLMate Cluster Secret
|
||||
Stripe | Stripe Live API Secret Key
|
||||
Stripe | Stripe Test API Secret Key
|
||||
Stripe | Stripe Live API Restricted Key
|
||||
Stripe | Stripe Test API Restricted Key
|
||||
Supabase | Supabase Service Key
|
||||
Tencent Cloud | Tencent Cloud Secret ID
|
||||
Tencent WeChat | Tencent WeChat API App ID
|
||||
Twilio | Twilio Account String Identifier
|
||||
Twilio | Twilio API Key
|
||||
Typeform | Typeform {% data variables.product.pat_generic_title_case %}
|
||||
Uniwise | Chave da API do WISEflow
|
||||
Valour | Token de acesso do Valour
|
||||
Yandex | Chave de API do Yandex.Cloud
|
||||
Yandex | Cookie de IAM do Yandex.Cloud
|
||||
Yandex | Token de IAM do Yandex.Cloud
|
||||
Yandex | Chave de API do Yandex.Dictionary
|
||||
Yandex | Segredo de acesso do Yandex.Cloud
|
||||
Yandex | Token OAuth do Yandex.Passport
|
||||
Zuplo | API do Consumidor Zuplo
|
||||
Uniwise | WISEflow API Key
|
||||
Valour | Valour Access Token
|
||||
Yandex | Yandex.Cloud API Key
|
||||
Yandex | Yandex.Cloud IAM Cookie
|
||||
Yandex | Yandex.Cloud IAM Token
|
||||
Yandex | Yandex.Dictionary API Key
|
||||
Yandex | Yandex.Cloud Access Secret
|
||||
Yandex | Yandex.Passport OAuth Token
|
||||
Zuplo | Zuplo Consumer API
|
||||
|
||||
@@ -41,6 +41,8 @@ Doppler | Doppler Audit Token | doppler_audit_token
|
||||
Dropbox | Dropbox Short Lived Access Token | dropbox_short_lived_access_token
|
||||
Duffel | Duffel Live Access Token | duffel_live_access_token
|
||||
EasyPost | EasyPost Production API Key | easypost_production_api_key
|
||||
{%- ifversion fpt or ghec or ghes > 3.7 or ghae > 3.7 %}
|
||||
Figma | Figma {% data variables.product.pat_generic_title_case %} | figma_pat{% endif %}
|
||||
Flutterwave | Flutterwave Live API Secret Key | flutterwave_live_api_secret_key
|
||||
Fullstory | FullStory API Key | fullstory_api_key
|
||||
GitHub | GitHub {% data variables.product.pat_generic_title_case %} | github_personal_access_token
|
||||
|
||||
@@ -1,19 +1,10 @@
|
||||
---
|
||||
ms.openlocfilehash: 4081194451ae681e3a8208cb0462bd7f7574c3ef
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: "145128321"
|
||||
---
|
||||
Se a sua solicitação de suporte não está no escopo de auxílio da nossa equipe, podemos recomendar próximas etapas para resolução do problema fora do {% data variables.contact.github_support %}. A sua solicitação de suporte possivelmente está fora do escopo de {% data variables.contact.github_support %}, se a solicitação se tratar principalmente de:
|
||||
- Integrações de terceiros, como o Jira{% ifversion ghes %}
|
||||
- Configuração de hardware{% endif %}
|
||||
- CI/CD, como Jenkins
|
||||
- Criação de scripts
|
||||
- Configuração de sistemas de autenticação externa, como provedores de identidade SAML
|
||||
- Projetos de código aberto{% ifversion ghes %}
|
||||
- Design de cluster LGTM{% endif %}
|
||||
- Escrevendo ou depurando novas consultas para {% data variables.product.prodname_codeql %}
|
||||
If your support request is outside of the scope of what our team can help you with, we may recommend next steps to resolve your issue outside of {% data variables.contact.github_support %}. Your support request is possibly out of {% data variables.contact.github_support %}'s scope if the request is primarily about:
|
||||
- Third party integrations, such as Jira{% ifversion ghes %}
|
||||
- Hardware setup{% endif %}
|
||||
- CI/CD, such as Jenkins
|
||||
- Writing scripts
|
||||
- Configuration of external authentication systems, such as SAML identity providers
|
||||
- Open source projects
|
||||
- Writing or debugging new queries for {% data variables.product.prodname_codeql %}
|
||||
|
||||
Se não tem certeza se o problema está fora do escopo, abra um tíquete e ficaremos felizes em ajudá-lo a determinar a melhor maneira de prosseguir.
|
||||
If you're uncertain if the issue is out of scope, open a ticket and we're happy to help you determine the best way to proceed.
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
ms.openlocfilehash: 251049400fe7254dd3be991c1612faaa05efeb96
|
||||
ms.sourcegitcommit: c562c85cc75ffe1eb4e9595d8adc09ec71697ab1
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 11/22/2022
|
||||
ms.locfileid: "148180099"
|
||||
---
|
||||
1. Opcionalmente, você pode configurar métodos adicionais de 2FA para reduzir o risco de bloqueio de conta. Para obter mais detalhes sobre como configurar cada método adicional, confira "[Como configurar a autenticação de dois fatores usando o GitHub Mobile](/articles/configuring-two-factor-authentication#configuring-two-factor-authentication-using-github-mobile)" e "[Como configurar a autenticação de dois fatores usando uma chave de segurança](/articles/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-security-key)".
|
||||

|
||||
@@ -42,8 +42,11 @@ After you configure {% data variables.location.product_location %} to use {% dat
|
||||
|
||||
Any VM that you use for {% data variables.product.prodname_dependabot %} runners must meet the requirements for self-hosted runners. In addition, they must meet the following requirements.
|
||||
|
||||
- Linux operating system{% ifversion ghes < 3.5 %}
|
||||
- Git installed{% endif %}
|
||||
- Linux operating system
|
||||
- x64 architecture
|
||||
{%- ifversion ghes < 3.5 %}
|
||||
- Git installed
|
||||
{%- endif %}
|
||||
- Docker installed with access for the runner users:
|
||||
- We recommend installing Docker in rootless mode and configuring the runners to access Docker without `root` privileges.
|
||||
- Alternatively, install Docker and give the runner users raised privileges to run Docker.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: About billing for GitHub Codespaces
|
||||
title: 关于 GitHub Codespaces 的计费
|
||||
shortTitle: About billing
|
||||
intro: 'Learn about the costs for using {% data variables.product.prodname_github_codespaces %}, and the monthly usage quotas included with {% data variables.product.prodname_dotcom %} personal accounts.'
|
||||
intro: '了解 {% data variables.product.prodname_github_codespaces %} 的使用成本,以及 {% data variables.product.prodname_dotcom %} 个人帐户包含的每月使用配额。'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -17,183 +17,187 @@ redirect_from:
|
||||
- /codespaces/codespaces-reference/about-billing-for-codespaces
|
||||
- /codespaces/codespaces-reference/understanding-billing-for-codespaces
|
||||
- /codespaces/codespaces-reference/understanding-billing-for-github-codespaces.md
|
||||
ms.openlocfilehash: 24410721878cd77d2528a4d9e8c91633725ce661
|
||||
ms.sourcegitcommit: 99eb4456062aea31ca381977396417cf92e5798d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/21/2022
|
||||
ms.locfileid: '148179546'
|
||||
---
|
||||
|
||||
## {% data variables.product.prodname_github_codespaces %} pricing
|
||||
## {% data variables.product.prodname_github_codespaces %} 定价
|
||||
|
||||
{% data reusables.codespaces.codespaces-free-for-personal-intro %}
|
||||
|
||||
Charges are billed to an organization or enterprise when all of the following are true:
|
||||
如果下列所有条件均成立,则向组织或企业收取费用:
|
||||
|
||||
- The repository from which a codespace is started (or the parent repository, in the case of a forked repository) is owned by an organization.
|
||||
- The organization is configured to be billed for codespaces created from the repository or forks of the repository.
|
||||
- The user creating the codespace belongs to the organization, or is an outside collaborator affiliated with the organization, and the organization has chosen to pay for this user's use of organization-owned codespaces.
|
||||
- 在其中启动 codespace 的存储库(如果是分支存储库,则为父存储库)归组织所有。
|
||||
- 组织已配置为承担从存储库或存储库分支创建的 codespace 的费用。
|
||||
- 创建 codespace 的用户属于组织或是与组织关联的外部协作者,并且组织已选择为此用户所使用的归组织所有的 codespace 付费。
|
||||
|
||||
Otherwise use of {% data variables.product.prodname_github_codespaces %} applies to the personal account of the person who created the codespace, and either consumes some of the monthly included usage for their personal account, or their account is billed according to their usage in excess of their included quotas.
|
||||
否则,{% data variables.product.prodname_github_codespaces %} 的使用费将计入创建 codespace 的人员的个人帐户,并消耗该个人帐户每月包含的使用量的一部分,或者根据超出所含配额的使用量向该帐户进行计费。
|
||||
|
||||
For information about how to configure an organization to be billed for codespace usage, see "[Enabling {% data variables.product.prodname_github_codespaces %} for your organization](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization)." The Free, Team, and Enterprise plans for organization and enterprise accounts do not include any free use of {% data variables.product.prodname_github_codespaces %}.
|
||||
有关如何将组织配置为支付 codespace 使用费的信息,请参阅“[为组织启用 {% data variables.product.prodname_github_codespaces %}](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization)”。 面向组织和企业帐户的免费版、团队版和企业版计划不包括对 {% data variables.product.prodname_github_codespaces %} 的任何免费使用。
|
||||
|
||||
### Monthly included storage and core hours for personal accounts
|
||||
### 个人帐户每月包含的存储空间和核心小时数
|
||||
|
||||
The following storage and core hours of usage are included, free of charge, for personal accounts:
|
||||
个人帐户包含以下存储空间和核心使用小时数(免费):
|
||||
|
||||
| Account plan | Storage per month | Core hours per month |
|
||||
| 帐户计划 | 每月存储空间 | 每月核心小时数 |
|
||||
| ------------ | ----------------- | -------------------- |
|
||||
| {% data variables.product.prodname_dotcom %} Free for personal accounts | 15 GB-month | 120 |
|
||||
| {% data variables.product.prodname_dotcom %} Pro | 20 GB-month | 180 |
|
||||
| 面向个人帐户的 {% data variables.product.prodname_dotcom %} Free | 15 GB/月 | 120 |
|
||||
| {% data variables.product.prodname_dotcom %} Pro | 20 GB/月 | 180 |
|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes**:
|
||||
- The GB-month unit of storage is a time-based measurement, 1 GB-month being 1 GB of storage usage for one whole month. The disk space used by all of your codespaces and prebuilds is assessed once an hour and your current GB-month usage is recalculated. Therefore, while you have codespaces and prebuilds, your GB-month usage will increase throughout the month. For example, if the storage totals 15 GB, and remains unchanged throughout your monthly billing cycle, then you will have used 7.5 GB halfway through the month, and 15 GB at the end of the month. For more information, see "[Billing for storage usage](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#billing-for-storage-usage)" below.
|
||||
- A "core hour" is a measure used for included compute usage. To calculate core hours, multiply the number of hours for which a codespace has been active by the multiplier in the pricing table below. For the basic machine types, the multiplier is the number of processor cores in the machine that hosts the codespace. For example, if you use a 2-core machine for your codespace and it's active for an hour, you have used 2 core hours. If you use an 8-core machine for an hour, you have used 8 core hours. If you use an 8-core machine for two hours, you have used 16 core hours.
|
||||
**注释**:
|
||||
- GB/月存储单位是基于时间的度量,1 GB/月表示一整个月的存储使用量为 1 GB。 所有 codespace 和预生成使用的磁盘空间每小时评估一次,并重新计算当前的 GB/月使用量。 因此,虽然有 codespace 和预生成,但 GB/月使用量将在整个月增加。 例如,如果存储总量为 15 GB,并且在整个月度计费周期中保持不变,则在月中使用了 7.5 GB,在月底使用了 15 GB。 有关详细信息,请参阅下面的“[存储使用量计费](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#billing-for-storage-usage)”。
|
||||
- “核心小时数”是用于包含的计算使用量的度量值。 要计算核心小时数,请将 codespace 处于活动状态的小时数乘以下面定价表中的乘数。 对于基本计算机类型,乘数是承载 codespace 的计算机中的处理器核心数。 例如,如果对 codespace 使用 2 核计算机,并且该 codespace 处于活动状态 1 小时,则已使用 2 个核心小时。 如果使用 8 核计算机 1 小时,则已使用 8 个核心小时。 如果使用 8 核计算机两小时,则已使用 16 个核心小时。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
You will be notified by email when you have used 75%, 90%, and 100% of your included quotas. Notifications are also displayed in a "toast" message within {% data variables.product.prodname_vscode_shortname %} and the {% data variables.product.prodname_vscode_shortname %} web client. You can turn off email notifications if required. For more information, see "[Managing the spending limit for GitHub Codespaces](/billing/managing-billing-for-github-codespaces/managing-the-spending-limit-for-github-codespaces#managing-usage-and-spending-limit-email-notifications)."
|
||||
当你使用了 75%、90% 和 100% 的包含配额时,你将收到电子邮件通知。 通知还显示在 {% data variables.product.prodname_vscode_shortname %} 和 {% data variables.product.prodname_vscode_shortname %} Web 客户端中的“toast”消息中。 可以关闭电子邮件通知(如果需要)。 有关详细信息,请参阅“[管理 GitHub Codespaces 的支出限制](/billing/managing-billing-for-github-codespaces/managing-the-spending-limit-for-github-codespaces#managing-usage-and-spending-limit-email-notifications)”。
|
||||
|
||||
When a personal account has used all of either the included storage or compute usage (whichever is reached first), and has no spending limit configured, use of {% data variables.product.prodname_github_codespaces %} will be blocked. You must set up a payment method and a spending limit to continue using {% data variables.product.prodname_github_codespaces %} during the current billing month. At the beginning of the next monthly billing cycle the included usage is reset. Storage will not be billed while use of {% data variables.product.prodname_github_codespaces %} is blocked.
|
||||
如果个人帐户已用完所有包含的存储空间或计算使用量(以先达到者为准),并且未配置支出限制,则 {% data variables.product.prodname_github_codespaces %} 的使用将受到阻止。 必须设置付款方式和支出限制才能在当前计费月内继续使用 {% data variables.product.prodname_github_codespaces %}。 在下一个月度计费周期开始时,包含的使用量将会重置。 阻止使用 {% data variables.product.prodname_github_codespaces %} 时,不会对存储计费。
|
||||
|
||||
You can view details of your usage for the current month at any time. For more information, see "[Viewing your {% data variables.product.prodname_github_codespaces %} usage](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)."
|
||||
可以随时查看当月使用情况的详细信息。 有关详细信息,请参阅“[查看 {% data variables.product.prodname_github_codespaces %} 使用情况](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)”。
|
||||
|
||||
If you are blocked from resuming a codespace and you want to continue to work on changes you have made in your codespace, you can do any of the following:
|
||||
如果恢复 codespace 的操作受到阻止,并且希望继续处理在 codespace 中所做的更改,则可执行以下任一操作:
|
||||
|
||||
- Add a payment method and a spending limit greater than $0 USD.
|
||||
- Export the changes from the codespace to a branch. For more information, see "[Exporting changes to a branch](/codespaces/troubleshooting/exporting-changes-to-a-branch)."
|
||||
- Wait for your monthly included usage to reset at the start of the next monthly billing cycle.
|
||||
- 添加付款方式和大于 0 美元的支出限制。
|
||||
- 将 codespace 中的更改导出到分支。 有关详细信息,请参阅“[将更改导出到分支](/codespaces/troubleshooting/exporting-changes-to-a-branch)”。
|
||||
- 等待每月包含的使用量在下一个月度计费周期开始时重置。
|
||||
|
||||
If you have used all of either your included storage usage or your included compute usage, and you have set up a payment method and a spending limit, any further use of codespaces owned by your personal account will incur charges for whichever type of usage has no remaining included quota. You will not be charged for the other type of usage until you have also used all of its included quota.
|
||||
如果已用完所有包含的所有存储使用量或包含的计算使用量,并且已设置付款方式和支出限制,则无论哪种类型的使用量没有剩余的包含配额,对个人帐户拥有的 codespace 的任何进一步使用都将产生相应费用。 在用完其包含的所有配额之前,不会向你收取其他类型的使用费。
|
||||
|
||||
### Pricing for paid usage
|
||||
### 付费使用定价
|
||||
|
||||
A {% data variables.product.prodname_github_codespaces %} instance (a "codespace") incurs charges for compute time, while it is active, and for the amount of disk space the codespace occupies, while it exists. The compute cost is proportional to the number of processor cores in the machine type you choose for your codespace, as shown in the table below. For example, the compute cost of using a codespace for an hour on a 16-core machine is eight times greater than a 2-core machine.
|
||||
{% data variables.product.prodname_github_codespaces %} 实例(“codespace”)在处于活动状态时会根据计算时间产生费用,并在存在时根据 codespace 占用的磁盘空间大小产生费用。 计算成本与为 codespace 选择的计算机类型中的处理器核心数成正比,如下表所示。 例如,在 16 核计算机上使用 codespace 一小时的计算成本是 2 核计算机的 8 倍。
|
||||
|
||||
| Component | Machine type | Unit of measure | Included usage multiplier | Price |
|
||||
| 组件 | 计算机类型 | 度量单位 | 包含的使用量乘数 | 价格 |
|
||||
| ------------------- | ------------ | --------------- | ------------------------- | ----- |
|
||||
| Codespaces compute | 2 core | 1 hour | 2 | $0.18 |
|
||||
| | 4 core | 1 hour | 4 | $0.36 |
|
||||
| | 8 core | 1 hour | 8 | $0.72 |
|
||||
| | 16 core | 1 hour | 16 | $1.44 |
|
||||
| | 32 core | 1 hour | 32 | $2.88 |
|
||||
| Codespaces storage | Storage | 1 GB-month<sup>*</sup> | N/A | $0.07 |
|
||||
| Codespaces 计算 | 2 个内核 | 1 小时 | 2 | $0.18 |
|
||||
| | 4 个内核 | 1 小时 | 4 | $0.36 |
|
||||
| | 8 个内核 | 1 小时 | 8 | $0.72 |
|
||||
| | 16 个内核 | 1 小时 | 16 | $1.44 |
|
||||
| | 32 个内核 | 1 小时 | 32 | $2.88 |
|
||||
| Codespaces 存储 | 存储 | 1 GB/月<sup>*</sup> | 空值 | 0\.07 美元 |
|
||||
|
||||
<sup>*</sup> See "[Billing for storage usage](#billing-for-storage-usage)" below for details of the GB-month unit of measure.
|
||||
<sup>*</sup> 有关 GB/月度量单位的详细信息,请参阅下面的“[存储使用量计费](#billing-for-storage-usage)”。
|
||||
|
||||
If you enable prebuilding of codespaces this will incur additional charges. For more information, see "[Billing for {% data variables.product.prodname_codespaces %} prebuilds](#billing-for-codespaces-prebuilds)."
|
||||
如果启用代码空间的预构建,则会产生额外费用。 有关详细信息,请参阅“[{% data variables.product.prodname_codespaces %} 预生成的计费](#billing-for-codespaces-prebuilds)”。
|
||||
|
||||
## About billing for {% data variables.product.prodname_github_codespaces %}
|
||||
## 关于 {% data variables.product.prodname_github_codespaces %} 的计费
|
||||
|
||||
{% data variables.product.prodname_github_codespaces %} is billed in US dollars (USD) according to the amount of compute time and storage space your codespaces use. {% data reusables.codespaces.codespaces-monthly-billing %}
|
||||
{% data variables.product.prodname_github_codespaces %} 是根据 codespaces 使用的计算时间长度和存储空间大小以美元 (USD) 计费的。 {% data reusables.codespaces.codespaces-monthly-billing %}
|
||||
|
||||
Billing for {% data variables.product.prodname_github_codespaces %} shares your account's existing payment method, and receipt. For more information, see "[Viewing your subscriptions and billing date](/articles/viewing-your-subscriptions-and-billing-date)."
|
||||
{% data variables.product.prodname_github_codespaces %} 的计费将使用帐户的现有付款方式和收据。 有关详细信息,请参阅“[查看订阅和计费日期](/articles/viewing-your-subscriptions-and-billing-date)”。
|
||||
|
||||
{% ifversion ghec %}
|
||||
If you purchased {% data variables.product.prodname_enterprise %} through a Microsoft Enterprise Agreement, you can connect your Azure Subscription ID to your enterprise account to enable and pay for {% data variables.product.prodname_github_codespaces %} usage. For more information, see "[Connecting an Azure subscription to your enterprise](/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise)."
|
||||
{% ifversion ghec %} 如果你通过 Microsoft 企业协议购买了 {% data variables.product.prodname_enterprise %},则可以将 Azure 订阅 ID 连接到企业帐户,以启用并支付你的 {% data variables.product.prodname_github_codespaces %} 使用费。 有关详细信息,请参阅“[将 Azure 订阅连接到企业](/billing/managing-billing-for-your-github-account/connecting-an-azure-subscription-to-your-enterprise)”。
|
||||
{% endif %}
|
||||
|
||||
### Billing for compute usage
|
||||
The compute usage of a codespace is the length of time for which that codespace is active multiplied by the multiplier in the pricing table for the machine type of the codespace. Total compute usage is calculated by summing the time used by all codespaces billable to a particular account. These totals are reported to the billing service every hour, and are billed monthly.
|
||||
### 计算使用量计费
|
||||
Codespace 的计算使用量是该 codespace 处于活动状态的时间长度乘以定价表中该 codespace 计算机类型的乘数。 总计算使用量的计算方式是将可向特定帐户计费的所有 codespace 使用的时间相加。 这些总数每小时向计费服务报告一次,并按月计费。
|
||||
|
||||
As an example, if a codespace is active for 1 hour and 15 minutes, then the compute cost will be the hourly cost of the codespace, as determined by its machine type, multiplied by 1.25.
|
||||
例如,如果 codespace 处于活动状态 1 小时 15 分钟,则计算成本将是 codespace 的每小时成本(由其计算机类型确定)乘以 1.25。
|
||||
|
||||
You can control compute usage by stopping your codespaces. For information, see "[Stopping and starting a codespace](/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace)." Codespaces are stopped automatically after a configurable period of inactivity. The timeout period can be configured by the user, or at the organization level. For more information, see "[Setting your timeout period for {% data variables.product.prodname_github_codespaces %}](/codespaces/customizing-your-codespace/setting-your-timeout-period-for-github-codespaces)" and "[Restricting the idle timeout period](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)."
|
||||
可通过停止 codespace 来控制计算使用量。 有关信息,请参阅“[停止和启动 codespace](/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace)”。 Codespace 在一段可配置的非活动时间后自动停止。 超时期限可以由用户配置,也可以在组织级别配置。 有关详细信息,请参阅“[设置 {% data variables.product.prodname_github_codespaces %} 的超时期限](/codespaces/customizing-your-codespace/setting-your-timeout-period-for-github-codespaces)”和“[限制空闲超时期限](/codespaces/managing-codespaces-for-your-organization/restricting-the-idle-timeout-period)”。
|
||||
|
||||
### Billing for storage usage
|
||||
For {% data variables.product.prodname_github_codespaces %} billing purposes, storage comprises the disk space used by all of the codespaces and prebuilds in your account. This includes any files you use in a codespace, such as cloned repositories, configuration files, data loaded to the codespace (for example as input or output of the software running in the repository), and extensions, among others. Storage is billed for all of your existing codespaces, regardless of whether they are active or inactive with the exception of blocked usage due to exhausted included usage quota or reaching your spending limit. The storage billing for a codespace ends when it is deleted.
|
||||
### 存储使用量计费
|
||||
出于 {% data variables.product.prodname_github_codespaces %} 计费目的,存储空间包括帐户中所有 codespace 和预生成所使用的磁盘空间。 这包括在 codespace 中使用的所有文件,例如克隆的存储库、配置文件、加载到 codespace 的数据(例如作为存储库中运行的软件的输入和输出的数据)以及扩展等内容。 对于你现有的所有 codespace,无论这些 codespace 处于活动状态还是非活动状态,都会对存储进行计费,但因已用尽包含的使用配额或达到支出限制而被阻止的使用除外。 Codespace 的存储计费在其被删除时终止。
|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes**:
|
||||
**注释**:
|
||||
|
||||
- When you use the default dev container configuration (see "[Introduction to dev containers](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#using-the-default-dev-container-configuration)"), we do not count the default container as used storage. When you create a custom container using a dev container configuration with a different base image we do count the container as used storage.
|
||||
- When you rebuild your container from the default image we do not count the base container as used storage. For other base images all of the storage consumed by the codespace, including the base container, is counted as used storage.
|
||||
- 当你使用默认开发容器配置时(请参阅“[开发容器简介](/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers#using-the-default-dev-container-configuration)”),我们不会将该默认容器计为已用存储空间。 当你使用具有不同基础映像的开发容器配置创建自定义容器时,我们会将该容器计为已用存储空间。
|
||||
- 当你从默认映像重新生成容器时,我们不会将基础容器计为已用存储空间。 对于其他基础映像,codespace 使用的所有存储空间(包括基础容器)都计为已用存储空间。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
Codespace storage is reported in GB-months. Your billing month runs from a fixed day in one month until the same day in the next month. In most cases the day of the month is determined by the day you started on your current {% data variables.product.prodname_dotcom %} plan. Your GB-month storage is calculated as follows. Once every hour, the storage used by all of your currently active and stopped codespaces is assessed. This figure is then divided by the number of hours in the current billing month: `total storage size / hours this month`. The result is added to the running total for codespace storage for the month.
|
||||
以 GB/月为单位报告 codespace 存储。 计费月是从一个月的固定日期到下个月的同一天。 在大多数情况下,该固定日期由你开始执行当前 {% data variables.product.prodname_dotcom %} 计划的日期决定。 GB/月存储的计算方式如下。 每小时评估一次当前处于活动状态和停止状态的所有 codespace 所使用的存储空间。 然后,此数字除以当前计费月的小时数:`total storage size / hours this month`。 结果将与当月 codespace 存储的累积总计相加。
|
||||
|
||||
For example, if you have one codespace that uses 100 GB of storage and has existed for one hour you will have used `100 / (24 * 30) = 0.1388` GB-months of storage in a 30-day month. If your use of {% data variables.product.prodname_github_codespaces %} during a 30-day month consists of two 100 GB codespaces that both existed for three full days then there will be `24 * 3` hourly reports for the storage of these codespaces, giving a total of `(24 * 3) * 200 / (24 * 30) = 20` GB-months.
|
||||
例如,如果有一个 codespace 使用 100 GB 存储空间且已存在一小时,则在该月(30 天)已使用 `100 / (24 * 30) = 0.1388` GB/月存储空间。 如果一个月(30 天)内使用的 {% data variables.product.prodname_github_codespaces %} 包含两个 100 GB codespace,并且这两个 codespace 都存在整整三天,则将有针对这些 codespace 的存储的 `24 * 3` 个每小时报告,总共 `(24 * 3) * 200 / (24 * 30) = 20` GB/月。
|
||||
|
||||
For each hourly report, the storage usage for the previous hour is calculated in seconds. As a result, you won't be charged for a full hour of storage if a codespace did not exist for the full 60 minutes. At the end of the month, {% data variables.product.prodname_dotcom %} rounds your storage to the nearest MB.
|
||||
对于每一个每小时报告,前一小时的存储使用量以秒为单位计算。 因此,如果 codespace 的存在时间未满 60 分钟,则不会收取整整一小时的存储费用。 到月底,{% data variables.product.prodname_dotcom %} 会将您的存储量舍入到最接近的 MB。
|
||||
|
||||
Organization owners can:
|
||||
- List the currently active and stopped codespaces for your organization. For more information, see "[Listing the codespaces in your organization](/codespaces/managing-codespaces-for-your-organization/listing-the-codespaces-in-your-organization)." In addition to the cost of these codespaces, the cost of {% data variables.product.prodname_github_codespaces %} for the current month may include costs for codespaces that existed earlier in the current month but have since been deleted.
|
||||
- See the total {% data variables.product.prodname_github_codespaces %} compute and storage usage for your organization for the current month to date. For more information, see "[Viewing your {% data variables.product.prodname_github_codespaces %} usage](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)."
|
||||
- Configure your organization settings to manage the cost of {% data variables.product.prodname_github_codespaces %}. For more information, see "[Managing the cost of {% data variables.product.prodname_github_codespaces %} in your organization](/codespaces/managing-codespaces-for-your-organization/managing-the-cost-of-github-codespaces-in-your-organization)."
|
||||
组织所有者可以执行以下操作:
|
||||
- 列出组织中当前处于活动状态和停止状态的 codespace。 有关详细信息,请参阅“[列出组织中的 codespace](/codespaces/managing-codespaces-for-your-organization/listing-the-codespaces-in-your-organization)”。 除了这些 codespace 的成本外,当月的 {% data variables.product.prodname_github_codespaces %} 成本可能包括当月早些时候存在但之后已被删除的 codespace 的成本。
|
||||
- 查看组织当月到目前为止的 {% data variables.product.prodname_github_codespaces %} 计算和存储使用总量。 有关详细信息,请参阅“[查看 {% data variables.product.prodname_github_codespaces %} 使用情况](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)”。
|
||||
- 配置组织设置以管理 {% data variables.product.prodname_github_codespaces %} 成本。 有关详细信息,请参阅“[管理组织中的 {% data variables.product.prodname_github_codespaces %} 成本](/codespaces/managing-codespaces-for-your-organization/managing-the-cost-of-github-codespaces-in-your-organization)”。
|
||||
|
||||
To estimate the costs for metered services, you can use the {% data variables.product.prodname_dotcom %} [pricing calculator](https://github.com/pricing/calculator?feature=codespaces).
|
||||
要估算计量服务的成本,可使用 {% data variables.product.prodname_dotcom %} [定价计算器](https://github.com/pricing/calculator?feature=codespaces)。
|
||||
|
||||
### Billing for {% data variables.product.prodname_codespaces %} prebuilds
|
||||
### {% data variables.product.prodname_codespaces %} 预构建的计费
|
||||
|
||||
{% data reusables.codespaces.prebuilds-definition %} For more information, see "[About {% data variables.product.prodname_github_codespaces %} prebuilds](/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds)."
|
||||
{% data reusables.codespaces.prebuilds-definition %} 有关详细信息,请参阅“[关于 {% data variables.product.prodname_github_codespaces %} 预生成](/codespaces/prebuilding-your-codespaces/about-github-codespaces-prebuilds)”。
|
||||
|
||||
#### {% data variables.product.prodname_actions %} costs for prebuilds
|
||||
#### 预生成的 {% data variables.product.prodname_actions %} 成本
|
||||
|
||||
Prebuilds are created and updated by running a {% data variables.product.prodname_actions %} workflow on a {% data variables.product.prodname_dotcom %}-hosted runner. You can configure how you want prebuild updates to be automatically triggered. For information, see "[Configuring prebuilds](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-a-prebuild)."
|
||||
预生成是通过在 {% data variables.product.prodname_dotcom %} 托管的运行器上运行 {% data variables.product.prodname_actions %} 工作流来创建和更新的。 可配置期望的预生成更新的自动触发方式。 有关信息,请参阅“[配置预生成](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-a-prebuild)”。
|
||||
|
||||
As with other workflows, while prebuild workflows are running they consume {% data variables.product.prodname_actions %} minutes included with your account, if you have any, or they incur charges for {% data variables.product.prodname_actions %} minutes. For more information about pricing for {% data variables.product.prodname_actions %} minutes, see "[About billing for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions/about-billing-for-github-actions)." There is no associated {% data variables.product.prodname_codespaces %} compute cost for creating or updating prebuilds.
|
||||
与其他工作流一样,在预生成工作流运行时,它们会消耗帐户中包含的 {% data variables.product.prodname_actions %} 分钟数(如果有),或者它们会根据 {% data variables.product.prodname_actions %} 分钟数产生费用。 有关 {% data variables.product.prodname_actions %} 分钟定价的详细信息,请参阅“[关于 {% data variables.product.prodname_actions %} 的计费](/billing/managing-billing-for-github-actions/about-billing-for-github-actions)”。 创建或更新预生成不会产生 {% data variables.product.prodname_codespaces %} 计算成本。
|
||||
|
||||
You can track usage of prebuild workflows and storage by downloading a usage report for your account. For more information, see "[Viewing your {% data variables.product.prodname_github_codespaces %} usage](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)."
|
||||
可通过下载帐户的使用情况报告来跟踪预生成工作流和存储的使用情况。 有关详细信息,请参阅“[查看 {% data variables.product.prodname_github_codespaces %} 使用情况](/billing/managing-billing-for-github-codespaces/viewing-your-github-codespaces-usage)”。
|
||||
|
||||
#### Storage costs for prebuilds
|
||||
#### 预生成的存储成本
|
||||
|
||||
In addition to {% data variables.product.prodname_actions %} minutes, you will also be billed for the storage of prebuilds associated with each prebuild configuration, for a given repository and region. Storage of prebuilds is billed at the same rate as storage of codespaces.
|
||||
除了 {% data variables.product.prodname_actions %} 分钟数,还将针对与给定存储库和区域的每个预生成配置关联的预生成的存储计费。 预生成的存储按与 codespace 存储相同的费率计费。
|
||||
|
||||
The storage cost for a prebuild in a single region will be similar to the storage cost that will be incurred for storing a single codespace created from that prebuild. The storage cost for the generated codespace may be more than the cost for the prebuild if, for example, the `updateContentCommand` and `postCreateCommand` commands are used during codespace creation to download more files to the dev container.
|
||||
单个区域中预生成的存储成本将类似于存储从该预生成创建的单个 codespace 所产生的存储成本。 例如,如果在 codespace 创建期间使用 `updateContentCommand` 和 `postCreateCommand` 命令将更多文件下载到开发容器,则生成的 codespace 的存储成本可能高于预生成的成本。
|
||||
|
||||
The total storage costs associated with a prebuild configuration will depend on the following factors.
|
||||
与预生成配置关联的总存储成本将取决于以下因素。
|
||||
|
||||
- The price of storage per GB. See the table above.
|
||||
- The size of the generated prebuild in GB.
|
||||
- The number of regions in which the prebuild is available (because a copy of the prebuild is stored in each region).
|
||||
- The number of older versions of the prebuild that are retained.
|
||||
- 每 GB 存储价格。 请参阅下表。
|
||||
- 生成的预生成的大小(以 GB 为单位)。
|
||||
- 预生成可用的区域数(因为预生成的副本存储在每个区域)。
|
||||
- 保留的预生成的旧版本数。
|
||||
|
||||
The storage cost for the prebuilds generated by a prebuild configuration is therefore calculated as: `price per GB * size (GB) * regions * versions`.
|
||||
因此,预生成配置生成的预生成的存储成本计算方式如下:`price per GB * size (GB) * regions * versions`。
|
||||
|
||||
#### Controlling the cost of prebuilds
|
||||
#### 控制预生成成本
|
||||
|
||||
To reduce consumption of Actions minutes, you can set a prebuild to be updated only when you make a change to your dev container configuration files, or only on a custom schedule. You can also manage your storage usage by adjusting the number of previous versions of each prebuild that are retained. For more information, see "[Configuring prebuilds](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-prebuilds)."
|
||||
为了减少 Actions 分钟数的消耗,可将预生成设置为仅在对开发容器配置文件进行更改时更新,或者仅在自定义计划中进行更新。 还可通过调整保留的每个预生成的早期版本数来管理存储使用量。 有关详细信息,请参阅“[配置预生成](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-prebuilds)”。
|
||||
|
||||
To limit the storage costs associated with prebuilds, you can choose to create prebuilds only in selected regions, and you can specify the number of older versions of prebuilds that will be retained. For more information, see "[Configuring prebuilds](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-prebuilds)."
|
||||
要限制与预生成关联的存储成本,可选择仅在选定区域创建预生成,并且可指定将保留的预生成的旧版本数。 有关详细信息,请参阅“[配置预生成](/codespaces/prebuilding-your-codespaces/configuring-prebuilds#configuring-prebuilds)”。
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: Prebuilds may be updated several times during a billing month. Newer versions of a prebuild may be larger or smaller than the previous versions. This will affect the storage charges. For details of how storage is calculated during a billing month, see "[Billing for storage usage](#billing-for-storage-usage)" above.
|
||||
注意:在一个计费月内,预生成可能会多次更新。 预生成的新版本可能大于或小于早期版本。 这将影响存储费用。 有关如何计算一个计费月内的存储的详细信息,请参阅上面的“[存储使用量计费](#billing-for-storage-usage)”。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
#### Cost of codespaces created from prebuilds
|
||||
#### 从预生成创建的 codespace 的成本
|
||||
|
||||
Use of codespaces created using prebuilds is charged at the same rate as regular codespaces.
|
||||
使用预生成创建的 codespace 的费用与常规 codespace 相同。
|
||||
|
||||
## Setting a spending limit
|
||||
## 设置支出限制
|
||||
|
||||
{% data reusables.codespaces.codespaces-spending-limit-requirement %}
|
||||
|
||||
For information on managing and changing your account's spending limit, see "[Managing your spending limit for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/managing-the-spending-limit-for-github-codespaces)."
|
||||
有关管理和更改帐户支出限制的信息,请参阅“[管理 {% data variables.product.prodname_github_codespaces %} 的支出限制](/billing/managing-billing-for-github-codespaces/managing-the-spending-limit-for-github-codespaces)”。
|
||||
|
||||
{% data reusables.codespaces.exporting-changes %}
|
||||
|
||||
## Limiting the machine types for organization-owned codespaces
|
||||
## 限制组织拥有的 codespace 的计算机类型
|
||||
|
||||
By default the machine type with the lowest valid resources is used when a codespace is created. However, users may be able to choose a machine type with more resources. They can do this either when they create a codespace, or they can change the machine type of an existing codespace. For more information, see "[Creating a codespace for a repository](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository)" and "[Changing the machine type for your codespace](/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace)."
|
||||
默认情况下,创建 codespace 时将使用具有最低有效资源的计算机类型。 但是,用户可能能够选择具有更多资源的计算机类型。 他们可以在创建 codespace 时执行此操作,也可以更改现有 codespace 的计算机类型。 有关详细信息,请参阅“[为存储库创建 codespace](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository)”和“[更改 codespace 的计算机类型”](/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace)。
|
||||
|
||||
If a machine type that has more resources is chosen, this will affect the per-hour charge for that codespace, as shown above.
|
||||
如果选择了具有更多资源的计算机类型,这将影响该 codespace 的每小时费用,如上所示。
|
||||
|
||||
Organization owners can create a policy to limit the choice of machine types available to users for codespaces that are billed to an organization or enterprise account. For more information, see "[Restricting access to machine types](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)."
|
||||
对于向组织或企业帐户计费的 codespace,组织所有者可创建策略来限制用户可为其选择的计算机类型。 有关详细信息,请参阅“[限制对计算机类型的访问](/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types)”。
|
||||
|
||||
## How billing is handled for forked repositories
|
||||
## 如何处理复刻的存储库的计费
|
||||
|
||||
Usage of codespaces created from a forked repository will be billed to your personal account unless the upstream (or parent) repository is in an organization that has allowed you - as a member, or outside collaborator, of the organization - to use codespaces at the organization's expense.
|
||||
从分支存储库创建的 codespace 的使用费将计入个人帐户,除非上游(或父)存储库位于以下类型的组织内:允许组织的成员或外部协作者使用 codespace,费用由组织承担。
|
||||
|
||||
For example, consider a member, or outside collaborator, of an organization that has allowed billing for codespaces for that user. If the user has permission to fork an organization-owned private repository, they can subsequently create and use a codespace for the new repository at the organization's expense. This is because the organization is the owner of the parent repository. Note that the organization owner can remove the user's access to the private repository, the forked repository, and therefore also the codespace. The organization owner can also delete the parent repository which will also delete the forked repository. For more information, see "[Managing the forking policy for your repository](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-the-forking-policy-for-your-repository)."
|
||||
例如,以某个组织的成员或外部协作者为例,该组织同意为该用户的 codespace 付费。 如果该用户有权对组织拥有的专用存储库创建分支,则可在之后为这个新存储库创建 codespace 并使用它,其费用由组织承担。 这是因为组织是父存储库的所有者。 请注意,组织所有者可以删除用户对专用存储库、分支存储库以及 codespace 的访问权限。 组织所有者还可以删除父存储库,这也将删除分支存储库。 有关详细信息,请参阅“[管理存储库的分支策略](/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-the-forking-policy-for-your-repository)”。
|
||||
|
||||
{% data reusables.codespaces.codespaces-disabling-org-billing %}
|
||||
|
||||
## How billing is handled when a repository is transferred to another organization
|
||||
## 存储库转让给其他组织时如何处理计费
|
||||
|
||||
Usage is calculated every hour. An organization pays for usage of codespaces created from any repository owned by the organization, where the organization settings permit the organization to be billed. For more information, see "[Enabling {% data variables.product.prodname_github_codespaces %} for your organization](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization#choose-who-can-create-codespaces-that-are-billed-to-your-organization)." When a repository is transferred out of your organization, ownership and billing responsibility for any codespaces associated with that repository will change accordingly.
|
||||
使用量每小时计算一次。 组织支付从组织拥有的任何存储库创建的 codespace 的使用费,其中组织设置允许对组织计费。 有关详细信息,请参阅“[为组织启用 {% data variables.product.prodname_github_codespaces %}](/codespaces/managing-codespaces-for-your-organization/enabling-github-codespaces-for-your-organization#choose-who-can-create-codespaces-that-are-billed-to-your-organization)”。 存储库转出组织后,与该存储库关联的任何 codespace 的所有权和计费责任都将相应地改变。
|
||||
|
||||
## What happens when users are removed
|
||||
## 移除用户后会发生什么情况
|
||||
|
||||
If a user is removed from an organization or repository, their codespaces are automatically deleted.
|
||||
如果从组织或存储库中移除用户,则会自动删除其代码空间。
|
||||
|
||||
@@ -50,6 +50,8 @@ You can enable a related feature, {% data variables.product.prodname_dependabot_
|
||||
|
||||
{% data reusables.dependabot.dependabot-updates-and-actions %}
|
||||
|
||||
{% data reusables.dependabot.dependabot-actions-support %}
|
||||
|
||||
## About pull requests for security updates
|
||||
|
||||
Each pull request contains everything you need to quickly and safely review and merge a proposed fix into your project. This includes information about the vulnerability like release notes, changelog entries, and commit details. Details of which vulnerability a pull request resolves are hidden from anyone who does not have access to {% data variables.product.prodname_dependabot_alerts %} for the repository.
|
||||
|
||||
@@ -841,6 +841,27 @@ registries:
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
{% ifversion dependabot-hex-self-hosted-support %}
|
||||
### `hex-repository`
|
||||
|
||||
The `hex-repository` type supports an authentication key.
|
||||
|
||||
`repo` is a required field, which must match the name of the repository used in your dependency declaration.
|
||||
|
||||
The `public-key-fingerprint` is an optional configuration field, representing the fingerprint of the public key for the Hex repository. `public-key-fingerprint` is used by Hex to establish trust with the private repository. The `public-key-fingerprint` field can be either listed in plaintext or stored as a {% data variables.product.prodname_dependabot %} secret.
|
||||
|
||||
{% raw %}
|
||||
```yaml
|
||||
registries:
|
||||
github-hex-repository:
|
||||
type: hex-repository
|
||||
repo: private-repo
|
||||
url: https://private-repo.example.com
|
||||
auth-key: ${{secrets.MY_AUTH_KEY}}
|
||||
public-key-fingerprint: ${{secrets.MY_PUBLIC_KEY_FINGERPRINT}}
|
||||
```
|
||||
{% endraw %}{% endif %}
|
||||
|
||||
### `maven-repository`
|
||||
|
||||
The `maven-repository` type supports username and password.
|
||||
|
||||
@@ -30,6 +30,8 @@ If a contributor bypasses a push protection block for a secret, {% data variable
|
||||
- adds the bypass event to the audit log.{% ifversion secret-scanning-push-protection-email %}
|
||||
- sends an email alert to organization owners, security managers, and repository administrators, with a link to the related secret and the reason why it was allowed.{% endif %}
|
||||
|
||||
{% data reusables.secret-scanning.bypass-reasons-and-alerts %}
|
||||
|
||||
For information on the secrets and service providers supported for push protection, see "[{% data variables.product.prodname_secret_scanning_caps %} patterns](/code-security/secret-scanning/secret-scanning-patterns#supported-secrets-for-push-protection)."
|
||||
|
||||
## Enabling {% data variables.product.prodname_secret_scanning %} as a push protection
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 关于供应链安全性
|
||||
intro: '{% data variables.product.product_name %} 有助于保护供应链,通过从了解环境中的依赖项到了解这些依赖项中的漏洞{% ifversion fpt or ghec or ghes %}并修补它们得以实现{% endif %}。'
|
||||
title: About supply chain security
|
||||
intro: '{% data variables.product.product_name %} helps you secure your supply chain, from understanding the dependencies in your environment, to knowing about vulnerabilities in those dependencies{% ifversion fpt or ghec or ghes %}, and patching them{% endif %}.'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
shortTitle: Supply chain security
|
||||
redirect_from:
|
||||
@@ -19,151 +19,160 @@ topics:
|
||||
- Dependencies
|
||||
- Pull requests
|
||||
- Repositories
|
||||
ms.openlocfilehash: 7c059876a27969b4664d5c8d94dec357a135c2de
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148106499'
|
||||
---
|
||||
## 关于 GitHub 上的供应链安全性
|
||||
|
||||
随着开放源代码的加速使用,大多数项目都依赖于数百个开源依赖项。 这就带来了一个安全问题:如果你正在使用的依赖项有漏洞,该怎么办? 你可能会使用户面临供应链攻击的风险。 保护供应链最重要的操作之一就是修补易受攻击的依赖项{% ifversion GH-advisory-db-supports-malware %}并替换任何恶意软件{% endif %}。
|
||||
## About supply chain security at GitHub
|
||||
|
||||
当你在清单文件或锁定文件中指定依赖项时,可以直接将它们添加到供应链。 依赖项也可以通过可传递方式包含在内,也就是说,即使你没有指定某个特定的依赖项,但你的某个依赖项使用了它,那么你也会依赖于该依赖项。
|
||||
With the accelerated use of open source, most projects depend on hundreds of open-source dependencies. This poses a security problem: what if the dependencies you're using are vulnerable? You could be putting your users at risk of a supply chain attack. One of the most important things you can do to protect your supply chain is to patch your vulnerable dependencies{% ifversion GH-advisory-db-supports-malware %} and replace any malware{% endif %}.
|
||||
|
||||
{% data variables.product.product_name %} 提供了一系列功能,可帮助你了解环境中的依赖项{% ifversion ghae %},并了解这些依赖项中的漏洞{% endif %}{% ifversion fpt or ghec or ghes %},了解这些依赖项中的漏洞并进行修补{% endif %}。
|
||||
You add dependencies directly to your supply chain when you specify them in a manifest file or a lockfile. Dependencies can also be included transitively, that is, even if you don’t specify a particular dependency, but a dependency of yours uses it, then you’re also dependent on that dependency.
|
||||
|
||||
{% data variables.product.product_name %} 上的供应链功能包括:
|
||||
- **依赖项关系图**
|
||||
- **依赖项审查**
|
||||
- **{% data variables.product.prodname_dependabot_alerts %} ** {% ifversion fpt or ghec or ghes %}- {% data variables.product.prodname_dependabot_updates %}
|
||||
- {% data variables.product.prodname_dependabot_security_updates %}
|
||||
- {% data variables.product.prodname_dependabot_version_updates %}{% endif %}
|
||||
{% data variables.product.product_name %} offers a range of features to help you understand the dependencies in your environment{% ifversion ghae %} and know about vulnerabilities in those dependencies{% endif %}{% ifversion fpt or ghec or ghes %}, know about vulnerabilities in those dependencies, and patch them{% endif %}.
|
||||
|
||||
依赖项关系图是供应链安全性的核心。 依赖项关系图标识了存储库或包的所有上游依赖项和公共下游依赖项。 你可以在存储库的依赖项关系图上看到存储库的依赖项和它们的一些属性,例如漏洞信息。
|
||||
The supply chain features on {% data variables.product.product_name %} are:
|
||||
- **Dependency graph**
|
||||
- **Dependency review**
|
||||
- **{% data variables.product.prodname_dependabot_alerts %} **
|
||||
{% ifversion fpt or ghec or ghes %}- **{% data variables.product.prodname_dependabot_updates %}**
|
||||
- **{% data variables.product.prodname_dependabot_security_updates %}**
|
||||
- **{% data variables.product.prodname_dependabot_version_updates %}**{% endif %}
|
||||
|
||||
{% data variables.product.prodname_dotcom %} 上的其他供应链功能依赖于依赖项关系图提供的信息。
|
||||
The dependency graph is central to supply chain security. The dependency graph identifies all upstream dependencies and public downstream dependents of a repository or package. You can see your repository’s dependencies and some of their properties, like vulnerability information, on the dependency graph for the repository.
|
||||
|
||||
- 依赖项审查使用依赖项关系图来标识依赖项更改,在你审查拉取请求时,可帮助你了解这些更改的安全影响。
|
||||
- {% data variables.product.prodname_dependabot %} 通过 {% data variables.product.prodname_advisory_database %} 中发布的公告列表交叉引用依赖项关系图提供的依赖项数据,扫描依赖项并在检测到潜在漏洞{% ifversion GH-advisory-db-supports-malware %}或恶意软件{% endif %}时生成 {% data variables.product.prodname_dependabot_alerts %}。
|
||||
{% ifversion fpt or ghec or ghes %}- {% data variables.product.prodname_dependabot_security_updates %}通过依赖项关系图和 {% data variables.product.prodname_dependabot_alerts %}来帮助你更新存储库中有已知漏洞的依赖项。
|
||||
Other supply chain features on {% data variables.product.prodname_dotcom %} rely on the information provided by the dependency graph.
|
||||
|
||||
{% data variables.product.prodname_dependabot_version_updates %}不使用依赖项关系图,而是依赖于依赖项的语义版本控制。 {% data variables.product.prodname_dependabot_version_updates %}可帮助你使依赖项保持最新,即使它们没有任何漏洞。
|
||||
- Dependency review uses the dependency graph to identify dependency changes and help you understand the security impact of these changes when you review pull requests.
|
||||
- {% data variables.product.prodname_dependabot %} cross-references dependency data provided by the dependency graph with the list of advisories published in the {% data variables.product.prodname_advisory_database %}, scans your dependencies and generates {% data variables.product.prodname_dependabot_alerts %} when a potential vulnerability {% ifversion GH-advisory-db-supports-malware %}or malware{% endif %} is detected.
|
||||
{% ifversion fpt or ghec or ghes %}- {% data variables.product.prodname_dependabot_security_updates %} use the dependency graph and {% data variables.product.prodname_dependabot_alerts %} to help you update dependencies with known vulnerabilities in your repository.
|
||||
|
||||
{% data variables.product.prodname_dependabot_version_updates %} don't use the dependency graph and rely on the semantic versioning of dependencies instead. {% data variables.product.prodname_dependabot_version_updates %} help you keep your dependencies updated, even when they don’t have any vulnerabilities.
|
||||
{% endif %}
|
||||
|
||||
{% ifversion fpt or ghec or ghes %} 有关端到端供应链安全性的最佳做法指南,包括如何保护个人帐户、代码和生成流程,请参阅“[保护端到端供应链](/code-security/supply-chain-security/end-to-end-supply-chain/end-to-end-supply-chain-overview)”。
|
||||
{% ifversion fpt or ghec or ghes %}
|
||||
For best practice guides on end-to-end supply chain security including the protection of personal accounts, code, and build processes, see "[Securing your end-to-end supply chain](/code-security/supply-chain-security/end-to-end-supply-chain/end-to-end-supply-chain-overview)."
|
||||
{% endif %}
|
||||
|
||||
## 功能概述
|
||||
## Feature overview
|
||||
|
||||
### 什么是依赖项关系图
|
||||
### What is the dependency graph
|
||||
|
||||
为了生成依赖项关系图,{% data variables.product.company_short %} 会查看清单和锁定文件中声明的存储库显式依赖项。 启用后,依赖项关系图会自动分析存储库中的所有已知包清单文件,并以此来构造一个包含已知依赖项名称和版本的关系图。
|
||||
To generate the dependency graph, {% data variables.product.company_short %} looks at a repository’s explicit dependencies declared in the manifest and lockfiles. When enabled, the dependency graph automatically parses all known package manifest files in the repository, and uses this to construct a graph with known dependency names and versions.
|
||||
|
||||
- 依赖项关系图包含有关直接依赖项和可传递依赖项的信息。
|
||||
- 当你将提交推送到 {% data variables.product.company_short %} 以更改受支持的清单或锁定文件或者将其添加到默认分支时,以及当任何人将更改推送到某个依赖项的存储库时,依赖项关系图会自动更新。
|
||||
- 可以通过打开 {% data variables.product.product_name %} 上的存储库主页,并导航到“见解”选项卡来查看依赖项关系图。
|
||||
- The dependency graph includes information on your _direct_ dependencies and _transitive_ dependencies.
|
||||
- The dependency graph is automatically updated when you push a commit to {% data variables.product.company_short %} that changes or adds a supported manifest or lock file to the default branch, and when anyone pushes a change to the repository of one of your dependencies.
|
||||
- You can see the dependency graph by opening the repository's main page on {% data variables.product.product_name %}, and navigating to the **Insights** tab.
|
||||
|
||||
{% ifversion dependency-submission-api %} {% data reusables.dependency-submission.dependency-submission-link %} {% endif %}
|
||||
{% ifversion dependency-submission-api %}
|
||||
{% data reusables.dependency-submission.dependency-submission-link %}
|
||||
{% endif %}
|
||||
|
||||
有关依赖项关系图的详细信息,请参阅“[关于依赖项关系图](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph)”。
|
||||
For more information about the dependency graph, see "[About the dependency graph](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph)."
|
||||
|
||||
### 什么是依赖项审查
|
||||
### What is dependency review
|
||||
|
||||
依赖项审查可帮助审阅者和参与者了解每个拉取请求中的依赖项更改及其安全性影响。
|
||||
Dependency review helps reviewers and contributors understand dependency changes and their security impact in every pull request.
|
||||
|
||||
- 依赖项审查会在拉取请求中告知你已经添加、移除或更新了哪些依赖项。 你可以使用发布日期、依赖项的受欢迎程度和漏洞信息来帮助决定是否接受更改。
|
||||
- 可以通过在“已更改的文件”选项卡上显示多差异来查看拉取请求的依赖项审查。
|
||||
- Dependency review tells you which dependencies were added, removed, or updated, in a pull request. You can use the release dates, popularity of dependencies, and vulnerability information to help you decide whether to accept the change.
|
||||
- You can see the dependency review for a pull request by showing the rich diff on the **Files Changed** tab.
|
||||
|
||||
有关依赖项审查的详细信息,请参阅“[关于依赖项审查](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review)”。
|
||||
For more information about dependency review, see "[About dependency review](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review)."
|
||||
|
||||
### 什么是 Dependabot
|
||||
### What is Dependabot
|
||||
|
||||
{% data variables.product.prodname_dependabot %} 通过告知你的依赖项中的任何安全漏洞使依赖项保持最新{% ifversion fpt or ghec or ghes %},并自动提交拉取请求,以便在触发 {% data variables.product.prodname_dependabot %} 警报时将依赖项升级到下一个可用的安全版本,或者在版本发布时将依赖项升级到最新版本,{% else %}这样你就可以更新该依赖项{% endif %}。
|
||||
{% data variables.product.prodname_dependabot %} keeps your dependencies up to date by informing you of any security vulnerabilities in your dependencies{% ifversion fpt or ghec or ghes %}, and automatically opens pull requests to upgrade your dependencies to the next available secure version when a {% data variables.product.prodname_dependabot %} alert is triggered, or to the latest version when a release is published{% else %} so that you can update that dependency{% endif %}.
|
||||
|
||||
{% ifversion fpt or ghec or ghes %}术语“{% data variables.product.prodname_dependabot %}”包含了以下功能:
|
||||
- {% data variables.product.prodname_dependabot_alerts %} - 在存储库的“安全性”选项卡上以及存储库的依赖项关系图中显示通知。 该警报包括指向项目中受影响的文件的链接,以及有关修复的版本的信息。
|
||||
- {% data variables.product.prodname_dependabot_updates %}:
|
||||
- {% data variables.product.prodname_dependabot_security_updates %} - 触发更新以在触发警报时将依赖项升级到安全版本。
|
||||
- {% data variables.product.prodname_dependabot_version_updates %} - 计划更新以使依赖项始终是最新版本。
|
||||
{% ifversion fpt or ghec or ghes %}
|
||||
The term "{% data variables.product.prodname_dependabot %}" encompasses the following features:
|
||||
- {% data variables.product.prodname_dependabot_alerts %}—Displayed notification on the **Security** tab for the repository, and in the repository's dependency graph. The alert includes a link to the affected file in the project, and information about a fixed version.
|
||||
- {% data variables.product.prodname_dependabot_updates %}:
|
||||
- {% data variables.product.prodname_dependabot_security_updates %}—Triggered updates to upgrade your dependencies to a secure version when an alert is triggered.
|
||||
- {% data variables.product.prodname_dependabot_version_updates %}—Scheduled updates to keep your dependencies up to date with the latest version.
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
{% data variables.product.prodname_dependabot_alerts %}、{% data variables.product.prodname_dependabot_security_updates %} 和 {% data variables.product.prodname_dependabot_version_updates %} 在 {% data variables.product.product_name %} 上运行时不使用 {% data variables.product.prodname_actions %}。 但是,由 {% data variables.product.prodname_dependabot %} 打开的拉取请求可能会触发运行操作的工作流。 有关详细信息,请参阅“[使用 {% data variables.product.prodname_actions %} 自动化 {% data variables.product.prodname_dependabot %}](/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions)”。
|
||||
{% data variables.product.prodname_dependabot_alerts %}, {% data variables.product.prodname_dependabot_security_updates %}, and {% data variables.product.prodname_dependabot_version_updates %} do not use {% data variables.product.prodname_actions %} when they run on {% data variables.product.product_name %}. However, pull requests opened by {% data variables.product.prodname_dependabot %} can trigger workflows that run actions. For more information, see "[Automating {% data variables.product.prodname_dependabot %} with {% data variables.product.prodname_actions %}](/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions)."
|
||||
|
||||
{% elsif ghes %}
|
||||
|
||||
{% data variables.product.prodname_dependabot_security_updates %} 和 {% data variables.product.prodname_dependabot_version_updates %} 要求 {% data variables.product.prodname_actions %} 在 {% data variables.product.product_name %} 上运行。 {% data variables.product.prodname_dependabot_alerts %} 不需要 {% data variables.product.prodname_actions %}。 有关详细信息,请参阅“[对企业启用 {% data variables.product.prodname_dependabot %}](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)”。
|
||||
{% data variables.product.prodname_dependabot_security_updates %} and {% data variables.product.prodname_dependabot_version_updates %} require {% data variables.product.prodname_actions %} to run on {% data variables.product.product_name %}. {% data variables.product.prodname_dependabot_alerts %} do not require {% data variables.product.prodname_actions %}. For more information, see "[Enabling {% data variables.product.prodname_dependabot %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)."
|
||||
|
||||
{% elsif ghae %}
|
||||
|
||||
{% data variables.product.prodname_dependabot_alerts %} 不需要 {% data variables.product.prodname_actions %} 才能在 {% data variables.product.product_name %} 上运行。
|
||||
{% data variables.product.prodname_actions %} is not required for {% data variables.product.prodname_dependabot_alerts %} to run on {% data variables.product.product_name %}.
|
||||
|
||||
{% endif %}
|
||||
|
||||
#### 什么是 Dependabot 警报
|
||||
{% ifversion dependabot-actions-support %}
|
||||
|
||||
{% data variables.product.prodname_dependabot_alerts %} 基于依赖项关系图和 {% data variables.product.prodname_advisory_database %} 突出显示了受新发现的漏洞影响的存储库,其中包含已知漏洞{% ifversion GH-advisory-db-supports-malware %}和恶意软件{% endif %}的公告。
|
||||
{% data reusables.dependabot.dependabot-actions-support %} For more information, see "[About {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/about-dependabot-security-updates)."
|
||||
|
||||
- {% data variables.product.prodname_dependabot %} 执行扫描以检测不安全的依赖项,并在以下情况下发送 {% data variables.product.prodname_dependabot_alerts %}:{% ifversion fpt or ghec %}
|
||||
- 新公告添加到 {% data variables.product.prodname_advisory_database %}。{% else %}
|
||||
- 新公告数据每小时从 {% data variables.product.prodname_dotcom_the_website %} 同步到 {% data variables.location.product_location %}。 {% data reusables.security-advisory.link-browsing-advisory-db %}{% endif %}
|
||||
- 存储库的依赖关系图发生更改。
|
||||
- {% data variables.product.prodname_dependabot_alerts %} 显示在{% ifversion fpt or ghec or ghes %}存储库的“安全性”选项卡上,以及{% endif %}存储库的依赖项关系图中。 警报包括项目中受影响文件的{% ifversion fpt or ghec or ghes %}链接,以及{% endif %}有关已修复的版本的信息。
|
||||
{% endif %}
|
||||
|
||||
有关详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies)”。
|
||||
#### What are Dependabot alerts
|
||||
|
||||
{% data variables.product.prodname_dependabot_alerts %} highlight repositories affected by a newly discovered vulnerability based on the dependency graph and the {% data variables.product.prodname_advisory_database %}, which contains advisories for known vulnerabilities{% ifversion GH-advisory-db-supports-malware %} and malware{% endif %}.
|
||||
|
||||
- {% data variables.product.prodname_dependabot %} performs a scan to detect insecure dependencies and sends {% data variables.product.prodname_dependabot_alerts %} when:
|
||||
{% ifversion fpt or ghec %}
|
||||
- A new advisory is added to the {% data variables.product.prodname_advisory_database %}.{% else %}
|
||||
- New advisory data is synchronized to {% data variables.location.product_location %} each hour from {% data variables.product.prodname_dotcom_the_website %}. {% data reusables.security-advisory.link-browsing-advisory-db %}{% endif %}
|
||||
- The dependency graph for the repository changes.
|
||||
- {% data variables.product.prodname_dependabot_alerts %} are displayed {% ifversion fpt or ghec or ghes %} on the **Security** tab for the repository and{% endif %} in the repository's dependency graph. The alert includes {% ifversion fpt or ghec or ghes %}a link to the affected file in the project, and {% endif %}information about a fixed version.
|
||||
|
||||
For more information, see "[About {% data variables.product.prodname_dependabot_alerts %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-alerts-for-vulnerable-dependencies)."
|
||||
|
||||
{% ifversion fpt or ghec or ghes %}
|
||||
#### 什么是 Dependabot 更新
|
||||
#### What are Dependabot updates
|
||||
|
||||
有两种类型的 {% data variables.product.prodname_dependabot_updates %}:{% data variables.product.prodname_dependabot %}安全更新和版本更新。 {% data variables.product.prodname_dependabot %} 会生成自动拉取请求以在这两种情况下更新依赖项,但存在一些差异。
|
||||
There are two types of {% data variables.product.prodname_dependabot_updates %}: {% data variables.product.prodname_dependabot %} _security_ updates and _version_ updates. {% data variables.product.prodname_dependabot %} generates automatic pull requests to update your dependencies in both cases, but there are several differences.
|
||||
|
||||
{% data variables.product.prodname_dependabot_security_updates %}:
|
||||
- 由 {% data variables.product.prodname_dependabot %} 警报触发
|
||||
- 将依赖项更新到可修复已知漏洞的最低版本
|
||||
- 支持用于依赖项关系图支持的生态系统
|
||||
- 不需要配置文件,但可使用配置文件来替代默认行为
|
||||
{% data variables.product.prodname_dependabot_security_updates %}:
|
||||
- Triggered by a {% data variables.product.prodname_dependabot %} alert
|
||||
- Update dependencies to the minimum version that resolves a known vulnerability
|
||||
- Supported for ecosystems the dependency graph supports
|
||||
- Does not require a configuration file, but you can use one to override the default behavior
|
||||
|
||||
{% data variables.product.prodname_dependabot_version_updates %}:
|
||||
- 需要配置文件
|
||||
- 按配置的计划运行
|
||||
- 将依赖项更新到与配置匹配的最新版本
|
||||
- 支持用于不同类别的生态系统
|
||||
{% data variables.product.prodname_dependabot_version_updates %}:
|
||||
- Requires a configuration file
|
||||
- Run on a schedule you configure
|
||||
- Update dependencies to the latest version that matches the configuration
|
||||
- Supported for a different group of ecosystems
|
||||
|
||||
有关 {% data variables.product.prodname_dependabot_updates %}的详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates)”和“[关于 {% data variables.product.prodname_dependabot_version_updates %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates)”。
|
||||
For more information about {% data variables.product.prodname_dependabot_updates %}, see "[About {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates)" and "[About {% data variables.product.prodname_dependabot_version_updates %}](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates)."
|
||||
{% endif %}
|
||||
|
||||
## 功能可用性
|
||||
## Feature availability
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
公共存储库:
|
||||
- 依赖项关系图 - 默认已启用,不能禁用。
|
||||
- 依赖项审查 - 默认已启用,不能禁用。
|
||||
- {% data variables.product.prodname_dependabot_alerts %} - 默认未启用。 {% data variables.product.prodname_dotcom %} 检测不安全的依赖项,并在依赖项关系图中显示信息,但默认情况下不会生成 {% data variables.product.prodname_dependabot_alerts %}。 存储库所有者或具有管理员访问权限的人员可以启用 {% data variables.product.prodname_dependabot_alerts %}。
|
||||
你也可以为用户帐户或组织拥有的所有存储库启用或禁用 Dependabot 警报。 有关详细信息,请参阅“[管理用户帐户的安全和分析设置](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account)”或“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization)”。
|
||||
Public repositories:
|
||||
- **Dependency graph**—enabled by default and cannot be disabled.
|
||||
- **Dependency review**—enabled by default and cannot be disabled.
|
||||
- **{% data variables.product.prodname_dependabot_alerts %}**—not enabled by default. {% data variables.product.prodname_dotcom %} detects insecure dependencies and displays information in the dependency graph, but does not generate {% data variables.product.prodname_dependabot_alerts %} by default. Repository owners or people with admin access can enable {% data variables.product.prodname_dependabot_alerts %}.
|
||||
You can also enable or disable Dependabot alerts for all repositories owned by your user account or organization. For more information, see "[Managing security and analysis settings for your user account](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account)" or "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization)."
|
||||
|
||||
专用存储库:
|
||||
- 依赖项关系图 - 默认未启用。 存储库管理员可以启用该功能。 有关详细信息,请参阅“[探索存储库的依赖项](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)”。
|
||||
Private repositories:
|
||||
- **Dependency graph**—not enabled by default. The feature can be enabled by repository administrators. For more information, see "[Exploring the dependencies of a repository](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)."
|
||||
{% ifversion fpt %}
|
||||
- 依赖项审查 - 可用于使用 {% data variables.product.prodname_ghe_cloud %} 并拥有 {% data variables.product.prodname_GH_advanced_security %} 的许可证的组织所拥有的专用存储库。 有关详细信息,请参阅 [{% data variables.product.prodname_ghe_cloud %} 文档](/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review)。
|
||||
- **Dependency review**—available in private repositories owned by organizations that use {% data variables.product.prodname_ghe_cloud %} and have a license for {% data variables.product.prodname_GH_advanced_security %}. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review).
|
||||
{% elsif ghec %}
|
||||
- 依赖项审查 - 在组织拥有的专用存储库中可用,前提是你具有 {% data variables.product.prodname_GH_advanced_security %} 许可证并启用了依赖项关系图。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)”和“[浏览存储库的依赖项](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)”。 {% endif %}
|
||||
- {% data variables.product.prodname_dependabot_alerts %} - 默认未启用。 私有仓库的所有者或具有管理员权限的人员可以通过为其仓库启用依赖关系图和 {% data variables.product.prodname_dependabot_alerts %} 来启用 {% data variables.product.prodname_dependabot_alerts %}。
|
||||
你也可以为用户帐户或组织拥有的所有存储库启用或禁用 Dependabot 警报。 有关详细信息,请参阅“[管理用户帐户的安全和分析设置](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account)”或“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization)”。
|
||||
- **Dependency review**—available in private repositories owned by organizations provided you have a license for {% data variables.product.prodname_GH_advanced_security %} and the dependency graph enabled. For more information, see "[About {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)" and "[Exploring the dependencies of a repository](/code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository#enabling-and-disabling-the-dependency-graph-for-a-private-repository)."
|
||||
{% endif %}
|
||||
- **{% data variables.product.prodname_dependabot_alerts %}**—not enabled by default. Owners of private repositories, or people with admin access, can enable {% data variables.product.prodname_dependabot_alerts %} by enabling the dependency graph and {% data variables.product.prodname_dependabot_alerts %} for their repositories.
|
||||
You can also enable or disable Dependabot alerts for all repositories owned by your user account or organization. For more information, see "[Managing security and analysis settings for your user account](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-security-and-analysis-settings-for-your-personal-account)" or "[Managing security and analysis settings for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization)."
|
||||
|
||||
任意存储库类型:
|
||||
- {% data variables.product.prodname_dependabot_security_updates %} - 默认未启用。 您可以为任何使用 {% data variables.product.prodname_dependabot_alerts %} 和依赖关系图的仓库启用 {% data variables.product.prodname_dependabot_security_updates %}。 若要了解如何启用安全更新,请参阅“[配置 {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates)”。
|
||||
- {% data variables.product.prodname_dependabot_version_updates %} - 默认未启用。 拥有存储库写入权限的用户可以启用 {% data variables.product.prodname_dependabot_version_updates %}。 若要了解如何启用版本更新,请参阅“[配置 {% data variables.product.prodname_dependabot_version_updates %}](/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)”。
|
||||
Any repository type:
|
||||
- **{% data variables.product.prodname_dependabot_security_updates %}**—not enabled by default. You can enable {% data variables.product.prodname_dependabot_security_updates %} for any repository that uses {% data variables.product.prodname_dependabot_alerts %} and the dependency graph. For information about enabling security updates, see "[Configuring {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates)."
|
||||
- **{% data variables.product.prodname_dependabot_version_updates %}**—not enabled by default. People with write permissions to a repository can enable {% data variables.product.prodname_dependabot_version_updates %}. For information about enabling version updates, see "[Configuring {% data variables.product.prodname_dependabot_version_updates %}](/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)."
|
||||
{% endif %}
|
||||
|
||||
{% ifversion ghes or ghae %}
|
||||
- 依赖项关系图和 {% data variables.product.prodname_dependabot_alerts %} - 默认未启用。 这两项功能由企业所有者在企业级别进行配置。 有关详细信息,请参阅 {% ifversion ghes %}“[为企业启用依赖项关系图](/admin/code-security/managing-supply-chain-security-for-your-enterprise/enabling-the-dependency-graph-for-your-enterprise)和 {% endif %}“[为企业启用 {% data variables.product.prodname_dependabot %} ](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)”。
|
||||
- 依赖项审查 - 为 {% data variables.location.product_location %} 启用依赖项关系图并为组织或存储库启用 {% data variables.product.prodname_advanced_security %} 时可用。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)”。
|
||||
{% endif %} {% ifversion ghes %}
|
||||
- {% data variables.product.prodname_dependabot_security_updates %} - 默认未启用。 您可以为任何使用 {% data variables.product.prodname_dependabot_alerts %} 和依赖关系图的仓库启用 {% data variables.product.prodname_dependabot_security_updates %}。 若要了解如何启用安全更新,请参阅“[配置 {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates)”。
|
||||
- {% data variables.product.prodname_dependabot_version_updates %} - 默认未启用。 拥有存储库写入权限的用户可以启用 {% data variables.product.prodname_dependabot_version_updates %}。 若要了解如何启用版本更新,请参阅“[配置 {% data variables.product.prodname_dependabot_version_updates %}](/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)”。
|
||||
- **Dependency graph** and **{% data variables.product.prodname_dependabot_alerts %}**—not enabled by default. Both features are configured at an enterprise level by the enterprise owner. For more information, see {% ifversion ghes %}"[Enabling the dependency graph for your enterprise](/admin/code-security/managing-supply-chain-security-for-your-enterprise/enabling-the-dependency-graph-for-your-enterprise)" and {% endif %}"[Enabling {% data variables.product.prodname_dependabot %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-dependabot-for-your-enterprise)."
|
||||
- **Dependency review**—available when dependency graph is enabled for {% data variables.location.product_location %} and {% data variables.product.prodname_advanced_security %} is enabled for the organization or repository. For more information, see "[About {% data variables.product.prodname_GH_advanced_security %}](/get-started/learning-about-github/about-github-advanced-security)."
|
||||
{% endif %}
|
||||
{% ifversion ghes %}
|
||||
- **{% data variables.product.prodname_dependabot_security_updates %}**—not enabled by default. You can enable {% data variables.product.prodname_dependabot_security_updates %} for any repository that uses {% data variables.product.prodname_dependabot_alerts %} and the dependency graph. For information about enabling security updates, see "[Configuring {% data variables.product.prodname_dependabot_security_updates %}](/code-security/dependabot/dependabot-security-updates/configuring-dependabot-security-updates)."
|
||||
- **{% data variables.product.prodname_dependabot_version_updates %}**—not enabled by default. People with write permissions to a repository can enable {% data variables.product.prodname_dependabot_version_updates %}. For information about enabling version updates, see "[Configuring {% data variables.product.prodname_dependabot_version_updates %}](/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates)."
|
||||
{% endif %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: The github.dev web-based editor
|
||||
intro: 'Use the github.dev {% data variables.codespaces.serverless %} from your repository or pull request to create and commit changes.'
|
||||
title: github.dev 基于 web 的编辑器
|
||||
intro: '使用存储库或拉取请求中的 github.dev {% data variables.codespaces.serverless %} 来创建和提交更改。'
|
||||
versions:
|
||||
feature: githubdev-editor
|
||||
type: how_to
|
||||
@@ -12,104 +12,108 @@ topics:
|
||||
shortTitle: Web-based editor
|
||||
redirect_from:
|
||||
- /codespaces/developing-in-codespaces/web-based-editor
|
||||
ms.openlocfilehash: adc5622d666f6a32e698a29ceedfc24217b27df9
|
||||
ms.sourcegitcommit: 57bef7d45acfa987d82e320c7581c87df320a28a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/18/2022
|
||||
ms.locfileid: '148172177'
|
||||
---
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** The github.dev {% data variables.codespaces.serverless %} is currently in beta preview. You can provide feedback [in our Discussions](https://github.com/community/community/discussions/categories/general).
|
||||
注意:github.dev {% data variables.codespaces.serverless %} 目前为测试预览版。 你可以在[我们的讨论中](https://github.com/community/community/discussions/categories/general)提供反馈。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## About the {% data variables.codespaces.serverless %}
|
||||
## 关于 {% data variables.codespaces.serverless %}
|
||||
|
||||
The {% data variables.codespaces.serverless %} introduces a lightweight editing experience that runs entirely in your browser. With the {% data variables.codespaces.serverless %}, you can navigate files and source code repositories from {% data variables.product.prodname_dotcom %}, and make and commit code changes. You can open any repository, fork, or pull request in the editor.
|
||||
{% data variables.codespaces.serverless %} 引入了完全在浏览器中运行的轻量级编辑体验。 使用 {% data variables.codespaces.serverless %},可以从 {% data variables.product.prodname_dotcom %} 中导航文件和源代码存储库,并创建和提交代码更改。 您可以在编辑器中打开任何存储库、复刻或拉取请求。
|
||||
|
||||
The {% data variables.codespaces.serverless %} is available to everyone for free on {% data variables.product.prodname_dotcom_the_website %}.
|
||||
{% data variables.codespaces.serverless %} 在 {% data variables.product.prodname_dotcom_the_website %} 上免费供所有人使用。
|
||||
|
||||
The {% data variables.codespaces.serverless %} provides many of the benefits of {% data variables.product.prodname_vscode %}, such as search, syntax highlighting, and a source control view. You can also use Settings Sync to share your own {% data variables.product.prodname_vscode_shortname %} settings with the editor. For more information, see "[Settings Sync](https://code.visualstudio.com/docs/editor/settings-sync)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
{% data variables.codespaces.serverless %} 具有 {% data variables.product.prodname_vscode %} 的诸多优点,如搜索、语法突出显示和源代码管理视图。 还可以使用 Settings Sync 与编辑器共享自己的 {% data variables.product.prodname_vscode_shortname %} 设置。 有关详细信息,请参阅 {% data variables.product.prodname_vscode_shortname %} 文档中的“[设置同步](https://code.visualstudio.com/docs/editor/settings-sync)”。
|
||||
|
||||
The {% data variables.codespaces.serverless %} runs entirely in your browser’s sandbox. The editor doesn’t clone the repository, but instead uses the [GitHub Repositories extension](https://code.visualstudio.com/docs/editor/github#_github-repositories-extension) to carry out most of the functionality that you will use. Your work is saved in the browser’s local storage until you commit it. You should commit your changes regularly to ensure that they're always accessible.
|
||||
{% data variables.codespaces.serverless %} 完全在浏览器的沙盒中运行。 编辑器不会克隆存储库,而是使用 [GitHub 存储库扩展](https://code.visualstudio.com/docs/editor/github#_github-repositories-extension)来执行你将要使用的大部分功能。 您的工作将保存在浏览器的本地存储中,直到您提交为止。 您应定期提交更改,以确保它们始终可访问。
|
||||
|
||||
You must be signed in to use the web-based editor.
|
||||
必须登录才能使用基于 Web 的编辑器。
|
||||
|
||||
## Opening the {% data variables.codespaces.serverless %}
|
||||
## 打开 {% data variables.codespaces.serverless %}
|
||||
|
||||
You can open any {% data variables.product.prodname_dotcom %} repository in the {% data variables.codespaces.serverless %} in either of the following ways:
|
||||
可以通过以下任一方式打开 {% data variables.codespaces.serverless %} 中的任何 {% data variables.product.prodname_dotcom %} 存储库:
|
||||
|
||||
- To open the repository in the same browser tab, press <kbd>.</kbd> while browsing any repository or pull request on {% data variables.product.prodname_dotcom %}.
|
||||
- 要在同一浏览器标签页中打开存储库,请按 <kbd>.</kbd> (在 {% data variables.product.prodname_dotcom %} 上浏览任何存储库或拉取请求时)。
|
||||
|
||||
To open the repository in a new browser tab, press <kbd>></kbd>.
|
||||
要在新的浏览器标签页中打开存储库,请按 <kbd>></kbd>。
|
||||
|
||||
- Change the URL from "github.com" to "github.dev".
|
||||
- When viewing a file, use the dropdown menu next to {% octicon "pencil" aria-label="The edit icon" %} and select **Open in github.dev**.
|
||||
- 将 URL 从“github.com”更改为“github.dev”。
|
||||
- 查看文件时,请使用 {% octicon "pencil" aria-label="The edit icon" %} 旁边的下拉菜单,然后选择“在 github.dev 中打开”。
|
||||
|
||||

|
||||

|
||||
|
||||
## {% data variables.product.prodname_codespaces %} and the {% data variables.codespaces.serverless %}
|
||||
## {% data variables.product.prodname_codespaces %} 和 {% data variables.codespaces.serverless %}
|
||||
|
||||
Both the {% data variables.codespaces.serverless %} and {% data variables.product.prodname_github_codespaces %} allow you to edit your code straight from your repository. However, both have slightly different benefits, depending on your use case.
|
||||
{% data variables.codespaces.serverless %} 和 {% data variables.product.prodname_github_codespaces %} 都允许你直接从存储库中编辑代码。 但两者的优点略有不同,具体取决于您的使用情况。
|
||||
|
||||
|| {% data variables.codespaces.serverless %} | {% data variables.product.prodname_github_codespaces %}|
|
||||
|-|----------------|---------|
|
||||
| **Cost** | Free. | Free monthly quota of usage for personal accounts. For information on pricing, see "[About billing for {% data variables.product.prodname_github_codespaces %}](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#github-codespaces-pricing)."|
|
||||
| **Availability** | Available to everyone on GitHub.com. | Available to everyone on GitHub.com. |
|
||||
| **Start up** | The {% data variables.codespaces.serverless %} opens instantly with a key-press and you can start using it right away, without having to wait for additional configuration or installation. | When you create or resume a codespace, the codespace is assigned a VM and the container is configured based on the contents of a `devcontainer.json` file. This set up may take a few minutes to create the environment. For more information, see "[Creating a codespace for a repository](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository)." |
|
||||
| **Compute** | There is no associated compute, so you won’t be able to build and run your code or use the integrated terminal. | With {% data variables.product.prodname_github_codespaces %}, you get the power of a dedicated VM on which you can run and debug your application.|
|
||||
| **Terminal access** | None. | {% data variables.product.prodname_github_codespaces %} provides a common set of tools by default, meaning that you can use the Terminal exactly as you would in your local environment.|
|
||||
| **Extensions** | Only a subset of extensions that can run in the web will appear in the Extensions View and can be installed. For more information, see "[Using extensions](#using-extensions)."| With {% data variables.product.prodname_github_codespaces %}, you can use most extensions from the {% data variables.product.prodname_vscode_marketplace %}.|
|
||||
| **成本** | 可用。 | 个人帐户每月免费使用配额。 有关定价的信息,请参阅“[关于 {% data variables.product.prodname_github_codespaces %} 的计费](/billing/managing-billing-for-github-codespaces/about-billing-for-github-codespaces#github-codespaces-pricing)”。|
|
||||
| **可用性** | 可供 GitHub.com 上的所有人使用。 | 可供 GitHub.com 上的所有人使用。 |
|
||||
| **启动** | {% data variables.codespaces.serverless %} 在按下按键时可立即打开,可以立即开始使用它,而无需等待其他配置或安装。 | 创建或恢复 codespace 时,将为该 codespace 分配一个 VM,并根据 `devcontainer.json` 文件的内容配置容器。 此设置可能需要几分钟才能创建环境。 有关详细信息,请参阅“[为存储库创建 codespace](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository)”。 |
|
||||
| **计算** | 没有关联的计算,因此您将无法创建和运行代码或使用集成终端。 | 借助 {% data variables.product.prodname_github_codespaces %},可以获得专用 VM 的强大功能,在该 VM 上可以运行和调试应用程序。|
|
||||
| **终端访问** | 无。 | 默认情况下,{% data variables.product.prodname_github_codespaces %} 提供一组通用工具,这意味着可以像在本地环境中一样使用终端。|
|
||||
| **扩展** | 只有可以在 Web 中运行的扩展子集才会显示在扩展视图中,并且可以安装。 有关详细信息,请参阅[使用扩展](#using-extensions)。| 借助 {% data variables.product.prodname_github_codespaces %},可以使用 {% data variables.product.prodname_vscode_marketplace %} 中的大多数扩展。|
|
||||
|
||||
### Continue working on {% data variables.product.prodname_codespaces %}
|
||||
### 继续使用 {% data variables.product.prodname_codespaces %}
|
||||
|
||||
You can start your workflow in the {% data variables.codespaces.serverless %} and continue working on a codespace. If you try to access the Run and Debug View or the Terminal, you'll be notified that they are not available in the {% data variables.codespaces.serverless %}.
|
||||
可以在 {% data variables.codespaces.serverless %} 中启动工作流并继续使用 codespace。 如果尝试访问运行和调试视图或终端,系统将通知你它们在 {% data variables.codespaces.serverless %} 中不可用。
|
||||
|
||||
To continue your work in a codespace, click **Continue Working on…** and select **Create New Codespace** to create a codespace on your current branch. Before you choose this option, you must commit any changes.
|
||||
要在 codespace 中继续工作,请单击“继续处理...” 然后选择“新建 Codespace”,在当前分支上创建 codespace。 在选择此选项之前,必须提交任何更改。
|
||||
|
||||

|
||||

|
||||
|
||||
## Using source control
|
||||
## 使用源控制
|
||||
|
||||
When you use the {% data variables.codespaces.serverless %}, all actions are managed through the Source Control View, which is located in the Activity Bar on the left hand side. For more information on the Source Control View, see "[Version Control](https://code.visualstudio.com/docs/editor/versioncontrol)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
使用 {% data variables.codespaces.serverless %} 时,所有操作都通过源代码管理视图进行管理,该视图位于左侧的活动栏中。 有关源代码管理视图的详细信息,请参阅 {% data variables.product.prodname_vscode_shortname %} 文档中的“[版本控制](https://code.visualstudio.com/docs/editor/versioncontrol)”。
|
||||
|
||||
Because the web-based editor uses the GitHub Repositories extension to power its functionality, you can switch branches without needing to stash changes. For more information, see "[GitHub Repositories](https://code.visualstudio.com/docs/editor/github#_github-repositories-extension)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
由于基于 Web 的编辑器使用 GitHub 存储库扩展来增强其功能,因此您可以切换分支而无需隐藏更改。 有关详细信息,请参阅 {% data variables.product.prodname_vscode_shortname %} 文档中的“[GitHub 存储库](https://code.visualstudio.com/docs/editor/github#_github-repositories-extension)”。
|
||||
|
||||
### Create a new branch
|
||||
### 创建新分支
|
||||
|
||||
{% data reusables.codespaces.create-or-switch-branch %}
|
||||
Any uncommitted changes you have made in your old branch will be available on your new branch.
|
||||
{% data reusables.codespaces.create-or-switch-branch %} 你在旧分支中所做的任何未提交的更改都将在新分支上可用。
|
||||
|
||||
### Commit your changes
|
||||
### 提交更改
|
||||
|
||||
{% data reusables.codespaces.source-control-commit-changes %}
|
||||
5. Once you have committed your changes, they will automatically be pushed to your branch on {% data variables.product.prodname_dotcom %}.
|
||||
### Create a pull request
|
||||
5. 更改在提交后将自动推送到 {% data variables.product.prodname_dotcom %} 上的分支。
|
||||
### 创建拉取请求
|
||||
|
||||
{% data reusables.codespaces.source-control-pull-request %}
|
||||
|
||||
### Working with an existing pull request
|
||||
### 使用现有的拉取请求
|
||||
|
||||
You can use the {% data variables.codespaces.serverless %} to work with an existing pull request.
|
||||
可以使用 {% data variables.codespaces.serverless %} 来处理现有的拉取请求。
|
||||
|
||||
1. Browse to the pull request you'd like to open in the {% data variables.codespaces.serverless %}.
|
||||
2. Press `.` to open the pull request in the {% data variables.codespaces.serverless %}.
|
||||
3. Once you have made any changes, commit them using the steps in [Commit your changes](#commit-your-changes). Your changes will be committed directly to the branch, it's not necessary to push the changes.
|
||||
1. 浏览到要在 {% data variables.codespaces.serverless %} 中打开的拉取请求。
|
||||
2. 按 `.` 以在 {% data variables.codespaces.serverless %} 中打开拉取请求。
|
||||
3. 进行任何更改后,请使用[提交更改](#commit-your-changes)中的步骤提交更改。 您的更改将直接提交到分支,无需推送更改。
|
||||
|
||||
## Using extensions
|
||||
## 使用扩展
|
||||
|
||||
The {% data variables.codespaces.serverless %} supports {% data variables.product.prodname_vscode_shortname %} extensions that have been specifically created or updated to run in the web. These extensions are known as "web extensions". To learn how you can create a web extension or update your existing extension to work for the web, see "[Web extensions](https://code.visualstudio.com/api/extension-guides/web-extensions)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
{% data variables.codespaces.serverless %} 支持专门创建或更新以在 Web 中运行的 {% data variables.product.prodname_vscode_shortname %} 扩展。 这些扩展称为“Web 扩展”。 要了解如何创建 Web 扩展或更新现有扩展以适用于 Web,请参阅 {% data variables.product.prodname_vscode_shortname %} 文档中的“[Web 扩展](https://code.visualstudio.com/api/extension-guides/web-extensions)”。
|
||||
|
||||
Extensions that can run in the {% data variables.codespaces.serverless %} will appear in the Extensions View and can be installed. If you use Settings Sync, any compatible extensions are also installed automatically. For information, see "[Settings Sync](https://code.visualstudio.com/docs/editor/settings-sync)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
可以在 {% data variables.codespaces.serverless %} 中运行的扩展将显示在扩展视图中,并且可以安装。 如果使用“设置同步”,则所有兼容的扩展也会自动安装。 有关信息,请参阅 {% data variables.product.prodname_vscode_shortname %} 文档中的“[设置同步](https://code.visualstudio.com/docs/editor/settings-sync)”。
|
||||
|
||||
|
||||
## Troubleshooting
|
||||
## 故障排除
|
||||
|
||||
If you have issues opening the {% data variables.codespaces.serverless %}, try the following:
|
||||
如果在打开 {% data variables.codespaces.serverless %} 时遇到问题,请尝试以下操作:
|
||||
|
||||
- Make sure you are signed in to {% data variables.product.prodname_dotcom %}.
|
||||
- Disable any ad blockers.
|
||||
- Use a non-incognito window in your browser to open the {% data variables.codespaces.serverless %}.
|
||||
- 确保您已登录到 {% data variables.product.prodname_dotcom %}。
|
||||
- 禁用任何广告拦截器。
|
||||
- 在浏览器中使用非隐身窗口打开 {% data variables.codespaces.serverless %}。
|
||||
|
||||
### Known limitations
|
||||
### 已知的限制
|
||||
|
||||
- The {% data variables.codespaces.serverless %} is currently supported in Chrome (and various other Chromium-based browsers), Edge, Firefox, and Safari. We recommend that you use the latest versions of these browsers.
|
||||
- Some keybindings may not work, depending on the browser you are using. These keybinding limitations are documented in the "[Known limitations and adaptations](https://code.visualstudio.com/docs/remote/codespaces#_known-limitations-and-adaptations)" section of the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
- `.` may not work to open the {% data variables.codespaces.serverless %} according to your local keyboard layout. In that case, you can open any {% data variables.product.prodname_dotcom %} repository in the {% data variables.codespaces.serverless %} by changing the URL from `github.com` to `github.dev`.
|
||||
- {% data variables.codespaces.serverless %} 目前在 Chrome(以及其他各种基于 Chromium 的浏览器)、Edge、Firefox 和 Safari 中受支持。 我们建议您使用这些浏览器的最新版本。
|
||||
- 某些按键绑定可能不起作用,具体取决于您使用的浏览器。 这些键绑定限制记录在 {% data variables.product.prodname_vscode_shortname %} 文档的“[已知限制和改编](https://code.visualstudio.com/docs/remote/codespaces#_known-limitations-and-adaptations)”部分中。
|
||||
- 根据本地键盘布局,`.` 可能无法打开 {% data variables.codespaces.serverless %}。 在这种情况下,可以通过将 URL 从 `github.com` 更改为 `github.dev` 来打开 {% data variables.codespaces.serverless %} 中的任何 {% data variables.product.prodname_dotcom %} 存储库。
|
||||
|
||||
@@ -1,121 +1,123 @@
|
||||
---
|
||||
title: Getting started with GitHub Copilot in a JetBrains IDE
|
||||
title: 在 JetBrains IDE 中开始使用 GitHub Copilot
|
||||
shortTitle: JetBrains IDE
|
||||
intro: 'Learn how to install {% data variables.product.prodname_copilot %} in a JetBrains IDE, and start seeing suggestions as you write comments and code.'
|
||||
intro: '了解如何在 JetBrains IDE 中安装 {% data variables.product.prodname_copilot %},并在编写注释和代码时开始查看建议。'
|
||||
product: '{% data reusables.gated-features.copilot %}'
|
||||
versions:
|
||||
feature: copilot
|
||||
topics:
|
||||
- Copilot
|
||||
ms.openlocfilehash: 24415504e0abeff6e129321068b07590d265da16
|
||||
ms.sourcegitcommit: 99eb4456062aea31ca381977396417cf92e5798d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/21/2022
|
||||
ms.locfileid: '148179575'
|
||||
---
|
||||
|
||||
## About {% data variables.product.prodname_copilot %} and JetBrains IDEs
|
||||
## 关于 {% data variables.product.prodname_copilot %} 和 JetBrains IDE
|
||||
|
||||
{% data reusables.copilot.procedural-intro %}
|
||||
|
||||
If you use a JetBrains IDE, you can view and incorporate suggestions from {% data variables.product.prodname_copilot %} directly within the editor. This guide demonstrates how to use {% data variables.product.prodname_copilot %} within a JetBrains IDE for macOS, Windows, or Linux.
|
||||
如果使用 JetBrains IDE,可以直接在编辑器中查看并合并来自 {% data variables.product.prodname_copilot %} 的建议。 本指南演示如何在适用于 macOS、Windows 或 Linux 的 JetBrains IDE 中使用 {% data variables.product.prodname_copilot %}。
|
||||
|
||||
## Prerequisites
|
||||
## 先决条件
|
||||
|
||||
{% data reusables.copilot.jetbrains-ides %}
|
||||
|
||||
## Installing the {% data variables.product.prodname_copilot %} extension in your JetBrains IDE
|
||||
## 在 JetBrains IDE 中安装 {% data variables.product.prodname_copilot %} 扩展
|
||||
|
||||
To use {% data variables.product.prodname_copilot %} in a JetBrains IDE, you must install the {% data variables.product.prodname_copilot %} extension. The following procedure will guide you through installation of the {% data variables.product.prodname_copilot %} plugin in IntelliJ IDEA. Steps to install the plugin in another supported IDE may differ.
|
||||
若要在 JetBrains IDE 中使用 {% data variables.product.prodname_copilot %},必须先安装 {% data variables.product.prodname_copilot %} 扩展。 以下过程将指导你在 IntelliJ IDEA 中安装 {% data variables.product.prodname_copilot %} 插件。 在另一个受支持的 IDE 中安装插件的步骤可能有所不同。
|
||||
|
||||
1. In your JetBrains IDE, under the **File** menu for Windows or under the name of your IDE for Mac (for example, **PyCharm** or **IntelliJ**), click **Settings** for Windows or **Preferences** for Mac.
|
||||
2. In the left-side menu of the **Settings/Preferences** dialog box, click **Plugins**.
|
||||
3. At the top of the **Settings/Preferences** dialog box, click **Marketplace**. In the search bar, search for **{% data variables.product.prodname_copilot %}**, then click **Install**.
|
||||

|
||||
1. After {% data variables.product.prodname_copilot %} is installed, click **Restart IDE**.
|
||||
1. After your JetBrains IDE has restarted, click the **Tools** menu. Click **{% data variables.product.prodname_copilot %}**, then click **Login to {% data variables.product.prodname_dotcom %}**.
|
||||

|
||||
1. In the "Sign in to {% data variables.product.prodname_dotcom %}" dialog box, to copy the device code and open the device activation window, click **Copy and Open**.
|
||||

|
||||
1. A device activation window will open in your browser. Paste the device code, then click **Continue**.
|
||||
1. 在 JetBrains IDE 中,在 Windows 的“文件”菜单或 IDE 名称 (Mac) 下(例如 PyCharm 或 IntelliJ),单击“设置”(Windows) 或“首选项”(Mac)。
|
||||
2. 在“设置/首选项”对话框的左侧菜单中,单击“插件”。
|
||||
3. 在“设置/首选项”对话框顶部,单击“市场”。 在搜索栏中,搜索“{% data variables.product.prodname_copilot %}”,然后单击“安装”。
|
||||

|
||||
1. 安装 {% data variables.product.prodname_copilot %} 后,单击“重启 IDE”。
|
||||
1. JetBrains IDE 重启后,单击“工具”菜单。 单击“{% data variables.product.prodname_copilot %}”,然后单击“登录到 {% data variables.product.prodname_dotcom %}”。
|
||||

|
||||
1. 在“登录到 {% data variables.product.prodname_dotcom %}”对话框中,若要复制设备代码并打开设备激活窗口,请单击“复制并打开”。
|
||||

|
||||
1. 设备激活窗口将在浏览器中打开。 粘贴设备代码,然后单击“继续”。
|
||||
|
||||
- To paste the code in Windows or Linux, press <kbd>Ctrl</kbd>+<kbd>v</kbd>.
|
||||
- To paste the code in macOS, press <kbd>command</kbd>+<kbd>v</kbd>.
|
||||
1. {% data variables.product.prodname_dotcom %} will request the necessary permissions for {% data variables.product.prodname_copilot %}. To approve these permissions, click **Authorize {% data variables.product.prodname_copilot %} Plugin**.
|
||||
1. After the permissions have been approved, your JetBrains IDE will show a confirmation. To begin using {% data variables.product.prodname_copilot %}, click **OK**.
|
||||

|
||||
- 若要在 Windows 或 Linux 中粘贴代码,请按 <kbd>Ctrl</kbd>+<kbd>v</kbd>。
|
||||
- 若要在 macOS 中粘贴代码,请按 <kbd>command</kbd>+<kbd>v</kbd>。
|
||||
1. {% data variables.product.prodname_dotcom %} 将请求 {% data variables.product.prodname_copilot %} 所需的权限。 若要批准这些权限,请单击“授权 {% data variables.product.prodname_copilot %} 插件”。
|
||||
1. 权限获得批准后,JetBrains IDE 将显示确认。 要开始使用 {% data variables.product.prodname_copilot %},请单击“确定”。
|
||||

|
||||
|
||||
|
||||
## Seeing your first suggestion
|
||||
## 查看第一个建议
|
||||
|
||||
{% data reusables.copilot.code-examples-limitations %}
|
||||
|
||||
{% data reusables.copilot.supported-languages %} The following samples are in Java, but other languages will work similarly.
|
||||
{% data reusables.copilot.supported-languages %} 以下示例使用的是 Java,但其他语言的工作方式类似。
|
||||
|
||||
{% data reusables.copilot.create-java-file %}
|
||||
1. In the Java file, create a class by typing `class Test`.
|
||||
{% data variables.product.prodname_copilot %} will automatically suggest a class body in grayed text, as shown below. The exact suggestion may vary.
|
||||

|
||||
{% data reusables.copilot.accept-suggestion %}
|
||||
1. To prompt {% data variables.product.prodname_copilot %} to suggest a function body, type the following line below the bracket of the `main` function. The exact suggestion may vary.
|
||||
1. 在 Java 文件中,通过键入 `class Test` 创建类。
|
||||
{% data variables.product.prodname_copilot %} 将自动以灰色文本建议类正文,如下所示。 具体的建议可能会有所不同。
|
||||
 {% data reusables.copilot.accept-suggestion %}
|
||||
1. 若要提示 {% data variables.product.prodname_copilot %} 建议函数正文,请在 `main` 函数括号下方键入以下行。 具体的建议可能会有所不同。
|
||||
{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %}
|
||||
|
||||

|
||||
{% data reusables.copilot.accept-suggestion %}
|
||||
 {% data reusables.copilot.accept-suggestion %}
|
||||
|
||||
{% data variables.product.prodname_copilot %} will attempt to match the context and style of your code. You can always edit the suggested code.
|
||||
{% data variables.product.prodname_copilot %} 将尝试与代码的上下文和样式匹配。 始终可以编辑建议的代码。
|
||||
|
||||
## Seeing alternative suggestions
|
||||
## 查看替代建议
|
||||
|
||||
{% data reusables.copilot.alternative-suggestions %}
|
||||
|
||||
{% data reusables.copilot.create-java-file %}
|
||||
1. To prompt {% data variables.product.prodname_copilot %} to show you a suggestion, type the following line in the Java file.
|
||||
{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %}
|
||||
{% data reusables.copilot.see-alternative-suggestions %}
|
||||
1. 若要提示 {% data variables.product.prodname_copilot %} 显示建议,请在 Java 文件中键入以下行。
|
||||
{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %} {% data reusables.copilot.see-alternative-suggestions %}
|
||||
|
||||
| OS | See next suggestion | See previous suggestion |
|
||||
| OS | 查看下一个建议 | 查看上一个建议 |
|
||||
| :- | :- | :- |
|
||||
| macOS | <kbd>Option</kbd>+<kbd>]</kbd> | <kbd>Option</kbd>+<kbd>[</kbd> |
|
||||
| macOS | <kbd>选项</kbd>+<kbd>]</kbd> | <kbd>选项</kbd>+<kbd>[</kbd> |
|
||||
| Windows | <kbd>Alt</kbd>+<kbd>]</kbd> | <kbd>Alt</kbd>+<kbd>[</kbd> |
|
||||
| Linux | <kbd>Alt</kbd>+<kbd>]</kbd> | <kbd>Alt</kbd>+<kbd>[</kbd> |
|
||||
{% data reusables.copilot.accept-or-reject-suggestion %}
|
||||
|
||||
## Seeing multiple suggestions in a new tab
|
||||
## 在新选项卡中查看多个建议
|
||||
|
||||
{% data reusables.copilot.suggestions-new-tab %}
|
||||
|
||||
{% data reusables.copilot.create-java-file %}
|
||||
1. To prompt {% data variables.product.prodname_copilot %} to show you a suggestion, type the following line in the Java file.
|
||||
1. 若要提示 {% data variables.product.prodname_copilot %} 显示建议,请在 Java 文件中键入以下行。
|
||||
{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %}
|
||||
1. Open a new tab with multiple additional suggestions.
|
||||
- On macOS, press <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>A</kbd>, then click **Open GitHub Copilot**, or press <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>\</kbd> to open the new tab immediately.
|
||||
- On Windows or Linux, press <kbd>Ctrl</kbd>+<kbd>Enter</kbd>, then click **Open GitHub Copilot**.
|
||||

|
||||
1. To accept a suggestion, above the suggestion, click **Accept Solution**. To reject all suggestions, close the tab.
|
||||
1. 打开包含多个附加建议的新选项卡。
|
||||
- 在 macOS 上,按 <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>A</kbd>,然后单击“打开 GitHub Copilot”,或按 <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>\</kbd> 立即打开新选项卡。
|
||||
- 在 Windows 或 Linux 上,按 <kbd>Ctrl</kbd>+<kbd>Enter</kbd>,然后单击“打开 GitHub Copilot”。
|
||||

|
||||
1. 若要接受建议,请在建议上方单击“接受解决方案”。 若要拒绝所有建议,请关闭选项卡。
|
||||
|
||||
## Generating code suggestions from comments
|
||||
## 从注释生成代码建议
|
||||
|
||||
{% data reusables.copilot.generating-suggestions-from-comments %}
|
||||
|
||||
{% data reusables.copilot.create-java-file %}
|
||||
1. To prompt {% data variables.product.prodname_copilot %} to suggest an implementation of a function in the Java file, type the following lines.
|
||||
1. 若要提示 {% data variables.product.prodname_copilot %} 以建议 Java 文件中函数的实现,请键入以下行。
|
||||
```java{:copy}
|
||||
// find all images without alternate text
|
||||
// and give them a red border
|
||||
void process () {
|
||||
```
|
||||

|
||||

|
||||
|
||||
## Enabling and disabling {% data variables.product.prodname_copilot %}
|
||||
## 启用或禁用 {% data variables.product.prodname_copilot %}
|
||||
|
||||
You can enable or disable {% data variables.product.prodname_copilot %} for all languages, or for individual languages. The {% data variables.product.prodname_copilot %} status icon in the bottom panel of your JetBrains IDE window indicates whether {% data variables.product.prodname_copilot %} is enabled or disabled. When enabled, the icon is highlighted. When disabled, the icon is grayed out.
|
||||
可以为所有语言或单个语言启用或禁用 {% data variables.product.prodname_copilot %}。 JetBrains IDE 窗口底部面板中的 {% data variables.product.prodname_copilot %} 状态图标指示 {% data variables.product.prodname_copilot %} 是启用还是禁用。 启用后,将突出显示图标。 禁用后,图标灰显。
|
||||
|
||||
1. To enable or disable {% data variables.product.prodname_copilot %}, click the status icon in the bottom panel of the JetBrains window.
|
||||

|
||||
2. If you are disabling {% data variables.product.prodname_copilot %}, you will be asked whether you want to disable it globally, or for the language of the file you are currently editing.
|
||||
1. 若要启用或禁用 {% data variables.product.prodname_copilot %},请单击 JetBrains 窗口底部面板中的状态图标。
|
||||

|
||||
2. 如果要禁用 {% data variables.product.prodname_copilot %},系统会询问是全局禁用它,还是要禁用当前正在编辑的文件的语言。
|
||||
|
||||
- To disable suggestions from {% data variables.product.prodname_copilot %} globally, click **Disable Completions**.
|
||||
- To disable suggestions from {% data variables.product.prodname_copilot %} for the specified language, click **Disable Completions for _LANGUAGE_**.
|
||||

|
||||
- 若要全局禁用 {% data variables.product.prodname_copilot %} 的建议,请单击“禁用完成”。
|
||||
- 若要禁用指定语言的 {% data variables.product.prodname_copilot %} 的建议,请单击“禁用 LANGUAGE 完成”。
|
||||

|
||||
|
||||
|
||||
## Further reading
|
||||
## 延伸阅读
|
||||
|
||||
- [The {% data variables.product.prodname_copilot %} website](https://copilot.github.com/)
|
||||
- [About {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot#about-the-license-for-the-github-copilot-plugin-in-jetbrains-ides)
|
||||
- [{% data variables.product.prodname_copilot %} 网站](https://copilot.github.com/)
|
||||
- [关于 {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot#about-the-license-for-the-github-copilot-plugin-in-jetbrains-ides)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Creating CI tests with the Checks API
|
||||
intro: 'Build a continuous integration server to run tests using a {% data variables.product.prodname_github_app %} and the Checks API.'
|
||||
title: 使用检查 API 创建 CI 测试
|
||||
intro: '使用 {% data variables.product.prodname_github_app %} 和检查 API 构建一个持续集成服务器以运行测试。'
|
||||
redirect_from:
|
||||
- /apps/quickstart-guides/creating-ci-tests-with-the-checks-api
|
||||
- /developers/apps/creating-ci-tests-with-the-checks-api
|
||||
@@ -12,98 +12,104 @@ versions:
|
||||
topics:
|
||||
- GitHub Apps
|
||||
shortTitle: CI tests using Checks API
|
||||
ms.openlocfilehash: 0459714ae9ffb8094c70a714a60a66a19964424f
|
||||
ms.sourcegitcommit: 06d16bf9a5c7f3e7107f4dcd4d06edae5971638b
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/21/2022
|
||||
ms.locfileid: '148179675'
|
||||
---
|
||||
## Introduction
|
||||
## 简介
|
||||
|
||||
This guide will introduce you to [GitHub Apps](/apps/) and the [Checks API](/rest/reference/checks), which you'll use to build a continuous integration (CI) server that runs tests.
|
||||
本指南将介绍 [GitHub 应用](/apps/)和[检查 API](/rest/reference/checks),你将使用它们生成运行测试的持续集成 (CI) 服务器。
|
||||
|
||||
CI is a software practice that requires frequently committing code to a shared repository. Committing code more often raises errors sooner and reduces the amount of code a developer needs to debug when finding the source of an error. Frequent code updates also make it easier to merge changes from different members of a software development team. This is great for developers, who can spend more time writing code and less time debugging errors or resolving merge conflicts. 🙌
|
||||
CI 是一种需要频繁提交代码到共享仓库的软件实践。 频繁提交代码能较早检测到错误,减少在查找错误来源时开发者需要调试的代码量。 频繁的代码更新也更便于从软件开发团队的不同成员合并更改。 这对开发者非常有益,他们可以将更多时间用于编写代码,而减少在调试错误或解决合并冲突上所花的时间。 🙌
|
||||
|
||||
A CI server hosts code that runs CI tests such as code linters (which check style formatting), security checks, code coverage, and other checks against new code commits in a repository. CI servers can even build and deploy code to staging or production servers. For some examples of the types of CI tests you can create with a GitHub App, check out the [continuous integration apps](https://github.com/marketplace/category/continuous-integration) available in GitHub Marketplace.
|
||||
CI 服务器托管运行 CI 测试的代码,如代码语法检查(检查样式格式)、安全检查、代码覆盖率以及针对仓库中新代码提交的其他检查。 CI 服务器甚至可以构建代码并将其部署到暂存或生产服务器。 有关可以使用 GitHub 应用创建的 CI 测试类型的一些示例,请查看 GitHub 市场中可用的[持续集成应用](https://github.com/marketplace/category/continuous-integration)。
|
||||
|
||||
{% data reusables.apps.app-ruby-guides %}
|
||||
|
||||
### Checks API overview
|
||||
### 检查 API 概述
|
||||
|
||||
The [Checks API](/rest/reference/checks) allows you to set up CI tests that are automatically run against each code commit in a repository. The Checks API reports detailed information about each check on GitHub in the pull request's **Checks** tab. With the Checks API, you can create annotations with additional details for specific lines of code. Annotations are visible in the **Checks** tab. When you create an annotation for a file that is part of the pull request, the annotations are also shown in the **Files changed** tab.
|
||||
[检查 API](/rest/reference/checks) 允许你设置针对存储库中的每个代码提交自动运行的 CI 测试。 检查 API 会在 GitHub 上的拉取请求的“检查”选项卡中报告有关每个检查的详细信息。使用检查 API,可以为特定代码行创建具有其他详细信息的注释。 注释显示在“检查”选项卡中。当你为拉取请求中的文件创建注释时,注释也会显示在“已更改的文件”选项卡中。
|
||||
|
||||
A _check suite_ is a group of _check runs_ (individual CI tests). Both the suite and the runs contain _statuses_ that are visible in a pull request on GitHub. You can use statuses to determine when a code commit introduces errors. Using these statuses with [protected branches](/rest/reference/repos#branches) can prevent people from merging pull requests prematurely. See "[About protected branches](/github/administering-a-repository/about-protected-branches#require-status-checks-before-merging)" for more details.
|
||||
检查套件是一组检查运行(单个 CI 测试)。 套件和运行都包含 GitHub 上的拉取请求中可见的状态。 您可以使用状态来确定何时代码提交引入错误。 将这些状态与[受保护的分支](/rest/reference/repos#branches)结合使用,可以防止人们过早合并拉取请求。 有关更多详细信息,请参阅“[关于受保护的分支](/github/administering-a-repository/about-protected-branches#require-status-checks-before-merging)”。
|
||||
|
||||
The Checks API sends the [`check_suite` webhook event](/webhooks/event-payloads/#check_suite) to all GitHub Apps installed on a repository each time new code is pushed to the repository. To receive all Checks API event actions, the app must have the `checks:write` permission. GitHub automatically creates `check_suite` events for new code commits in a repository using the default flow, although [Update repository preferences for check suites](/rest/reference/checks#update-repository-preferences-for-check-suites) if you'd like. Here's how the default flow works:
|
||||
每当将新代码推送到存储库时,检查 API 都会将 [`check_suite` Webhook 事件](/webhooks/event-payloads/#check_suite)发送到存储库上安装的所有 GitHub 应用。 要接收所有检查 API 事件操作,应用必须具有 `checks:write` 权限。 GitHub 使用默认流自动为存储库中的新代码提交创建 `check_suite` 事件,尽管可根据需要[更新检查套件的存储库首选项](/rest/reference/checks#update-repository-preferences-for-check-suites)。 以下是默认流程的工作方式:
|
||||
|
||||
1. Whenever someone pushes code to the repository, GitHub sends the `check_suite` event with an action of `requested` to all GitHub Apps installed on the repository that have the `checks:write` permission. This event lets the apps know that code was pushed and that GitHub has automatically created a new check suite.
|
||||
1. When your app receives this event, it can [add check runs](/rest/reference/checks#create-a-check-run) to that suite.
|
||||
1. Your check runs can include [annotations](/rest/reference/checks#annotations-object) that are displayed on specific lines of code.
|
||||
1. 每当有人将代码推送到存储库时,GitHub 都会将包含 `requested` 操作的 `check_suite` 事件发送到存储库上安装的具有 `checks:write` 权限的所有 GitHub 应用。 此事件让应用程序知道推送了代码,并且 GitHub 已自动创建新的检查套件。
|
||||
1. 当应用收到此事件时,它可以向该套件[添加检查运行](/rest/reference/checks#create-a-check-run)。
|
||||
1. 检查运行可能包括在特定代码行中显示的[注释](/rest/reference/checks#annotations-object)。
|
||||
|
||||
**In this guide, you’ll learn how to:**
|
||||
在本指南中,你将学习如何:
|
||||
|
||||
* Part 1: Set up the framework for a CI server using the Checks API.
|
||||
* Configure a GitHub App as a server that receives Checks API events.
|
||||
* Create new check runs for CI tests when a repository receives newly pushed commits.
|
||||
* Re-run check runs when a user requests that action on GitHub.
|
||||
* Part 2: Build on the CI server framework you created by adding a linter CI test.
|
||||
* Update a check run with a `status`, `conclusion`, and `output` details.
|
||||
* Create annotations on lines of code that GitHub displays in the **Checks** and **Files Changed** tab of a pull request.
|
||||
* Automatically fix linter recommendations by exposing a "Fix this" button in the **Checks** tab of the pull request.
|
||||
* 第 1 部分:使用检查 API 为 CI 服务器设置框架。
|
||||
* 将 GitHub 应用程序配置为接收检查 API 事件的服务器。
|
||||
* 当仓库收到新推送的提交时,为 CI 测试创建新的检查运行。
|
||||
* 当用户在 GitHub 上请求该操作时,重新运行检查。
|
||||
* 第 2 部分:通过添加语法检查 CI 测试在您创建的 CI 服务器框架上构建。
|
||||
* 使用 `status`、`conclusion` 和 `output` 详细信息更新检查运行。
|
||||
* 在 GitHub 显示在拉取请求的“检查”和“已更改的文件”选项卡中的代码行上创建注释。
|
||||
* 通过在“检查”选项卡中显示“修复此问题”按钮来自动修复 linter 建议。
|
||||
|
||||
To get an idea of what your Checks API CI server will do when you've completed this quickstart, check out the demo below:
|
||||
要了解完成此快速入门后检查 API CI 服务器将执行的操作,请查看以下演示:
|
||||
|
||||

|
||||

|
||||
|
||||
## Prerequisites
|
||||
## 先决条件
|
||||
|
||||
Before you get started, you may want to familiarize yourself with [GitHub Apps](/apps/), [Webhooks](/webhooks), and the [Checks API](/rest/reference/checks), if you're not already. You'll find more APIs in the [REST API docs](/rest). The Checks API is also available to use in [GraphQL](/graphql), but this quickstart focuses on REST. See the GraphQL [Checks Suite](/graphql/reference/objects#checksuite) and [Check Run](/graphql/reference/objects#checkrun) objects for more details.
|
||||
在开始之前,你可能需要熟悉 [GitHub 应用](/apps/)、[Webhook](/webhooks) 和[检查 API](/rest/reference/checks)(如果还没有这么做)。 可以在 [REST API 文档](/rest)中找到更多 API。检查 API 也可用于 [GraphQL](/graphql),但本快速入门重点介绍了 REST。 有关更多详细信息,请参阅 GraphQL [检查套件](/graphql/reference/objects#checksuite)和[检查运行](/graphql/reference/objects#checkrun)对象。
|
||||
|
||||
You'll use the [Ruby programming language](https://www.ruby-lang.org/en/), the [Smee](https://smee.io/) webhook payload delivery service, the [Octokit.rb Ruby library](http://octokit.github.io/octokit.rb/) for the GitHub REST API, and the [Sinatra web framework](http://sinatrarb.com/) to create your Checks API CI server app.
|
||||
你将使用 [Ruby 编程语言](https://www.ruby-lang.org/en/)、[Smee](https://smee.io/) Webhook 有效负载交付服务、GitHub REST API 的 [Octokit.rb Ruby 库](http://octokit.github.io/octokit.rb/)和 [Sinatra Web 框架](http://sinatrarb.com/)来创建检查 API CI 服务器应用。
|
||||
|
||||
You don't need to be an expert in any of these tools or concepts to complete this project. This guide will walk you through all the required steps. Before you begin creating CI tests with the Checks API, you'll need to do the following:
|
||||
完成此项目并不需要您精通任何这些工具或概念。 本指南将引导您完成所有必需的步骤。 在开始使用检查 API 创建 CI 测试之前,您需要执行以下操作:
|
||||
|
||||
1. Clone the [Creating CI tests with the Checks API](https://github.com/github-developer/creating-ci-tests-with-the-checks-api) repository.
|
||||
1. 克隆[使用检查 API 创建 CI 测试](https://github.com/github-developer/creating-ci-tests-with-the-checks-api)存储库。
|
||||
```shell
|
||||
$ git clone https://github.com/github-developer/creating-ci-tests-with-the-checks-api.git
|
||||
```
|
||||
|
||||
Inside the directory, you'll find a `template_server.rb` file with the template code you'll use in this quickstart and a `server.rb` file with the completed project code.
|
||||
在目录中,你将找到包含本快速入门将要使用的模板代码的 `template_server.rb` 文件以及包含已完成项目代码的 `server.rb` 文件。
|
||||
|
||||
1. Follow the steps in the "[Setting up your development environment](/apps/quickstart-guides/setting-up-your-development-environment/)" quickstart to configure and run the app server. **Note:** Instead of [cloning the GitHub App template repository](/apps/quickstart-guides/setting-up-your-development-environment/#prerequisites), use the `template_server.rb` file in the repository you cloned in the previous step in this quickstart.
|
||||
1. 按照“[设置开发环境](/apps/quickstart-guides/setting-up-your-development-environment/)”快速入门中的步骤来配置和运行应用服务器。 注意:请使用在本快速入门的上一步中克隆的存储库中的 `template_server.rb` 文件,而不要[克隆 GitHub 应用模板存储库](/apps/quickstart-guides/setting-up-your-development-environment/#prerequisites)。
|
||||
|
||||
If you've completed a GitHub App quickstart before, make sure to register a _new_ GitHub App and start a new Smee channel to use with this quickstart.
|
||||
如果你之前已完成 GitHub 应用快速入门,请确保注册一个新的 GitHub 应用,并开启一个新的 Smee 通道用于本快速入门。
|
||||
|
||||
See the [troubleshooting](/apps/quickstart-guides/setting-up-your-development-environment/#troubleshooting) section if you are running into problems setting up your template GitHub App.
|
||||
如果在设置模板 GitHub 应用时遇到问题,请参阅[故障排除](/apps/quickstart-guides/setting-up-your-development-environment/#troubleshooting)部分。
|
||||
|
||||
## Part 1. Creating the Checks API interface
|
||||
## 第 1 部分。 创建检查 API 接口
|
||||
|
||||
In this part, you will add the code necessary to receive `check_suite` webhook events and create and update check runs. You'll also learn how to create check runs when a check was re-requested on GitHub. At the end of this section, you'll be able to view the check run you created in a GitHub pull request.
|
||||
在本部分,你将添加必要的代码以接收 `check_suite` Webhook 事件并创建和更新检查运行。 您还将学习在 GitHub 上重新请求检查时如何创建检查运行。 在本节的最后,您将能够查看在 GitHub 拉取请求中创建的检查运行。
|
||||
|
||||
Your check run will not be performing any checks on the code in this section. You'll add that functionality in [Part 2: Creating the Octo RuboCop CI test](#part-2-creating-the-octo-rubocop-ci-test).
|
||||
您的检查运行不会对本节中的代码执行任何检查。 你将在[第 2 部分:创建 Octo RuboCop CI 测试](#part-2-creating-the-octo-rubocop-ci-test)中添加该功能。
|
||||
|
||||
You should already have a Smee channel configured that is forwarding webhook payloads to your local server. Your server should be running and connected to the GitHub App you registered and installed on a test repository. If you haven't completed the steps in "[Setting up your development environment](/apps/quickstart-guides/setting-up-your-development-environment/)," you'll need to do that before you can continue.
|
||||
您应该已经配置了可将 web 挂钩有效负载转发到本地服务器的 Smee 通道。 您的服务器应该正在运行并连接到您注册并安装在测试仓库的 GitHub 应用程序。 如果尚未完成“[设置开发环境](/apps/quickstart-guides/setting-up-your-development-environment/)”中的步骤,请先执行此操作,然后才能继续。
|
||||
|
||||
Let's get started! These are the steps you'll complete in Part 1:
|
||||
让我们开始吧! 以下是您将在第 1 部分中完成的步骤:
|
||||
|
||||
1. [Updating app permissions](#step-11-updating-app-permissions)
|
||||
1. [Adding event handling](#step-12-adding-event-handling)
|
||||
1. [Creating a check run](#step-13-creating-a-check-run)
|
||||
1. [Updating a check run](#step-14-updating-a-check-run)
|
||||
1. [更新应用权限](#step-11-updating-app-permissions)
|
||||
1. [添加事件处理](#step-12-adding-event-handling)
|
||||
1. [创建检查运行](#step-13-creating-a-check-run)
|
||||
1. [更新检查运行](#step-14-updating-a-check-run)
|
||||
|
||||
## Step 1.1. Updating app permissions
|
||||
## 步骤 1.1. 更新应用程序权限
|
||||
|
||||
When you [first registered your app](#prerequisites), you accepted the default permissions, which means your app doesn't have access to most resources. For this example, your app will need permission to read and write checks.
|
||||
如果你在[首次注册应用](#prerequisites)时接受了默认权限,则意味着你的应用无法访问大多数资源。 对于此示例,您的应用程序将需要读取和写入检查的权限。
|
||||
|
||||
To update your app's permissions:
|
||||
要更新应用程序的权限:
|
||||
|
||||
1. Select your app from the [app settings page](https://github.com/settings/apps) and click **Permissions & Webhooks** in the sidebar.
|
||||
1. In the "Permissions" section, find "Checks", and select **Read & write** in the Access dropdown next to it.
|
||||
1. In the "Subscribe to events" section, select **Check suite** and **Check run** to subscribe to these events.
|
||||
1. 从[应用设置页](https://github.com/settings/apps)中选择应用,然后单击边栏中的“权限和 Webhook”。
|
||||
1. 在“权限”部分,找到“检查”,然后在旁边的“访问权限”下拉列表中选择“读取和写入”。
|
||||
1. 在“订阅事件”部分中,选择“检查套件”和“检查运行”以订阅这些事件。
|
||||
{% data reusables.apps.accept_new_permissions_steps %}
|
||||
|
||||
Great! Your app has permission to do the tasks you want it to do. Now you can add the code to handle the events.
|
||||
很好! 您的应用程序现在有权限执行所需的任务。 现在您可以添加代码来处理事件。
|
||||
|
||||
## Step 1.2. Adding event handling
|
||||
## 步骤 1.2. 添加事件处理
|
||||
|
||||
Now that your app is subscribed to the **Check suite** and **Check run** events, it will start receiving the [`check_suite`](/webhooks/event-payloads/#check_suite) and [`check_run`](/webhooks/event-payloads/#check_run) webhooks. GitHub sends webhook payloads as `POST` requests. Because you forwarded your Smee webhook payloads to `http://localhost/event_handler:3000`, your server will receive the `POST` request payloads at the `post '/event_handler'` route.
|
||||
现在,应用已订阅“检查套件”和“检查运行” 事件,它将开始接收 [`check_suite`](/webhooks/event-payloads/#check_suite) 和 [`check_run`](/webhooks/event-payloads/#check_run) Webhook。 GitHub 将 Webhook 有效负载作为 `POST` 请求发送。 因为你已将 Smee Webhook 有效负载转发到 `http://localhost/event_handler:3000`,因此服务器将在 `post '/event_handler'` 路由中接收 `POST` 请求有效负载。
|
||||
|
||||
An empty `post '/event_handler'` route is already included in the `template_server.rb` file, which you downloaded in the [prerequisites](#prerequisites) section. The empty route looks like this:
|
||||
空 `post '/event_handler'` 路由已包含在你在[先决条件](#prerequisites)部分中下载的 `template_server.rb` 文件中。 空路由如下所示:
|
||||
|
||||
``` ruby
|
||||
post '/event_handler' do
|
||||
@@ -116,7 +122,7 @@ An empty `post '/event_handler'` route is already included in the `template_serv
|
||||
end
|
||||
```
|
||||
|
||||
Use this route to handle the `check_suite` event by adding the following code:
|
||||
通过添加以下代码,使用此路由来处理 `check_suite` 事件:
|
||||
|
||||
``` ruby
|
||||
# Get the event type from the HTTP_X_GITHUB_EVENT header
|
||||
@@ -129,13 +135,13 @@ when 'check_suite'
|
||||
end
|
||||
```
|
||||
|
||||
Every event that GitHub sends includes a request header called `HTTP_X_GITHUB_EVENT`, which indicates the type of event in the `POST` request. Right now, you're only interested in events of type `check_suite`, which are emitted when a new check suite is created. Each event has an additional `action` field that indicates the type of action that triggered the events. For `check_suite`, the `action` field can be `requested`, `rerequested`, or `completed`.
|
||||
GitHub 发送的每个事件都包含一个名为 `HTTP_X_GITHUB_EVENT` 的请求标头,它指示 `POST` 请求中的事件类型。 现在,你只关注类型为 `check_suite` 的事件,在创建新的检查套件时会触发这些事件。 每个事件都有一个附加的 `action` 字段,它指示触发事件的操作类型。 对于 `check_suite`,`action` 字段可以是 `requested`、`rerequested` 或 `completed`。
|
||||
|
||||
The `requested` action requests a check run each time code is pushed to the repository, while the `rerequested` action requests that you re-run a check for code that already exists in the repository. Because both the `requested` and `rerequested` actions require creating a check run, you'll call a helper called `create_check_run`. Let's write that method now.
|
||||
每当有代码推送到存储库时,`requested` 操作会请求检查运行,而 `rerequested` 操作则请求你对存储库中已经存在的代码重新运行检查。 由于 `requested` 和 `rerequested` 操作都需要创建检查运行,因此你将调用名为 `create_check_run` 的帮助程序。 现在我们来编写该方法。
|
||||
|
||||
## Step 1.3. Creating a check run
|
||||
## 步骤 1.3. 创建检查运行
|
||||
|
||||
You'll add this new method as a [Sinatra helper](https://github.com/sinatra/sinatra#helpers) in case you want other routes to use it too. Under `helpers do`, add this `create_check_run` method:
|
||||
如果希望其他路由也使用此新方法,请将其添加为 [Sinatra 帮助程序](https://github.com/sinatra/sinatra#helpers)。 在 `helpers do` 下,添加此 `create_check_run` 方法:
|
||||
|
||||
``` ruby
|
||||
# Create a new check run with the status queued
|
||||
@@ -154,17 +160,17 @@ def create_check_run
|
||||
end
|
||||
```
|
||||
|
||||
This code calls the "[Create a check run](/rest/reference/checks#create-a-check-run)" endpoint using the [create_check_run method](https://msp-greg.github.io/octokit/Octokit/Client/Checks.html#create_check_run-instance_method).
|
||||
此代码使用 [create_check_run 方法](https://msp-greg.github.io/octokit/Octokit/Client/Checks.html#create_check_run-instance_method)调用“[创建检查运行](/rest/reference/checks#create-a-check-run)”终结点。
|
||||
|
||||
To create a check run, only two input parameters are required: `name` and `head_sha`. We will use [RuboCop](https://rubocop.readthedocs.io/en/latest/) to implement the CI test later in this quickstart, which is why the name "Octo RuboCop" is used here, but you can choose any name you'd like for the check run.
|
||||
若要创建检查运行,只需要两个输入参数:`name` 和 `head_sha`。 在本快速入门中的稍后部分,我们将使用 [RuboCop](https://rubocop.readthedocs.io/en/latest/) 来实现 CI 测试,这就是在此处使用名称“Octo RuboCop”的原因,但是你可以为检查运行选择任何想用的名称。
|
||||
|
||||
You're only supplying the required parameters now to get the basic functionality working, but you'll update the check run later as you collect more information about the check run. By default, GitHub sets the `status` to `queued`.
|
||||
您现在仅提供必需的参数以使基本功能正常工作,但是稍后您将在收集有关检查运行的更多信息时更新检查运行。 默认情况下,GitHub 将 `status` 设置为 `queued`。
|
||||
|
||||
GitHub creates a check run for a specific commit SHA, which is why `head_sha` is a required parameter. You can find the commit SHA in the webhook payload. Although you're only creating a check run for the `check_suite` event right now, it's good to know that the `head_sha` is included in both the `check_suite` and `check_run` objects in the event payloads.
|
||||
GitHub 为特定的提交 SHA 创建检查运行,因此 `head_sha` 是必需参数。 您可以在 web 挂钩有效负载中找到提交 SHA。 虽然现在你只为 `check_suite` 事件创建检查运行,但最好知道 `head_sha` 包含在事件有效负载中的 `check_suite` 和 `check_run` 对象中。
|
||||
|
||||
In the code above, you're using the [ternary operator](https://ruby-doc.org/core-2.3.0/doc/syntax/control_expressions_rdoc.html#label-Ternary+if), which works like an `if/else` statement, to check if the payload contains a `check_run` object. If it does, you read the `head_sha` from the `check_run` object, otherwise you read it from the `check_suite` object.
|
||||
在上面的代码中,你将使用[三元运算符](https://ruby-doc.org/core-2.3.0/doc/syntax/control_expressions_rdoc.html#label-Ternary+if)(其工作原理类似于 `if/else` 语句)来检查有效负载是否包含 `check_run` 对象。 如果包含,你将从 `check_run` 对象中读取 `head_sha`,否则从 `check_suite` 对象中读取。
|
||||
|
||||
To test this code, restart the server from your terminal:
|
||||
要测试此代码,请从您的终端重启服务器:
|
||||
|
||||
```shell
|
||||
$ ruby template_server.rb
|
||||
@@ -172,21 +178,21 @@ $ ruby template_server.rb
|
||||
|
||||
{% data reusables.apps.sinatra_restart_instructions %}
|
||||
|
||||
Now open a pull request in the repository where you installed your app. Your app should respond by creating a check run on your pull request. Click on the **Checks** tab, and you should see something like this:
|
||||
现在,在安装应用程序的仓库中打开拉取请求。 您的应用程序应该通过对拉取请求创建检查运行来响应。 单击“检查”选项卡,应该会看到如下所示的内容:
|
||||
|
||||

|
||||

|
||||
|
||||
If you see other apps in the Checks tab, it means you have other apps installed on your repository that have **Read & write** access to checks and are subscribed to **Check suite** and **Check run** events.
|
||||
如果在“检查”选项卡中看到其他应用,这意味着已在存储库上安装了其他应用,这些应用对检查具有“读取与写入”访问权限,并订阅了“检查套件”和“检查运行”事件。
|
||||
|
||||
Great! You've told GitHub to create a check run. You can see the check run status is set to `queued` next to a yellow icon. Next, you'll want to wait for GitHub to create the check run and update its status.
|
||||
很好! 您已告诉 GitHub 创建检查运行。 你可以在黄色图标旁边看到检查运行状态设置为 `queued`。 接下来,您需要等待 GitHub 创建检查运行并更新其状态。
|
||||
|
||||
## Step 1.4. Updating a check run
|
||||
## 步骤 1.4. 更新检查运行
|
||||
|
||||
When your `create_check_run` method runs, it asks GitHub to create a new check run. When GitHub finishes creating the check run, you'll receive the `check_run` webhook event with the `created` action. That event is your signal to begin running the check.
|
||||
当 `create_check_run` 方法运行时,它会要求 GitHub 创建新的检查运行。 GitHub 创建完检查运行后,你将收到包含 `created` 操作的 `check_run` Webhook 事件。 该事件是您开始运行检查的信号。
|
||||
|
||||
You'll want to update your event handler to look for the `created` action. While you're updating the event handler, you can add a conditional for the `rerequested` action. When someone re-runs a single test on GitHub by clicking the "Re-run" button, GitHub sends the `rerequested` check run event to your app. When a check run is `rerequested`, you'll want to start the process all over and create a new check run.
|
||||
你需要更新事件处理程序以查找 `created` 操作。 在更新事件处理程序时,可以为 `rerequested` 操作添加条件。 当用户通过单击“重新运行”按钮在 GitHub 上重新运行单个测试时,GitHub 会将 `rerequested` 检查运行事件发送到你的应用。 当检查运行为 `rerequested` 时,你需要重新启动整个过程并创建新的检查运行。
|
||||
|
||||
To include a condition for the `check_run` event in the `post '/event_handler'` route, add the following code under `case request.env['HTTP_X_GITHUB_EVENT']`:
|
||||
若要在 `post '/event_handler'` 路由中包含 `check_run` 事件的条件,请在 `case request.env['HTTP_X_GITHUB_EVENT']` 下添加以下代码:
|
||||
|
||||
``` ruby
|
||||
when 'check_run'
|
||||
@@ -201,13 +207,13 @@ when 'check_run'
|
||||
end
|
||||
```
|
||||
|
||||
GitHub sends all events for `created` check runs to every app installed on a repository that has the necessary checks permissions. That means that your app will receive check runs created by other apps. A `created` check run is a little different from a `requested` or `rerequested` check suite, which GitHub sends only to apps that are being requested to run a check. The code above looks for the check run's application ID. This filters out all check runs for other apps on the repository.
|
||||
GitHub 会将 `created` 检查运行的所有事件发送到存储库中安装的每个具有必要检查权限的应用。 这意味着您的应用程序将收到其他应用程序创建的检查运行。 `created` 检查运行与 `requested` 或 `rerequested` 检查套件略有不同,GitHub 仅会将这两个套件发送到请求运行检查的应用。 上面的代码查找检查运行的应用程序 ID。 这将过滤掉仓库中其他应用程序的所有检查运行。
|
||||
|
||||
Next you'll write the `initiate_check_run` method, which is where you'll update the check run status and prepare to kick off your CI test.
|
||||
接下来,你将编写 `initiate_check_run` 方法,你将在其中更新检查运行状态并准备开始 CI 测试。
|
||||
|
||||
In this section, you're not going to kick off the CI test yet, but you'll walk through how to update the status of the check run from `queued` to `pending` and then from `pending` to `completed` to see the overall flow of a check run. In "[Part 2: Creating the Octo RuboCop CI test](#part-2-creating-the-octo-rubocop-ci-test)," you'll add the code that actually performs the CI test.
|
||||
在本部分中,你尚未开始 CI 测试,但将逐步了解如何将检查运行的状态从 `queued` 更新为 `pending`,然后从 `pending` 更新为 `completed` 以查看检查运行的总体流。 在“[第 2 部分:创建 Octo RuboCop CI 测试](#part-2-creating-the-octo-rubocop-ci-test)”中,将添加实际执行 CI 测试的代码。
|
||||
|
||||
Let's create the `initiate_check_run` method and update the status of the check run. Add the following code to the helpers section:
|
||||
我们来创建 `initiate_check_run` 方法并更新检查运行的状态。 将以下代码添加到小助手部分:
|
||||
|
||||
``` ruby
|
||||
# Start the CI process
|
||||
@@ -236,53 +242,53 @@ def initiate_check_run
|
||||
end
|
||||
```
|
||||
|
||||
The code above calls the "[Update a check run](/rest/reference/checks#update-a-check-run)" API endpoint using the [`update_check_run` Octokit method](https://msp-greg.github.io/octokit/Octokit/Client/Checks.html#update_check_run-instance_method) to update the check run that you already created.
|
||||
上述代码使用 [`update_check_run` Octokit 方法](https://msp-greg.github.io/octokit/Octokit/Client/Checks.html#update_check_run-instance_method)调用“[更新检查运行](/rest/reference/checks#update-a-check-run)”API 终结点,以更新已创建的检查运行。
|
||||
|
||||
Here's what this code is doing. First, it updates the check run's status to `in_progress` and implicitly sets the `started_at` time to the current time. In [Part 2](#part-2-creating-the-octo-rubocop-ci-test) of this quickstart, you'll add code that kicks off a real CI test under `***** RUN A CI TEST *****`. For now, you'll leave that section as a placeholder, so the code that follows it will just simulate that the CI process succeeds and all tests pass. Finally, the code updates the status of the check run again to `completed`.
|
||||
以下是此代码的作用。 首先,它会将检查运行的状态更新为 `in_progress`,并将 `started_at` 时间隐式设置为当前时间。 在本快速入门的[第 2 部分](#part-2-creating-the-octo-rubocop-ci-test)中,你将添加代码以在 `***** RUN A CI TEST *****` 下启动真正的 CI 测试。 现在,您将该部分保留为占位符,因此后面的代码将模拟 CI 流程成功并且所有测试都通过。 最后,代码会将检查运行的状态再次更新为 `completed`。
|
||||
|
||||
You'll notice in the "[Update a check run](/rest/reference/checks#update-a-check-run)" docs that when you provide a status of `completed`, the `conclusion` and `completed_at` parameters are required. The `conclusion` summarizes the outcome of a check run and can be `success`, `failure`, `neutral`, `cancelled`, `timed_out`, or `action_required`. You'll set the conclusion to `success`, the `completed_at` time to the current time, and the status to `completed`.
|
||||
你将在“[更新检查运行](/rest/reference/checks#update-a-check-run)”文档中注意到,当你提供状态 `completed` 时,`conclusion` 参数和 `completed_at` 参数为必需参数。 `conclusion` 汇总了检查运行的结果,可以是 `success`、`failure`、`neutral`、`cancelled`、`timed_out` 或 `action_required`。 你要将结论设置为 `success`、将 `completed_at` 时间设置为当前时间并将状态设置为 `completed`。
|
||||
|
||||
You could also provide more details about what your check is doing, but you'll get to that in the next section. Let's test this code again by re-running `template_server.rb`:
|
||||
您还可以提供有关检查操作的更多详细信息,但这些内容将在下一部分进行介绍。 让我们通过重新运行 `template_server.rb` 来再次测试此代码:
|
||||
|
||||
```shell
|
||||
$ ruby template_server.rb
|
||||
```
|
||||
|
||||
Head over to your open pull request and click the **Checks** tab. Click the "Re-run all" button in the upper left corner. You should see the check run move from `pending` to `in_progress` and end with `success`:
|
||||
转到打开的拉取请求,然后单击“检查”选项卡。单击左上角的“全部重新运行”按钮。 应该会看到检查运行从 `pending` 移到 `in_progress` 并以 `success` 结束:
|
||||
|
||||

|
||||

|
||||
|
||||
## Part 2. Creating the Octo RuboCop CI test
|
||||
## 第 2 部分。 创建 Octo RuboCop CI 测试
|
||||
|
||||
[RuboCop](https://rubocop.readthedocs.io/en/latest/) is a Ruby code linter and formatter. It checks Ruby code to ensure that it complies with the "[Ruby Style Guide](https://github.com/rubocop-hq/ruby-style-guide)." RuboCop has three primary functions:
|
||||
[RuboCop](https://rubocop.readthedocs.io/en/latest/) 是一个 Ruby 代码 Linter 和格式化程序。 它会检查 Ruby 代码,以确保它符合“[Ruby 样式指南](https://github.com/rubocop-hq/ruby-style-guide)”。 RuboCop 有三个主要功能:
|
||||
|
||||
* Linting to check code style
|
||||
* Code formatting
|
||||
* Replaces the native Ruby linting capabilities using `ruby -w`
|
||||
* 分析检查代码样式
|
||||
* 代码格式设置
|
||||
* 使用 `ruby -w` 替换本地 Ruby Lint 分析功能
|
||||
|
||||
Now that you've got the interface created to receive Checks API events and create check runs, you can create a check run that implements a CI test.
|
||||
您已经创建了用于接收检查 API 事件和创建检查运行的接口,现在,您可以创建实现 CI 测试的检查运行。
|
||||
|
||||
Your app will run RuboCop on the CI server and create check runs (CI tests in this case) that report the results that RuboCop reports to GitHub.
|
||||
您的应用程序将在 CI 服务器上运行 RuboCop,并创建检查运行(本例中为 CI 测试),以报告 RuboCop 向 GitHub 报告的结果。
|
||||
|
||||
The Checks API allows you to report rich details about each check run, including statuses, images, summaries, annotations, and requested actions.
|
||||
检查 API 允许您报告关于每个检查运行的丰富细节,包括状态、图像、摘要、注释和请求的操作。
|
||||
|
||||
Annotations are information about specific lines of code in a repository. An annotation allows you to pinpoint and visualize the exact parts of the code you'd like to show additional information for. That information can be anything: for example, a comment, an error, or a warning. This quickstart uses annotations to visualize RuboCop errors.
|
||||
注释是关于仓库中特定代码行的信息。 注释允许您精确定位和可视化要显示其他信息的代码确切部分。 这些信息可以是任何内容:例如,注释、错误或警告。 本快速入门使用注释来可视化 RuboCop 错误。
|
||||
|
||||
To take advantage of requested actions, app developers can create buttons in the **Checks** tab of pull requests. When someone clicks one of these buttons, the click sends a `requested_action` `check_run` event to the GitHub App. The action that the app takes is completely configurable by the app developer. This quickstart will walk you through adding a button that allows users to request that RuboCop fix the errors it finds. RuboCop supports automatically fixing errors using a command-line option, and you'll configure the `requested_action` to take advantage of this option.
|
||||
为了利用请求的操作,应用开发人员可以在拉取请求的“检查”选项卡中创建按钮。 当有人单击其中一个按钮时,单击会向 GitHub 应用发送一个 `requested_action``check_run` 事件。 应用程序执行的操作完全由应用程序开发者配置。 此快速入门将引导您添加一个按钮,允许用户请求 RuboCop 修复它发现的错误。 RuboCop 支持使用命令行选项自动修复错误,你将配置 `requested_action` 以利用此选项。
|
||||
|
||||
Let's get started! These are the steps you'll complete in this section:
|
||||
让我们开始吧! 以下是您将在本部分中完成的步骤:
|
||||
|
||||
1. [Adding a Ruby file](#step-21-adding-a-ruby-file)
|
||||
1. [Cloning the repository](#step-22-cloning-the-repository)
|
||||
1. [Running RuboCop](#step-23-running-rubocop)
|
||||
1. [Collecting RuboCop errors](#step-24-collecting-rubocop-errors)
|
||||
1. [Updating the check run with CI test results](#step-25-updating-the-check-run-with-ci-test-results)
|
||||
1. [Automatically fixing RuboCop errors](#step-26-automatically-fixing-rubocop-errors)
|
||||
1. [Security tips](#step-27-security-tips)
|
||||
1. [添加 Ruby 文件](#step-21-adding-a-ruby-file)
|
||||
1. [克隆存储库](#step-22-cloning-the-repository)
|
||||
1. [运行 RuboCop](#step-23-running-rubocop)
|
||||
1. [收集 RuboCop 错误](#step-24-collecting-rubocop-errors)
|
||||
1. [使用 CI 测试结果更新检查运行](#step-25-updating-the-check-run-with-ci-test-results)
|
||||
1. [自动修复 RuboCop 错误](#step-26-automatically-fixing-rubocop-errors)
|
||||
1. [安全提示](#step-27-security-tips)
|
||||
|
||||
## Step 2.1. Adding a Ruby file
|
||||
## 步骤 2.1. 添加 Ruby 文件
|
||||
|
||||
You can pass specific files or entire directories for RuboCop to check. In this quickstart, you'll run RuboCop on an entire directory. Because RuboCop only checks Ruby code, you'll want at least one Ruby file in your repository that contains errors. The example file provided below contains a few errors. Add this example Ruby file to the repository where your app is installed (make sure to name the file with an `.rb` extension, as in `myfile.rb`):
|
||||
您可以传递特定文件或整个目录供 RuboCop 检查。 在本快速入门中,您将在整个目录上运行 RuboCop。 由于 RuboCop 只检查 Ruby 代码,因此您的仓库中至少需要一个含有错误的 Ruby 文件。 下面提供的示例文件包含一些错误。 将此示例 Ruby 文件添加到安装应用的存储库(确保使用 `.rb` 扩展名命名文件,如 `myfile.rb` 所示):
|
||||
|
||||
```ruby
|
||||
# The Octocat class tells you about different breeds of Octocat
|
||||
@@ -304,31 +310,31 @@ m = Octocat.new("Mona", "cat", "octopus")
|
||||
m.display
|
||||
```
|
||||
|
||||
## Step 2.2. Cloning the repository
|
||||
## 步骤 2.2. 克隆存储库
|
||||
|
||||
RuboCop is available as a command-line utility. That means your GitHub App will need to clone a local copy of the repository on the CI server so RuboCop can parse the files. To run Git operations in your Ruby app, you can use the [ruby-git](https://github.com/ruby-git/ruby-git) gem.
|
||||
RuboCop 可用作命令行实用工具。 这意味着您的 GitHub 应用程序将需要克隆 CI 服务器上仓库的本地副本,以便 RuboCop 可以解析文件。 若要在 Ruby 应用中运行 Git 操作,可以使用 [ruby-git](https://github.com/ruby-git/ruby-git) gem。
|
||||
|
||||
The `Gemfile` in the `building-a-checks-api-ci-server` repository already includes the ruby-git gem, and you installed it when you ran `bundle install` in the [prerequisite steps](#prerequisites). To use the gem, add this code to the top of your `template_server.rb` file:
|
||||
`building-a-checks-api-ci-server` 存储库中的 `Gemfile` 已包含 ruby-git gem,它是在[先决条件步骤](#prerequisites)中运行 `bundle install` 时安装的。 若要使用该 gem,请将此代码添加到 `template_server.rb` 文件顶部:
|
||||
|
||||
``` ruby
|
||||
require 'git'
|
||||
```
|
||||
|
||||
Your app needs read permission for "Repository contents" to clone a repository. Later in this quickstart, you'll need to push contents to GitHub, which requires write permission. Go ahead and set your app's "Repository contents" permission to **Read & write** now so you don't need to update it again later. To update your app's permissions:
|
||||
您的应用程序需要“仓库内容”的读取权限才能克隆仓库。 在本快速入门后面的部分,您需要将内容推送到 GitHub,这需要写入权限。 现在将应用的“存储库内容”权限设置为“读取和写入”,这样以后就不需要再更新它了。 要更新应用程序的权限:
|
||||
|
||||
1. Select your app from the [app settings page](https://github.com/settings/apps) and click **Permissions & Webhooks** in the sidebar.
|
||||
1. In the "Permissions" section, find "Repository contents", and select **Read & write** in the "Access" dropdown next to it.
|
||||
1. 从[应用设置页](https://github.com/settings/apps)中选择应用,然后单击边栏中的“权限和 Webhook”。
|
||||
1. 在“权限”部分,找到“存储库内容”,然后在旁边的“访问权限”下拉列表中选择“读取和写入”。
|
||||
{% data reusables.apps.accept_new_permissions_steps %}
|
||||
|
||||
To clone a repository using your GitHub App's permissions, you can use the app's installation token (`x-access-token:<token>`) shown in the example below:
|
||||
若要使用 GitHub 应用的权限克隆存储库,你可以使用该应用的安装令牌 (`x-access-token:<token>`),如下例所示:
|
||||
|
||||
```shell
|
||||
git clone https://x-access-token:<token>@github.com/<owner>/<repo>.git
|
||||
```
|
||||
|
||||
The code above clones a repository over HTTP. It requires the full repository name, which includes the repository owner (user or organization) and the repository name. For example, the [octocat Hello-World](https://github.com/octocat/Hello-World) repository has a full name of `octocat/hello-world`.
|
||||
上面的代码通过 HTTP 克隆仓库。 它需要完整的仓库名称,其中包括仓库所有者(用户或组织)和仓库名称。 例如,[octocat Hello-World](https://github.com/octocat/Hello-World) 存储库的全名为 `octocat/hello-world`。
|
||||
|
||||
After your app clones the repository, it needs to pull the latest code changes and check out a specific Git ref. The code to do all of this will fit nicely into its own method. To perform these operations, the method needs the name and full name of the repository and the ref to checkout. The ref can be a commit SHA, branch, or tag. Add the following new method to the helper method section in `template_server.rb`:
|
||||
你的应用在克隆存储库后,需要拉取最新的代码更改并签出特定的 Git ref。执行所有这些操作的代码将很好地融入其自己的方法中。 要执行这些操作,该方法需要仓库的名称和全名以及要检出的 ref。 Ref 可以是提交 SHA、分支或标记。 将以下新方法添加到 `template_server.rb` 中的帮助程序方法部分:
|
||||
|
||||
``` ruby
|
||||
# Clones the repository to the current working directory, updates the
|
||||
@@ -347,11 +353,11 @@ def clone_repository(full_repo_name, repository, ref)
|
||||
end
|
||||
```
|
||||
|
||||
The code above uses the `ruby-git` gem to clone the repository using the app's installation token. This code clones the code in the same directory as `template_server.rb`. To run Git commands in the repository, the code needs to change into the repository directory. Before changing directories, the code stores the current working directory in a variable (`pwd`) to remember where to return before exiting the `clone_repository` method.
|
||||
上面的代码通过应用的安装令牌使用 `ruby-git` gem 来克隆存储库。 此代码将在与 `template_server.rb` 相同的目录中克隆代码。 要在仓库中运行 Git 命令,代码需要更改为仓库目录。 在更改目录之前,代码将当前工作目录存储在变量 (`pwd`) 中,以便在退出 `clone_repository` 方法之前记住要返回的位置。
|
||||
|
||||
From the repository directory, this code fetches and merges the latest changes (`@git.pull`), checks out the ref (`@git.checkout(ref)`), then changes the directory back to the original working directory (`pwd`).
|
||||
从存储库目录中,此代码提取和合并最新更改 (`@git.pull`),签出 ref (`@git.checkout(ref)`),然后将目录更改回原始工作目录 (`pwd`)。
|
||||
|
||||
Now you've got a method that clones a repository and checks out a ref. Next, you need to add code to get the required input parameters and call the new `clone_repository` method. Add the following code under the `***** RUN A CI TEST *****` comment in your `initiate_check_run` helper method:
|
||||
现在,你已获得克隆存储库并签出 ref 的方法。接下来,需要添加代码以获取所需的输入参数并调用新 `clone_repository` 方法。 在 `initiate_check_run` 帮助程序方法中的 `***** RUN A CI TEST *****` 注释下添加以下代码:
|
||||
|
||||
``` ruby
|
||||
# ***** RUN A CI TEST *****
|
||||
@@ -362,13 +368,13 @@ head_sha = @payload['check_run']['head_sha']
|
||||
clone_repository(full_repo_name, repository, head_sha)
|
||||
```
|
||||
|
||||
The code above gets the full repository name and the head SHA of the commit from the `check_run` webhook payload.
|
||||
上面的代码从 `check_run` Webhook 有效负载获取完整的存储库名称和注释的头部 SHA。
|
||||
|
||||
## Step 2.3. Running RuboCop
|
||||
## 步骤 2.3. 运行 RuboCop
|
||||
|
||||
Great! You're cloning the repository and creating check runs using your CI server. Now you'll get into the nitty gritty details of the [RuboCop linter](https://docs.rubocop.org/rubocop/usage/basic_usage.html#code-style-checker) and [Checks API annotations](/rest/reference/checks#create-a-check-run).
|
||||
很好! 您正在克隆仓库并使用 CI 服务器创建检查运行。 现在,你将了解 [RuboCop Linter](https://docs.rubocop.org/rubocop/usage/basic_usage.html#code-style-checker) 和[检查 API 注释](/rest/reference/checks#create-a-check-run)的基本详细信息。
|
||||
|
||||
The following code runs RuboCop and saves the style code errors in JSON format. Add this code below the call to `clone_repository` you added in the [previous step](#step-22-cloning-the-repository) and above the code that updates the check run to complete.
|
||||
下面的代码运行 RuboCop 并以 JSON 格式保存样式代码错误。 将此代码添加到对[上一步](#step-22-cloning-the-repository)中添加的 `clone_repository` 的调用下方和用于更新检查运行使其完成操作的代码上方。
|
||||
|
||||
``` ruby
|
||||
# Run RuboCop on all files in the repository
|
||||
@@ -378,23 +384,23 @@ logger.debug @report
|
||||
@output = JSON.parse @report
|
||||
```
|
||||
|
||||
The code above runs RuboCop on all files in the repository's directory. The option `--format json` is a handy way to save a copy of the linting results in a machine-parsable format. See the [RuboCop docs](https://docs.rubocop.org/rubocop/formatters.html#json-formatter) for details and an example of the JSON format.
|
||||
上面的代码在仓库目录中的所有文件上运行 RuboCop 。 选项 `--format json` 是将 Lint 分析结果的副本保存为机器可解析格式的方便方法。 有关 JSON 格式的详细信息和示例,请参阅 [RuboCop 文档](https://docs.rubocop.org/rubocop/formatters.html#json-formatter)。
|
||||
|
||||
Because this code stores the RuboCop results in a `@report` variable, it can safely remove the checkout of the repository. This code also parses the JSON so you can easily access the keys and values in your GitHub App using the `@output` variable.
|
||||
由于此代码将 RuboCop 结果存储在 `@report` 变量中,因此可以安全地移除存储库的签出。 此代码还会解析 JSON,因此你可以使用 `@output` 变量轻松访问 GitHub 应用中的键和值。
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** The command used to remove the repository (`rm -rf`) cannot be undone. See [Step 2.7. Security tips](#step-27-security-tips) to learn how to check webhooks for injected malicious commands that could be used to remove a different directory than intended by your app. For example, if a bad actor sent a webhook with the repository name `./`, your app would remove the root directory. 😱 If for some reason you're _not_ using the method `verify_webhook_signature` (which is included in `template_server.rb`) to validate the sender of the webhook, make sure you check that the repository name is valid.
|
||||
注意:无法撤消用于移除存储库 (`rm -rf`) 的命令。 请参阅[步骤 2.7. 安全提示](#step-27-security-tips),了解如何检查 Webhook 中是否注入了可用于移除与应用预期不同的目录的恶意命令。 例如,如果一个恶意行为者发送了一个存储库名称为 `./` 的 Webhook,你的应用将会移除根目录。 😱如果你出于某种原因未使用方法 `verify_webhook_signature`(包含在 `template_server.rb`)验证 Webhook 的发送方,请确保检查存储库名称是否有效。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
You can test that this code works and see the errors reported by RuboCop in your server's debug output. Start up the `template_server.rb` server again and create a new pull request in the repository where you're testing your app:
|
||||
您可以测试此代码是否有效,并在服务器的调试输出中查看 RuboCop 报告的错误。 再次启动 `template_server.rb` 服务器,并在测试应用的存储库中创建新的拉取请求:
|
||||
|
||||
```shell
|
||||
$ ruby template_server.rb
|
||||
```
|
||||
|
||||
You should see the linting errors in the debug output, although they aren't printed with formatting. You can use a web tool like [JSON formatter](https://jsonformatter.org/) to format your JSON output like this formatted linting error output:
|
||||
您应该在调试输出中看到分析错误,尽管它们不是用格式打印的。 你可以使用 [JSON 格式化程序](https://jsonformatter.org/)之类的 Web 工具来格式化 JSON 输出,例如以下格式化的 Lint 分析错误输出:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -450,17 +456,17 @@ You should see the linting errors in the debug output, although they aren't prin
|
||||
}
|
||||
```
|
||||
|
||||
## Step 2.4. Collecting RuboCop errors
|
||||
## 步骤 2.4. 收集 RuboCop 错误
|
||||
|
||||
The `@output` variable contains the parsed JSON results of the RuboCop report. As shown above, the results contain a `summary` section that your code can use to quickly determine if there are any errors. The following code will set the check run conclusion to `success` when there are no reported errors. RuboCop reports errors for each file in the `files` array, so if there are errors, you'll need to extract some data from the file object.
|
||||
`@output` 变量包含 RuboCop 报告的已解析 JSON 结果。 如上所示,结果包含 `summary` 部分,你的代码可使用它快速确定是否存在错误。 如果没有报告错误,以下代码会将检查运行结论设置为 `success`。 RuboCop 会报告 `files` 数组中每个文件的错误,如果存在错误,你需要从文件对象中提取一些数据。
|
||||
|
||||
The Checks API allows you to create annotations for specific lines of code. When you create or update a check run, you can add annotations. In this quickstart you are [updating the check run](/rest/reference/checks#update-a-check-run) with annotations.
|
||||
检查 API 允许您为特定代码行创建注释。 创建或更新检查运行时,可以添加注释。 在本快速入门中,你将使用注释[更新检查运行](/rest/reference/checks#update-a-check-run)。
|
||||
|
||||
The Checks API limits the number of annotations to a maximum of 50 per API request. To create more than 50 annotations, you have to make multiple requests to the [Update a check run](/rest/reference/checks#update-a-check-run) endpoint. For example, to create 105 annotations you'd need to call the [Update a check run](/rest/reference/checks#update-a-check-run) endpoint three times. The first two requests would each have 50 annotations, and the third request would include the five remaining annotations. Each time you update the check run, annotations are appended to the list of annotations that already exist for the check run.
|
||||
检查 API 将注释数量限制为每个 API 请求最多 50 个注释。 若要创建 50 个以上的注释,必须向[更新检查运行](/rest/reference/checks#update-a-check-run)终结点发出多个请求。 例如,若要创建 105 个注释,需要调用[更新检查运行](/rest/reference/checks#update-a-check-run)终结点三次。 前两个请求各有 50 个注释,第三个请求将包括其余五个注释。 每次更新检查运行时,注释都会添加到已经存在的检查运行注释列表中。
|
||||
|
||||
A check run expects annotations as an array of objects. Each annotation object must include the `path`, `start_line`, `end_line`, `annotation_level`, and `message`. RuboCop provides the `start_column` and `end_column` too, so you can include those optional parameters in the annotation. Annotations only support `start_column` and `end_column` on the same line. See the [`annotations` object](/rest/reference/checks#annotations-object-1) reference documentation for details.
|
||||
检查运行会将注释作为对象数组。 每个注释对象必须包含 `path`、`start_line`、`end_line`、`annotation_level` 和 `message`。 RuboCop 还提供了 `start_column` 和 `end_column`,因此你可以在注释中包含这些可选参数。 注释仅在同一行中支持 `start_column` 和 `end_column`。 有关详细信息,请参阅 [`annotations` 对象](/rest/reference/checks#annotations-object-1)。
|
||||
|
||||
You'll extract the required information from RuboCop needed to create each annotation. Append the following code to the code you added in the [previous section](#step-23-running-rubocop):
|
||||
您将从 RuboCop 中提取创建每个注释所需的信息。 将以下代码追加到在[上一部分](#step-23-running-rubocop)中添加的代码:
|
||||
|
||||
``` ruby
|
||||
annotations = []
|
||||
@@ -515,21 +521,21 @@ else
|
||||
end
|
||||
```
|
||||
|
||||
This code limits the total number of annotations to 50. But you can modify this code to update the check run for each batch of 50 annotations. The code above includes the variable `max_annotations` that sets the limit to 50, which is used in the loop that iterates through the offenses.
|
||||
此代码将注释总数限制为 50。 但是,您可以修改此代码以更新每批 50 个注释的检查运行。 上面的代码包含变量 `max_annotations`,它将限制设置为 50,该限制在循环中循环访问超限问题。
|
||||
|
||||
When the `offense_count` is zero, the CI test is a `success`. If there are errors, this code sets the conclusion to `neutral` in order to prevent strictly enforcing errors from code linters. But you can change the conclusion to `failure` if you would like to ensure that the check suite fails when there are linting errors.
|
||||
如果 `offense_count` 为零,则 CI 测试为 `success`。 如果存在错误,此代码会将结论设置为 `neutral`,以防止严格执行来自代码语法检查的错误。 但如果你想确保检查套件在发现分析错误时失败,可以将结论更改为 `failure`。
|
||||
|
||||
When errors are reported, the code above iterates through the `files` array in the RuboCop report. For each file, it extracts the file path and sets the annotation level to `notice`. You could go even further and set specific warning levels for each type of [RuboCop Cop](https://docs.rubocop.org/rubocop/cops.html), but to keep things simpler in this quickstart, all errors are set to a level of `notice`.
|
||||
当报告错误时,上面的代码将循环访问 RuboCop 报告中的 `files` 数组。 对于每个文件,它会提取文件路径,并将注释级别设置为 `notice`。 你可以更进一步,为每种 [RuboCop Cop](https://docs.rubocop.org/rubocop/cops.html) 类型设置特定的警告等级,但本快速入门为了简单起见,所有错误都设置为 `notice` 级别。
|
||||
|
||||
This code also iterates through each error in the `offenses` array and collects the location of the offense and error message. After extracting the information needed, the code creates an annotation for each error and stores it in the `annotations` array. Because annotations only support start and end columns on the same line, `start_column` and `end_column` are only added to the `annotation` object if the start and end line values are the same.
|
||||
此代码还会循环访问 `offenses` 数组中的每个错误,并收集超限的位置和错误消息。 提取所需的信息后,代码将为每个错误创建一个注释,并将其存储在 `annotations` 数组中。 由于注释仅在同一行上支持起始列和结束列,因此 `start_column` 和 `end_column` 仅在开始和结束行值相同时才会添加到 `annotation` 对象。
|
||||
|
||||
This code doesn't yet create an annotation for the check run. You'll add that code in the next section.
|
||||
此代码尚未为检查运行创建注释。 您将在下一节中添加该代码。
|
||||
|
||||
## Step 2.5. Updating the check run with CI test results
|
||||
## 步骤 2.5. 使用 CI 测试结果更新检查运行
|
||||
|
||||
Each check run from GitHub contains an `output` object that includes a `title`, `summary`, `text`, `annotations`, and `images`. The `summary` and `title` are the only required parameters for the `output`, but those alone don't offer much detail, so this quickstart adds `text` and `annotations` too. The code here doesn't add an image, but feel free to add one if you'd like!
|
||||
从 GitHub 运行的每次检查都包含一个 `output` 对象,该对象包括 `title`、`summary`、`text`、`annotations` 和 `images`。 `summary` 和 `title` 是 `output` 仅有的必需参数,但仅有这些参数无法提供太多详细信息,因此本快速入门还添加了 `text` 和 `annotations`。 此处的代码没有添加图片,但是您可以根据需要随意添加!
|
||||
|
||||
For the `summary`, this example uses the summary information from RuboCop and adds some newlines (`\n`) to format the output. You can customize what you add to the `text` parameter, but this example sets the `text` parameter to the RuboCop version. To set the `summary` and `text`, append this code to the code you added in the [previous section](#step-24-collecting-rubocop-errors):
|
||||
对于 `summary`,此示例使用 RuboCop 中的摘要信息,并添加了一些换行符 (`\n`) 来设置输出格式。 你可以自定义要添加到 `text` 参数的内容,但此示例将 `text` 参数设置为 RuboCop 版本。 若要设置 `summary` 和 `text`,请将此代码追加到[上一部分中](#step-24-collecting-rubocop-errors)添加的代码:
|
||||
|
||||
``` ruby
|
||||
# Updated check run summary and text parameters
|
||||
@@ -537,7 +543,7 @@ summary = "Octo RuboCop summary\n-Offense count: #{@output['summary']['offense_c
|
||||
text = "Octo RuboCop version: #{@output['metadata']['rubocop_version']}"
|
||||
```
|
||||
|
||||
Now you've got all the information you need to update your check run. In the [first half of this quickstart](#step-14-updating-a-check-run), you added this code to set the status of the check run to `success`:
|
||||
现在您已经获得了更新检查运行所需的所有信息。 在[本快速入门的上半部分](#step-14-updating-a-check-run),你添加了此代码,将检查运行的状态设置为 `success`:
|
||||
|
||||
``` ruby
|
||||
# Mark the check run as complete!
|
||||
@@ -550,7 +556,7 @@ Now you've got all the information you need to update your check run. In the [fi
|
||||
)
|
||||
```
|
||||
|
||||
You'll need to update that code to use the `conclusion` variable you set based on the RuboCop results (to `success` or `neutral`). You can update the code with the following:
|
||||
你需要更新该代码来使用根据 RuboCop 结果设置的 `conclusion` 变量(更新为 `success` 或 `neutral`)。 您可以使用以下内容更新代码:
|
||||
|
||||
``` ruby
|
||||
# Mark the check run as complete! And if there are warnings, share them.
|
||||
@@ -574,48 +580,48 @@ You'll need to update that code to use the `conclusion` variable you set based o
|
||||
)
|
||||
```
|
||||
|
||||
Now that you're setting a conclusion based on the status of the CI test and you've added the output from the RuboCop results, you've created a CI test! Congratulations. 🙌
|
||||
现在,您正在根据 CI 测试的状态设置结论,并且添加了 RuboCop 结果的输出,您已经创建了 CI 测试! 祝贺。 🙌
|
||||
|
||||
The code above also adds a feature to your CI server called [requested actions](https://developer.github.com/changes/2018-05-23-request-actions-on-checks/) via the `actions` object. {% ifversion fpt or ghec %}(Note this is not related to [GitHub Actions](/actions).) {% endif %}Requested actions add a button in the **Checks** tab on GitHub that allows someone to request the check run to take additional action. The additional action is completely configurable by your app. For example, because RuboCop has a feature to automatically fix the errors it finds in Ruby code, your CI server can use a requested actions button to allow people to request automatic error fixes. When someone clicks the button, the app receives the `check_run` event with a `requested_action` action. Each requested action has an `identifier` that the app uses to determine which button was clicked.
|
||||
上述代码还会通过 `actions` 对象向 CI 服务器添加一项功能,称为[请求的操作](https://developer.github.com/changes/2018-05-23-request-actions-on-checks/)。 {% ifversion fpt or ghec %}(请注意,这与 [GitHub Actions](/actions) 无关。){% endif %}请求的操作会在 GitHub 的“检查”选项卡中添加一个按钮,允许用户请求检查运行,从而执行其他操作。 附加操作完全由您的应用程序配置。 例如,由于 RuboCop 具有自动修复在 Ruby 代码中发现的错误的功能,因此您的 CI 服务器可以使用请求操作按钮来允许用户请求自动修复错误。 当有人单击该按钮时,应用会收到包含 `requested_action` 操作的 `check_run` 事件。 每个请求的操作都有一个 `identifier`,应用使用它来确定哪个按钮被单击。
|
||||
|
||||
The code above doesn't have RuboCop automatically fix errors yet. You'll add that in the next section. But first, take a look at the CI test that you just created by starting up the `template_server.rb` server again and creating a new pull request:
|
||||
上面的代码还没有让 RuboCop 自动修复错误。 您将在下一节中添加该功能。 但首先,我们通过再次启动 `template_server.rb` 服务器并创建一个新的拉取请求,看看刚刚创建的 CI 测试:
|
||||
|
||||
```shell
|
||||
$ ruby template_server.rb
|
||||
```
|
||||
|
||||
The annotations will show up in the **Checks** tab.
|
||||
注释将显示在“检查”选项卡中。
|
||||
|
||||

|
||||

|
||||
|
||||
Notice the "Fix this" button that you created by adding a requested action.
|
||||
请注意您通过添加请求的操作创建的“Fix this(修复此问题)”按钮。
|
||||
|
||||

|
||||

|
||||
|
||||
If the annotations are related to a file already included in the PR, the annotations will also show up in the **Files changed** tab.
|
||||
如果注释与 PR 中已包含的文件有关,则注释还将显示在“已更改的文件”选项卡中。
|
||||
|
||||

|
||||

|
||||
|
||||
## Step 2.6. Automatically fixing RuboCop errors
|
||||
## 步骤 2.6. 自动修复 RuboCop 错误
|
||||
|
||||
If you've made it this far, kudos! 👏 You've already created a CI test. In this section, you'll add one more feature that uses RuboCop to automatically fix the errors it finds. You already added the "Fix this" button in the [previous section](#step-25-updating-the-check-run-with-ci-test-results). Now you'll add the code to handle the `requested_action` check run event triggered when someone clicks the "Fix this" button.
|
||||
如果您走到了这一步,为您点赞! 👏 你已经创建了 CI 测试。 在本节中,您将添加另外一个功能,即使用 RuboCop 自动修复它发现的错误。 你已在[上一部分](#step-25-updating-the-check-run-with-ci-test-results)中添加了“修复此问题”按钮。 现在,你将添加代码来处理有人单击“修复此问题”按钮时触发的 `requested_action` 检查运行事件。
|
||||
|
||||
The RuboCop tool [offers](https://docs.rubocop.org/rubocop/usage/basic_usage.html#auto-correcting-offenses) the `--auto-correct` command-line option to automatically fix errors it finds. When you use the `--auto-correct` feature, the updates are applied to the local files on the server. You'll need to push the changes to GitHub after RuboCop does its magic.
|
||||
RuboCop 工具[提供](https://docs.rubocop.org/rubocop/usage/basic_usage.html#auto-correcting-offenses)了 `--auto-correct` 命令行选项,用于自动修复找到的错误。 使用 `--auto-correct` 功能时,更新将应用于服务器上的本地文件。 在 RuboCop 发挥作用之后,您需要将更改推送到 GitHub。
|
||||
|
||||
To push to a repository, your app must have write permissions for "Repository contents." You set that permission back in [Step 2.2. Cloning the repository](#step-22-cloning-the-repository) to **Read & write**, so you're all set.
|
||||
要推送到仓库,您的应用程序必须具备“仓库内容”的写入权限。 你已在[步骤 2.2. 克隆存储库](#step-22-cloning-the-repository)中将该权限设置回“读取与写入”,因此现在你已准备就绪。
|
||||
|
||||
In order to commit files, Git must know which [username](/github/getting-started-with-github/setting-your-username-in-git/) and [email](/articles/setting-your-commit-email-address-in-git/) to associate with the commit. Add two more environment variables in your `.env` file to store the name (`GITHUB_APP_USER_NAME`) and email (`GITHUB_APP_USER_EMAIL`) settings. Your name can be the name of your app and the email can be any email you'd like for this example. For example:
|
||||
为了提交文件,Git 必须知道哪个[用户名](/github/getting-started-with-github/setting-your-username-in-git/)和[电子邮件](/articles/setting-your-commit-email-address-in-git/)与提交相关联。 在 `.env` 文件中添加另外两个环境变量来存储名称 (`GITHUB_APP_USER_NAME`) 和电子邮件 (`GITHUB_APP_USER_EMAIL`) 设置。 您的名称可以是应用程序名称,电子邮件可以是您在本例中想使用的任何电子邮件地址。 例如:
|
||||
|
||||
```ini
|
||||
GITHUB_APP_USER_NAME=Octoapp
|
||||
GITHUB_APP_USER_EMAIL=octoapp@octo-org.com
|
||||
```
|
||||
|
||||
Once you've updated your `.env` file with the name and email of the author and committer, you'll be ready to add code to read the environment variables and set the Git configuration. You'll add that code soon.
|
||||
使用作者和提交者的名称和电子邮件更新 `.env` 文件后,即可准备添加代码来读取环境变量并设置 Git 配置。 您很快就将添加该代码。
|
||||
|
||||
When someone clicks the "Fix this" button, your app receives the [check run webhook](/webhooks/event-payloads/#check_run) with the `requested_action` action type.
|
||||
当有人单击“修复此问题”按钮时,你的应用会收到包含 `requested_action` 操作类型的[检查运行 Webhook](/webhooks/event-payloads/#check_run)。
|
||||
|
||||
In [Step 1.4. Updating a check run](#step-14-updating-a-check-run) you updated the your `event_handler` to handle look for actions in the `check_run` event. You already have a case statement to handle the `created` and `rerequested` action types:
|
||||
在[步骤 1.4. 更新检查运行](#step-14-updating-a-check-run)中,已更新 `event_handler` 以在 `check_run` 事件中查找操作。 你已经有一个用于处理 `created` 和 `rerequested` 操作类型的 case 语句:
|
||||
|
||||
``` ruby
|
||||
when 'check_run'
|
||||
@@ -630,14 +636,14 @@ when 'check_run'
|
||||
end
|
||||
```
|
||||
|
||||
Add another `when` statement after the `rerequested` case to handle the `rerequested_action` event:
|
||||
在 `rerequested` 案例后面添加另一个 `when` 语句来处理 `rerequested_action` 事件:
|
||||
|
||||
``` ruby
|
||||
when 'requested_action'
|
||||
take_requested_action
|
||||
```
|
||||
|
||||
This code calls a new method that will handle all `requested_action` events for your app. Add the following method to the helper methods section of your code:
|
||||
此代码调用将处理应用的所有 `requested_action` 事件的新方法。 将以下方法添加到代码的辅助方法部分:
|
||||
|
||||
``` ruby
|
||||
# Handles the check run `requested_action` event
|
||||
@@ -672,11 +678,11 @@ def take_requested_action
|
||||
end
|
||||
```
|
||||
|
||||
The code above clones a repository just like the code you added in [Step 2.2. Cloning the repository](#step-22-cloning-the-repository). An `if` statement checks that the requested action's identifier matches the RuboCop button identifier (`fix_rubocop_notices`). When they match, the code clones the repository, sets the Git username and email, and runs RuboCop with the option `--auto-correct`. The `--auto-correct` option applies the changes to the local CI server files automatically.
|
||||
上面的代码将克隆存储库,就像你在[步骤 2.2. 克隆存储库](#step-22-cloning-the-repository)中添加的代码一样。 `if` 语句会检查所请求操作的标识符是否与 RuboCop 按钮标识符 (`fix_rubocop_notices`) 匹配。 如果它们匹配,代码将克隆存储库,设置 Git 用户名和电子邮件,并使用选项 `--auto-correct` 运行 RuboCop。 `--auto-correct` 选项会将更改自动应用于本地 CI 服务器文件。
|
||||
|
||||
The files are changed locally, but you'll still need to push them to GitHub. You'll use the handy `ruby-git` gem again to commit all of the files. Git has a single command that stages all modified or deleted files and commits them: `git commit -a`. To do the same thing using `ruby-git`, the code above uses the `commit_all` method. Then the code pushes the committed files to GitHub using the installation token, using the same authentication method as the Git `clone` command. Finally, it removes the repository directory to ensure the working directory is prepared for the next event.
|
||||
文件在本地更改,但您仍然需要将它们推送到 GitHub。 你将再次使用方便的 `ruby-git` 的 gem 提交所有文件。 Git 有一个命令可以暂存所有已修改或删除的文件并提交它们:`git commit -a`。 若要使用 `ruby-git` 执行相同操作,上述代码将使用 `commit_all` 方法。 然后,代码使用与 Git `clone` 命令相同的身份验证方法,通过安装令牌将提交的文件推送到 GitHub。 最后,它删除仓库目录,以确保为下一个事件准备工作目录。
|
||||
|
||||
That's it! The code you have written now completes your Checks API CI server. 💪 Restart your `template_server.rb` server again and create a new pull request:
|
||||
就这么简单! 您编写的代码现在完成了检查 API CI 服务器的构建。 💪 再次重启 `template_server.rb` 服务器并创建新的拉取请求:
|
||||
|
||||
```shell
|
||||
$ ruby template_server.rb
|
||||
@@ -684,21 +690,21 @@ $ ruby template_server.rb
|
||||
|
||||
{% data reusables.apps.sinatra_restart_instructions %}
|
||||
|
||||
This time, click the "Fix this" button to automatically fix the errors RuboCop found from the **Checks** tab.
|
||||
现在,单击“修复此问题”按钮,自动修复 RuboCop 在“检查”选项卡中发现的错误。
|
||||
|
||||
In the **Commits** tab, you'll see a brand new commit by the username you set in your Git configuration. You may need to refresh your browser to see the update.
|
||||
在“提交”选项卡中,你会看到由 Git 配置中设置的用户名提供的全新提交。 您可能需要刷新浏览器才能看到更新。
|
||||
|
||||

|
||||

|
||||
|
||||
Because a new commit was pushed to the repo, you'll see a new check suite for Octo RuboCop in the **Checks** tab. But this time there are no errors because RuboCop fixed them all. 🎉
|
||||
由于新提交已推送到存储库,因此你将在“检查”选项卡中看到适用于 Octo RuboCop 的新检查套件。但是这次没有错误,因为 RuboCop 修复了所有这些错误。 🎉
|
||||
|
||||

|
||||

|
||||
|
||||
You can find the completed code for the app you just built in the `server.rb` file in the [Creating CI tests with the Checks API](https://github.com/github-developer/creating-ci-tests-with-the-checks-api) repository.
|
||||
可以在[使用检查 API 创建 CI 测试](https://github.com/github-developer/creating-ci-tests-with-the-checks-api)存储库中找到刚刚在 `server.rb` 文件中生成的应用的已完成代码。
|
||||
|
||||
## Step 2.7. Security tips
|
||||
## 步骤 2.7. 安全提示
|
||||
|
||||
The template GitHub App code already has a method to verify incoming webhook payloads to ensure they are from a trusted source. If you are not validating webhook payloads, you'll need to ensure that when repository names are included in the webhook payload, the webhook does not contain arbitrary commands that could be used maliciously. The code below validates that the repository name only contains Latin alphabetic characters, hyphens, and underscores. To provide you with a complete example, the complete `server.rb` code available in the [companion repository](https://github.com/github-developer/creating-ci-tests-with-the-checks-api) for this quickstart includes both the method of validating incoming webhook payloads and this check to verify the repository name.
|
||||
模板 GitHub 应用程序代码已经有方法来验证传入的 web 挂钩有效负载,以确保它们来自受信任的源。 如果不验证 web 挂钩有效负载,则需要确保当仓库名称包含在 web 挂钩有效负载中时,该 web 挂钩不包含可能被恶意使用的任意命令。 下面的代码将验证仅包含拉丁字母、连字符和下划线的仓库名称。 为了提供完整示例,本快速入门的[配套存储库`server.rb`中提供的完整 ](https://github.com/github-developer/creating-ci-tests-with-the-checks-api) 代码包括验证传入的 Webhook 有效负载的方法以及此项用于验证存储库名称的检查。
|
||||
|
||||
``` ruby
|
||||
# This quickstart example uses the repository name in the webhook with
|
||||
@@ -712,43 +718,43 @@ unless @payload['repository'].nil?
|
||||
end
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
## 故障排除
|
||||
|
||||
Here are a few common problems and some suggested solutions. If you run into any other trouble, you can ask for help or advice in the {% data reusables.support.prodname_support_forum_with_url %}.
|
||||
以下是一些常见问题和一些建议的解决方案。 如果遇到任何其他问题,可以在 {% data reusables.support.prodname_support_forum_with_url %} 中寻求帮助或建议。
|
||||
|
||||
* **Q:** My app isn't pushing code to GitHub. I don't see the fixes that RuboCop automatically makes!
|
||||
* 问:我的应用不将代码推送到 GitHub。 我没有看到 RuboCop 自动进行修复!
|
||||
|
||||
**A:** Make sure you have **Read & write** permissions for "Repository contents," and that you are cloning the repository with your installation token. See [Step 2.2. Cloning the repository](#step-22-cloning-the-repository) for details.
|
||||
答:请确保对“存储库内容”拥有“读取与写入”权限,以及使用安装令牌克隆存储库。 请参阅[步骤 2.2. 克隆存储库](#step-22-cloning-the-repository)了解详细信息。
|
||||
|
||||
* **Q:** I see an error in the `template_server.rb` debug output related to cloning my repository.
|
||||
* 问:我在与克隆存储库相关的 `template_server.rb` 调试输出中看到了错误。
|
||||
|
||||
**A:** If you see the following error, you haven't deleted the checkout of the repository in one or both of the `initiate_check_run` or `take_requested_action` methods:
|
||||
答:如果看到以下错误,表明你尚未删除 `initiate_check_run` 或 `take_requested_action` 方法中的其中一个或两者中的存储库签出:
|
||||
|
||||
```shell
|
||||
2018-11-26 16:55:13 - Git::GitExecuteError - git clone '--' 'https://x-access-token:ghs_9b2080277016f797074c4dEbD350745f4257@github.com/codertocat/octocat-breeds.git' 'Octocat-breeds' 2>&1:fatal: destination path 'Octocat-breeds' already exists and is not an empty directory.:
|
||||
```
|
||||
|
||||
Compare your code to the `server.rb` file to ensure you have the same code in your `initiate_check_run` and `take_requested_action` methods.
|
||||
将代码与 `server.rb` 文件进行比较,以确保你在 `initiate_check_run` 和 `take_requested_action` 方法中拥有相同的代码。
|
||||
|
||||
* **Q:** New check runs are not showing up in the "Checks" tab on GitHub.
|
||||
* 问:新的检查运行未显示在 GitHub 的“检查”选项卡中。
|
||||
|
||||
**A:** Restart Smee and re-run your `template_server.rb` server.
|
||||
答:重启 Smee 并重新运行 `template_server.rb` 服务器。
|
||||
|
||||
* **Q:** I do not see the "Re-run all" button in the "Checks" tab on GitHub.
|
||||
* 问:我在 GitHub 的“检查”选项卡中没有看到“全部重新运行”按钮。
|
||||
|
||||
**A:** Restart Smee and re-run your `template_server.rb` server.
|
||||
答:重启 Smee 并重新运行 `template_server.rb` 服务器。
|
||||
|
||||
## Conclusion
|
||||
## 结束语
|
||||
|
||||
After walking through this guide, you've learned the basics of using the Checks API to create a CI server! To review, you:
|
||||
完成本指南后,您已经学会了使用检查 API 创建 CI 服务器的基础知识! 回顾一下:
|
||||
|
||||
* Configured your server to receive Checks API events and create check runs.
|
||||
* Used RuboCop to check code in repositories and create annotations for the errors.
|
||||
* Implemented a requested action that automatically fixes linter errors.
|
||||
* 配置您的服务器来接收检查 API 事件并创建检查运行。
|
||||
* 使用 RuboCop 来检查仓库中的代码并为错误创建注释。
|
||||
* 实现自动修复语法检查错误的请求操作。
|
||||
|
||||
## Next steps
|
||||
## 后续步骤
|
||||
|
||||
Here are some ideas for what you can do next:
|
||||
以下是有关接下来可以做什么的一些想法:
|
||||
|
||||
* Currently, the "Fix this" button is always displayed. Update the code you wrote to display the "Fix this" button only when RuboCop finds errors.
|
||||
* If you'd prefer that RuboCop doesn't commit files directly to the head branch, you can update the code to [create a pull request](/rest/reference/pulls#create-a-pull-request) with a new branch based on the head branch.
|
||||
* 目前,始终显示“Fix this(修复此问题)”按钮。 更新您编写的代码,仅在 RuboCop 发现错误时显示“Fix this(修复此问题)”按钮。
|
||||
* 如果你不希望 RuboCop 将文件直接提交到头部分支,你可以更新代码,以使用基于头部分支的新分支[创建拉取请求](/rest/reference/pulls#create-a-pull-request)。
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
---
|
||||
title: 编辑作业
|
||||
intro: 可以编辑课程中的现有作业。
|
||||
versions:
|
||||
fpt: '*'
|
||||
permissions: 'Organization owners who are admins for a classroom can edit assignments for that classroom. {% data reusables.classroom.classroom-admins-link %}'
|
||||
shortTitle: Edit an assignment
|
||||
ms.openlocfilehash: 65814debd3fb5bf64ea83b04bef6349b7755b77f
|
||||
ms.sourcegitcommit: 82b1242de02ecc4bdec02a5b6d11568fb2deb1aa
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/21/2022
|
||||
ms.locfileid: '148179846'
|
||||
---
|
||||
## 关于编辑作业
|
||||
|
||||
创建作业后,可以编辑作业的许多方面,以更好地满足自己和学生的需求。 请注意,创建作业后,无法更改作业类型(个人或组)或联机集成开发环境 (IDE)。 有关详细信息,请参阅“[创建个人作业](/education/manage-coursework-with-github-classroom/teach-with-github-classroom/create-an-individual-assignment)”和“[创建组作业](/education/manage-coursework-with-github-classroom/teach-with-github-classroom/create-a-group-assignment)”。
|
||||
|
||||
## 编辑现有作业
|
||||
|
||||
1. 登录 {% data variables.product.prodname_classroom_with_url %}。
|
||||
1. 导航到教室。
|
||||
|
||||

|
||||
|
||||
1. 在 {% octicon "repo" aria-label="The repo icon" %}“作业”选项卡中,在要编辑的作业旁边单击 {% octicon "pencil" aria-label="The pencil icon" %}。
|
||||
|
||||
{% note %}
|
||||
|
||||
注意:还可以从作业的页面编辑作业。 若要访问作业的页面,请在“作业”选项卡中,单击作业名称。
|
||||
|
||||
{% endnote %}
|
||||
|
||||

|
||||
|
||||
1. 在“作业标题”下,单击文本字段,然后删除现有文本并键入新的作业标题。
|
||||
|
||||

|
||||
|
||||
1. (可选)若要编辑每个学生的作业存储库的默认前缀,请单击 {% octicon "pencil" aria-label="The pencil icon" %}。
|
||||
|
||||
{% note %}
|
||||
|
||||
注意:编辑作业的标题或默认存储库前缀不会更改现有作业存储库的名称。
|
||||
|
||||
{% endnote %}
|
||||
|
||||

|
||||
|
||||
然后,在“自定义存储库前缀”下键入新前缀。
|
||||
|
||||

|
||||
|
||||
1. 在“截止日期(可选)”下,单击文本字段,然后使用日期选取器指定截止日期。 新的截止时间不能是过去,重新分配截止时间将更新所有学生的截止日期。
|
||||
|
||||

|
||||
|
||||
1. 若要更改作业的状态,请选择“作业状态”下拉菜单,然后单击“活动”或“非活动”。
|
||||
|
||||
{% note %}
|
||||
|
||||
注意:学生不能接受非活动作业。 一旦不再有学生应接受作业或作业截止日期已过,应将作业状态更改为非活动状态。
|
||||
|
||||
{% endnote %}
|
||||
|
||||

|
||||
|
||||
1. 在“Repository visibility(仓库可见性)”下,选择可见性。 如果您使用私有仓库,只有学生或团队可以查看您提供的反馈。
|
||||
|
||||
{% note %}
|
||||
|
||||
注意:更改作业存储库的可见性不会以追溯方式更改现有作业存储库的可见性。
|
||||
|
||||
{% endnote %}
|
||||
|
||||

|
||||
|
||||
1. (可选)选择或取消选择“授予学生对其存储库的管理员权限”。 有关存储库的管理员权限的详细信息,请参阅“[关于存储库](/repositories/creating-and-managing-repositories/about-repositories#about-repository-visibility)”和“[组织的存储库角色](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)”。
|
||||
|
||||
{% note %}
|
||||
|
||||
注意:创建作业后授予或撤销学生管理员访问权限不会以追溯方式更改现有作业存储库的权限。
|
||||
|
||||
{% endnote %}
|
||||
|
||||

|
||||
|
||||
1. 若要设置或更改作业的模板存储库,请在“添加模板存储库以为学生提供起始代码”部分中,选择“选择存储库”下拉菜单。
|
||||
- 若要选择模板存储库,请开始在文本字段中键入存储库名称,然后在搜索结果中单击该存储库。
|
||||
- 若要删除模板存储库,请删除文本字段中的任何文本。
|
||||
|
||||
{% note %}
|
||||
|
||||
注意:默认情况下,作业将为教室名册上的每个学生创建一个空存储库。
|
||||
|
||||
{% endnote %}
|
||||
|
||||

|
||||
|
||||
1. 若要添加新的自动评分测试,请在“添加自动评分测试”部分,选择“添加测试”下拉菜单,然后在显示的选项中单击评分方法。 有关详细信息,请参阅“[使用自动分级](/education/manage-coursework-with-github-classroom/use-autograding)”。
|
||||
|
||||

|
||||
|
||||
此外,可以使用 {% octicon "pencil" aria-label="The pencil icon" %} 或 {% octicon "trash" aria-label="The trash icon" %} 编辑或删除现有的自动评分测试。
|
||||
|
||||

|
||||
|
||||
1. 若要打开或关闭反馈拉取请求,请选择或取消选择“启用反馈拉取请求”。
|
||||
|
||||
{% note %}
|
||||
|
||||
注意:启用或禁用作业的反馈拉取请求不会创建或删除现有作业存储库的反馈拉取请求。
|
||||
|
||||
{% endnote %}
|
||||
|
||||

|
||||
|
||||
{% data reusables.classroom.update-assignment %}
|
||||
|
||||
## 延伸阅读
|
||||
|
||||
- [创建单个分配](/education/manage-coursework-with-github-classroom/teach-with-github-classroom/create-an-individual-assignment)
|
||||
- [创建组分配](/education/manage-coursework-with-github-classroom/teach-with-github-classroom/create-a-group-assignment)
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: GitHub glossary
|
||||
intro: 'This glossary introduces common Git and {% data variables.product.prodname_dotcom %} terminology.'
|
||||
title: GitHub 词汇表
|
||||
intro: '此词汇表介绍了通用 Git 和 {% data variables.product.prodname_dotcom %} 术语。'
|
||||
redirect_from:
|
||||
- /articles/github-glossary
|
||||
- /github/getting-started-with-github/github-glossary
|
||||
@@ -10,6 +10,12 @@ versions:
|
||||
ghes: '*'
|
||||
ghae: '*'
|
||||
ghec: '*'
|
||||
ms.openlocfilehash: b8a436ed4e20133f1a2c4def572a60b73c48cf4d
|
||||
ms.sourcegitcommit: c95a5c9bdf3ae54ad77b074739b262e7d0e8a077
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/17/2022
|
||||
ms.locfileid: '148169580'
|
||||
---
|
||||
{% for glossary in glossaries %}
|
||||
### {{ glossary.term }}
|
||||
@@ -19,8 +25,8 @@ versions:
|
||||
|
||||
---
|
||||
|
||||
## Further reading
|
||||
## 延伸阅读
|
||||
|
||||
- [The Official Git Glossary](https://www.kernel.org/pub/software/scm/git/docs/gitglossary.html)
|
||||
- [Git documentation](https://git-scm.com/doc)
|
||||
- [Git command list](https://git-scm.com/docs)
|
||||
- [官方 Git 术语表](https://www.kernel.org/pub/software/scm/git/docs/gitglossary.html)
|
||||
- [Git 文档](https://git-scm.com/doc)
|
||||
- [Git 命令列表](https://git-scm.com/docs)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Accessing compliance reports for your organization
|
||||
intro: 'You can access {% data variables.product.company_short %}''s compliance reports, such as our SOC reports and Cloud Security Alliance CAIQ self-assessment (CSA CAIQ), for your organization.'
|
||||
title: 访问组织的合规性报告
|
||||
intro: '你可以为组织访问 {% data variables.product.company_short %} 的合规性报告,例如我们的 SOC 报告和云安全联盟 CAIQ 自我评估 (CSA CAIQ)。'
|
||||
versions:
|
||||
ghec: '*'
|
||||
type: how_to
|
||||
@@ -9,30 +9,33 @@ topics:
|
||||
- Teams
|
||||
permissions: Organization owners can access compliance reports for the organization.
|
||||
shortTitle: Access compliance reports
|
||||
ms.openlocfilehash: a260c5a13ed92d6cd3ead55cce1c2ff2a61c8d57
|
||||
ms.sourcegitcommit: 2ff4a43f0b14939da79d56c54402cfee8d90ae23
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/17/2022
|
||||
ms.locfileid: '148169571'
|
||||
---
|
||||
## 关于 {% data variables.product.company_short %} 的合规性报告
|
||||
|
||||
## About {% data variables.product.company_short %}'s compliance reports
|
||||
|
||||
You can access {% data variables.product.company_short %}'s compliance reports in your organization settings.
|
||||
可以在组织设置中访问 {% data variables.product.company_short %} 的合规性报告。
|
||||
|
||||
{% data reusables.security.compliance-report-list %}
|
||||
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** To view compliance reports, your organization must use {% data variables.product.prodname_ghe_cloud %}. {% data reusables.enterprise.link-to-ghec-trial %}
|
||||
注意:要查看合规性报告,你的组织必须使用 {% data variables.product.prodname_ghe_cloud %}。 {% data reusables.enterprise.link-to-ghec-trial %}
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## Accessing compliance reports for your organization
|
||||
## 访问组织的合规性报告
|
||||
|
||||
{% data reusables.profile.access_org %}
|
||||
{% data reusables.profile.org_settings %}
|
||||
{% data reusables.organizations.compliance %}
|
||||
1. To the right of the report you want to access, click {% octicon "download" aria-label="The Download icon" %} **Download** or {% octicon "link-external" aria-label="The external link icon" %} **View**.
|
||||
{% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.organizations.compliance %}
|
||||
1. 在想要访问的报告右侧,单击 {% octicon "download" aria-label="The Download icon" %}“下载”或 {% octicon "link-external" aria-label="The external link icon" %}“查看” 。
|
||||
|
||||
{% data reusables.security.compliance-report-screenshot %}
|
||||
|
||||
## Further reading
|
||||
## 延伸阅读
|
||||
|
||||
- "[Accessing compliance reports for your enterprise](/admin/overview/accessing-compliance-reports-for-your-enterprise)"
|
||||
- [访问企业的合规性报告](/admin/overview/accessing-compliance-reports-for-your-enterprise)
|
||||
|
||||
@@ -46,15 +46,15 @@ To set up a `www` or custom subdomain, such as `www.example.com` or `blog.exampl
|
||||
{% data reusables.repositories.sidebar-settings %}
|
||||
{% data reusables.pages.sidebar-pages %}
|
||||
4. Under "Custom domain", type your custom domain, then click **Save**. If you are publishing your site from a branch, this will create a commit that adds a `CNAME` file to the root of your source branch. If you are publishing your site with a custom {% data variables.product.prodname_actions %} workflow , no `CNAME` file is created. For more information about your publishing source, see "[Configuring a publishing source for your GitHub Pages site](/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site)."
|
||||

|
||||

|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If your custom domain is an internationalized domain name, you must enter the Punycode encoded version.
|
||||
|
||||
For more information on Punycodes, see [Internationalized domain name](https://en.wikipedia.org/wiki/Internationalized_domain_name).
|
||||
|
||||
{% endnote %}
|
||||
{% note %}
|
||||
|
||||
**Note:** If your custom domain is an internationalized domain name, you must enter the Punycode encoded version.
|
||||
|
||||
For more information on Punycodes, see [Internationalized domain name](https://en.wikipedia.org/wiki/Internationalized_domain_name).
|
||||
|
||||
{% endnote %}
|
||||
|
||||
5. Navigate to your DNS provider and create a `CNAME` record that points your subdomain to the default domain for your site. For example, if you want to use the subdomain `www.example.com` for your user site, create a `CNAME` record that points `www.example.com` to `<user>.github.io`. If you want to use the subdomain `another.example.com` for your organization site, create a `CNAME` record that points `another.example.com` to `<organization>.github.io`. The `CNAME` record should always point to `<user>.github.io` or `<organization>.github.io`, excluding the repository name. {% data reusables.pages.contact-dns-provider %} {% data reusables.pages.default-domain-information %}
|
||||
|
||||
|
||||
@@ -0,0 +1,166 @@
|
||||
---
|
||||
title: 使用新代码视图(beta 版本)执行文件导航
|
||||
intro: 使用新代码视图(beta 版本),可以通过易于导航的文件树和集成的符号搜索,在上下文中查看代码。
|
||||
allowTitleToDifferFromFilename: true
|
||||
versions:
|
||||
feature: file-tree-view
|
||||
topics:
|
||||
- Repositories
|
||||
shortTitle: New code view (beta)
|
||||
ms.openlocfilehash: 0c0fe588c92f67c92d7f3ffaa09716da39ac4551
|
||||
ms.sourcegitcommit: 57bef7d45acfa987d82e320c7581c87df320a28a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/18/2022
|
||||
ms.locfileid: '148172185'
|
||||
---
|
||||
{% note %}
|
||||
|
||||
注意:{% data reusables.search.code-search-code-view-beta-note %}
|
||||
|
||||
{% data reusables.search.code-search-link %}
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## 关于新代码视图(beta 版本)
|
||||
新代码视图 beta 版本通过文件树视图改进了导航,简化了文件编辑,引入了用于符号搜索和导航的符号窗格,并更新了追溯视图以维护文件上下文。 新代码视图集成了 {% data variables.product.prodname_dotcom_the_website %} 上一个有限公共 beta 版本中的新代码搜索引擎和搜索界面。 {% data reusables.search.code-search-link %}
|
||||
|
||||
若要访问新代码视图(beta 版本),以及新代码搜索,可以注册[等待列表](https://github.com/features/code-search-code-view/signup)。
|
||||
|
||||
若要提供有关新代码视图 beta 版本的反馈,请参阅[讨论论坛](https://github.com/orgs/community/discussions/categories/repositories)。
|
||||
|
||||
## 启用和禁用新的代码搜索和代码视图(beta 版本)
|
||||
|
||||
{% data reusables.search.enabling-and-disabling-code-search-and-view-beta %}
|
||||
|
||||
## 使用文件树视图
|
||||
新的文件树视图是一个面板,可通过易于导航的树结构来显示存储库的目录和文件。 可以在目录和文件之间快速移动,并了解所查看的每个项的上下文。
|
||||
|
||||
1. 选择存储库,然后单击该存储库中的目录或文件以打开文件树视图。
|
||||
|
||||

|
||||
|
||||
1. 若要搜索特定目录或文件,请单击 {% octicon "filter" aria-label="The filter icon" %}“跳转到文件”搜索栏,然后键入目录或文件名,然后从结果中选择目录或文件。 在每个搜索结果下方可以查看目录或文件的文件路径。
|
||||
|
||||

|
||||
|
||||
- 若要使用 {% data variables.product.prodname_dotcom %} 搜索栏在存储库中进行搜索,请单击 {% octicon "search" aria-label="The search icon" %}。
|
||||
|
||||

|
||||
|
||||
1. 若要在分支之间切换,请选择 {% octicon "git-branch" aria-label="The branch icon" %} 分支下拉菜单,然后从结果中单击所需的分支。 若要查看存储库的所有分支,请单击“查看所有分支”。
|
||||
|
||||

|
||||
|
||||
1. 若要在标记之间切换,请选择 {% octicon "git-branch" aria-label="The branch icon" %} 分支下拉菜单,然后从结果中单击所需的标记。 若要查看存储库的所有标记,请单击“查看所有标记”。
|
||||
|
||||

|
||||
|
||||
## 使用文件
|
||||
新代码视图还包括对使用文件的方式的更新。 编辑文件、创建或上传文件以及删除文件或目录等现有功能已得到简化。 现在,你可以快速在 github.dev 或 {% data variables.product.prodname_desktop %} 中编辑文件,以及快速访问集成的文件内搜索功能。
|
||||
|
||||
1. 选择存储库,然后单击该存储库中的文件以打开新的代码视图。
|
||||
|
||||

|
||||
|
||||
1. 若要在集成文件编辑器中编辑文件,请单击 {% octicon "pencil" aria-label="The pencil icon" %}。
|
||||
|
||||

|
||||
|
||||
1. 若要在 github.dev {% data variables.codespaces.serverless %} 或 {% data variables.product.prodname_desktop %} 上编辑文件,请选择 {% octicon "pencil" aria-label="The pencil icon" %} 旁边的 {% octicon "triangle-down" aria-label="The downwards-facing triangle icon" %},然后单击“github.dev”或“{% data variables.product.prodname_desktop %}” 。
|
||||
|
||||
{% note %}
|
||||
|
||||
注意:github.dev {% data variables.codespaces.serverless %} 目前为测试预览版。 你可以在[我们的讨论中](https://github.com/community/community/discussions/categories/general)提供反馈。
|
||||
|
||||
{% endnote %}
|
||||
|
||||

|
||||
|
||||
1. 若要查找文件中的特定字符,请单击“代码”按钮查看该文件的原始代码。 接下来,按 <kbd>Command</kbd>+<kbd>F</kbd> (Mac) 或 <kbd>Ctrl</kbd>+<kbd>F</kbd> (Windows/Linux) 并键入要查找的字符。 可以通过按 <kbd>Return</kbd> (Mac) 或 <kbd>Enter</kbd> (Windows/Linux),或单击 {% octicon "chevron-down" aria-label="The downwards-facing chevron icon" %} 和 {% octicon "chevron-up" aria-label="The upwards-facing chevron icon" %} 在结果之间导航。
|
||||
|
||||
{% note %}
|
||||
|
||||
注意:若要使用浏览器的默认查找功能,请按 <kbd>Command</kbd>+<kbd>F</kbd> (Mac) 或 <kbd>Ctrl</kbd>+<kbd>F</kbd> (Windows/Linux) 两次。 请注意,浏览器的默认查找功能无法搜索大型文件的全部内容,而新代码视图中集成的搜索可以。
|
||||
|
||||
{% endnote %}
|
||||
|
||||

|
||||
|
||||
1. 若要将新文件添加到特定目录,请单击该目录,然后单击{% octicon "plus" aria-label="The plus sign icon" %}“新建文件”,或单击文件树视图中的 {% octicon "plus" aria-label="The plus sign icon" %}。
|
||||
|
||||

|
||||
|
||||
1. 若要删除目录或文件,请导航到该目录或文件,然后单击 {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}。 然后,单击“删除目录”或“删除文件” 。
|
||||
|
||||

|
||||
|
||||
1. 若要上传文件,请导航到所选目录,然后单击 {% octicon "upload" aria-label="The upload icon" %}“上传文件”或将文件拖放到浏览器中。
|
||||
|
||||

|
||||
|
||||
## 使用符号窗格
|
||||
现在,可以使用符号窗格在代码中的函数或类等符号之间快速查看和导航。 可以在单个文件中、存储库中的所有文件中搜索符号,甚至可以在 {% data variables.product.prodname_dotcom %} 上的所有公共存储库中搜索符号。
|
||||
|
||||
符号搜索是新代码搜索(beta 版本)的一项功能。 有关详细信息,请参阅“[了解 GitHub 代码搜索(beta 版本)语法](/search-github/github-code-search/understanding-github-code-search-syntax#symbol-qualifier)”。
|
||||
|
||||
1. 选择存储库,然后导航到包含符号的文件。
|
||||
2. 若要打开符号窗格,请单击 {% octicon "code-square" aria-label="The code square icon" %}。
|
||||
|
||||

|
||||
|
||||
或者,可以通过单击文件中的合格符号来打开符号窗格。 将鼠标悬停在可单击符号上时,它们会以黄色突出显示。
|
||||
|
||||

|
||||
|
||||
1. 单击要从符号窗格或文件本身中查找的符号。
|
||||
|
||||

|
||||
|
||||
- 若要在整个存储库中搜索符号,请单击“在此存储库中搜索此符号”。 若要在 {% data variables.product.prodname_dotcom %} 上的所有存储库中搜索符号,请单击“所有存储库”。
|
||||
|
||||

|
||||
|
||||
1. 若要在对符号的引用之间导航,请单击 {% octicon "chevron-down" aria-label="The downwards-facing chevron icon" %} 或 {% octicon "chevron-up" aria-label="The upwards-facing chevron icon" %}。
|
||||
|
||||

|
||||
|
||||
1. 若要导航到对符号的特定引用,请单击 {% octicon "chevron-down" aria-label="The downwards-facing chevron icon" %}“此文件中”下的符号搜索结果。
|
||||
|
||||

|
||||
|
||||
1. 若要退出对特定符号的搜索,请单击 {% octicon "arrow-left" aria-label="The left arrow icon" %}“所有符号”。
|
||||
|
||||

|
||||
|
||||
## 使用追溯视图
|
||||
当进入追溯视图时不会丢失文件上下文,你现在可以使用新的代码视图在追溯视图、原始代码视图和文件预览之间快速切换(取决于文件类型)。
|
||||
|
||||
1. 选择存储库,然后单击该存储库中的文件以打开新的代码视图。
|
||||
|
||||

|
||||
|
||||
1. 若要查看文件的修订历史记录,请单击“追溯”。 此视图提供逐行修订历史记录,文件中的代码按提交分隔。 每个提交都会列出作者、提交说明和提交日期。
|
||||
|
||||

|
||||
|
||||
- 若要在特定提交之前查看文件的版本,请单击 {% octicon "versions" aria-label="The versions icon" %}。
|
||||
|
||||

|
||||
|
||||
- 若要查看有关特定提交的详细信息,请单击提交说明。
|
||||
|
||||

|
||||
|
||||
1. 若要返回到原始代码视图,请单击“代码”。
|
||||
|
||||

|
||||
|
||||
- 如果要查看 Markdown 文件,还可以单击“预览”以返回到应用 Markdown 格式的视图。
|
||||
|
||||

|
||||
|
||||
## 延伸阅读
|
||||
|
||||
- [将文件移至新位置](/repositories/working-with-files/managing-files/moving-a-file-to-a-new-location)
|
||||
- [关于 GitHub 代码搜索(beta 版本)](/search-github/github-code-search/about-github-code-search)
|
||||
@@ -6,6 +6,7 @@ intro: '使用 {% data variables.product.prodname_actions %} OIDC API,可自
|
||||
topics:
|
||||
- API
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ghes: '>=3.7'
|
||||
ms.openlocfilehash: 6857081d29bd89e59c4f6c7ff458fd0afc2cf6ef
|
||||
|
||||
@@ -21,6 +21,6 @@ When you create a new repository on {% ifversion ghae %}{% data variables.produc
|
||||
|
||||
You can use this custom media type when getting a gitignore template.
|
||||
|
||||
application/vnd.github.VERSION.raw
|
||||
application/vnd.github.raw
|
||||
|
||||
For more information, see "[Media types](/rest/overview/media-types)."
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: 拉取请求审查评论
|
||||
title: Pull request review comments
|
||||
shortTitle: Review comments
|
||||
intro: ''
|
||||
versions:
|
||||
@@ -11,24 +11,10 @@ topics:
|
||||
- API
|
||||
miniTocMaxHeadingLevel: 3
|
||||
allowTitleToDifferFromFilename: true
|
||||
ms.openlocfilehash: 6d49aa3d5bca7f74a21c1cce32cecd38abe9366d
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147067728'
|
||||
---
|
||||
## 关于拉取请求评审评论 API
|
||||
|
||||
拉取请求审查评论是在拉取请求审查期间对统一差异的一部分所发表的评论。 提交评论和议题评论不同于拉取请求审查评论。 将提交评论直接应用于提交,然后应用议题评论而不引用统一差异的一部分。 有关详细信息,请参阅“[创建提交评论](/rest/reference/commits#create-a-commit-comment)”和“[创建问题评论](/rest/reference/issues#create-an-issue-comment)”。
|
||||
## About the Pull request review comments API
|
||||
|
||||
### 拉取请求审查评论的自定义媒体类型
|
||||
Pull request review comments are comments on a portion of the unified diff made during a pull request review. Commit comments and issue comments are different from pull request review comments. You apply commit comments directly to a commit and you apply issue comments without referencing a portion of the unified diff. For more information, see "[Create a commit comment](/rest/reference/commits#create-a-commit-comment)" and "[Create an issue comment](/rest/reference/issues#create-an-issue-comment)."
|
||||
|
||||
以下是拉取请求审查评论支持的媒体类型。
|
||||
|
||||
application/vnd.github.VERSION.raw+json
|
||||
application/vnd.github.VERSION.text+json
|
||||
application/vnd.github.VERSION.html+json
|
||||
application/vnd.github.VERSION.full+json
|
||||
|
||||
有关详细信息,请参阅“[自定义媒体类型](/rest/overview/media-types)”。
|
||||
{% data reusables.pull_requests.issues-media-types %}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
ms.openlocfilehash: b4949218acc89828772bf2bea3998dfde3a10e95
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.openlocfilehash: 298bcacbb02a443ae929ddcd48d9d9cd4bebd41a
|
||||
ms.sourcegitcommit: 99eb4456062aea31ca381977396417cf92e5798d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: "147079538"
|
||||
ms.lasthandoff: 11/21/2022
|
||||
ms.locfileid: "148179581"
|
||||
---
|
||||
触发工作流程的分支或标记参考。 对于 `push` 触发的工作流,这是推送的分支或标记参考。 对于 `pull_request` 触发的工作流,这是拉取请求合并分支。 对于 `release` 触发的工作流,这是创建的发布标记。 对于其他触发器,这是触发工作流运行的分支或标记参考。 此变量仅在分支或标记可用于事件类型时才会设置。 给定的参考格式完整,这意味着对于分支,其格式为 `refs/heads/<branch_name>`,对于拉取请求,其格式为 `refs/pull/<pr_number>/merge`,对于标签,其格式为 `refs/tags/<tag_name>`。 例如,`refs/heads/feature-branch-1`。
|
||||
触发工作流运行的分支或标记的格式完整的参考。 对于 `push` 触发的工作流,这是推送的分支或标记参考。 对于 `pull_request` 触发的工作流,这是拉取请求合并分支。 对于 `release` 触发的工作流,这是创建的发布标记。 对于其他触发器,这是触发工作流运行的分支或标记参考。 此变量仅在分支或标记可用于事件类型时才会设置。 给定的参考格式完整,这意味着对于分支,其格式为 `refs/heads/<branch_name>`,对于拉取请求,其格式为 `refs/pull/<pr_number>/merge`,对于标签,其格式为 `refs/tags/<tag_name>`。 例如,`refs/heads/feature-branch-1`。
|
||||
@@ -1 +1,9 @@
|
||||
The short ref name of the branch or tag that triggered the workflow run. This value matches the branch or tag name shown on {% data variables.product.prodname_dotcom %}. For example, `feature-branch-1`.
|
||||
---
|
||||
ms.openlocfilehash: 0e70ab3b15c9f36204833d8cbf5f5776d71f1375
|
||||
ms.sourcegitcommit: 99eb4456062aea31ca381977396417cf92e5798d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/21/2022
|
||||
ms.locfileid: "148179573"
|
||||
---
|
||||
触发工作流运行的分支或标记的短参考名称。 此值与 {% data variables.product.prodname_dotcom %} 上显示的分支或标记名称匹配。 例如,`feature-branch-1`。
|
||||
@@ -1,27 +1,11 @@
|
||||
The table below summarizes whether dependency scope is supported for various ecosystems and manifests, that is, whether {% data variables.product.prodname_dependabot %} can identify if a dependency is used for development or production.
|
||||
---
|
||||
ms.openlocfilehash: fe25bdae61de1f19af6cb1e9103df41c40f60510
|
||||
ms.sourcegitcommit: f392aa98511e0889d96af2e4a56e67f8adfb025f
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/18/2022
|
||||
ms.locfileid: "148172723"
|
||||
---
|
||||
下表总结了各种生态系统和清单是否支持依赖项范围,即 {% data variables.product.prodname_dependabot %} 是否可以识别依赖项用于开发还是生产。
|
||||
|
||||
| **Language** | **Ecosystem** | **Manifest file** | **Dependency scope supported** |
|
||||
|:---|:---:|:---:|:---|{% ifversion dependency-graph-dart-support %}
|
||||
| Dart | pub | pubspec.yaml | ✔ |
|
||||
| Dart | pub | pubspec.lock | ✔ |{% endif %}
|
||||
| Go | Go modules | go.mod | No, defaults to runtime |
|
||||
| Go | Go modules | go.sum | No, defaults to runtime |
|
||||
| Java | Maven | pom.xml | ✔ `test` maps to development, else scope defaults to runtime |
|
||||
| JavaScript | npm | package.json | ✔ |
|
||||
| JavaScript | npm | package-lock.json | ✔ |
|
||||
| JavaScript | yarn v1 | yarn.lock | No, defaults to runtime |
|
||||
| PHP | Composer | composer.json | ✔ |
|
||||
| PHP | Composer | composer.lock | ✔ |
|
||||
| Python | Poetry | poetry.lock | ✔ |
|
||||
| Python | Poetry | pyproject.toml | ✔ |
|
||||
| Python | pip | requirements.txt | ✔ Scope is development if the filename contains `test` or `dev`, else it is runtime |
|
||||
| Python | pip | pipfile.lock | ✔ |
|
||||
| Python | pip | pipfile | ✔ |
|
||||
| Ruby | RubyGems | Gemfile | ✔ |
|
||||
| Ruby | RubyGems | Gemfile.lock | No, defaults to runtime |
|
||||
| Rust | Cargo | Cargo.toml | ✔ |
|
||||
| Rust | Cargo | Cargo.lock | No, defaults to runtime |
|
||||
| YAML | GitHub Actions | - | No, defaults to runtime |
|
||||
| .NET (C#, F#, VB, etc.) | NuGet | .csproj / .vbproj .vcxproj / .fsproj | No, defaults to runtime |
|
||||
| .NET | NuGet | packages.config | No, defaults to runtime |
|
||||
| .NET | NuGet | .nuspec | ✔ When the tag != runtime |
|
||||
| 语言 | 生态系统 | 清单文件 | 支持的依赖项范围 | |:---|:---:|:---:|:---|{% ifversion dependency-graph-dart-support %} | Dart | pub | pubspec.yaml | ✔ | | Dart | pub | pubspec.lock | ✔ |{% endif %} | Go | Go 模块 | go.mod | 否,默认为运行时 | | Go | Go 模块 | go.sum | 否,默认为运行时 | | Java | Maven | pom.xml | ✔ `test` 映射到开发,否则范围默认为运行时 | | JavaScript | npm | package.json | ✔ | | JavaScript | npm | package-lock.json | ✔ | | JavaScript | yarn v1 | yarn.lock | 否,默认为运行时 | | PHP | Composer | composer.json | ✔ | | PHP | Composer | composer.lock | ✔ | | Python | Poetry | poetry.lock | ✔ | | Python | Poetry | pyproject.toml | ✔ | | Python | pip | requirements.txt | ✔ 如果文件名包含 `test` 或 `dev`,范围则为开发,否则为运行时 | | Python | pip | pipfile.lock | ✔ | | Python | pip | pipfile | ✔ | | Ruby | RubyGems | Gemfile | ✔ | | Ruby | RubyGems | Gemfile.lock | 否,默认为运行时 | | Rust | Cargo | Cargo.toml | ✔ | | Rust | Cargo | Cargo.lock | 否,默认为运行时 | | YAML | GitHub Actions | - | 否,默认为运行时 | | .NET (C#, F#, VB, etc.) | NuGet | .csproj / .vbproj .vcxproj / .fsproj | 否,默认为运行时 | | .NET | NuGet | packages.config | 否,默认为运行时 | | .NET | NuGet | .nuspec | ✔ 当标记 != 运行时时 |
|
||||
|
||||
@@ -64,6 +64,8 @@ Dynatrace | Dynatrace Internal Token | dynatrace_internal_token
|
||||
EasyPost | EasyPost Production API Key | easypost_production_api_key
|
||||
EasyPost | EasyPost Test API Key | easypost_test_api_key
|
||||
Fastly | Fastly API Token | fastly_api_token
|
||||
{%- ifversion fpt or ghec or ghes > 3.7 or ghae > 3.7 %}
|
||||
Figma | Figma {% data variables.product.pat_generic_title_case %} | figma_pat{% endif %}
|
||||
Finicity | Finicity App Key | finicity_app_key
|
||||
Flutterwave | Flutterwave Live API Secret Key | flutterwave_live_api_secret_key
|
||||
Flutterwave | Flutterwave Test API Secret Key | flutterwave_test_api_secret_key
|
||||
@@ -91,7 +93,12 @@ Google | Google OAuth Access Token | google_oauth_access_token{% endif %}
|
||||
Google | Google OAuth Client ID with Google OAuth Client Secret | google_oauth_client_id </br>google_oauth_client_secret{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %}
|
||||
Google | Google OAuth Refresh Token | google_oauth_refresh_token{% endif %}
|
||||
{%- ifversion fpt or ghec or ghes > 3.7 or ghae > 3.7 %}
|
||||
Grafana | Grafana API Key | grafana_api_key
|
||||
Grafana | Grafana Cloud API Key | grafana_cloud_api_key
|
||||
Grafana | Grafana Cloud API Token | grafana_cloud_api_token
|
||||
Grafana | Grafana Project API Key | grafana_project_api_key
|
||||
Grafana | Grafana Project Service Account Token | grafana_project_service_account_token{% endif %}
|
||||
HashiCorp | Terraform Cloud / Enterprise API Token | terraform_api_token
|
||||
HashiCorp | HashiCorp Vault Batch Token | hashicorp_vault_batch_token
|
||||
{%- ifversion fpt or ghec or ghes > 3.8 or ghae > 3.8 %}
|
||||
@@ -198,6 +205,8 @@ Stripe | Stripe Webhook Signing Secret | stripe_webhook_signing_secret
|
||||
Supabase | Supabase Service Key | supabase_service_key{% endif %}
|
||||
Tableau | Tableau {% data variables.product.pat_generic_title_case %} | tableau_personal_access_token
|
||||
Telegram | Telegram Bot Token | telegram_bot_token
|
||||
{%- ifversion fpt or ghec or ghes > 3.7 or ghae > 3.7 %}
|
||||
Telnyx | Telnyx API V2 Key | telnyx_api_v2_key{% endif %}
|
||||
Tencent Cloud | Tencent Cloud Secret ID | tencent_cloud_secret_id
|
||||
{%- ifversion fpt or ghec or ghes > 3.3 or ghae > 3.3 %}
|
||||
Twilio | Twilio Access Token | twilio_access_token{% endif %}
|
||||
|
||||
@@ -1,132 +1,127 @@
|
||||
---
|
||||
ms.openlocfilehash: 7843dd2811e3645b6c9ea979fd3cb54a14b151f0
|
||||
ms.sourcegitcommit: 8d6f272d8b5da44e3a29ad8d99013c10a5c91b35
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/17/2022
|
||||
ms.locfileid: "148172034"
|
||||
---
|
||||
Partner | 支持的密钥
|
||||
Partner | Supported secret
|
||||
--- | ---
|
||||
Adafruit IO | Adafruit IO 密钥
|
||||
Adobe | Adobe 设备令牌
|
||||
Adobe | Adobe 服务令牌
|
||||
Adobe | Adobe 短暂访问令牌
|
||||
Adobe | Adobe JSON Web 令牌
|
||||
Alibaba Cloud | Alibaba 云端访问密钥 ID 和访问密钥对
|
||||
Amazon Web Services (AWS) | Amazon AWS 访问密钥 ID 和秘密访问密钥对
|
||||
Atlassian | Atlassian API 令牌
|
||||
Atlassian | Atlassian JSON Web 令牌
|
||||
Azure | Azure Active Directory 应用程序密钥
|
||||
Azure | Azure Batch 可识别密钥
|
||||
Azure | Azure CosmosDB 可识别密钥
|
||||
Adafruit IO | Adafruit IO Key
|
||||
Adobe | Adobe Device Token
|
||||
Adobe | Adobe Service Token
|
||||
Adobe | Adobe Short-Lived Access Token
|
||||
Adobe | Adobe JSON Web Token
|
||||
Alibaba Cloud | Alibaba Cloud Access Key ID and Access Key Secret pair
|
||||
Amazon Web Services (AWS) | Amazon AWS Access Key ID and Secret Access Key pair
|
||||
Atlassian | Atlassian API Token
|
||||
Atlassian | Atlassian JSON Web Token
|
||||
Azure | Azure Active Directory Application Secret
|
||||
Azure | Azure Batch Key Identifiable
|
||||
Azure | Azure CosmosDB Key Identifiable
|
||||
Azure | Azure DevOps {% data variables.product.pat_generic_title_case %}
|
||||
Azure | Azure ML 工作室(经典)Web 服务密钥
|
||||
Azure | Azure SAS 令牌
|
||||
Azure | Azure 搜索管理密钥
|
||||
Azure | Azure 搜索查询密钥
|
||||
Azure | Azure 服务管理证书
|
||||
Azure | Azure SQL 连接字符串
|
||||
Azure | Azure 存储帐户密钥
|
||||
Checkout.com | Checkout.com 生产密钥
|
||||
Checkout.com | Checkout.com 测试密钥
|
||||
Chief | Chief 工具令牌
|
||||
Clojars | Clojars 部署令牌
|
||||
CloudBees CodeShip | CloudBees CodeShip 凭据
|
||||
参与的系统 | 参与的系统凭据
|
||||
Databricks | Databricks 访问令牌
|
||||
Datadog | Datadog API 密钥
|
||||
DevCycle | DevCycle 客户端 API 密钥
|
||||
DevCycle | DevCycle 服务器 API 密钥
|
||||
Azure | Azure ML Studio (classic) Web Service Key
|
||||
Azure | Azure SAS Token
|
||||
Azure | Azure Search Admin Key
|
||||
Azure | Azure Search Query Key
|
||||
Azure | Azure Service Management Certificate
|
||||
Azure | Azure SQL Connection String
|
||||
Azure | Azure Storage Account Key
|
||||
Checkout.com | Checkout.com Production Secret Key
|
||||
Checkout.com | Checkout.com Test Secret Key
|
||||
Chief | Chief Tools Token
|
||||
Clojars | Clojars Deploy Token
|
||||
CloudBees CodeShip | CloudBees CodeShip Credential
|
||||
Contributed Systems | Contributed Systems Credentials
|
||||
Databricks | Databricks Access Token
|
||||
Datadog | Datadog API Key
|
||||
DevCycle | DevCycle Client API Key
|
||||
DevCycle | DevCycle Server API Key
|
||||
DigitalOcean | DigitalOcean {% data variables.product.pat_generic_title_case %}
|
||||
DigitalOcean | DigitalOcean OAuth 令牌
|
||||
DigitalOcean | DigitalOcean 刷新令牌
|
||||
DigitalOcean | DigitalOcean 系统令牌
|
||||
Discord | Discord 自动程序令牌
|
||||
Doppler | Doppler 个人令牌
|
||||
Doppler | Doppler 服务令牌
|
||||
Doppler | Doppler CLI 令牌
|
||||
Doppler | Doppler SCIM 令牌
|
||||
Doppler | Doppler 审核令牌
|
||||
Dropbox | Dropbox 访问令牌
|
||||
Dropbox | Dropbox 短暂访问令牌
|
||||
Dynatrace | Dynatrace 访问令牌
|
||||
Dynatrace | Dynatrace 内部令牌
|
||||
Finicity | Finicity App 密钥
|
||||
Frame.io | Frame.io JSON Web 令牌
|
||||
Frame.io| Frame.io Developer 令牌
|
||||
FullStory| FullStory API 密钥
|
||||
DigitalOcean | DigitalOcean OAuth Token
|
||||
DigitalOcean | DigitalOcean Refresh Token
|
||||
DigitalOcean | DigitalOcean System Token
|
||||
Discord | Discord Bot Token
|
||||
Doppler | Doppler Personal Token
|
||||
Doppler | Doppler Service Token
|
||||
Doppler | Doppler CLI Token
|
||||
Doppler | Doppler SCIM Token
|
||||
Doppler | Doppler Audit Token
|
||||
Dropbox | Dropbox Access Token
|
||||
Dropbox | Dropbox Short Lived Access Token
|
||||
Dynatrace | Dynatrace Access Token
|
||||
Dynatrace | Dynatrace Internal Token
|
||||
Figma | Figma {% data variables.product.pat_generic_title_case %}
|
||||
Finicity | Finicity App Key
|
||||
Frame.io | Frame.io JSON Web Token
|
||||
Frame.io| Frame.io Developer Token
|
||||
FullStory| FullStory API Key
|
||||
GitHub | GitHub {% data variables.product.pat_generic_title_case %}
|
||||
GitHub | GitHub OAuth 访问令牌
|
||||
GitHub | GitHub 刷新令牌
|
||||
GitHub | GitHub App 安装访问令牌
|
||||
GitHub | GitHub SSH 私钥
|
||||
GoCardless | GoCardless 实时访问令牌
|
||||
GoCardless | GoCardless Sandbox 访问令牌
|
||||
Google Cloud | Google API 密钥
|
||||
Google Cloud | Google Cloud 私钥 ID
|
||||
Hashicorp Terraform | Terraform Cloud / Enterprise API 令牌
|
||||
Hubspot | Hubspot API 密钥
|
||||
GitHub | GitHub OAuth Access Token
|
||||
GitHub | GitHub Refresh Token
|
||||
GitHub | GitHub App Installation Access Token
|
||||
GitHub | GitHub SSH Private Key
|
||||
GoCardless | GoCardless Live Access Token
|
||||
GoCardless | GoCardless Sandbox Access Token
|
||||
Google Cloud | Google API Key
|
||||
Google Cloud | Google Cloud Private Key ID
|
||||
Hashicorp Terraform | Terraform Cloud / Enterprise API Token
|
||||
Hubspot | Hubspot API Key
|
||||
Hubspot | Hubspot API Personal Access Key
|
||||
Ionic | Ionic {% data variables.product.pat_generic_title_case %}
|
||||
Ionic | Ionic 刷新令牌
|
||||
JD Cloud | JD Cloud 访问密钥
|
||||
线性 | 线性 API 密钥
|
||||
线性 | 线性 OAuth 访问令牌
|
||||
Mailchimp | Mailchimp API 密钥
|
||||
Mailchimp | Mandril API 密钥
|
||||
Mailgun | Mailgun API 密钥
|
||||
MessageBird | MessageBird API 密钥
|
||||
元数据 | Facebook Access Token
|
||||
npm | npm 访问令牌
|
||||
NuGet | NuGet API 密钥
|
||||
Octopus 部署 | Octopus 部署 API 密钥
|
||||
OpenAI | OpenAI API 密钥
|
||||
Palantir | Palantir JSON Web 令牌
|
||||
PlanetScale | PlanetScale 数据库密码
|
||||
PlanetScale | PlanetScale OAuth 令牌
|
||||
PlanetScale | PlanetScale 服务令牌
|
||||
Plivo | Plivo 身份验证 ID 和令牌
|
||||
Postman | Postman API 密钥
|
||||
Prefect | Prefect 服务器 API 密钥
|
||||
Prefect | Prefect 用户 API 令牌
|
||||
Proctorio | Proctorio 消费者密钥
|
||||
Proctorio | Proctorio 链接密钥
|
||||
Proctorio | Proctorio 注册密钥
|
||||
Proctorio | Proctorio 密钥
|
||||
Pulumi | Pulumi 访问令牌
|
||||
PyPI | PyPI API 令牌
|
||||
ReadMe | ReadMe API 访问密钥
|
||||
redirect.pizza | redirect.pizza API 令牌
|
||||
RubyGems | RubyGems API 密钥
|
||||
Samsara | Samsara API 令牌
|
||||
Samsara | Samsara OAuth 访问令牌
|
||||
SendGrid | SendGrid API 密钥
|
||||
Sendinblue | Sendinblue API 密钥
|
||||
Sendinblue | Sendinblue SMTP 密钥
|
||||
Shopify | Shopify App 共享密钥
|
||||
Shopify | Shopify 访问令牌
|
||||
Shopify | Shopify 自定义应用访问令牌
|
||||
Shopify | Shopify 私人应用密码
|
||||
Slack | Slack API 令牌
|
||||
Slack | Slack 传入 web 挂钩 URL
|
||||
Slack | Slack 工作流程 web 挂钩 URL
|
||||
SSLMate | SSLMate API 密钥
|
||||
SSLMate | SSLMate 集群密钥
|
||||
Stripe | Stripe Live API 密钥
|
||||
Stripe | Stripe 测试 API 密钥
|
||||
Stripe | Stripe Live API 限制密钥
|
||||
Stripe | Stripe 测试 API 限制密钥
|
||||
Supabase | Supabase 服务密钥
|
||||
Tencent Cloud | 腾讯云密钥 ID
|
||||
Twilio | Twilio 帐户字符串标识符
|
||||
Twilio | Twilio API 密钥
|
||||
Ionic | Ionic Refresh Token
|
||||
JD Cloud | JD Cloud Access Key
|
||||
Linear | Linear API Key
|
||||
Linear | Linear OAuth Access Token
|
||||
Mailchimp | Mailchimp API Key
|
||||
Mailchimp | Mandrill API Key
|
||||
Mailgun | Mailgun API Key
|
||||
MessageBird | MessageBird API Key
|
||||
Meta | Facebook Access Token
|
||||
npm | npm Access Token
|
||||
NuGet | NuGet API Key
|
||||
Octopus Deploy | Octopus Deploy API Key
|
||||
OpenAI | OpenAI API Key
|
||||
Palantir | Palantir JSON Web Token
|
||||
PlanetScale | PlanetScale Database Password
|
||||
PlanetScale | PlanetScale OAuth Token
|
||||
PlanetScale | PlanetScale Service Token
|
||||
Plivo | Plivo Auth ID and Token
|
||||
Postman | Postman API Key
|
||||
Prefect | Prefect Server API Key
|
||||
Prefect | Prefect User API Token
|
||||
Proctorio | Proctorio Consumer Key
|
||||
Proctorio | Proctorio Linkage Key
|
||||
Proctorio | Proctorio Registration Key
|
||||
Proctorio | Proctorio Secret Key
|
||||
Pulumi | Pulumi Access Token
|
||||
PyPI | PyPI API Token
|
||||
ReadMe | ReadMe API Access Key
|
||||
redirect.pizza | redirect.pizza API Token
|
||||
RubyGems | RubyGems API Key
|
||||
Samsara | Samsara API Token
|
||||
Samsara | Samsara OAuth Access Token
|
||||
SendGrid | SendGrid API Key
|
||||
Sendinblue | Sendinblue API Key
|
||||
Sendinblue | Sendinblue SMTP Key
|
||||
Shopify | Shopify App Shared Secret
|
||||
Shopify | Shopify Access Token
|
||||
Shopify | Shopify Custom App Access Token
|
||||
Shopify | Shopify Private App Password
|
||||
Slack | Slack API Token
|
||||
Slack | Slack Incoming Webhook URL
|
||||
Slack | Slack Workflow Webhook URL
|
||||
SSLMate | SSLMate API Key
|
||||
SSLMate | SSLMate Cluster Secret
|
||||
Stripe | Stripe Live API Secret Key
|
||||
Stripe | Stripe Test API Secret Key
|
||||
Stripe | Stripe Live API Restricted Key
|
||||
Stripe | Stripe Test API Restricted Key
|
||||
Supabase | Supabase Service Key
|
||||
Tencent Cloud | Tencent Cloud Secret ID
|
||||
Tencent WeChat | Tencent WeChat API App ID
|
||||
Twilio | Twilio Account String Identifier
|
||||
Twilio | Twilio API Key
|
||||
Typeform | Typeform {% data variables.product.pat_generic_title_case %}
|
||||
Uniwise | WISEflow API 密钥
|
||||
Valour | Valour 访问令牌
|
||||
Yandex | Yandex.Cloud API 密钥
|
||||
Yandex | Yandex.Cloud IAM Cookie
|
||||
Yandex | Yandex.Cloud IAM 令牌
|
||||
Yandex | Yandex.Dictionary API 密钥
|
||||
Yandex | Yandex.Cloud 访问机密
|
||||
Yandex | Yandex.Passport OAuth 令牌
|
||||
Zuplo | Zuplo 使用者 API
|
||||
Uniwise | WISEflow API Key
|
||||
Valour | Valour Access Token
|
||||
Yandex | Yandex.Cloud API Key
|
||||
Yandex | Yandex.Cloud IAM Cookie
|
||||
Yandex | Yandex.Cloud IAM Token
|
||||
Yandex | Yandex.Dictionary API Key
|
||||
Yandex | Yandex.Cloud Access Secret
|
||||
Yandex | Yandex.Passport OAuth Token
|
||||
Zuplo | Zuplo Consumer API
|
||||
|
||||
@@ -41,6 +41,8 @@ Doppler | Doppler Audit Token | doppler_audit_token
|
||||
Dropbox | Dropbox Short Lived Access Token | dropbox_short_lived_access_token
|
||||
Duffel | Duffel Live Access Token | duffel_live_access_token
|
||||
EasyPost | EasyPost Production API Key | easypost_production_api_key
|
||||
{%- ifversion fpt or ghec or ghes > 3.7 or ghae > 3.7 %}
|
||||
Figma | Figma {% data variables.product.pat_generic_title_case %} | figma_pat{% endif %}
|
||||
Flutterwave | Flutterwave Live API Secret Key | flutterwave_live_api_secret_key
|
||||
Fullstory | FullStory API Key | fullstory_api_key
|
||||
GitHub | GitHub {% data variables.product.pat_generic_title_case %} | github_personal_access_token
|
||||
|
||||
@@ -1,19 +1,10 @@
|
||||
---
|
||||
ms.openlocfilehash: 4081194451ae681e3a8208cb0462bd7f7574c3ef
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: "145130369"
|
||||
---
|
||||
如果您的支持申请超出了我们团队可以帮助您的范围, 我们可能会提出后续措施建议,以便在 {% data variables.contact.github_support %} 之外解决您的问题。 您的支持申请如果主要是关于以下方面,可能超出了 {% data variables.contact.github_support %} 的范围:
|
||||
- 第三方集成,例如 Jira{% ifversion ghes %}
|
||||
- 硬件设置{% endif %}
|
||||
- CI/CD,例如 Jenkins
|
||||
- 编写脚本
|
||||
- 配置外部身份验证系统,例如 SAML 标识提供者
|
||||
- 开源项目{% ifversion ghes %}
|
||||
- LGTM 群集设计{% endif %}
|
||||
- 写入或调试 {% data variables.product.prodname_codeql %} 的新查询
|
||||
If your support request is outside of the scope of what our team can help you with, we may recommend next steps to resolve your issue outside of {% data variables.contact.github_support %}. Your support request is possibly out of {% data variables.contact.github_support %}'s scope if the request is primarily about:
|
||||
- Third party integrations, such as Jira{% ifversion ghes %}
|
||||
- Hardware setup{% endif %}
|
||||
- CI/CD, such as Jenkins
|
||||
- Writing scripts
|
||||
- Configuration of external authentication systems, such as SAML identity providers
|
||||
- Open source projects
|
||||
- Writing or debugging new queries for {% data variables.product.prodname_codeql %}
|
||||
|
||||
如果您不确定问题是否超出范围,请开一个事件单,我们乐意帮助您确定最好的处理方式。
|
||||
If you're uncertain if the issue is out of scope, open a ticket and we're happy to help you determine the best way to proceed.
|
||||
|
||||
Reference in New Issue
Block a user