From a7e096504a1c8ba79794841850e0772e5ae4307d Mon Sep 17 00:00:00 2001 From: docubot <67483024+docubot@users.noreply.github.com> Date: Fri, 28 Oct 2022 10:53:13 -0700 Subject: [PATCH] New translation batch for cn (#32158) --- translations/log/msft-cn-resets.csv | 41 +++--- .../security-hardening-for-github-actions.md | 6 + ...ub-actions-for-github-enterprise-server.md | 10 +- .../dependabot/dependabot-alerts/index.md | 8 +- ...rator-to-a-repository-security-advisory.md | 51 +++++++ ...lve-a-repository-security-vulnerability.md | 91 ++++++++++++ ...vels-for-repository-security-advisories.md | 51 +++++++ ...tor-from-a-repository-security-advisory.md | 43 ++++++ ...hdrawing-a-repository-security-advisory.md | 29 ++++ .../zh-CN/content/codespaces/guides.md | 8 +- .../index.md | 8 +- .../about-git-large-file-storage.md | 44 +++--- .../rest/guides/traversing-with-pagination.md | 130 ++++++++++++++---- .../actions/hardware-requirements-3.6.md | 14 -- .../codespaces/edit-devcontainer-json.md | 9 ++ .../security-advisory/global-advisories.md | 9 ++ 16 files changed, 457 insertions(+), 95 deletions(-) create mode 100644 translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory.md create mode 100644 translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability.md create mode 100644 translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/permission-levels-for-repository-security-advisories.md create mode 100644 translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory.md create mode 100644 translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/withdrawing-a-repository-security-advisory.md delete mode 100644 translations/zh-CN/data/reusables/actions/hardware-requirements-3.6.md create mode 100644 translations/zh-CN/data/reusables/codespaces/edit-devcontainer-json.md create mode 100644 translations/zh-CN/data/reusables/security-advisory/global-advisories.md diff --git a/translations/log/msft-cn-resets.csv b/translations/log/msft-cn-resets.csv index 6b679303f8..7cd00ecb00 100644 --- a/translations/log/msft-cn-resets.csv +++ b/translations/log/msft-cn-resets.csv @@ -217,6 +217,7 @@ translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponso translations/zh-CN/data/glossaries/internal.yml,file deleted because it no longer exists in main translations/zh-CN/data/graphql/ghes-3.1/graphql_previews.enterprise.yml,file deleted because it no longer exists in main translations/zh-CN/data/graphql/ghes-3.2/graphql_previews.enterprise.yml,file deleted because it no longer exists in main +translations/zh-CN/data/reusables/actions/hardware-requirements-3.6.md,file deleted because it no longer exists in main translations/zh-CN/data/reusables/actions/link-to-example-library.md,file deleted because it no longer exists in main translations/zh-CN/data/reusables/actions/perform-blob-storage-precheck.md,file deleted because it no longer exists in main translations/zh-CN/data/reusables/actions/self-hosted-runner-configure-runner-group.md,file deleted because it no longer exists in main @@ -233,9 +234,7 @@ translations/zh-CN/data/reusables/codespaces/concurrent-codespace-limit.md,file translations/zh-CN/data/reusables/codespaces/prebuilds-beta-note.md,file deleted because it no longer exists in main translations/zh-CN/data/reusables/codespaces/prebuilds-not-available.md,file deleted because it no longer exists in main translations/zh-CN/data/reusables/codespaces/unsupported-repos.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/dependabot/beta-security-and-version-updates-onboarding.md,file deleted because it no longer exists in main translations/zh-CN/data/reusables/dependabot/create-dependabot-yml.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/dependency-review/beta.md,file deleted because it no longer exists in main translations/zh-CN/data/reusables/desktop/paste-email-git-config.md,file deleted because it no longer exists in main translations/zh-CN/data/reusables/dotcom_billing/codespaces-minutes.md,file deleted because it no longer exists in main translations/zh-CN/data/reusables/dotcom_billing/pricing_calculator/pricing_cal_codespaces.md,file deleted because it no longer exists in main @@ -243,7 +242,6 @@ translations/zh-CN/data/reusables/education/upgrade-organization.md,file deleted translations/zh-CN/data/reusables/education/upgrade-page.md,file deleted because it no longer exists in main translations/zh-CN/data/reusables/enterprise-accounts/repository-visibility-policy.md,file deleted because it no longer exists in main translations/zh-CN/data/reusables/enterprise-licensing/you-can-sync-for-a-combined-view.md,file deleted because it no longer exists in main -translations/zh-CN/data/reusables/enterprise/upgrade-ghes-for-actions.md,file deleted because it no longer exists in main translations/zh-CN/data/reusables/enterprise_management_console/username_normalization_sample.md,file deleted because it no longer exists in main translations/zh-CN/data/reusables/gated-features/advanced-security.md,file deleted because it no longer exists in main translations/zh-CN/data/reusables/gated-features/discussions.md,file deleted because it no longer exists in main @@ -303,7 +301,7 @@ translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-pers translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-accessibility-settings.md,broken liquid tags translations/zh-CN/content/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.md,rendering error translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-the-default-branch-name-for-your-repositories.md,rendering error -translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-your-theme-settings.md,broken liquid tags +translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/managing-your-theme-settings.md,rendering error translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/permission-levels-for-a-personal-account-repository.md,broken liquid tags translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-membership-in-organizations/requesting-organization-approval-for-oauth-apps.md,rendering error translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/best-practices-for-leaving-your-company.md,broken liquid tags @@ -413,7 +411,7 @@ translations/zh-CN/content/admin/enterprise-management/caching-repositories/conf translations/zh-CN/content/admin/enterprise-management/caching-repositories/index.md,rendering error translations/zh-CN/content/admin/enterprise-management/configuring-clustering/cluster-network-configuration.md,broken liquid tags translations/zh-CN/content/admin/enterprise-management/configuring-clustering/configuring-high-availability-replication-for-a-cluster.md,broken liquid tags -translations/zh-CN/content/admin/enterprise-management/configuring-high-availability/about-geo-replication.md,broken liquid tags +translations/zh-CN/content/admin/enterprise-management/configuring-high-availability/about-geo-replication.md,rendering error translations/zh-CN/content/admin/enterprise-management/configuring-high-availability/creating-a-high-availability-replica.md,broken liquid tags translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/accessing-the-monitor-dashboard.md,broken liquid tags translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/configuring-collectd.md,broken liquid tags @@ -608,13 +606,13 @@ translations/zh-CN/content/code-security/dependabot/dependabot-version-updates/c translations/zh-CN/content/code-security/dependabot/dependabot-version-updates/configuring-dependabot-version-updates.md,rendering error translations/zh-CN/content/code-security/dependabot/dependabot-version-updates/customizing-dependency-updates.md,rendering error translations/zh-CN/content/code-security/dependabot/dependabot-version-updates/listing-dependencies-configured-for-version-updates.md,rendering error -translations/zh-CN/content/code-security/dependabot/index.md,broken liquid tags +translations/zh-CN/content/code-security/dependabot/index.md,rendering error translations/zh-CN/content/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions.md,rendering error translations/zh-CN/content/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot.md,rendering error translations/zh-CN/content/code-security/dependabot/working-with-dependabot/managing-encrypted-secrets-for-dependabot.md,rendering error translations/zh-CN/content/code-security/dependabot/working-with-dependabot/troubleshooting-dependabot-errors.md,rendering error translations/zh-CN/content/code-security/dependabot/working-with-dependabot/troubleshooting-the-detection-of-vulnerable-dependencies.md,rendering error -translations/zh-CN/content/code-security/getting-started/adding-a-security-policy-to-your-repository.md,broken liquid tags +translations/zh-CN/content/code-security/getting-started/adding-a-security-policy-to-your-repository.md,rendering error translations/zh-CN/content/code-security/getting-started/github-security-features.md,rendering error translations/zh-CN/content/code-security/getting-started/securing-your-organization.md,rendering error translations/zh-CN/content/code-security/getting-started/securing-your-repository.md,rendering error @@ -635,7 +633,7 @@ translations/zh-CN/content/code-security/supply-chain-security/understanding-you 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-dependency-review.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/code-security/supply-chain-security/understanding-your-software-supply-chain/troubleshooting-the-dependency-graph.md,broken liquid tags +translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/troubleshooting-the-dependency-graph.md,rendering error translations/zh-CN/content/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry.md,broken liquid tags translations/zh-CN/content/codespaces/codespaces-reference/disaster-recovery-for-github-codespaces.md,broken liquid tags translations/zh-CN/content/codespaces/codespaces-reference/security-in-github-codespaces.md,broken liquid tags @@ -818,7 +816,7 @@ translations/zh-CN/content/organizations/managing-organization-settings/integrat translations/zh-CN/content/organizations/managing-organization-settings/managing-the-commit-signoff-policy-for-your-organization.md,rendering error translations/zh-CN/content/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization.md,rendering error translations/zh-CN/content/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization.md,broken liquid tags -translations/zh-CN/content/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators.md,broken liquid tags +translations/zh-CN/content/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators.md,rendering error translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization.md,rendering error translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on.md,broken liquid tags translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta.md,broken liquid tags @@ -900,6 +898,7 @@ translations/zh-CN/content/repositories/releasing-projects-on-github/comparing-r translations/zh-CN/content/repositories/releasing-projects-on-github/linking-to-releases.md,rendering error translations/zh-CN/content/repositories/releasing-projects-on-github/managing-releases-in-a-repository.md,rendering error translations/zh-CN/content/repositories/working-with-files/managing-files/adding-a-file-to-a-repository.md,broken liquid tags +translations/zh-CN/content/repositories/working-with-files/managing-large-files/about-git-large-file-storage.md,broken liquid tags translations/zh-CN/content/repositories/working-with-files/managing-large-files/about-large-files-on-github.md,broken liquid tags translations/zh-CN/content/repositories/working-with-files/using-files/getting-permanent-links-to-files.md,broken liquid tags translations/zh-CN/content/repositories/working-with-files/using-files/working-with-non-code-files.md,rendering error @@ -1007,7 +1006,7 @@ translations/zh-CN/data/reusables/actions/github-connect-resolution.md,broken li translations/zh-CN/data/reusables/actions/ip-allow-list-self-hosted-runners.md,broken liquid tags translations/zh-CN/data/reusables/actions/jobs/section-defining-outputs-for-jobs.md,broken liquid tags translations/zh-CN/data/reusables/actions/jobs/section-running-jobs-in-a-container.md,broken liquid tags -translations/zh-CN/data/reusables/actions/message-parameters.md,broken liquid tags +translations/zh-CN/data/reusables/actions/message-parameters.md,rendering error translations/zh-CN/data/reusables/actions/more-resources-for-ghes.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 @@ -1032,7 +1031,7 @@ translations/zh-CN/data/reusables/advanced-security/about-committer-numbers-ghec translations/zh-CN/data/reusables/advanced-security/about-ghas-organization-policy.md,broken liquid tags translations/zh-CN/data/reusables/advanced-security/secret-scanning-add-custom-pattern-details.md,rendering error translations/zh-CN/data/reusables/advanced-security/secret-scanning-create-custom-pattern.md,rendering error -translations/zh-CN/data/reusables/advanced-security/secret-scanning-new-custom-pattern.md,broken liquid tags +translations/zh-CN/data/reusables/advanced-security/secret-scanning-new-custom-pattern.md,rendering error translations/zh-CN/data/reusables/advanced-security/secret-scanning-push-protection-org.md,broken liquid tags translations/zh-CN/data/reusables/apps/user-to-server-rate-limits.md,broken liquid tags translations/zh-CN/data/reusables/audit_log/audit-log-action-categories.md,rendering error @@ -1136,23 +1135,23 @@ translations/zh-CN/data/reusables/organizations/billing_plans.md,rendering error translations/zh-CN/data/reusables/organizations/github-apps-settings-sidebar.md,rendering error translations/zh-CN/data/reusables/organizations/member-privileges.md,rendering error translations/zh-CN/data/reusables/organizations/navigate-to-org.md,broken liquid tags -translations/zh-CN/data/reusables/organizations/new_team.md,broken liquid tags -translations/zh-CN/data/reusables/organizations/org_settings.md,broken liquid tags -translations/zh-CN/data/reusables/organizations/organization-wide-project.md,broken liquid tags -translations/zh-CN/data/reusables/organizations/owners-team.md,broken liquid tags -translations/zh-CN/data/reusables/organizations/people.md,broken liquid tags +translations/zh-CN/data/reusables/organizations/new_team.md,rendering error +translations/zh-CN/data/reusables/organizations/org_settings.md,rendering error +translations/zh-CN/data/reusables/organizations/organization-wide-project.md,rendering error +translations/zh-CN/data/reusables/organizations/owners-team.md,rendering error +translations/zh-CN/data/reusables/organizations/people.md,rendering error translations/zh-CN/data/reusables/organizations/repository-defaults.md,rendering error translations/zh-CN/data/reusables/organizations/security-and-analysis.md,rendering error translations/zh-CN/data/reusables/organizations/security.md,rendering error -translations/zh-CN/data/reusables/organizations/specific_team.md,broken liquid tags -translations/zh-CN/data/reusables/organizations/teams.md,broken liquid tags +translations/zh-CN/data/reusables/organizations/specific_team.md,rendering error +translations/zh-CN/data/reusables/organizations/teams.md,rendering error translations/zh-CN/data/reusables/organizations/teams_sidebar.md,rendering error translations/zh-CN/data/reusables/organizations/verified-domains.md,rendering error translations/zh-CN/data/reusables/package_registry/authenticate-packages.md,broken liquid tags translations/zh-CN/data/reusables/package_registry/authenticate-to-container-registry-steps.md,rendering error translations/zh-CN/data/reusables/package_registry/next-steps-for-packages-enterprise-setup.md,broken liquid tags translations/zh-CN/data/reusables/package_registry/package-registry-with-github-tokens.md,broken liquid tags -translations/zh-CN/data/reusables/package_registry/package-settings-from-org-level.md,broken liquid tags +translations/zh-CN/data/reusables/package_registry/package-settings-from-org-level.md,rendering error translations/zh-CN/data/reusables/package_registry/packages-billing.md,broken liquid tags translations/zh-CN/data/reusables/package_registry/required-scopes.md,broken liquid tags translations/zh-CN/data/reusables/pages/build-failure-email-server.md,broken liquid tags @@ -1196,7 +1195,7 @@ translations/zh-CN/data/reusables/secret-scanning/partner-secret-list-public-rep translations/zh-CN/data/reusables/secret-scanning/secret-list-private-push-protection.md,rendering error translations/zh-CN/data/reusables/security-advisory/security-advisory-overview.md,broken liquid tags translations/zh-CN/data/reusables/security-overview/permissions.md,rendering error -translations/zh-CN/data/reusables/security/displayed-information.md,broken liquid tags +translations/zh-CN/data/reusables/security/displayed-information.md,rendering error translations/zh-CN/data/reusables/shortdesc/rate_limits_github_apps.md,broken liquid tags translations/zh-CN/data/reusables/sponsors/select-sponsorship-billing.md,broken liquid tags translations/zh-CN/data/reusables/ssh/about-ssh.md,broken liquid tags @@ -1229,7 +1228,7 @@ translations/zh-CN/data/reusables/user-settings/ssh.md,rendering error translations/zh-CN/data/reusables/webhooks/pull_request_properties.md,broken liquid tags translations/zh-CN/data/reusables/webhooks/pull_request_webhook_properties.md,broken liquid tags translations/zh-CN/data/reusables/webhooks/repository_vulnerability_alert_short_desc.md,broken liquid tags -translations/zh-CN/data/reusables/webhooks/webhooks-rest-api-links.md,broken liquid tags +translations/zh-CN/data/reusables/webhooks/webhooks-rest-api-links.md,rendering error translations/zh-CN/data/reusables/webhooks/workflow_run_properties.md,broken liquid tags translations/zh-CN/data/variables/product.yml,broken liquid tags translations/zh-CN/data/variables/projects.yml,broken liquid tags diff --git a/translations/zh-CN/content/actions/security-guides/security-hardening-for-github-actions.md b/translations/zh-CN/content/actions/security-guides/security-hardening-for-github-actions.md index 5a18705739..fed4af9a0b 100644 --- a/translations/zh-CN/content/actions/security-guides/security-hardening-for-github-actions.md +++ b/translations/zh-CN/content/actions/security-guides/security-hardening-for-github-actions.md @@ -215,6 +215,12 @@ For more information on how to configure this setting, see {% ifversion allow-ac These sections consider some of the steps an attacker can take if they're able to run malicious commands on a {% data variables.product.prodname_actions %} runner. +{% note %} + +**Note:** {% data variables.product.prodname_dotcom %}-hosted runners do not scan for malicious code downloaded by a user during their job, such as a compromised third party library. + +{% endnote %} + ### Accessing secrets Workflows triggered using the `pull_request` event have read-only permissions and have no access to secrets. However, these permissions differ for various event triggers such as `issue_comment`, `issues` and `push`, where the attacker could attempt to steal repository secrets or use the write permission of the job's [`GITHUB_TOKEN`](/actions/reference/authentication-in-a-workflow#permissions-for-the-github_token). diff --git a/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server.md b/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server.md index 5b79fefc07..fd0656617f 100644 --- a/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server.md +++ b/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server.md @@ -77,9 +77,15 @@ Maximum concurrency was measured using multiple repositories, job duration of ap {%- endif %} -{%- ifversion ghes = 3.6 %} +{%- ifversion ghes > 3.5 %} -{% data reusables.actions.hardware-requirements-3.6 %} + +| vCPUs | Memory | Maximum Connected Runners | +| :---| :--- | :--- | +| 8 | 64 GB | 740 runners | +| 32 | 160 GB | 2700 runners | +| 96 | 384 GB | 7000 runners | +| 128 | 512 GB | 7000 runners | {% data variables.product.company_short %} measured maximum connected runners using multiple repositories, job duration of approximately 10 minutes, and 10 MB artifact uploads. You may experience different performance depending on the overall levels of activity on your instance. diff --git a/translations/zh-CN/content/code-security/dependabot/dependabot-alerts/index.md b/translations/zh-CN/content/code-security/dependabot/dependabot-alerts/index.md index 87831d91fb..2651397b2d 100644 --- a/translations/zh-CN/content/code-security/dependabot/dependabot-alerts/index.md +++ b/translations/zh-CN/content/code-security/dependabot/dependabot-alerts/index.md @@ -19,11 +19,11 @@ children: - /configuring-dependabot-alerts - /viewing-and-updating-dependabot-alerts - /configuring-notifications-for-dependabot-alerts -ms.openlocfilehash: 04365ffa391c8da15c34f1e0651d9efa4ebb1a42 -ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 +ms.openlocfilehash: b9abda5288d4f0dfed2175b0e944c0d1bc48f3f7 +ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/05/2022 -ms.locfileid: '146455491' +ms.lasthandoff: 10/27/2022 +ms.locfileid: '148113985' --- diff --git a/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory.md b/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory.md new file mode 100644 index 0000000000..0b4bbeec0d --- /dev/null +++ b/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory.md @@ -0,0 +1,51 @@ +--- +title: 将协作者添加到存储库安全通告 +intro: 您可以添加其他用户或团队与您协作处理安全通告。 +redirect_from: + - /articles/adding-a-collaborator-to-a-maintainer-security-advisory + - /github/managing-security-vulnerabilities/adding-a-collaborator-to-a-maintainer-security-advisory + - /github/managing-security-vulnerabilities/adding-a-collaborator-to-a-security-advisory + - /code-security/security-advisories/adding-a-collaborator-to-a-security-advisory + - /code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: + - Security advisories + - Vulnerabilities + - Collaboration +shortTitle: Add collaborators +ms.openlocfilehash: d080fa5d7b66d9ce89b7985f689133e52ec69cc3 +ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/27/2022 +ms.locfileid: '148113995' +--- +对安全通告具有管理员权限的人员可向安全通告添加协作者。 + +{% data reusables.security-advisory.repository-level-advisory-note %} + +## 添加协作者到安全通告 + +协作者对安全通告具有写入权限。 有关详细信息,请参阅[存储库安全通告的权限级别](/code-security/repository-security-advisories/permission-levels-for-repository-security-advisories)。 + +{% note %} + +{% data reusables.repositories.security-advisory-collaborators-public-repositories %} 有关删除安全通告协作者的更多信息,请参阅[从存储库安全通告删除协作者](/code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory)。 + +{% endnote %} + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 在“Security Advisories(安全通告)”列表中,单击要向其添加协作者的安全通告。 +5. 在页面右侧的“Collaborators(协作者)”下,键入要添加到安全通告的用户或团队名称。 + ![用于输入用户或团队名称的字段](/assets/images/help/security/add-collaborator-field.png) +6. 单击“添加”。 + ![“添加”按钮](/assets/images/help/security/security-advisory-add-collaborator-button.png) + +## 延伸阅读 + +- [存储库安全通告的权限级别](/code-security/repository-security-advisories/permission-levels-for-repository-security-advisories) +- [在临时专用分支中协作以解决存储库安全漏洞](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability) +- [从存储库安全通告删除协作者](/code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory)。 diff --git a/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability.md b/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability.md new file mode 100644 index 0000000000..89e90fa3c0 --- /dev/null +++ b/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability.md @@ -0,0 +1,91 @@ +--- +title: 在临时专用分支中协作以解决存储库安全漏洞 +intro: 您可以创建临时私有复刻,以私下协作修复仓库中的安全漏洞。 +redirect_from: + - /articles/collaborating-in-a-temporary-private-fork-to-resolve-a-security-vulnerability + - /github/managing-security-vulnerabilities/collaborating-in-a-temporary-private-fork-to-resolve-a-security-vulnerability + - /code-security/security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-security-vulnerability + - /code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: + - Security advisories + - Vulnerabilities + - Collaboration + - Forks +shortTitle: Temporary private forks +ms.openlocfilehash: c5d4f5f8b58498f995a473b4c0c0f3c38ea96083 +ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/27/2022 +ms.locfileid: '148113993' +--- +{% data reusables.security-advisory.repository-level-advisory-note %} + +## 先决条件 + +在临时私有复刻中进行协作之前,必须创建维护员通告草稿。 有关详细信息,请参阅“[创建存储库安全通告](/code-security/repository-security-advisories/creating-a-repository-security-advisory)”。 + +## 创建临时私有复刻 + +任何对安全通告有管理权限的人都可以创建临时私有复刻。 + +为保证漏洞相关信息的安全,集成系统(包括 CI)无法访问临时私有复刻。 + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 在“Security Advisories(安全通告)”列表中,单击要在其中创建临时私有复刻的安全通告。 + ![列表中的安全通告](/assets/images/help/security/security-advisory-in-list.png) +5. 单击“新建临时专用分支”。 + ![“新建临时专用分支”按钮](/assets/images/help/security/new-temporary-private-fork-button.png) + +## 将协作者添加到临时私有复刻 + +对安全通告具有管理员权限的任何人都可以向安全通告添加其他协作者,而安全通告的协作者可以访问临时私有复刻。 有关详细信息,请参阅“[将协作者添加到存储库安全通告](/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory)”。 + +## 将更改添加到临时私有复刻 + +任何对安全通告有写入权限的人都可以向临时私有复刻添加更改。 + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 在“Security Advisories(安全通告)”列表中,单击要向其添加更改的安全通告。 + ![列表中的安全通告](/assets/images/help/security/security-advisory-in-list.png) +5. 在 {% data variables.product.product_name %} 上或在本地添加更改: + - 若要在 {% data variables.product.product_name %} 上添加更改,请在“向此通告添加更改”下单击“临时专用分支”。 然后,创建新分支并编辑文件。 有关详细信息,请参阅“[在存储库中创建和删除分支](/articles/creating-and-deleting-branches-within-your-repository)”和“[编辑文件](/repositories/working-with-files/managing-files/editing-files)”。 + - 要在本地添加更改,请按照“克隆并创建新分支”和“进行更改,然后推送”下的说明进行操作。 + ![“向此通告添加更改”框](/assets/images/help/security/add-changes-to-this-advisory-box.png) + +## 从临时私有复刻创建拉取请求 + +任何对安全通告有写入权限的人都可以从临时私有复刻创建拉取请求。 + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 在“Security Advisories(安全通告)”列表中,单击要在其中创建拉取请求的安全通告。 + ![列表中的安全通告](/assets/images/help/security/security-advisory-in-list.png) +5. 在分支名称的右侧,单击“比较和拉取请求”。 + ![“比较和拉取请求”按钮](/assets/images/help/security/security-advisory-compare-and-pr.png) {% data reusables.repositories.pr-title-description %} {% data reusables.repositories.create-pull-request %} + +{% data reusables.repositories.merge-all-pulls-together %} 有关详细信息,请参阅“[合并安全通告中的更改](#merging-changes-in-a-security-advisory)”。 + +## 合并安全通告中的更改 + +对安全通告具有管理员权限的任何人都可合并安全通告中的更改。 + +{% data reusables.repositories.merge-all-pulls-together %} + +在合并安全通告中的更改之前,临时私有复刻中每个打开的拉取请求必须为可合并状态。 不存在合并冲突,并且必须满足分支保护要求。 为保证漏洞相关信息的安全,不在临时私有复刻的拉取请求上运行状态检查。 有关详细信息,请参阅“[关于受保护的分支](/articles/about-protected-branches)”。 + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 在“Security Advisories(安全通告)”列表中,单击要合并其更改的安全通告。 + ![列表中的安全通告](/assets/images/help/security/security-advisory-in-list.png) +5. 若要合并临时专用分支中所有打开的拉取请求,请单击“合并拉取请求”。 + ![“合并拉取请求”按钮](/assets/images/help/security/merge-pull-requests-button.png) + +合并安全通告中的更改后,您可以发布安全通告,以提醒您的社区有关项目早期版本中安全漏洞的信息。 有关详细信息,请参阅“[发布存储库安全通告](/code-security/repository-security-advisories/publishing-a-repository-security-advisory)”。 + +## 延伸阅读 + +- “[存储库安全通告的权限级别](/code-security/repository-security-advisories/permission-levels-for-repository-security-advisories)” +- “[发布存储库安全通告](/code-security/repository-security-advisories/publishing-a-repository-security-advisory)” diff --git a/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/permission-levels-for-repository-security-advisories.md b/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/permission-levels-for-repository-security-advisories.md new file mode 100644 index 0000000000..aac14ab00e --- /dev/null +++ b/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/permission-levels-for-repository-security-advisories.md @@ -0,0 +1,51 @@ +--- +title: 存储库安全公告的权限级别 +intro: 你在存储库安全公告中可以执行的操作取决于你是公告的管理员还是对其有写入权限。 +redirect_from: + - /articles/permission-levels-for-maintainer-security-advisories + - /github/managing-security-vulnerabilities/permission-levels-for-maintainer-security-advisories + - /github/managing-security-vulnerabilities/permission-levels-for-security-advisories + - /code-security/security-advisories/permission-levels-for-security-advisories + - /code-security/repository-security-advisories/permission-levels-for-repository-security-advisories +versions: + fpt: '*' + ghec: '*' +type: reference +topics: + - Security advisories + - Vulnerabilities + - Permissions +shortTitle: Permission levels +ms.openlocfilehash: f4195822de121780f1629fda3d646170d4c4e566 +ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/27/2022 +ms.locfileid: '148113994' +--- +本文仅适用于存储库级别的安全公告。 任何人都可以在 [github.com/advisories](https://github.com/advisories) 上的 {% data variables.product.prodname_advisory_database %} 中提供全局安全公告内容。 对全局公告的编辑不会改变或影响公告在存储库中的显示方式。 有关详细信息,请参阅“[在 {% data variables.product.prodname_advisory_database %} 中编辑安全公告](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/editing-security-advisories-in-the-github-advisory-database)”。 + +## 权限概述 + +{% data reusables.repositories.security-advisory-admin-permissions %} 有关将协作者添加到安全公告的详细信息,请参阅“[将协作者添加到存储库安全公告](/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory)”。 + +操作 | 写入权限 | 管理员权限 | +------ | ----------------- | ----------------- | +查看安全通告草稿 | X | X | +将协作者添加到安全公告(请参阅“[将协作者添加到存储库安全公告](/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory)”) | | X | +编辑和删除安全通告中的任何评论 | X | X | +在安全公告中创建临时专用分支(请参阅“[在临时专用分支中协作以解决存储库安全漏洞](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability)”) | | X | +在安全公告中添加对临时专用分支的更改(请参阅“[在临时专用分支中协作以解决存储库安全漏洞](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability)”) | X | X | +在临时专用分支中创建拉取请求(请参阅“[在临时专用分支中协作以解决存储库安全漏洞](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability)”) | X | X | +合并安全公告中的更改(请参阅“[在临时专用分支中协作以解决存储库安全漏洞](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability)”) | | X | +在安全公告中添加和编辑元数据(请参阅“[发布存储库安全公告](/code-security/repository-security-advisories/publishing-a-repository-security-advisory)”) | X | X | +添加和删除安全公告的积分(请参阅“[编辑存储库安全公告](/code-security/repository-security-advisories/editing-a-repository-security-advisory)”) | X | X | +关闭安全通告草稿 | | X | +发布安全公告(请参阅“[发布存储库安全公告](/code-security/repository-security-advisories/publishing-a-repository-security-advisory)”) | | X | + +## 延伸阅读 + +- [将协作者添加到存储库安全公告](/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory) +- [在临时专用分支中协作以解决存储库安全漏洞](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability) +- [从存储库安全公告删除协作者](/code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory) +- [撤消存储库安全公告](/code-security/repository-security-advisories/withdrawing-a-repository-security-advisory) diff --git a/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory.md b/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory.md new file mode 100644 index 0000000000..8395d24322 --- /dev/null +++ b/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory.md @@ -0,0 +1,43 @@ +--- +title: 删除存储库安全公告中的协作者 +intro: 协作者从存储库安全公告中删除后,将失去对安全公告的讨论和元数据的读取和写入权限。 +redirect_from: + - /github/managing-security-vulnerabilities/removing-a-collaborator-from-a-security-advisory + - /code-security/security-advisories/removing-a-collaborator-from-a-security-advisory + - /code-security/repository-security-advisories/removing-a-collaborator-from-a-repository-security-advisory +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: + - Security advisories + - Vulnerabilities + - Collaboration +shortTitle: Remove collaborators +ms.openlocfilehash: 77c21bea9c593935ee1b92028fc52859320f5a38 +ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/27/2022 +ms.locfileid: '148113991' +--- +对安全通告具有管理员权限的人员可从安全通告删除协作者。 + +{% data reusables.security-advisory.repository-level-advisory-note %} + +## 从安全通告删除协作者 + +{% data reusables.repositories.security-advisory-collaborators-public-repositories %} + +{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %} +4. 在“Security Advisories(安全通告)”列表中,单击要从中删除协作者的安全通告。 + ![列表中的安全公告](/assets/images/help/security/security-advisory-in-list.png) +5. 在页面右侧的“Collaborators(协作者)”下,键入要从安全通告删除的用户或团队名称。 + ![安全公告协作者](/assets/images/help/security/security-advisory-collaborator.png) +6. 在要移除的协作者旁边,单击“X”图标。 + ![用于删除安全公告协作者的 X 图标](/assets/images/help/security/security-advisory-remove-collaborator-x.png) + +## 延伸阅读 + +- [存储库安全公告的权限级别](/code-security/repository-security-advisories/permission-levels-for-repository-security-advisories) +- [将协作者添加到存储库安全公告](/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory) diff --git a/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/withdrawing-a-repository-security-advisory.md b/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/withdrawing-a-repository-security-advisory.md new file mode 100644 index 0000000000..b997f9fcc2 --- /dev/null +++ b/translations/zh-CN/content/code-security/security-advisories/repository-security-advisories/withdrawing-a-repository-security-advisory.md @@ -0,0 +1,29 @@ +--- +title: 撤销存储库安全通告 +intro: 你可以撤销已发布的存储库安全公告。 +redirect_from: + - /github/managing-security-vulnerabilities/withdrawing-a-security-advisory + - /code-security/security-advisories/withdrawing-a-security-advisory + - /code-security/repository-security-advisories/withdrawing-a-repository-security-advisory +versions: + fpt: '*' + ghec: '*' +type: how_to +topics: + - Security advisories + - Vulnerabilities +shortTitle: Withdraw repository advisories +ms.openlocfilehash: 71a6560c463384b032546b824e5f4294ced568e5 +ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/27/2022 +ms.locfileid: '148113980' +--- +{% data reusables.security-advisory.repository-level-advisory-note %} + +如果错误地发布了安全通告,可以联系 {% data variables.contact.contact_support %} 撤销。 + +## 延伸阅读 + +- “[编辑存储库安全通告](/code-security/repository-security-advisories/editing-a-repository-security-advisory)” diff --git a/translations/zh-CN/content/codespaces/guides.md b/translations/zh-CN/content/codespaces/guides.md index 0d4b1d4901..4378542b87 100644 --- a/translations/zh-CN/content/codespaces/guides.md +++ b/translations/zh-CN/content/codespaces/guides.md @@ -55,11 +55,11 @@ includeGuides: - /codespaces/codespaces-reference/using-the-command-palette-in-codespaces - /codespaces/codespaces-reference/disaster-recovery-for-codespaces - /codespaces/codespaces-reference/security-in-codespaces -ms.openlocfilehash: 54ba7cc4fbacd536f0438626281d1b59252eb3f1 -ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.openlocfilehash: 24bf08da053efd9f822b1eb43bacbbe822c1ba8b +ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/09/2022 -ms.locfileid: '147783109' +ms.lasthandoff: 10/27/2022 +ms.locfileid: '148113895' --- diff --git a/translations/zh-CN/content/codespaces/setting-up-your-project-for-codespaces/index.md b/translations/zh-CN/content/codespaces/setting-up-your-project-for-codespaces/index.md index 6ddb3c1ba5..e8c4b6cd24 100644 --- a/translations/zh-CN/content/codespaces/setting-up-your-project-for-codespaces/index.md +++ b/translations/zh-CN/content/codespaces/setting-up-your-project-for-codespaces/index.md @@ -19,11 +19,11 @@ children: - /setting-a-minimum-specification-for-codespace-machines - /automatically-opening-files-in-the-codespaces-for-a-repository - /adding-a-codespaces-badge -ms.openlocfilehash: 1e172243dc351f0a173c8624b66914e1c3795495 -ms.sourcegitcommit: 478f2931167988096ae6478a257f492ecaa11794 +ms.openlocfilehash: 4649ef4e36dff0b37d4a579ecd56bbb0edd2a184 +ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65 ms.translationtype: HT ms.contentlocale: zh-CN -ms.lasthandoff: 09/09/2022 -ms.locfileid: '147783037' +ms.lasthandoff: 10/27/2022 +ms.locfileid: '148113986' --- diff --git a/translations/zh-CN/content/repositories/working-with-files/managing-large-files/about-git-large-file-storage.md b/translations/zh-CN/content/repositories/working-with-files/managing-large-files/about-git-large-file-storage.md index 530d320471..7a6fcdc772 100644 --- a/translations/zh-CN/content/repositories/working-with-files/managing-large-files/about-git-large-file-storage.md +++ b/translations/zh-CN/content/repositories/working-with-files/managing-large-files/about-git-large-file-storage.md @@ -1,6 +1,6 @@ --- -title: 关于 Git Large File Storage -intro: '{% data variables.product.product_name %} 限制存储库中允许的文件大小。 要跟踪超出此限制的文件,您可以使用 {% data variables.large_files.product_name_long %}。' +title: About Git Large File Storage +intro: '{% data variables.product.product_name %} limits the size of files allowed in repositories. To track files beyond this limit, you can use {% data variables.large_files.product_name_long %}.' redirect_from: - /articles/about-large-file-storage - /articles/about-git-large-file-storage @@ -12,35 +12,33 @@ versions: ghae: '*' ghec: '*' shortTitle: Git Large File Storage -ms.openlocfilehash: af198fe13f69fc4768178aea74a03f27a82ec20b -ms.sourcegitcommit: fcf3546b7cc208155fb8acdf68b81be28afc3d2d -ms.translationtype: HT -ms.contentlocale: zh-CN -ms.lasthandoff: 09/10/2022 -ms.locfileid: '145129252' --- -## 关于 {% data variables.large_files.product_name_long %} -{% data variables.large_files.product_name_short %} 处理大文件的方式是存储对仓库中文件的引用,而不实际文件本身。 为满足 Git 的架构要求,{% data variables.large_files.product_name_short %} 创建了“指针文件”,充当对实际文件(存储在其他位置)的引用。 {% data variables.product.product_name %} 在仓库中管理此指针文件。 克隆仓库时,{% data variables.product.product_name %} 使用指针文件作为映射来查找大文件。 +## About {% data variables.large_files.product_name_long %} -{% ifversion fpt or ghec %} 使用 {% data variables.large_files.product_name_short %},可以将文件存储到: +{% data variables.large_files.product_name_short %} handles large files by storing references to the file in the repository, but not the actual file itself. To work around Git's architecture, {% data variables.large_files.product_name_short %} creates a pointer file which acts as a reference to the actual file (which is stored somewhere else). {% data variables.product.product_name %} manages this pointer file in your repository. When you clone the repository down, {% data variables.product.product_name %} uses the pointer file as a map to go and find the large file for you. -| 产品 | 文件大小上限 | +{% ifversion fpt or ghec %} +Using {% data variables.large_files.product_name_short %}, you can store files up to: + +| Product | Maximum file size | |------- | ------- | | {% data variables.product.prodname_free_user %} | 2 GB | | {% data variables.product.prodname_pro %} | 2 GB | | {% data variables.product.prodname_team %} | 4 GB | | {% data variables.product.prodname_ghe_cloud %} | 5 GB |{% else %} -使用 {% data variables.large_files.product_name_short %},可在仓库中存储最大 5 GB 的文件。 -{% endif %} +Using {% data variables.large_files.product_name_short %}, you can store files up to 5 GB in your repository. +{% endif %} -您也可以将 {% data variables.large_files.product_name_short %} 与 {% data variables.product.prodname_desktop %} 结合使用。 有关在 {% data variables.product.prodname_desktop %} 中克隆 Git LFS 存储库的详细信息,请参阅“[将存储库从 GitHub 克隆到 GitHub 桌面](/desktop/guides/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop)”。 +{% data reusables.repositories.git-lfs %} + +You can also use {% data variables.large_files.product_name_short %} with {% data variables.product.prodname_desktop %}. For more information about cloning Git LFS repositories in {% data variables.product.prodname_desktop %}, see "[Cloning a repository from GitHub to GitHub Desktop](/desktop/guides/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop)." {% data reusables.large_files.can-include-lfs-objects-archives %} -## 指针文件格式 +## Pointer file format -{% data variables.large_files.product_name_short %} 的指针文件看起来像: +{% data variables.large_files.product_name_short %}'s pointer file looks like this: ``` version {% data variables.large_files.version_name %} @@ -48,16 +46,16 @@ oid sha256:4cac19622fc3ada9c0fdeadb33f88f367b541f38b89102a3f1261ac81fd5bcb5 size 84977953 ``` -它会跟踪所用 {% data variables.large_files.product_name_short %} 的 `version`,后接文件的唯一标识符 (`oid`)。 它还会存储最终文件的 `size`。 +It tracks the `version` of {% data variables.large_files.product_name_short %} you're using, followed by a unique identifier for the file (`oid`). It also stores the `size` of the final file. {% note %} -**注释**: -- {% data variables.large_files.product_name_short %} 不能用于 {% data variables.product.prodname_pages %} 站点。 -- {% data variables.large_files.product_name_short %} 不能用于模板仓库。 +**Notes**: +- {% data variables.large_files.product_name_short %} cannot be used with {% data variables.product.prodname_pages %} sites. +- {% data variables.large_files.product_name_short %} cannot be used with template repositories. {% endnote %} -## 延伸阅读 +## Further reading -- [与 {% data variables.large_files.product_name_long %} 协作](/articles/collaboration-with-git-large-file-storage) +- "[Collaboration with {% data variables.large_files.product_name_long %}](/articles/collaboration-with-git-large-file-storage)" diff --git a/translations/zh-CN/content/rest/guides/traversing-with-pagination.md b/translations/zh-CN/content/rest/guides/traversing-with-pagination.md index ed7f9b1189..f47cd8dbbf 100644 --- a/translations/zh-CN/content/rest/guides/traversing-with-pagination.md +++ b/translations/zh-CN/content/rest/guides/traversing-with-pagination.md @@ -12,6 +12,7 @@ versions: topics: - API shortTitle: Traverse with pagination +miniTocMaxHeadingLevel: 3 --- The {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API provides a vast wealth of information for developers to consume. @@ -24,10 +25,13 @@ in the [platform-samples][platform samples] repository. {% data reusables.rest-api.dotcom-only-guide-note %} + + ## Basics of Pagination To start with, it's important to know a few facts about receiving paginated items: + 1. Different API calls respond with different defaults. For example, a call to [List public repositories](/rest/reference/repos#list-public-repositories) provides paginated items in sets of 30, whereas a call to the GitHub Search API @@ -37,55 +41,127 @@ provides items in sets of 100 [events](/rest/reference/activity#events) won't let you set a maximum for items to receive. Be sure to read the documentation on how to handle paginated results for specific endpoints. -Information about pagination is provided in [the Link header](https://datatracker.ietf.org/doc/html/rfc5988) -of an API call. For example, let's make a curl request to the search API, to find -out how many times Mozilla projects use the phrase `addClass`: +{% note %} + +**Note**: You should always rely on URLs included in the link header. Don't try to guess or construct your own URLs. + +{% endnote %} + + +### Link header + +The response header includes information about pagination. For more information about headers, see "[Getting started with the REST API](/rest/guides/getting-started-with-the-rest-api#about-the-response-code-and-headers)." To get the response header, include the `-I` flag in your request. For example: + +```shell +$ curl -I -H "Accept: application/vnd.github+json" -H "Authorization: Bearer YOUR_TOKEN" https://api.github.com/enterprises/advacado-corp/audit-log -```shell -$ curl -I "https://api.github.com/search/code?q=addClass+user:mozilla" ``` -The `-I` parameter indicates that we only care about the headers, not the actual -content. In examining the result, you'll notice some information in the Link header -that looks like this: +The `-I` flag returns only the response header. If the response is paginated, the response header will include a `link` header. The header will look something like this: - Link: ; rel="next", - ; rel="last" +``` +link: ; rel="next" +``` -Let's break that down. `rel="next"` says that the next page is `page=2`. This makes -sense, since by default, all paginated queries start at page `1.` `rel="last"` -provides some more information, stating that the last page of results is on page `34`. -Thus, we have 33 more pages of information about `addClass` that we can consume. -Nice! +or -**Always** rely on these link relations provided to you. Don't try to guess or construct your own URL. +``` +link: ; rel="next", ; rel="last" +``` +### Types of pagination -### Navigating through the pages +{% data variables.product.company_short %}'s API uses two pagination methods: page-based pagination and cursor-based pagination. If the `link` header includes `page`, then the operation uses page-based pagination. If the `link` header includes `before` and `after`, then the operation uses cursor-based pagination. -Now that you know how many pages there are to receive, you can start navigating -through the pages to consume the results. You do this by passing in a `page` -parameter. By default, `page` always starts at `1`. Let's jump ahead to page 14 -and see what happens: + +#### Page based pagination + +The link header for page-based pagination will tell you information about the previous, next, first, and last pages. If you did not request a specific page, then the response will default to the first page and information about the first and previous pages will be omitted. + +For example, for a request that did not specify a page, this header states that the next page is `2` and the last page is `511`. + +``` +link: ; rel="next", ; rel="last" +``` + +For example, for a request that specified page 5, this header states that the previous page is `4`, the next page is `6`, the last page is `511`, and the first page is `1`. + +``` +link: ; rel="prev", ; rel="next", ; rel="last", ; rel="first" +``` + +#### Cursor based pagination + +Cursor pagination uses terms `before` and `after` in order to navigate through pages. `rel="next"` and `rel="prev"` this mark the cursor point in the data set and provides a reference for traveling to the page `before` and `after` the current page. + +``` +link: ; rel="next", +; rel="first", +; rel="prev" +``` + +In this example, `rel=next` says that the next page is located at: + +``` +after=MS42NjQzODM5MTkzNDdlKzEyfDM0MkI6NDdBNDo4RTFGMEM6NUIyQkZCMzo2MzM0N0JBRg%3D%3D&before=> +``` + + + + +### Using pagination + +#### Cursor based pagination + +Using cursor based pagination requires you to use the terms `before` and `after`. To navigate using `before` and `after`, copy the link header generated above into your curl request: + +```shell +$ curl -I -H "Accept: application/vnd.github+json" -H "Authorization: Bearer YOUR_TOKEN" https://api.github.com/enterprises/13827/audit-log?after=MS42NjQzODM5MTkzNDdlKzEyfDM0MkI6NDdBNDo4RTFGMEM6NUIyQkZCMzo2MzM0N0JBRg%3D%3D&before=> +``` + +The above example will generate a page of results and new header information that you can use to make the next request. `rel="next"` provides the next page of results. `rel="prev"` provides the previous page of results. The important part of the output here is the link header needs to be generated rather than manually imputed. Copy the entire link from the following output. + +``` +link: ; rel="next", +; rel="first", +; rel="prev" +``` + +Unlike page-based pagination, the results will not return the last page number in the response. + + link: ; rel="next", + ; rel="first", + ; rel="prev" + +Because cursor based pagination creates a reference point in the data set, it cannot calculate the total number of results. + + +#### Page based pagination + +To navigate using page based pagination pass in a `page` +parameter. By default, `page` always starts at `1`. In the following example, we have made a curl request to the search API Mozilla projects use the phrase `addClass`. Instead of starting at 1, lets jump to page 14. ```shell $ curl -I "https://api.github.com/search/code?q=addClass+user:mozilla&page=14" ``` -Here's the link header once more: +Here's an except of the link header in the HTTP request: Link: ; rel="next", ; rel="last", ; rel="first", ; rel="prev" -As expected, `rel="next"` is at 15, and `rel="last"` is still 34. But now we've +In this example, `rel="next"` is at 15, and `rel="last"` is 34. But now we've got some more information: `rel="first"` indicates the URL for the _first_ page, and more importantly, `rel="prev"` lets you know the page number of the previous page. Using this information, you could construct some UI that lets users jump between the first, previous, next, or last list of results in an API call. + ### Changing the number of items received +#### Page based pagination + By passing the `per_page` parameter, you can specify how many items you want each page to return, up to 100 items. Let's try asking for 50 items about `addClass`: @@ -102,6 +178,14 @@ As you might have guessed, the `rel="last"` information says that the last page is now 20. This is because we are asking for more information per page about our results. +#### Cursor based pagination + +You can also pass the `per_page` parameter for cursor-based pagination. + +```shell +$ curl -I -H "Accept: application/vnd.github+json" -H "Authorization: Bearer YOUR_TOKEN" https://api.github.com/enterprises/13827/audit-log?after=MS42NjQzODM5MTkzNDdlKzEyfDM0MkI6NDdBNDo4RTFGMEM6NUIyQkZCMzo2MzM0N0JBRg%3D%3D&before=>&per_page=50 +``` + ## Consuming the information You don't want to be making low-level curl calls just to be able to work with diff --git a/translations/zh-CN/data/reusables/actions/hardware-requirements-3.6.md b/translations/zh-CN/data/reusables/actions/hardware-requirements-3.6.md deleted file mode 100644 index 7a012cf9b2..0000000000 --- a/translations/zh-CN/data/reusables/actions/hardware-requirements-3.6.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -ms.openlocfilehash: 5c7cf10fca8efdcb186487e5de0e9a9d7e88d66b -ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5 -ms.translationtype: HT -ms.contentlocale: zh-CN -ms.lasthandoff: 09/05/2022 -ms.locfileid: "147580722" ---- -| vCPU | 内存 | 最大连接运行器数量 | -| :---| :--- | :--- | -| 8 | 64 GB | 740 个运行器 | -| 32 | 160 GB | 2700 个运行器 | -| 96 | 384 GB | 7000 个运行器 | -| 128 | 512 GB | 7000 个运行器 | diff --git a/translations/zh-CN/data/reusables/codespaces/edit-devcontainer-json.md b/translations/zh-CN/data/reusables/codespaces/edit-devcontainer-json.md new file mode 100644 index 0000000000..7f13b596d0 --- /dev/null +++ b/translations/zh-CN/data/reusables/codespaces/edit-devcontainer-json.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: 38208812f73fda89c12d251955a1eee327ceb8db +ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/27/2022 +ms.locfileid: "148113990" +--- +1. 存储库的 {% data variables.product.prodname_github_codespaces %} 在 `devcontainer.json` 文件中配置。 如果存储库尚未包含 `devcontainer.json` 文件,请立即添加一个。 请参阅“[将开发容器配置添加到存储库](/free-pro-team@latest/codespaces/setting-up-your-project-for-codespaces/setting-up-your-project-for-codespaces)”。 \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/security-advisory/global-advisories.md b/translations/zh-CN/data/reusables/security-advisory/global-advisories.md new file mode 100644 index 0000000000..ac90e34316 --- /dev/null +++ b/translations/zh-CN/data/reusables/security-advisory/global-advisories.md @@ -0,0 +1,9 @@ +--- +ms.openlocfilehash: cb874d7a6fcaa0deeb828d91f9769df69050d337 +ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65 +ms.translationtype: HT +ms.contentlocale: zh-CN +ms.lasthandoff: 10/27/2022 +ms.locfileid: "148113956" +--- +位于 [github.com/advisories](https://github.com/advisories) 的 {% data variables.product.prodname_advisory_database %} 中的安全公告被视为全局公告。 任何人都可以对 {% data variables.product.prodname_advisory_database %} 中的任何全局安全公告提出改进建议。 可以编辑或添加任何详细信息,包括其他受影响的生态系统、严重性级别或受影响方的说明。 {% data variables.product.prodname_security %} 策展团队将评审提交的改进,并在接受后将其发布到 {% data variables.product.prodname_advisory_database %} 上。 \ No newline at end of file