From fd7fabd8aa4cae28881955a371cb962be74c44fc Mon Sep 17 00:00:00 2001 From: docubot <67483024+docubot@users.noreply.github.com> Date: Wed, 9 Feb 2022 01:17:45 +1000 Subject: [PATCH] New translation batch for cn (#25090) * Add crowdin translations * Run script/i18n/homogenize-frontmatter.js * Run script/i18n/lint-translation-files.js --check parsing * Run script/i18n/lint-translation-files.js --check rendering * run script/i18n/reset-files-with-broken-liquid-tags.js --language=cn * run script/i18n/reset-known-broken-translation-files.js * Check in cn CSV report Co-authored-by: Mike Surowiec --- translations/log/cn-resets.csv | 3 +- ...orkflow-for-triaging-your-notifications.md | 2 +- ...contributions-to-your-githubcom-profile.md | 2 +- ...-collaborators-to-a-personal-repository.md | 6 +- ...collaborator-from-a-personal-repository.md | 4 +- ...ourself-from-a-collaborators-repository.md | 5 +- ...rating-jira-with-your-personal-projects.md | 12 +- ...ging-your-tab-size-rendering-preference.md | 2 +- .../managing-your-scheduled-reminders.md | 9 +- ...hing-dependencies-to-speed-up-workflows.md | 2 +- .../building-and-testing-ruby.md | 2 +- .../creating-a-composite-action.md | 4 +- .../dockerfile-support-for-github-actions.md | 2 + .../metadata-syntax-for-github-actions.md | 222 +---- ...-security-hardening-with-openid-connect.md | 12 +- ...g-openid-connect-in-amazon-web-services.md | 11 +- .../configuring-openid-connect-in-azure.md | 9 +- ...uring-openid-connect-in-cloud-providers.md | 9 +- ...openid-connect-in-google-cloud-platform.md | 9 +- ...uring-openid-connect-in-hashicorp-vault.md | 9 +- .../about-self-hosted-runners.md | 6 +- .../autoscaling-with-self-hosted-runners.md | 38 +- ...and-troubleshooting-self-hosted-runners.md | 32 + translations/zh-CN/content/actions/index.md | 1 - .../actions/learn-github-actions/contexts.md | 2 +- .../learn-github-actions/expressions.md | 8 + .../finding-and-customizing-actions.md | 2 + .../understanding-github-actions.md | 5 + ...usage-limits-billing-and-administration.md | 9 +- ...igrating-from-jenkins-to-github-actions.md | 2 +- .../automatic-token-authentication.md | 28 +- .../security-guides/encrypted-secrets.md | 47 ++ .../events-that-trigger-workflows.md | 208 +---- .../using-workflows/reusing-workflows.md | 6 +- .../using-workflows/triggering-a-workflow.md | 234 +++++- .../workflow-commands-for-github-actions.md | 4 +- .../workflow-syntax-for-github-actions.md | 41 +- .../configuring-tls.md | 4 + .../configuring-backups-on-your-appliance.md | 2 +- .../configuring-email-for-notifications.md | 3 +- .../configuring-collectd.md | 2 +- ...ting-github-actions-for-your-enterprise.md | 6 +- .../about-github-actions-for-enterprises.md | 42 + .../index.md | 1 + ...ucing-github-actions-to-your-enterprise.md | 2 +- .../using-ldap.md | 2 +- ...d-access-management-for-your-enterprise.md | 1 + ...n-organization-to-an-enterprise-account.md | 2 - translations/zh-CN/content/admin/index.md | 2 + ...lling-github-enterprise-server-on-azure.md | 10 +- ...-compliance-reports-for-your-enterprise.md | 31 + .../zh-CN/content/admin/overview/index.md | 1 + ...s-for-github-actions-in-your-enterprise.md | 4 + ...or-security-settings-in-your-enterprise.md | 5 +- .../creating-a-pre-receive-hook-script.md | 3 + .../adding-people-to-teams.md | 5 + .../continuous-integration-using-jenkins.md | 1 + .../creating-teams.md | 5 + .../managing-projects-using-jira.md | 3 +- ...ving-users-from-teams-and-organizations.md | 5 + ...upport-entitlements-for-your-enterprise.md | 2 +- .../audit-logging.md | 2 +- .../creating-a-personal-access-token.md | 1 + .../reviewing-your-deploy-keys.md | 4 + .../reviewing-your-security-log.md | 8 +- .../using-ssh-over-the-https-port.md | 2 +- ...n-and-usage-for-your-enterprise-account.md | 4 + .../about-billing-on-github.md | 2 +- ...ing-license-usage-for-github-enterprise.md | 4 + .../about-code-scanning-alerts.md | 119 +++ .../about-code-scanning-with-codeql.md | 2 +- .../about-code-scanning.md | 1 - .../configuring-code-scanning.md | 6 +- ...-codeql-workflow-for-compiled-languages.md | 2 +- .../index.md | 3 +- ...ode-scanning-alerts-for-your-repository.md | 59 +- ...ing-codeql-code-scanning-in-a-container.md | 1 - ...nning-alerts-in-issues-using-task-lists.md | 4 +- ...g-code-scanning-alerts-in-pull-requests.md | 1 - .../troubleshooting-the-codeql-workflow.md | 15 +- .../code-security/code-scanning/index.md | 1 - .../about-integration-with-code-scanning.md | 2 +- .../integrating-with-code-scanning/index.md | 1 - .../sarif-support-for-code-scanning.md | 2 +- .../uploading-a-sarif-file-to-github.md | 2 +- ...onfiguring-codeql-cli-in-your-ci-system.md | 2 +- ...iguring-codeql-runner-in-your-ci-system.md | 3 +- .../index.md | 1 - ...ng-from-the-codeql-runner-to-codeql-cli.md | 2 +- ...running-codeql-runner-in-your-ci-system.md | 2 +- ...hooting-codeql-runner-in-your-ci-system.md | 1 - .../securing-your-organization.md | 6 + .../zh-CN/content/code-security/guides.md | 1 + .../about-the-security-overview.md | 6 +- ...ltering-alerts-in-the-security-overview.md | 19 +- .../viewing-the-security-overview.md | 5 +- ...tomating-dependabot-with-github-actions.md | 2 +- ...guration-options-for-dependency-updates.md | 14 +- ...pendabotcom-to-github-native-dependabot.md | 2 +- .../about-dependency-review.md | 2 +- .../about-the-dependency-graph.md | 19 +- ...pace-to-access-a-private-image-registry.md | 6 +- ...ing-for-codespaces-in-your-organization.md | 2 +- ...ository-and-organization-for-codespaces.md | 24 +- .../restricting-access-to-machine-types.md | 26 +- ...ing-up-your-java-project-for-codespaces.md | 2 +- .../working-with-support-for-codespaces.md | 2 +- ...nblocking-a-user-from-your-organization.md | 2 +- ...ting-interactions-for-your-user-account.md | 2 +- ...iting-interactions-in-your-organization.md | 3 +- ...imiting-interactions-in-your-repository.md | 3 +- ...dation-errors-when-creating-issue-forms.md | 641 +++++++++++++++ .../index.md | 1 + .../syntax-for-githubs-form-schema.md | 2 +- .../syntax-for-issue-forms.md | 3 +- ...ating-a-github-app-using-url-parameters.md | 2 +- ...g-and-authorizing-users-for-github-apps.md | 4 +- ...ment-environment-to-create-a-github-app.md | 6 +- .../creating-ci-tests-with-the-checks-api.md | 2 +- .../viewing-metrics-for-your-listing.md | 2 +- ...submitting-your-listing-for-publication.md | 2 +- .../handling-new-purchases-and-free-trials.md | 2 +- .../handling-plan-changes.md | 2 +- .../developers/overview/about-githubs-apis.md | 2 + .../overview/managing-deploy-keys.md | 12 +- .../overview/using-ssh-agent-forwarding.md | 6 +- .../webhooks/creating-webhooks.md | 4 +- .../index.md | 1 + .../viewing-insights-for-your-discussions.md | 34 + .../about-github-marketplace.md | 35 + .../about-integrations.md | 43 + .../exploring-integrations/about-webhooks.md | 32 + .../github-extensions-and-integrations.md | 55 ++ .../exploring-integrations/index.md | 18 + .../customizing-your-github-workflow/index.md | 17 + .../index.md | 15 + .../installing-an-app-in-your-organization.md | 51 ++ ...talling-an-app-in-your-personal-account.md | 49 ++ .../associating-text-editors-with-git.md | 2 +- ...bversion-properties-supported-by-github.md | 6 +- .../zh-CN/content/get-started/index.md | 1 + .../setting-up-a-trial-of-github-ae.md | 10 +- ...g-up-a-trial-of-github-enterprise-cloud.md | 20 +- .../using-git/about-git-subtree-merges.md | 4 +- .../using-github/github-command-palette.md | 15 +- .../using-github/keyboard-shortcuts.md | 272 +++--- .../github/copilot/research-recitation.md | 4 +- translations/zh-CN/content/github/index.md | 2 - .../github-government-takedown-policy.md | 5 +- translations/zh-CN/content/issues/index.md | 1 + .../about-task-lists.md | 2 +- .../creating-an-issue.md | 2 +- .../keeping-your-organization-secure/index.md | 12 +- ...ompliance-reports-for-your-organization.md | 31 + .../index.md | 21 + ...owed-ip-addresses-for-your-organization.md | 85 ++ ...analysis-settings-for-your-organization.md | 171 ++++ ...ail-notifications-for-your-organization.md | 47 ++ ...ing-the-audit-log-for-your-organization.md | 772 ++++++++++++++++++ ...ur-organizations-installed-integrations.md | 31 + .../index.md | 17 + ...tor-authentication-in-your-organization.md | 26 + ...tor-authentication-in-your-organization.md | 82 ++ ...s-in-your-organization-have-2fa-enabled.md | 33 + ...rs-to-repositories-in-your-organization.md | 4 +- ...ls-access-to-an-organization-repository.md | 6 +- ...ng-github-actions-for-your-organization.md | 4 + ...ing-project-boards-in-your-organization.md | 7 +- ...ra-with-your-organization-project-board.md | 21 +- ...heduled-reminders-for-your-organization.md | 5 +- ...he-forking-policy-for-your-organization.md | 1 + ...-a-billing-manager-to-your-organization.md | 4 + ...om-repository-roles-for-an-organization.md | 2 + ...saml-single-sign-on-and-scim-using-okta.md | 13 - ...ging-code-review-settings-for-your-team.md | 8 + ...aging-scheduled-reminders-for-your-team.md | 3 - .../deleting-and-restoring-a-package.md | 2 +- .../working-with-the-rubygems-registry.md | 4 +- ...ing-your-custom-domain-for-github-pages.md | 4 +- .../zh-CN/content/pages/quickstart.md | 10 +- .../about-status-checks.md | 2 +- .../creating-a-pull-request.md | 1 + .../index.md | 1 + ...ll-request-in-sync-with-the-base-branch.md | 53 ++ ...uring-commit-rebasing-for-pull-requests.md | 2 +- ...ring-commit-squashing-for-pull-requests.md | 4 +- .../configuring-pull-request-merges/index.md | 1 + ...ge-for-pull-requests-in-your-repository.md | 2 +- ...estions-to-update-pull-request-branches.md | 23 + ...ging-the-automatic-deletion-of-branches.md | 2 +- .../about-protected-branches.md | 2 +- .../transferring-a-repository.md | 3 +- .../about-code-owners.md | 21 +- ...ithub-actions-settings-for-a-repository.md | 10 +- ...tolinks-to-reference-external-resources.md | 8 +- ...d-people-with-access-to-your-repository.md | 6 +- .../working-with-files/using-files/index.md | 2 +- .../using-files/viewing-a-file.md | 49 ++ .../working-with-non-code-files.md | 2 +- .../rest/guides/building-a-ci-server.md | 2 +- .../rest/guides/delivering-deployments.md | 2 +- .../getting-started-with-the-rest-api.md | 2 +- .../zh-CN/content/rest/guides/index.md | 2 +- .../overview/resources-in-the-rest-api.md | 59 +- .../permissions-required-for-github-apps.md | 3 + .../zh-CN/content/rest/reference/pulls.md | 2 +- .../zh-CN/content/rest/reference/scim.md | 18 +- .../sorting-search-results.md | 18 +- .../understanding-the-search-syntax.md | 7 +- .../searching-on-github/searching-code.md | 10 +- .../searching-for-packages.md | 8 +- .../searching-for-repositories.md | 20 +- .../searching-issues-and-pull-requests.md | 32 +- .../managing-your-sponsorship-tiers.md | 37 + .../features/code-scanning-task-lists.yml | 5 + .../zh-CN/data/features/codeql-ml-queries.yml | 7 + .../github-actions-in-dependency-graph.yml | 7 + .../data/features/security-overview-views.yml | 7 + .../zh-CN/data/learning-tracks/actions.yml | 1 + .../zh-CN/data/learning-tracks/admin.yml | 1 + .../zh-CN/data/product-examples/README.md | 4 +- .../actions/code-examples.yml | 335 -------- .../enterprise-server/2-20/13.yml | 4 +- .../enterprise-server/2-20/15.yml | 2 +- .../enterprise-server/2-21/4.yml | 4 +- .../enterprise-server/2-21/6.yml | 4 +- .../enterprise-server/3-0/21.yml | 1 + .../enterprise-server/3-0/22.yml | 2 +- .../enterprise-server/3-0/24.yml | 21 + .../enterprise-server/3-1/13.yml | 1 + .../enterprise-server/3-1/14.yml | 2 +- .../enterprise-server/3-1/16.yml | 25 + .../release-notes/enterprise-server/3-2/5.yml | 1 + .../release-notes/enterprise-server/3-2/6.yml | 2 +- .../release-notes/enterprise-server/3-2/8.yml | 26 + .../release-notes/enterprise-server/3-3/1.yml | 2 +- .../release-notes/enterprise-server/3-3/3.yml | 29 + .../actions/oidc-permissions-token.md | 13 + .../section-triggering-a-workflow-paths.md | 2 +- .../reusables/apps/checks-availability.md | 2 +- .../audit_log_sidebar_for_org_admins.md | 4 + .../audit_log_sidebar_for_site_admins.md | 4 + .../reusables/billing/license-statuses.md | 6 + .../beta-alert-tracking-in-issues.md | 2 +- .../code-scanning/beta-codeql-ml-queries.md | 9 + .../codeql-query-suites-explanation.md | 5 + .../code-scanning/codeql-query-suites.md | 4 - .../codespaces/codespaces-billing.md | 4 +- .../dependabot/dependabot-secrets-button.md | 7 +- .../emu-password-reset-session.md | 2 +- .../save-settings.md | 2 +- .../tls-downtime.md | 5 + .../wait-for-configuration-run.md | 3 + .../gated-features/user-repo-collaborators.md | 5 +- .../github-actions/actions-activity-types.md | 22 + .../github-actions/actions-filters.md | 11 + .../github-actions/actions-multiple-types.md | 18 + .../github-actions/actions-on-examples.md | 66 +- .../github-actions/on-multiple-example.md | 7 + .../github-actions/on-single-example.md | 5 + .../private-repository-forks-options.md | 3 + .../private-repository-forks-overview.md | 6 +- .../self-hosted-runner-check-mac-linux.md | 3 + .../self-hosted-runner-configure.md | 3 + .../github-actions/sidebar-secret.md | 4 + .../supported-github-runners.md | 12 +- .../workflow-dispatch-inputs.md | 34 + .../organizations/billing-settings.md | 4 +- .../reusables/organizations/billing_plans.md | 4 + .../reusables/organizations/block_users.md | 2 +- .../organizations/click-codespaces.md | 2 +- .../github-apps-settings-sidebar.md | 4 + .../organizations/member-privileges.md | 4 + .../organizations/moderation-settings.md | 2 +- .../organizations/oauth_app_access.md | 4 +- .../org-settings-repository-roles.md | 2 +- .../organizations/repository-defaults.md | 4 + .../organizations/repository-labels.md | 2 +- .../organizations/security-and-analysis.md | 4 + .../data/reusables/organizations/security.md | 4 + .../reusables/organizations/teams_sidebar.md | 4 + .../organizations/verified-domains.md | 4 + .../data/reusables/pages/sidebar-pages.md | 4 +- .../profile/org_member_privileges.md | 1 + .../reminders/scheduled-reminders.md | 2 +- .../repositories/click-collaborators-teams.md | 1 + .../navigate-to-security-and-analysis.md | 4 + .../repositories/repository-branches.md | 4 + .../sidebar-moderation-reported-content.md | 2 +- .../repositories/sidebar-notifications.md | 4 + .../partner-secret-list-private-repo.md | 2 + .../security/compliance-report-list.md | 4 + .../security/compliance-report-screenshot.md | 1 + .../reusables/sponsors/sponsors-only-repos.md | 1 + .../data/reusables/sponsors/tier-details.md | 3 +- .../reusables/user-settings/oauth_apps.md | 2 +- .../user_settings/access_applications.md | 4 + .../user_settings/accessibility_settings.md | 2 +- .../user_settings/account_settings.md | 4 + .../user_settings/appearance-settings.md | 6 +- .../reusables/user_settings/billing_plans.md | 2 +- .../reusables/user_settings/blocked_users.md | 2 +- .../reusables/user_settings/codespaces-tab.md | 2 +- .../user_settings/developer_settings.md | 4 + .../data/reusables/user_settings/emails.md | 4 + .../reusables/user_settings/organizations.md | 4 + .../data/reusables/user_settings/repo-tab.md | 4 + .../reusables/user_settings/saved_replies.md | 4 + .../user_settings/security-analysis.md | 4 + .../data/reusables/user_settings/security.md | 4 + .../zh-CN/data/reusables/user_settings/ssh.md | 4 + translations/zh-CN/data/ui.yml | 10 +- 312 files changed, 4183 insertions(+), 1523 deletions(-) create mode 100644 translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises.md create mode 100644 translations/zh-CN/content/admin/overview/accessing-compliance-reports-for-your-enterprise.md create mode 100644 translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts.md create mode 100644 translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/common-validation-errors-when-creating-issue-forms.md create mode 100644 translations/zh-CN/content/discussions/managing-discussions-for-your-community/viewing-insights-for-your-discussions.md create mode 100644 translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/about-github-marketplace.md create mode 100644 translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/about-integrations.md create mode 100644 translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/about-webhooks.md create mode 100644 translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations.md create mode 100644 translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/index.md create mode 100644 translations/zh-CN/content/get-started/customizing-your-github-workflow/index.md create mode 100644 translations/zh-CN/content/get-started/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/index.md create mode 100644 translations/zh-CN/content/get-started/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/installing-an-app-in-your-organization.md create mode 100644 translations/zh-CN/content/get-started/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/installing-an-app-in-your-personal-account.md create mode 100644 translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/accessing-compliance-reports-for-your-organization.md create mode 100644 translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/index.md create mode 100644 translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization.md create mode 100644 translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization.md create mode 100644 translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/restricting-email-notifications-for-your-organization.md create mode 100644 translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization.md create mode 100644 translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-your-organizations-installed-integrations.md create mode 100644 translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/index.md create mode 100644 translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/preparing-to-require-two-factor-authentication-in-your-organization.md create mode 100644 translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization.md create mode 100644 translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/viewing-whether-users-in-your-organization-have-2fa-enabled.md create mode 100644 translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch.md create mode 100644 translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-suggestions-to-update-pull-request-branches.md create mode 100644 translations/zh-CN/content/repositories/working-with-files/using-files/viewing-a-file.md create mode 100644 translations/zh-CN/data/features/code-scanning-task-lists.yml create mode 100644 translations/zh-CN/data/features/codeql-ml-queries.yml create mode 100644 translations/zh-CN/data/features/github-actions-in-dependency-graph.yml create mode 100644 translations/zh-CN/data/features/security-overview-views.yml delete mode 100644 translations/zh-CN/data/product-examples/actions/code-examples.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-0/24.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-1/16.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-2/8.yml create mode 100644 translations/zh-CN/data/release-notes/enterprise-server/3-3/3.yml create mode 100644 translations/zh-CN/data/reusables/actions/oidc-permissions-token.md create mode 100644 translations/zh-CN/data/reusables/billing/license-statuses.md create mode 100644 translations/zh-CN/data/reusables/code-scanning/beta-codeql-ml-queries.md create mode 100644 translations/zh-CN/data/reusables/code-scanning/codeql-query-suites-explanation.md create mode 100644 translations/zh-CN/data/reusables/enterprise_site_admin_settings/tls-downtime.md create mode 100644 translations/zh-CN/data/reusables/enterprise_site_admin_settings/wait-for-configuration-run.md create mode 100644 translations/zh-CN/data/reusables/github-actions/actions-activity-types.md create mode 100644 translations/zh-CN/data/reusables/github-actions/actions-filters.md create mode 100644 translations/zh-CN/data/reusables/github-actions/actions-multiple-types.md create mode 100644 translations/zh-CN/data/reusables/github-actions/on-multiple-example.md create mode 100644 translations/zh-CN/data/reusables/github-actions/on-single-example.md create mode 100644 translations/zh-CN/data/reusables/github-actions/private-repository-forks-options.md create mode 100644 translations/zh-CN/data/reusables/github-actions/self-hosted-runner-check-mac-linux.md create mode 100644 translations/zh-CN/data/reusables/github-actions/workflow-dispatch-inputs.md create mode 100644 translations/zh-CN/data/reusables/profile/org_member_privileges.md create mode 100644 translations/zh-CN/data/reusables/repositories/click-collaborators-teams.md create mode 100644 translations/zh-CN/data/reusables/security/compliance-report-list.md create mode 100644 translations/zh-CN/data/reusables/security/compliance-report-screenshot.md create mode 100644 translations/zh-CN/data/reusables/sponsors/sponsors-only-repos.md diff --git a/translations/log/cn-resets.csv b/translations/log/cn-resets.csv index a2925060c5..7c8e1ac6c3 100644 --- a/translations/log/cn-resets.csv +++ b/translations/log/cn-resets.csv @@ -121,6 +121,7 @@ translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learni translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-for-your-schoolwork/why-wasnt-my-application-for-a-student-developer-pack-approved.md,broken liquid tags translations/zh-CN/content/education/manage-coursework-with-github-classroom/integrate-github-classroom-with-an-ide/about-using-makecode-arcade-with-github-classroom.md,broken liquid tags translations/zh-CN/content/education/manage-coursework-with-github-classroom/learn-with-github-classroom/view-autograding-results.md,broken liquid tags +translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/about-github-marketplace.md,broken liquid tags translations/zh-CN/content/get-started/getting-started-with-git/updating-credentials-from-the-macos-keychain.md,broken liquid tags translations/zh-CN/content/get-started/importing-your-projects-to-github/importing-source-code-to-github/adding-an-existing-project-to-github-using-the-command-line.md,broken liquid tags translations/zh-CN/content/get-started/learning-about-github/about-github-advanced-security.md,broken liquid tags @@ -131,9 +132,7 @@ translations/zh-CN/content/get-started/quickstart/github-flow.md,broken liquid t translations/zh-CN/content/get-started/using-git/dealing-with-non-fast-forward-errors.md,broken liquid tags translations/zh-CN/content/get-started/using-github/github-mobile.md,broken liquid tags translations/zh-CN/content/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists.md,broken liquid tags -translations/zh-CN/content/github/customizing-your-github-workflow/exploring-integrations/about-github-marketplace.md,broken liquid tags translations/zh-CN/content/issues/using-labels-and-milestones-to-track-work/managing-labels.md,broken liquid tags -translations/zh-CN/content/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization.md,Listed in localization-support#489 translations/zh-CN/content/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization.md,broken liquid tags translations/zh-CN/content/organizations/managing-organization-settings/managing-the-publication-of-github-pages-sites-for-your-organization.md,Listed in localization-support#489 translations/zh-CN/content/organizations/organizing-members-into-teams/about-teams.md,broken liquid tags diff --git a/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/viewing-and-triaging-notifications/customizing-a-workflow-for-triaging-your-notifications.md b/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/viewing-and-triaging-notifications/customizing-a-workflow-for-triaging-your-notifications.md index e72bc71121..7c91d2706b 100644 --- a/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/viewing-and-triaging-notifications/customizing-a-workflow-for-triaging-your-notifications.md +++ b/translations/zh-CN/content/account-and-profile/managing-subscriptions-and-notifications-on-github/viewing-and-triaging-notifications/customizing-a-workflow-for-triaging-your-notifications.md @@ -46,7 +46,7 @@ To follow-up on notifications, you might consider the question "What was I block 例如,您可以决定按照以下顺序采取后续行动: - 分配给您的议题和拉取请求。 立即关闭您可以关闭的任何议题或拉取请求,并添加更新。 需要时,保存通知供以后查看。 - - 查看已保存的收件箱中的通知,尤其是未读更新。 如果帖子不再相关,请取消选中 {% octicon "bookmark" aria-label="The bookmark icon" %} 以从保存的收件箱中删除通知并取消保存它。 + - 查看已保存的收件箱中的通知,尤其是未读更新。 If the thread is no longer relevant, deselect {% octicon "bookmark" aria-label="The bookmark icon" %} to remove the notification from the saved inbox and unsave it. ## 管理低优先级通知 diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile.md index 9084cb9a07..7afb8f3d39 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-graphs-on-your-profile/sending-enterprise-contributions-to-your-githubcom-profile.md @@ -28,7 +28,7 @@ For more information about how contributions are calculated, see "[Managing cont {% note %} **Notes:** -- The connection between your accounts is governed by GitHub's Privacy Statement and users enabling the connection agree to the GitHub's Terms of Service. +- The connection between your accounts is governed by [GitHub's Privacy Statement](/free-pro-team@latest/github/site-policy/github-privacy-statement/) and users enabling the connection agree to the [GitHub's Terms of Service](/free-pro-team@latest/github/site-policy/github-terms-of-service). - Before you can connect your {% ifversion fpt or ghec %}{% data variables.product.prodname_enterprise %}{% else %}{% data variables.product.product_name %}{% endif %} profile to your {% data variables.product.prodname_dotcom_the_website %} profile, your enterprise owner must enable {% data variables.product.prodname_github_connect %} and enable contribution sharing between the environments. For more information, contact your enterprise owner. diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository.md index 468ec12bb4..c9f2898800 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository.md @@ -7,7 +7,7 @@ redirect_from: - /articles/inviting-collaborators-to-a-personal-repository - /github/setting-up-and-managing-your-github-user-account/inviting-collaborators-to-a-personal-repository - /github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/inviting-collaborators-to-a-personal-repository -product: '{% ifversion fpt %}{% data reusables.gated-features.user-repo-collaborators %}{% endif %}' +product: '{% data reusables.gated-features.user-repo-collaborators %}' versions: fpt: '*' ghes: '*' @@ -38,8 +38,8 @@ If you're a member of an {% data variables.product.prodname_emu_enterprise %}, y 1. 您邀请成为协作者的人员需提供用户名。{% ifversion fpt or ghec %} 如果他们还没有用户名,他们可以注册 {% data variables.product.prodname_dotcom %} 更多信息请参阅“[注册新 {% data variables.product.prodname_dotcom %} 帐户](/articles/signing-up-for-a-new-github-account)”。{% endif %} {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} -{% ifversion fpt or ghec %} -{% data reusables.repositories.navigate-to-manage-access %} +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658%} +{% data reusables.repositories.click-collaborators-teams %} 1. 单击 **Invite a collaborator(邀请协作者)**。 !["邀请协作者" 按钮](/assets/images/help/repository/invite-a-collaborator-button.png) 2. 在搜索字段中,开始键入您想邀请的人员的姓名,然后单击匹配列表中的姓名。 ![搜索字段以键入要邀请加入仓库的人员姓名](/assets/images/help/repository/manage-access-invite-search-field-user.png) 3. 单击 **Add NAME to REPOSITORY(添加姓名到仓库)**。 ![用于添加协作者的按钮](/assets/images/help/repository/add-collaborator-user-repo.png) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository.md index 37fe983ecb..3bd5abf224 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-a-collaborator-from-a-personal-repository.md @@ -30,8 +30,8 @@ shortTitle: 删除协作者 {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} -{% ifversion fpt or ghec %} -{% data reusables.repositories.navigate-to-manage-access %} +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +{% data reusables.repositories.click-collaborators-teams %} 4. 在要要删除的协作者的右侧,单击 {% octicon "trash" aria-label="The trash icon" %}。 ![用于删除协作者的按钮](/assets/images/help/repository/collaborator-remove.png) {% else %} 3. 在左侧边栏中,单击 **Collaborators & teams(协作者和团队)**。 ![协作者选项卡](/assets/images/help/repository/repo-settings-collaborators.png) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository.md index df3436b82c..564c5f2715 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository.md @@ -9,7 +9,6 @@ redirect_from: - /articles/removing-yourself-from-a-collaborators-repository - /github/setting-up-and-managing-your-github-user-account/removing-yourself-from-a-collaborators-repository - /github/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories/removing-yourself-from-a-collaborators-repository -product: '{% data reusables.gated-features.user-repo-collaborators %}' versions: fpt: '*' ghes: '*' @@ -22,6 +21,10 @@ shortTitle: 删除自己 --- {% data reusables.user_settings.access_settings %} +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +2. In the "Code, planning, and automation" section of the sidebar, click **{% octicon "repo" aria-label="The repo icon" %} Repositories**. +{% else %} 2. 在左侧边栏中,单击 **Repositories(仓库)**。 ![仓库选项卡](/assets/images/help/settings/settings-sidebar-repositories.png) +{% endif %} 3. 在您要离开的仓库旁边,单击 **Leave(离开)**。 ![离开按钮](/assets/images/help/repository/repo-leave.png) 4. 仔细阅读警告,然后单击“I understand, leave this repository(我已了解,离开此仓库)”。 ![警告您离开的对话框](/assets/images/help/repository/repo-leave-confirmation.png) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/integrating-jira-with-your-personal-projects.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/integrating-jira-with-your-personal-projects.md index 9fdbe9cdca..101067be19 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/integrating-jira-with-your-personal-projects.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/integrating-jira-with-your-personal-projects.md @@ -13,12 +13,12 @@ shortTitle: 将 Jira 与项目集成 {% data reusables.user_settings.access_settings %} {% data reusables.user_settings.developer_settings %} -3. 在左侧边栏中,单击 **{% data variables.product.prodname_oauth_apps %}**。 ![左侧边栏中的 {% data variables.product.prodname_oauth_apps %} 选项卡](/assets/images/help/settings/developer-settings-oauth-apps.png) -3. 单击 **Register a new application(注册新应用程序)**。 -4. 在 **Application name(应用程序名称)**下输入 "Jira"。 -5. 在 **Homepage URL(主页 URL)**下,输入 Jira 实例的完整 URL。 -6. 在 **Authorization callback URL(授权回叫 URL)**下,输入 Jira 实例的完整 URL。 -7. 单击 **Register application(注册应用程序)**。 ![注册应用程序按钮](/assets/images/help/oauth/register-application-button.png) +{% data reusables.user-settings.oauth_apps %} +1. 单击 **Register a new application(注册新应用程序)**。 +2. 在 **Application name(应用程序名称)**下输入 "Jira"。 +3. 在 **Homepage URL(主页 URL)**下,输入 Jira 实例的完整 URL。 +4. 在 **Authorization callback URL(授权回叫 URL)**下,输入 Jira 实例的完整 URL。 +5. 单击 **Register application(注册应用程序)**。 ![注册应用程序按钮](/assets/images/help/oauth/register-application-button.png) 8. 在 **Developer applications(开发者应用程序)**下,记下 "Client ID"(客户 ID)和 "Client Secret"(客户端密钥)值。 ![客户端 ID 和客户端密码](/assets/images/help/oauth/client-id-and-secret.png) {% data reusables.user_settings.jira_help_docs %} diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-tab-size-rendering-preference.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-tab-size-rendering-preference.md index 6ed1703cd1..e448e15fc4 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-tab-size-rendering-preference.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-user-account-settings/managing-your-tab-size-rendering-preference.md @@ -14,5 +14,5 @@ shortTitle: Managing your tab size If you feel that tabbed indentation in code rendered on {% data variables.product.product_name %} takes up too much, or too little space, you can change this in your settings. {% data reusables.user_settings.access_settings %} -1. 在用户设置侧边栏中,单击 **Appearance(外观)**。 ![用户设置侧边栏中的"外观"选项卡](/assets/images/help/settings/appearance-tab.png) +1. In the left sidebar, click **{% octicon "paintbrush" aria-label="The paintbrush icon" %} Appearance**. 2. Under "Tab size preference", select the drop-down menu and choose your preference. ![Tab size preference button](/assets/images/help/settings/tab-size-preference.png) diff --git a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/managing-your-scheduled-reminders.md b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/managing-your-scheduled-reminders.md index 7df6bbf045..758ca92285 100644 --- a/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/managing-your-scheduled-reminders.md +++ b/translations/zh-CN/content/account-and-profile/setting-up-and-managing-your-github-user-account/managing-your-membership-in-organizations/managing-your-scheduled-reminders.md @@ -26,8 +26,7 @@ shortTitle: 管理预定提醒 {% data reusables.user_settings.access_settings %} {% data reusables.reminders.scheduled-reminders %} -![预定提醒按钮](/assets/images/help/profile/scheduled-reminders-profile.png) -3. 在要预定提醒的组织旁边,单击 **Edit(编辑)**。 ![预定提醒编辑按钮](/assets/images/help/settings/scheduled-reminders-org-choice.png) +1. 在要预定提醒的组织旁边,单击 **Edit(编辑)**。 ![预定提醒编辑按钮](/assets/images/help/settings/scheduled-reminders-org-choice.png) {% data reusables.reminders.add-reminder %} {% data reusables.reminders.authorize-slack %} {% data reusables.reminders.days-dropdown %} @@ -41,16 +40,14 @@ shortTitle: 管理预定提醒 ## 管理用户帐户的预定提醒 {% data reusables.user_settings.access_settings %} {% data reusables.reminders.scheduled-reminders %} -![预定提醒按钮](/assets/images/help/profile/scheduled-reminders-profile.png) -3. 在要编辑预定提醒的组织旁边,单击 **Edit(编辑)**。 ![预定提醒编辑按钮](/assets/images/help/settings/scheduled-reminders-org-choice.png) +1. 在要编辑预定提醒的组织旁边,单击 **Edit(编辑)**。 ![预定提醒编辑按钮](/assets/images/help/settings/scheduled-reminders-org-choice.png) {% data reusables.reminders.edit-page %} {% data reusables.reminders.update-buttons %} ## 删除用户帐户的预定提醒 {% data reusables.user_settings.access_settings %} {% data reusables.reminders.scheduled-reminders %} -![预定提醒按钮](/assets/images/help/profile/scheduled-reminders-profile.png) -3. 在要删除提醒的组织旁边,单击 **Edit(编辑)**。 ![预定提醒编辑按钮](/assets/images/help/settings/scheduled-reminders-org-choice.png) +1. 在要删除提醒的组织旁边,单击 **Edit(编辑)**。 ![预定提醒编辑按钮](/assets/images/help/settings/scheduled-reminders-org-choice.png) {% data reusables.reminders.delete %} ## 延伸阅读 diff --git a/translations/zh-CN/content/actions/advanced-guides/caching-dependencies-to-speed-up-workflows.md b/translations/zh-CN/content/actions/advanced-guides/caching-dependencies-to-speed-up-workflows.md index d20a7e67f1..a51de191f0 100644 --- a/translations/zh-CN/content/actions/advanced-guides/caching-dependencies-to-speed-up-workflows.md +++ b/translations/zh-CN/content/actions/advanced-guides/caching-dependencies-to-speed-up-workflows.md @@ -88,7 +88,7 @@ If you are caching the package managers listed below, consider using the respect ### `cache` 操作的输入参数 - `key`:**必要** 保存缓存时创建的键,以及用于搜索缓存的键。 可以是变量、上下文值、静态字符串和函数的任何组合。 密钥最大长度为 512 个字符,密钥长度超过最大长度将导致操作失败。 -- `path`:**必要** 运行器上缓存或还原的文件路径。 路径可以是绝对路径或相对于工作目录的路径。 +- `path`:**必要** 运行器上缓存或还原的文件路径。 The path can be an absolute path or relative to the workspace directory. - 路径可以是目录或单个文件,并且支持 glob 模式。 - 使用 `cache` 操作的 `v2`,可以指定单个路径,也可以在单独的行上添加多个路径。 例如: ``` diff --git a/translations/zh-CN/content/actions/automating-builds-and-tests/building-and-testing-ruby.md b/translations/zh-CN/content/actions/automating-builds-and-tests/building-and-testing-ruby.md index e677d40373..95692d2eeb 100644 --- a/translations/zh-CN/content/actions/automating-builds-and-tests/building-and-testing-ruby.md +++ b/translations/zh-CN/content/actions/automating-builds-and-tests/building-and-testing-ruby.md @@ -238,7 +238,7 @@ jobs: ## 嵌入代码 -下面的示例安装 `rubocop` 并用它来嵌入所有文件。 更多信息请参阅 [Rubocop](https://github.com/rubocop-hq/rubocop)。 您可以[配置 Rubocop](https://docs.rubocop.org/rubocop/configuration.html) 来决定特定的嵌入规则。 +下面的示例安装 `rubocop` 并用它来嵌入所有文件。 For more information, see [RuboCop](https://github.com/rubocop-hq/rubocop). 您可以[配置 Rubocop](https://docs.rubocop.org/rubocop/configuration.html) 来决定特定的嵌入规则。 ```yaml {% data reusables.actions.actions-not-certified-by-github-comment %} diff --git a/translations/zh-CN/content/actions/creating-actions/creating-a-composite-action.md b/translations/zh-CN/content/actions/creating-actions/creating-a-composite-action.md index a321ce6c56..256bb3fe41 100644 --- a/translations/zh-CN/content/actions/creating-actions/creating-a-composite-action.md +++ b/translations/zh-CN/content/actions/creating-actions/creating-a-composite-action.md @@ -84,7 +84,9 @@ Before you begin, you'll create a repository on {% ifversion ghae %}{% data vari - id: random-number-generator run: echo "::set-output name=random-id::$(echo $RANDOM)" shell: bash - - run: ${{ github.action_path }}/goodbye.sh + - run: echo "${{ github.action_path }}" >> $GITHUB_PATH + shell: bash + - run: goodbye.sh shell: bash ``` {% endraw %} diff --git a/translations/zh-CN/content/actions/creating-actions/dockerfile-support-for-github-actions.md b/translations/zh-CN/content/actions/creating-actions/dockerfile-support-for-github-actions.md index 7241c9833a..6d78d67c1b 100644 --- a/translations/zh-CN/content/actions/creating-actions/dockerfile-support-for-github-actions.md +++ b/translations/zh-CN/content/actions/creating-actions/dockerfile-support-for-github-actions.md @@ -47,6 +47,8 @@ Docker 操作必须由默认 Docker 用户 (root) 运行。 不要在 `Dockerfil Docker `ENTRYPOINT` 指令有 _shell_ 形式和 _exec_ 形式。 Docker `ENTRYPOINT` 文档建议使用 _exec_ 形式的 `ENTRYPOINT` 指令。 有关 _exec_ 和 _shell_ 形式的更多信息,请参阅 Docker 文档中的 [ENTRYPOINT 参考](https://docs.docker.com/engine/reference/builder/#entrypoint)。 +You should not use `WORKDIR` to specify your entrypoint in your Dockerfile. Instead, you should use an absolute path. For more information, see [WORKDIR](#workdir). + 如果您配置容器使用 _exec_ 形式的 `ENTRYPOINT` 指令,在操作元数据文件中配置的 `args` 不会在命令 shell 中运行。 如果操作的 `args` 包含环境变量,不会替换该变量。 例如,使用以下 _exec_ 格式将不会打印存储在 `$GITHUB_SHA` 中的值, 但会打印 `"$GITHUB_SHA"`。 ```dockerfile diff --git a/translations/zh-CN/content/actions/creating-actions/metadata-syntax-for-github-actions.md b/translations/zh-CN/content/actions/creating-actions/metadata-syntax-for-github-actions.md index 87bc65763f..24c80f1a28 100644 --- a/translations/zh-CN/content/actions/creating-actions/metadata-syntax-for-github-actions.md +++ b/translations/zh-CN/content/actions/creating-actions/metadata-syntax-for-github-actions.md @@ -13,6 +13,7 @@ versions: ghae: '*' ghec: '*' type: reference +miniTocMaxHeadingLevel: 4 --- {% data reusables.actions.enterprise-beta %} @@ -20,7 +21,7 @@ type: reference ## 关于 {% data variables.product.prodname_actions %} 的 YAML 语法 -Docker 和 JavaScript 操作需要元数据文件。 元数据文件名必须是 `action.yml` 或 `action.yaml`。 元数据文件中的数据定义操作的输入、输出和主要进入点。 +All actions require a metadata file. 元数据文件名必须是 `action.yml` 或 `action.yaml`。 The data in the metadata file defines the inputs, outputs, and runs configuration for your action. 操作元数据文件使用 YAML 语法。 如果您是 YAML 的新用户,请参阅“[五分钟了解 YAML](https://www.codeproject.com/Articles/1214409/Learn-YAML-in-five-minutes)”。 @@ -40,7 +41,7 @@ Docker 和 JavaScript 操作需要元数据文件。 元数据文件名必须是 **可选** 输入参数用于指定操作在运行时预期使用的数据。 {% data variables.product.prodname_dotcom %} 将输入参数存储为环境变量。 大写的输入 ID 在运行时转换为小写。 建议使用小写输入 ID。 -### 示例 +### Example: Specifying inputs 此示例配置两个输入:numOctocats 和 octocatEyeColor。 numOctocats 输入不是必要的,默认值为 '1'。 octocatEyeColor 输入是必要的,没有默认值。 使用此操作的工作流程文件必须使用 `with` 关键词来设置 octocatEyeColor 的输入值。 有关 `with` 语法的更多信息,请参阅“[{% data variables.product.prodname_actions %} 的工作流程语法](/articles/workflow-syntax-for-github-actions/#jobsjob_idstepswith)”。 @@ -83,13 +84,13 @@ inputs: **可选** 如果使用输入参数,此 `string` 将记录为警告消息。 您可以使用此警告通知用户输入已被弃用,并提及任何其他替代方式。 -## `outputs` +## `outputs` for Docker container and JavaScript actions **可选** 输出参数允许您声明操作所设置的数据。 稍后在工作流程中运行的操作可以使用以前运行操作中的输出数据集。 例如,如果有操作执行两个输入的相加 (x + y = z),则该操作可能输出总和 (z),用作其他操作的输入。 如果不在操作元数据文件中声明输出,您仍然可以设置输出并在工作流程中使用它们。 有关在操作中设置输出的更多信息,请参阅“[{% data variables.product.prodname_actions %} 的工作流程命令](/actions/reference/workflow-commands-for-github-actions/#setting-an-output-parameter)”。 -### 示例 +### Example: Declaring outputs for Docker container and JavaScript actions ```yaml outputs: @@ -107,17 +108,11 @@ outputs: ## 用于复合操作的 `outputs` -**可选** `outputs` 使用与 `outputs.` 及 `outputs..description` 相同的参数(请参阅“用于 {% data variables.product.prodname_actions %} 的 +**Optional** `outputs` use the same parameters as `outputs.` and `outputs..description` (see "[`outputs` for Docker container and JavaScript actions](#outputs-for-docker-container-and-javascript-actions)"), but also includes the `value` token. -`outputs`”),但也包括 `value` 令牌。

- - - -### 示例 +### Example: Declaring outputs for composite actions {% raw %} - - ```yaml outputs: random-number: @@ -130,35 +125,23 @@ runs: run: echo "::set-output name=random-id::$(echo $RANDOM)" shell: bash ``` - - {% endraw %} - - ### `outputs..value` **必要** 输出参数将会映射到的值。 您可以使用上下文将此设置为 `string` 或表达式。 例如,您可以使用 `steps` 上下文将输出的 `value` 设置为步骤的输出值。 有关如何使用上下文语法的更多信息,请参阅“[上下文](/actions/learn-github-actions/contexts)”。 - - ## `runs` -**Required** Specifies whether this is a JavaScript action, a composite action or a Docker action and how the action is executed. - - +**Required** Specifies whether this is a JavaScript action, a composite action, or a Docker container action and how the action is executed. ## 用于 JavaScript 操作的 `runs` **Required** Configures the path to the action's code and the runtime used to execute the code. - - -### Example using Node.js {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}v16{% else %}v12{% endif %} - - +### Example: Using Node.js {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}v16{% else %}v12{% endif %} ```yaml runs: @@ -166,32 +149,23 @@ runs: main: 'main.js' ``` - - - ### `runs.using` -**Required** The runtime used to execute the code specified in [`main`](#runsmain). +**Required** The runtime used to execute the code specified in [`main`](#runsmain). - Use `node12` for Node.js v12.{% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %} - Use `node16` for Node.js v16.{% endif %} - - ### `runs.main` **必要** 包含操作代码的文件。 The runtime specified in [`using`](#runsusing) executes this file. +### `runs.pre` - -### `pre` - -**可选** 允许您在 `main:` 操作开始之前,在作业开始时运行脚本。 例如,您可以使用 `pre:` 运行基本要求设置脚本。 The runtime specified with the [`using`](#runsusing) syntax will execute this file. `pre:` 操作始终默认运行,但您可以使用 [`pre-if`](#pre-if) 覆盖该设置。 +**可选** 允许您在 `main:` 操作开始之前,在作业开始时运行脚本。 例如,您可以使用 `pre:` 运行基本要求设置脚本。 The runtime specified with the [`using`](#runsusing) syntax will execute this file. The `pre:` action always runs by default but you can override this using [`runs.pre-if`](#runspre-if). 在此示例中,`pre:` 操作运行名为 `setup.js` 的脚本: - - ```yaml runs: using: {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}'node16'{% else %}'node12'{% endif %} @@ -200,10 +174,7 @@ runs: post: 'cleanup.js' ``` - - - -### `pre-if` +### `runs.pre-if` **可选** 允许您定义 `pre:` 操作执行的条件。 `pre:` 操作仅在满足 `pre-if` 中的条件后运行。 如果未设置,则 `pre-if` 默认使用 `always()`。 In `pre-if`, status check functions evaluate against the job's status, not the action's own status. @@ -211,24 +182,17 @@ runs: 在此示例中,`cleanup.js` 仅在基于 Linux 的运行器上运行: - - ```yaml pre: 'cleanup.js' pre-if: runner.os == 'linux' ``` - - - -### `post` +### `runs.post` **可选** 允许您在 `main:` 操作完成后,在作业结束时运行脚本。 例如,您可以使用 `post:` 终止某些进程或删除不需要的文件。 The runtime specified with the [`using`](#runsusing) syntax will execute this file. 在此示例中,`post:` 操作会运行名为 `cleanup.js` 的脚本: - - ```yaml runs: using: {% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %}'node16'{% else %}'node12'{% endif %} @@ -236,70 +200,44 @@ runs: post: 'cleanup.js' ``` - `post:` 操作始终默认运行,但您可以使用 `post-if` 覆盖该设置。 - - -### `post-if` +### `runs.post-if` **可选** 允许您定义 `post:` 操作执行的条件。 `post:` 操作仅在满足 `post-if` 中的条件后运行。 如果未设置,则 `post-if` 默认使用 `always()`。 In `post-if`, status check functions evaluate against the job's status, not the action's own status. 例如,此 `cleanup.js` 仅在基于 Linux 的运行器上运行: - - ```yaml post: 'cleanup.js' post-if: runner.os == 'linux' ``` - - - ## 用于复合操作的 `runs` **Required** Configures the path to the composite action. - - ### `runs.using` **Required** You must set this value to `'composite'`. - - ### `runs.steps` {% ifversion fpt or ghes > 3.2 or ghae-issue-4853 or ghec %} - - -**必要** 您计划在此操作中的步骤。 这些步骤可以是 `run` 步骤或 `uses` 步骤。 - +**必要** 您计划在此操作中的步骤。 这些步骤可以是 `run` 步骤或 `uses` 步骤。 {% else %} - -**必要** 您计划在此操作中的步骤。 - +**必要** 您计划在此操作中的步骤。 {% endif %} - - #### `runs.steps[*].run` {% ifversion fpt or ghes > 3.2 or ghae-issue-4853 or ghec %} - - -**可选** 您想要运行的命令。 这可以是内联的,也可以是操作仓库中的脚本: - +**可选** 您想要运行的命令。 这可以是内联的,也可以是操作仓库中的脚本: {% else %} - -**必要** 您想要运行的命令。 这可以是内联的,也可以是操作仓库中的脚本: - +**必要** 您想要运行的命令。 这可以是内联的,也可以是操作仓库中的脚本: {% endif %} {% raw %} - - ```yaml runs: using: "composite" @@ -307,14 +245,10 @@ runs: - run: ${{ github.action_path }}/test/script.sh shell: bash ``` - - {% endraw %} 或者,您也可以使用 `$GITHUB_ACTION_PATH`: - - ```yaml runs: using: "composite" @@ -323,26 +257,17 @@ runs: shell: bash ``` - 更多信息请参阅“[`github context`](/actions/reference/context-and-expression-syntax-for-github-actions#github-context)”。 - - #### `runs.steps[*].shell` {% ifversion fpt or ghes > 3.2 or ghae-issue-4853 or ghec %} - - -**可选** 您想要在其中运行命令的 shell。 您可以使用[这里](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsshell)列出的任何 shell。 如果设置了 `run`,则必填。 - +**可选** 您想要在其中运行命令的 shell。 您可以使用[这里](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsshell)列出的任何 shell。 如果设置了 `run`,则必填。 {% else %} - -**必要** 您想要在其中运行命令的 shell。 您可以使用[这里](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsshell)列出的任何 shell。 如果设置了 `run`,则必填。 - +**必要** 您想要在其中运行命令的 shell。 您可以使用[这里](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsshell)列出的任何 shell。 如果设置了 `run`,则必填。 {% endif %} - - +{% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %} #### `runs.steps[*].if` **Optional** You can use the `if` conditional to prevent a step from running unless a condition is met. 您可以使用任何支持上下文和表达式来创建条件。 @@ -351,9 +276,7 @@ runs: **示例:使用上下文** -此步骤仅在事件类型为 `pull_request` 并且事件操作为 `unassigned` 时运行。 - - + 此步骤仅在事件类型为 `pull_request` 并且事件操作为 `unassigned` 时运行。 ```yaml steps: @@ -361,13 +284,10 @@ steps: if: {% raw %}${{ github.event_name == 'pull_request' && github.event.action == 'unassigned' }}{% endraw %} ``` - **示例:使用状态检查功能** The `my backup step` only runs when the previous step of a composite action fails. For more information, see "[Expressions](/actions/learn-github-actions/expressions#job-status-check-functions)." - - ```yaml steps: - name: My first step @@ -376,49 +296,36 @@ steps: if: {% raw %}${{ failure() }}{% endraw %} uses: actions/heroku@1.0.0 ``` - - - +{% endif %} #### `runs.steps[*].name` **可选** 复合步骤的名称。 - - #### `runs.steps[*].id` **可选** 步骤的唯一标识符。 您可以使用 `id` 引用上下文中的步骤。 更多信息请参阅“[上下文](/actions/learn-github-actions/contexts)”。 - - #### `runs.steps[*].env` **可选** 设置环境变量的 `map` 仅用于该步骤。 If you want to modify the environment variable stored in the workflow, use `echo "{name}={value}" >> $GITHUB_ENV` in a composite step. - - #### `runs.steps[*].working-directory` **可选** 指定命令在其中运行的工作目录。 {% ifversion fpt or ghes > 3.2 or ghae-issue-4853 or ghec %} - - #### `runs.steps[*].uses` **可选** 选择作为作业步骤一部分运行的操作。 操作是一种可重复使用的代码单位。 您可以使用工作流程所在仓库中、公共仓库中或[发布 Docker 容器映像](https://hub.docker.com/)中定义的操作。 强烈建议指定 Git ref、SHA 或 Docker 标记编号来包含所用操作的版本。 如果不指定版本,在操作所有者发布更新时可能会中断您的工作流程或造成非预期的行为。 - - 使用已发行操作版本的 SHA 对于稳定性和安全性是最安全的。 - 使用特定主要操作版本可在保持兼容性的同时接收关键修复和安全补丁。 还可确保您的工作流程继续工作。 - 使用操作的默认分支可能很方便,但如果有人新发布具有突破性更改的主要版本,您的工作流程可能会中断。 有些操作要求必须通过 [`with`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepswith) 关键词设置输入。 请查阅操作的自述文件,确定所需的输入。 - - ```yaml runs: using: "composite" @@ -441,15 +348,10 @@ runs: - uses: docker://alpine:3.8 ``` - - - #### `runs.steps[*].with` **可选** 输入参数的 `map` 由操作定义。 每个输入参数都是一个键/值对。 输入参数被设置为环境变量。 该变量的前缀为 INPUT_,并转换为大写。 - - ```yaml runs: using: "composite" @@ -461,21 +363,13 @@ runs: middle_name: The last_name: Octocat ``` - - {% endif %} +## `runs` for Docker container actions +**Required** Configures the image used for the Docker container action. -## 用于 Docker 操作的 `runs` - -**必要** 配置用于 Docker 操作的图像。 - - - -### 在仓库中使用 Dockerfile 的示例 - - +### Example: Using a Dockerfile in your repository ```yaml runs: @@ -483,12 +377,7 @@ runs: image: 'Dockerfile' ``` - - - -### 使用公共 Docker 注册表容器的示例 - - +### Example: Using public Docker registry container ```yaml runs: @@ -496,25 +385,18 @@ runs: image: 'docker://debian:stretch-slim' ``` - - - ### `runs.using` **必要** 必须将此值设置为 `'docker'`。 +### `runs.pre-entrypoint` - -### `pre-entrypoint` - -**可选** 允许您在 `entrypoint` 操作开始之前运行脚本。 例如,您可以使用 `pre-entrypoint:` 运行基本要求设置脚本。 {% data variables.product.prodname_actions %} 使用 `docker run` 启动此操作,并在使用同一基本映像的新容器中运行脚本。 这意味着运行时状态与主 `entrypoint` 容器不同,并且必须在任一工作空间中访问所需的任何状态,`HOME` 或作为 `STATE_` 变量。 `pre-entrypoint:` 操作始终默认运行,但您可以使用 [`pre-if`](#pre-if) 覆盖该设置。 +**可选** 允许您在 `entrypoint` 操作开始之前运行脚本。 例如,您可以使用 `pre-entrypoint:` 运行基本要求设置脚本。 {% data variables.product.prodname_actions %} 使用 `docker run` 启动此操作,并在使用同一基本映像的新容器中运行脚本。 这意味着运行时状态与主 `entrypoint` 容器不同,并且必须在任一工作空间中访问所需的任何状态,`HOME` 或作为 `STATE_` 变量。 The `pre-entrypoint:` action always runs by default but you can override this using [`runs.pre-if`](#runspre-if). The runtime specified with the [`using`](#runsusing) syntax will execute this file. 在此示例中,`pre-entrypoint:` 操作会运行名为 `setup.sh` 的脚本: - - ```yaml runs: using: 'docker' @@ -525,34 +407,23 @@ runs: entrypoint: 'main.sh' ``` - - - ### `runs.image` **必要** 要用作容器来运行操作的 Docker 映像。 值可以是 Docker 基本映像名称、仓库中的本地 `Dockerfile`、Docker Hub 中的公共映像或另一个注册表。 要引用仓库本地的 `Dockerfile`,文件必须命名为 `Dockerfile`,并且您必须使用操作元数据文件的相对路径。 `Docker` 应用程序将执行此文件。 - - ### `runs.env` **可选** 指定要在容器环境中设置的环境变量的键/值映射。 - - ### `runs.entrypoint` **可选** 覆盖 `Dockerfile` 中的 Docker `ENTRYPOINT`,或在未指定时设置它。 当 `Dockerfile` 未指定 `ENTRYPOINT` 或者您想要覆盖 `ENTRYPOINT` 指令时使用 `entrypoint`。 如果您省略 `entrypoint`,您在 Docker `ENTRYPOINT` 指令中指定的命令将执行。 Docker `ENTRYPOINT` 指令有 _shell_ 形式和 _exec_ 形式。 Docker `ENTRYPOINT` 文档建议使用 _exec_ 形式的 `ENTRYPOINT` 指令。 有关 `entrypoint` 如何执行的更多信息,请参阅“[Dockerfile 对 {% data variables.product.prodname_actions %} 的支持](/actions/creating-actions/dockerfile-support-for-github-actions/#entrypoint)”。 - - ### `post-entrypoint` -**可选** 允许您在 `runs.entrypoint` 操作完成后运行清理脚本。 {% data variables.product.prodname_actions %} 使用 `docker run` 来启动此操作。 因为 {% data variables.product.prodname_actions %} 使用同一基本映像在新容器内运行脚本,所以运行时状态与主 `entrypoint` 容器不同。 您可以在任一工作空间中访问所需的任何状态,`HOME` 或作为 `STATE_` 变量。 `post-entrypoint:` 操作始终默认运行,但您可以使用 [`post-if`](#post-if) 覆盖该设置。 - - +**可选** 允许您在 `runs.entrypoint` 操作完成后运行清理脚本。 {% data variables.product.prodname_actions %} 使用 `docker run` 来启动此操作。 因为 {% data variables.product.prodname_actions %} 使用同一基本映像在新容器内运行脚本,所以运行时状态与主 `entrypoint` 容器不同。 您可以在任一工作空间中访问所需的任何状态,`HOME` 或作为 `STATE_` 变量。 The `post-entrypoint:` action always runs by default but you can override this using [`runs.post-if`](#runspost-if). ```yaml runs: @@ -564,9 +435,6 @@ runs: post-entrypoint: 'cleanup.sh' ``` - - - ### `runs.args` **可选** 定义 Docker 容器输入的字符串数组。 输入可包含硬编码的字符串。 {% data variables.product.prodname_dotcom %} 在容器启动时将 `args` 传递到容器的 `ENTRYPOINT`。 @@ -579,13 +447,9 @@ runs: 有关将 `CMD` 指令与 {% data variables.product.prodname_actions %} 一起使用的更多信息,请参阅“[Dockerfile 对 {% data variables.product.prodname_actions %} 的支持](/actions/creating-actions/dockerfile-support-for-github-actions/#cmd)”。 - - -#### 示例 +#### Example: Defining arguments for the Docker container {% raw %} - - ```yaml runs: using: 'docker' @@ -595,21 +459,13 @@ runs: - 'foo' - 'bar' ``` - - {% endraw %} - - ## `branding` 您可以使用颜色和 [Feather](https://feathericons.com/) 图标创建徽章,以个性化和识别操作。 徽章显示在 [{% data variables.product.prodname_marketplace %}](https://github.com/marketplace?type=actions) 中的操作名称旁边。 - - -### 示例 - - +### Example: Configuring branding for an action ```yaml branding: @@ -617,18 +473,18 @@ branding: color: 'green' ``` - - - ### `branding.color` 徽章的背景颜色。 可以是以下之一:`white`、`yellow`、`blue`、`green`、`orange`、`red`、`purple` 或 `gray-dark`。 - - ### `branding.icon` -要使用的 [Feather](https://feathericons.com/) 图标的名称。 +要使用的 [Feather](https://feathericons.com/) 图标的名称。 diff --git a/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect.md b/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect.md index 9d107bfd5d..84aeb6386d 100644 --- a/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect.md +++ b/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect.md @@ -29,7 +29,7 @@ By updating your workflows to use OIDC tokens, you can adopt the following good - **No cloud secrets**: You won't need to duplicate your cloud credentials as long-lived {% data variables.product.prodname_dotcom %} secrets. Instead, you can configure the OIDC trust on your cloud provider, and then update your workflows to request a short-lived access token from the cloud provider through OIDC. - **Authentication and authorization management**: You have more granular control over how workflows can use credentials, using your cloud provider's authentication (authN) and authorization (authZ) tools to control access to cloud resources. -- **Rotating credentials**: With OIDC, your cloud provider issues a short-lived access token that is only valid for a single workflow run, and then automatically expires. +- **Rotating credentials**: With OIDC, your cloud provider issues a short-lived access token that is only valid for a single job, and then automatically expires. ### Getting started with OIDC @@ -38,7 +38,7 @@ The following diagram gives an overview of how {% data variables.product.prodnam ![OIDC diagram](/assets/images/help/images/oidc-architecture.png) 1. In your cloud provider, create an OIDC trust between your cloud role and your {% data variables.product.prodname_dotcom %} workflow(s) that need access to the cloud. -2. Every time your {% data variables.product.prodname_actions %} workflow job runs, {% data variables.product.prodname_dotcom %}'s OIDC Provider auto-generates an OIDC token. This token contains multiple claims to establish a security-hardened and verifiable identity about the specific workflow that is trying to authenticate. +2. Every time your job runs, {% data variables.product.prodname_dotcom %}'s OIDC Provider auto-generates an OIDC token. This token contains multiple claims to establish a security-hardened and verifiable identity about the specific workflow that is trying to authenticate. 3. You could include a step or action in your job to request this token from {% data variables.product.prodname_dotcom %}'s OIDC provider, and present it to the cloud provider. 4. Once the cloud provider successfully validates the claims presented in the token, it then provides a short-lived cloud access token that is available only for the duration of the job. @@ -51,7 +51,7 @@ When you configure your cloud to trust {% data variables.product.prodname_dotcom ### Understanding the OIDC token -Each workflow run requests an OIDC token from {% data variables.product.prodname_dotcom %}'s OIDC provider, which responds with an automatically generated JSON web token (JWT) that is unique for each workflow job where it is generated. During a workflow run, the OIDC token is presented to the cloud provider. To validate the token, the cloud provider checks if the OIDC token's subject and other claims are a match for the conditions that were preconfigured on the cloud role's OIDC trust definition. +Each job requests an OIDC token from {% data variables.product.prodname_dotcom %}'s OIDC provider, which responds with an automatically generated JSON web token (JWT) that is unique for each workflow job where it is generated. When the job runs, the OIDC token is presented to the cloud provider. To validate the token, the cloud provider checks if the OIDC token's subject and other claims are a match for the conditions that were preconfigured on the cloud role's OIDC trust definition. The following example OIDC token uses a subject (`sub`) that references a job environment named `prod` in the `octo-org/octo-repo` repository. @@ -147,7 +147,7 @@ In addition, your cloud provider could allow you to assign a role to the access ### 示例 -The following examples demonstrate how to use "Subject" as a condition. The [subject](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims) uses information from the workflow run's [`job` context](/actions/learn-github-actions/contexts#job-context), and instructs your cloud provider that access token requests may only be granted for requests from workflows running in specific branches, environments. The following sections describe some common subjects you can use. +The following examples demonstrate how to use "Subject" as a condition. The [subject](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims) uses information from the [`job` context](/actions/learn-github-actions/contexts#job-context), and instructs your cloud provider that access token requests may only be granted for requests from workflows running in specific branches, environments. The following sections describe some common subjects you can use. #### Filtering for a specific environment @@ -217,6 +217,10 @@ You could also use a `curl` command to request the JWT, using the following envi curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" "$ACTIONS_ID_TOKEN_REQUEST_URL&audience=api://AzureADTokenExchange" ``` +### Adding permissions settings + +{% data reusables.actions.oidc-permissions-token %} + ## Updating your workflows for OIDC You can now update your YAML workflows to use OIDC access tokens instead of secrets. Popular cloud providers have published their official login actions that make it easy for you to get started with OIDC. For more information about updating your workflows, see the cloud-specific guides listed below in "[Enabling OpenID Connect for your cloud provider](#enabling-openid-connect-for-your-cloud-provider)." diff --git a/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services.md b/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services.md index 4558591372..df9ff468e3 100644 --- a/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services.md +++ b/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services.md @@ -56,14 +56,7 @@ To update your workflows for OIDC, you will need to make two changes to your YAM ### Adding permissions settings -The workflow will require a `permissions` setting with a defined [`id-token`](/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token) value. If you only need to fetch an OIDC token for a single job, then this permission can be set within that job. 例如: - -```yaml{:copy} -permissions: - id-token: write -``` - -You may need to specify additional permissions here, depending on your workflow's requirements. + {% data reusables.actions.oidc-permissions-token %} ### Requesting the access token @@ -93,7 +86,7 @@ jobs: - name: Git clone the repository uses: actions/checkout@v2 - name: configure aws credentials - uses: aws-actions/configure-aws-credentials@master + uses: aws-actions/configure-aws-credentials@v1 with: role-to-assume: arn:aws:iam::1234567890:role/example-role role-session-name: samplerolesession diff --git a/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure.md b/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure.md index 02cdcfad4a..ee6c4342fa 100644 --- a/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure.md +++ b/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure.md @@ -50,14 +50,7 @@ To update your workflows for OIDC, you will need to make two changes to your YAM ### Adding permissions settings -The workflow will require a `permissions` setting with a defined [`id-token`](/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token) value. If you only need to fetch an OIDC token for a single job, then this permission can be set within that job. 例如: - -```yaml{:copy} -permissions: - id-token: write -``` - -You may need to specify additional permissions here, depending on your workflow's requirements. + {% data reusables.actions.oidc-permissions-token %} ### Requesting the access token diff --git a/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-cloud-providers.md b/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-cloud-providers.md index ec4cab634d..d0823e7108 100644 --- a/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-cloud-providers.md +++ b/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-cloud-providers.md @@ -37,14 +37,7 @@ If your cloud provider doesn't yet offer an official action, you can update your ### Adding permissions settings -The workflow will require a `permissions` setting with a defined [`id-token`](/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token) value. If you only need to fetch an OIDC token for a single job, then this permission can be set within that job. 例如: - -```yaml{:copy} -permissions: - id-token: write -``` - -You may need to specify additional permissions here, depending on your workflow's requirements. + {% data reusables.actions.oidc-permissions-token %} ### Using official actions diff --git a/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-google-cloud-platform.md b/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-google-cloud-platform.md index 040ad59843..068cb10739 100644 --- a/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-google-cloud-platform.md +++ b/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-google-cloud-platform.md @@ -49,14 +49,7 @@ To update your workflows for OIDC, you will need to make two changes to your YAM ### Adding permissions settings -The workflow will require a `permissions` setting with a defined [`id-token`](/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token) value. If you only need to fetch an OIDC token for a single job, then this permission can be set within that job. 例如: - -```yaml{:copy} -permissions: - id-token: write -``` - -You may need to specify additional permissions here, depending on your workflow's requirements. + {% data reusables.actions.oidc-permissions-token %} ### Requesting the access token diff --git a/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-hashicorp-vault.md b/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-hashicorp-vault.md index 90f8d11dcc..e2f45d1934 100644 --- a/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-hashicorp-vault.md +++ b/translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-hashicorp-vault.md @@ -54,14 +54,7 @@ This example demonstrates how to use OIDC with the official action to request a ### Adding permissions settings -The workflow will require a `permissions` setting with a defined [`id-token`](/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token) value. If you only need to fetch an OIDC token for a single job, then this permission can be set within that job. 例如: - -```yaml{:copy} -permissions: - id-token: write -``` - -You may need to specify additional permissions here, depending on your workflow's requirements. + {% data reusables.actions.oidc-permissions-token %} ### Requesting the access token diff --git a/translations/zh-CN/content/actions/hosting-your-own-runners/about-self-hosted-runners.md b/translations/zh-CN/content/actions/hosting-your-own-runners/about-self-hosted-runners.md index 8585b4c622..d2d43e5039 100644 --- a/translations/zh-CN/content/actions/hosting-your-own-runners/about-self-hosted-runners.md +++ b/translations/zh-CN/content/actions/hosting-your-own-runners/about-self-hosted-runners.md @@ -44,7 +44,7 @@ For more information about installing and using self-hosted runners, see "[Addin - Use free minutes on your {% data variables.product.prodname_dotcom %} plan, with per-minute rates applied after surpassing the free minutes. **Self-hosted runners:**{% endif %} -- Receive automatic updates for the self-hosted runner application only. You are responsible for updating the operating system and all other software. +- Receive automatic updates for the self-hosted runner application only{% ifversion fpt or ghec or ghes > 3.2 %}, though you may disable automatic updates of the runner. For more information about controlling runner software updates on self-hosted runners, see "[Autoscaling with self-hosted runners](/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners#controlling-runner-software-updates-on-self-hosted-runners)."{% else %}.{% endif %} You are responsible for updating the operating system and all other software. - Can use cloud services or local machines that you already pay for. - Are customizable to your hardware, operating system, software, and security requirements. - Don't need to have a clean instance for every job execution. @@ -55,7 +55,7 @@ For more information about installing and using self-hosted runners, see "[Addin You can use any machine as a self-hosted runner as long at it meets these requirements: * You can install and run the self-hosted runner application on the machine. For more information, see "[Supported architectures and operating systems for self-hosted runners](#supported-architectures-and-operating-systems-for-self-hosted-runners)." -* The machine can communicate with {% data variables.product.prodname_actions %}. For more information, see "[Communication between self-hosted runners and {% data variables.product.prodname_dotcom %}](#communication-between-self-hosted-runners-and-github)." +* The machine can communicate with {% data variables.product.prodname_actions %}. For more information, see "[Communication between self-hosted runners and {% data variables.product.product_name %}](#communication-requirements)." * The machine has enough hardware resources for the type of workflows you plan to run. The self-hosted runner application itself only requires minimal resources. * If you want to run workflows that use Docker container actions or service containers, you must use a Linux machine and Docker must be installed. @@ -125,6 +125,8 @@ Some extra configuration might be required to use actions from {% data variables {% endif %} + + ## Communication between self-hosted runners and {% data variables.product.product_name %} The self-hosted runner polls {% data variables.product.product_name %} to retrieve application updates and to check if any jobs are queued for processing. The self-hosted runner uses a HTTPS _long poll_ that opens a connection to {% data variables.product.product_name %} for 50 seconds, and if no response is received, it then times out and creates a new long poll. The application must be running on the machine to accept and run {% data variables.product.prodname_actions %} jobs. diff --git a/translations/zh-CN/content/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners.md b/translations/zh-CN/content/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners.md index 78078cc6b8..2103cc051a 100644 --- a/translations/zh-CN/content/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners.md +++ b/translations/zh-CN/content/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners.md @@ -27,12 +27,12 @@ The following repositories have detailed instructions for setting up these autos Each solution has certain specifics that may be important to consider: -| **功能** | **actions-runner-controller** | **terraform-aws-github-runner** | -|:------------------------------ |:---------------------------------------------------------------------------------- |:--------------------------------------------------------------------- | -| Runtime | Kubernetes | Linux and Windows VMs | -| Supported Clouds | Azure, Amazon Web Services, Google Cloud Platform, on-premises | Amazon Web Services | -| Where runners can be scaled | Enterprise, organization, and repository levels. By runner label and runner group. | Organization and repository levels. By runner label and runner group. | -| Pull-based autoscaling support | 是 | 否 | +| **功能** | **actions-runner-controller** | **terraform-aws-github-runner** | +|:--------------------------- |:---------------------------------------------------------------------------------- |:--------------------------------------------------------------------- | +| Runtime | Kubernetes | Linux and Windows VMs | +| Supported Clouds | Azure, Amazon Web Services, Google Cloud Platform, on-premises | Amazon Web Services | +| Where runners can be scaled | Enterprise, organization, and repository levels. By runner label and runner group. | Organization and repository levels. By runner label and runner group. | +| How runners can be scaled | Webhook events, Scheduled, Pull-based | Webhook events, Scheduled (org-level runners only) | ## Using ephemeral runners for autoscaling @@ -42,8 +42,8 @@ This approach allows you to manage your runners as ephemeral systems, since you To add an ephemeral runner to your environment, include the `--ephemeral` parameter when registering your runner using `config.sh`. 例如: -``` -$ ./config.sh --url https://github.com/octo-org --token example-token --ephemeral +```shell +./config.sh --url https://github.com/octo-org --token example-token --ephemeral ``` The {% data variables.product.prodname_actions %} service will then automatically de-register the runner after it has processed one job. You can then create your own automation that wipes the runner after it has been de-registered. @@ -54,6 +54,28 @@ The {% data variables.product.prodname_actions %} service will then automaticall {% endnote %} +## Controlling runner software updates on self-hosted runners + +By default, self-hosted runners will automatically perform a software update whenever a new version of the runner software is available. If you use ephemeral runners in containers then this can lead to repeated software updates when a new runner version is released. Turning off automatic updates allows you to update the runner version on the container image directly on your own schedule. + +If you want to turn off automatic software updates and install software updates yourself, you can specify the `--disableupdate` parameter when starting the runner. 例如: + +```shell +./run.sh --disableupdate +``` + +If you disable automatic updates, you must still update your runner version regularly. New functionality in {% data variables.product.prodname_actions %} requires changes in both the {% data variables.product.prodname_actions %} service _and_ the runner software. The runner may not be able to correctly process jobs that take advantage of new features in {% data variables.product.prodname_actions %} without a software update. + +If you disable automatic updates, you will be required to update your runner version within 30 days of a new version being made available. You may want to subscribe to notifications for releases in the [`actions/runner` repository](https://github.com/actions/runner/releases). 更多信息请参阅“[配置通知](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/configuring-notifications#about-custom-notifications)”。 + +For instructions on how to install the latest runner version, see the installation instructions for [the latest release](https://github.com/actions/runner/releases). + +{% note %} + +**Note:** If you do not perform a software update within 30 days, the {% data variables.product.prodname_actions %} service will not queue jobs to your runner. In addition, if a critical security update is required, the {% data variables.product.prodname_actions %} service will not queue jobs to your runner until it has been updated. + +{% endnote %} + ## Using webhooks for autoscaling You can create your own autoscaling environment by using payloads received from the [`workflow_job`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#workflow_job) webhook. This webhook is available at the repository, organization, and enterprise levels, and the payload for this event contains an `action` key that corresponds to the stages of a workflow job's life-cycle; for example when jobs are `queued`, `in_progress`, and `completed`. You must then create your own scaling automation in response to these webhook payloads. diff --git a/translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md b/translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md index 1de5cdf6e1..8621853dcd 100644 --- a/translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md +++ b/translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md @@ -33,6 +33,38 @@ shortTitle: Monitor & troubleshoot * **Active**: The runner is currently executing a job. * **Offline**: The runner is not connected to {% data variables.product.product_name %}. This could be because the machine is offline, the self-hosted runner application is not running on the machine, or the self-hosted runner application cannot communicate with {% data variables.product.product_name %}. +## Checking self-hosted runner network connectivity + +You can use the self-hosted runner application's `run` script with the `--check` parameter to check that a self-hosted runner can access all required network services on {% data variables.product.product_location %}. + +In addition to `--check`, you must provide two arguments to the script: + +* `--url` with the URL to your {% data variables.product.company_short %} repository, organization, or enterprise. For example, `--url https://github.com/octo-org/octo-repo`. +* `--pat` with the value of a personal access token, which must have the `workflow` scope. For example, `--pat ghp_abcd1234`. For more information, see "[Creating a personal access token](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)." + +For example: + +{% mac %} + +{% data reusables.github-actions.self-hosted-runner-check-mac-linux %} + +{% endmac %} +{% linux %} + +{% data reusables.github-actions.self-hosted-runner-check-mac-linux %} + +{% endlinux %} +{% windows %} + +```shell +run.cmd --check --url https://github.com/octo-org/octo-repo --pat ghp_abcd1234 +``` + +{% endwindows %} + +The script tests each service, and outputs either a `PASS` or `FAIL` for each one. If you have any failing checks, you can see more details on the problem in the log file for the check. The log files are located in the `_diag` directory where you installed the runner application, and the path of the log file for each check is shown in the console output of the script. + +If you have any failing checks, you should also verify that your self-hosted runner machine meets all the communication requirements. For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#communication-requirements)." ## Reviewing the self-hosted runner application log files diff --git a/translations/zh-CN/content/actions/index.md b/translations/zh-CN/content/actions/index.md index c9ad4e1078..c9c954e663 100644 --- a/translations/zh-CN/content/actions/index.md +++ b/translations/zh-CN/content/actions/index.md @@ -32,7 +32,6 @@ featuredLinks: - title: GitHub Actions in action – Karan MV href: 'https://www.youtube-nocookie.com/embed/4SWO0Pc76CU' videosHeading: GitHub Universe 2021 videos -examples_source: data/product-examples/actions/code-examples.yml product_video: 'https://www.youtube-nocookie.com/embed/cP0I9w2coGU' redirect_from: - /articles/automating-your-workflow-with-github-actions diff --git a/translations/zh-CN/content/actions/learn-github-actions/contexts.md b/translations/zh-CN/content/actions/learn-github-actions/contexts.md index aa5311e698..fbbfb90a44 100644 --- a/translations/zh-CN/content/actions/learn-github-actions/contexts.md +++ b/translations/zh-CN/content/actions/learn-github-actions/contexts.md @@ -393,7 +393,7 @@ The `steps` context contains information about the steps in the current job that | 属性名称 | 类型 | 描述 | | --------------------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `steps` | `对象` | 此上下文针对作业中的每个步骤而改变。 您可以从作业中的任何步骤访问此上下文。 This object contains all the properties listed below. | -| `steps..outputs` | `对象` | 为步骤定义的输出集。 更多信息请参阅“[{% data variables.product.prodname_actions %} 的元数据语法](/articles/metadata-syntax-for-github-actions#outputs)”。 | +| `steps..outputs` | `对象` | 为步骤定义的输出集。 For more information, see "[Metadata syntax for {% data variables.product.prodname_actions %}](/articles/metadata-syntax-for-github-actions#outputs-for-docker-container-and-javascript-actions)." | | `steps..conclusion` | `字符串` | 在 [`continue-on-error`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error) 应用之后完成的步骤的结果。 可能的值包括 `success`、`failure`、`cancelled` 或 `skipped`。 当 `continue-on-error` 步骤失败时,`outcome` 为 `failure`,但最终的 `conclusion` 为 `success`。 | | `steps..outcome` | `字符串` | 在 [`continue-on-error`](/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepscontinue-on-error) 应用之前完成的步骤的结果。 可能的值包括 `success`、`failure`、`cancelled` 或 `skipped`。 当 `continue-on-error` 步骤失败时,`outcome` 为 `failure`,但最终的 `conclusion` 为 `success`。 | | `steps..outputs.` | `字符串` | 特定输出的值。 | diff --git a/translations/zh-CN/content/actions/learn-github-actions/expressions.md b/translations/zh-CN/content/actions/learn-github-actions/expressions.md index 07bd7e05f7..0dc15fcbc3 100644 --- a/translations/zh-CN/content/actions/learn-github-actions/expressions.md +++ b/translations/zh-CN/content/actions/learn-github-actions/expressions.md @@ -268,9 +268,15 @@ jobs: `hashFiles('**/package-lock.json', '**/Gemfile.lock')` + +{% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %} ## 状态检查函数 您可以使用以下状态检查函数作为 `if` 条件中的表达式。 除非您包含其中一个函数,否则 `success()` 的默认状态检查将会应用。 For more information about `if` conditionals, see "[Workflow syntax for GitHub Actions](/articles/workflow-syntax-for-github-actions/#jobsjob_idif)" and "[Metadata syntax for GitHub Composite Actions](/actions/creating-actions/metadata-syntax-for-github-actions/#runsstepsif)". +{% else %} +## Check Functions +您可以使用以下状态检查函数作为 `if` 条件中的表达式。 除非您包含其中一个函数,否则 `success()` 的默认状态检查将会应用。 For more information about `if` conditionals, see "[Workflow syntax for GitHub Actions](/articles/workflow-syntax-for-github-actions/#jobsjob_idif)". +{% endif %} ### success @@ -318,6 +324,7 @@ steps: if: {% raw %}${{ failure() }}{% endraw %} ``` +{% ifversion fpt or ghes > 3.3 or ghae-issue-5504 or ghec %} ### Evaluate Status Explicitly Instead of using one of the methods above, you can evaluate the status of the job or composite action that is executing the step directly: @@ -343,6 +350,7 @@ steps: ``` This is the same as using `if: failure()` in a composite action step. +{% endif %} ## 对象过滤器 diff --git a/translations/zh-CN/content/actions/learn-github-actions/finding-and-customizing-actions.md b/translations/zh-CN/content/actions/learn-github-actions/finding-and-customizing-actions.md index 074863bba3..a3e7f19973 100644 --- a/translations/zh-CN/content/actions/learn-github-actions/finding-and-customizing-actions.md +++ b/translations/zh-CN/content/actions/learn-github-actions/finding-and-customizing-actions.md @@ -47,6 +47,8 @@ topics: You can add an action to your workflow by referencing the action in your workflow file. +You can view the actions referenced in your {% data variables.product.prodname_actions %} workflows as dependencies in the dependency graph of the repository containing your workflows. For more information, see “[About the dependency graph](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph).” + ### Adding an action from {% data variables.product.prodname_marketplace %} 操作的列表页包括操作的版本以及使用操作所需的工作流程语法。 为使工作流程在操作有更新时也保持稳定,您可以在工作流程文件中指定 Git 或 Docker 标记号以引用所用操作的版本。 diff --git a/translations/zh-CN/content/actions/learn-github-actions/understanding-github-actions.md b/translations/zh-CN/content/actions/learn-github-actions/understanding-github-actions.md index c5e0e13e23..d983f2f1db 100644 --- a/translations/zh-CN/content/actions/learn-github-actions/understanding-github-actions.md +++ b/translations/zh-CN/content/actions/learn-github-actions/understanding-github-actions.md @@ -255,3 +255,8 @@ To understand how billing works for {% data variables.product.prodname_actions % ## 联系支持 {% data reusables.github-actions.contacting-support %} + +## 延伸阅读 + +{% ifversion ghec or ghes or ghae %} +- "[About {% data variables.product.prodname_actions %} for enterprises](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)"{% endif %} diff --git a/translations/zh-CN/content/actions/learn-github-actions/usage-limits-billing-and-administration.md b/translations/zh-CN/content/actions/learn-github-actions/usage-limits-billing-and-administration.md index 73251e1496..d991634b40 100644 --- a/translations/zh-CN/content/actions/learn-github-actions/usage-limits-billing-and-administration.md +++ b/translations/zh-CN/content/actions/learn-github-actions/usage-limits-billing-and-administration.md @@ -18,16 +18,23 @@ shortTitle: 工作流程计费和限制 ## 关于 {% data variables.product.prodname_actions %} 的计费 +{% data reusables.repositories.about-github-actions %} For more information, see "[Understanding {% data variables.product.prodname_actions %}](/actions/learn-github-actions/understanding-github-actions){% ifversion fpt %}."{% elsif ghes or ghec %}" and "[About {% data variables.product.prodname_actions %} for enterprises](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)."{% endif %} + {% ifversion fpt or ghec %} {% data reusables.github-actions.actions-billing %} 更多信息请参阅“[关于 {% data variables.product.prodname_actions %} 的计费](/billing/managing-billing-for-github-actions/about-billing-for-github-actions)”。 {% else %} -GitHub Actions usage is free for {% data variables.product.prodname_ghe_server %}s that use self-hosted runners. +GitHub Actions usage is free for {% data variables.product.prodname_ghe_server %} instances that use self-hosted runners. 更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners)”。 {% endif %} + +{% ifversion fpt or ghec %} + ## 可用性 {% data variables.product.prodname_actions %} is available on all {% data variables.product.prodname_dotcom %} products, but {% data variables.product.prodname_actions %} is not available for private repositories owned by accounts using legacy per-repository plans. {% data reusables.gated-features.more-info %} +{% endif %} + ## 使用限制 {% ifversion fpt or ghec %} diff --git a/translations/zh-CN/content/actions/migrating-to-github-actions/migrating-from-jenkins-to-github-actions.md b/translations/zh-CN/content/actions/migrating-to-github-actions/migrating-from-jenkins-to-github-actions.md index 81510efac2..12d0714427 100644 --- a/translations/zh-CN/content/actions/migrating-to-github-actions/migrating-from-jenkins-to-github-actions.md +++ b/translations/zh-CN/content/actions/migrating-to-github-actions/migrating-from-jenkins-to-github-actions.md @@ -63,7 +63,7 @@ Jenkins 使用指令来管理 _Declarative Pipelines_。 这些指令定义工 | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [`environment`](https://jenkins.io/doc/book/pipeline/syntax/#environment) | [`jobs..env`](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#env)
[`jobs..steps[*].env`](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstepsenv) | | [`options`](https://jenkins.io/doc/book/pipeline/syntax/#parameters) | [`jobs..strategy`](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategy)
[`jobs..strategy.fail-fast`](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idstrategyfail-fast)
[`jobs..timeout-minutes`](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idtimeout-minutes) | -| [`parameters`](https://jenkins.io/doc/book/pipeline/syntax/#parameters) | [`inputs`](/actions/creating-actions/metadata-syntax-for-github-actions#inputs)
[`outputs`](/actions/creating-actions/metadata-syntax-for-github-actions#outputs) | +| [`parameters`](https://jenkins.io/doc/book/pipeline/syntax/#parameters) | [`inputs`](/actions/creating-actions/metadata-syntax-for-github-actions#inputs)
[`outputs`](/actions/creating-actions/metadata-syntax-for-github-actions#outputs-for-docker-container-and-javascript-actions) | | [`triggers`](https://jenkins.io/doc/book/pipeline/syntax/#triggers) | [`on`](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#on)
[`on..types`](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onevent_nametypes)
[on..](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore)
[on..](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore)
[on..paths](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore) | | [`triggers { upstreamprojects() }`](https://jenkins.io/doc/book/pipeline/syntax/#triggers) | [`jobs..needs`](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#jobsjob_idneeds) | | [Jenkins cron syntax](https://jenkins.io/doc/book/pipeline/syntax/#cron-syntax) | [`on.schedule`](/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions#onschedule) | diff --git a/translations/zh-CN/content/actions/security-guides/automatic-token-authentication.md b/translations/zh-CN/content/actions/security-guides/automatic-token-authentication.md index fec3a19e0e..b3415aed02 100644 --- a/translations/zh-CN/content/actions/security-guides/automatic-token-authentication.md +++ b/translations/zh-CN/content/actions/security-guides/automatic-token-authentication.md @@ -80,20 +80,20 @@ jobs: {% ifversion fpt or ghes > 3.1 or ghae or ghec %} 下表显示默认情况下授予 `GITHUB_TOKEN` 的权限。 People with admin permissions to an {% ifversion not ghes %}enterprise, organization, or repository,{% else %}organization or repository{% endif %} can set the default permissions to be either permissive or restricted. For information on how to set the default permissions for the `GITHUB_TOKEN` for your enterprise, organization, or repository, see "[Enforcing policies for {% data variables.product.prodname_actions %} in your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-github-actions-policies-for-your-enterprise#enforcing-a-policy-for-workflow-permissions-in-your-enterprise)," "[Disabling or limiting {% data variables.product.prodname_actions %} for your organization](/github/setting-up-and-managing-organizations-and-teams/disabling-or-limiting-github-actions-for-your-organization#setting-the-permissions-of-the-github_token-for-your-organization)," or "[Managing {% data variables.product.prodname_actions %} settings for a repository](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#setting-the-permissions-of-the-github_token-for-your-repository)." -| 作用域 | 默认访问
(允许) | 默认访问
(限制) | 复刻的仓库的最大访问权限
| -| ------------------- | ------------------ | ------------------ | ---------------------- | -| 操作 | 读/写 | 无 | 读取 | -| 检查 | 读/写 | 无 | 读取 | -| 内容 | 读/写 | 读取 | 读取 | -| 部署 | 读/写 | 无 | 读取 | -| id-token | 读/写 | 无 | 读取 | -| 议题 | 读/写 | 无 | 读取 | -| 元数据 | 读取 | 读取 | 读取 | -| 包 | 读/写 | 无 | 读取 | -| pull-requests | 读/写 | 无 | 读取 | -| repository-projects | 读/写 | 无 | 读取 | -| security-events | 读/写 | 无 | 读取 | -| 状态 | 读/写 | 无 | 读取 | +| 作用域 | 默认访问
(允许) | 默认访问
(限制) | 复刻的仓库的最大访问权限
| +| -------- | ------------------ | ------------------ | ---------------------- | +| 操作 | 读/写 | 无 | 读取 | +| 检查 | 读/写 | 无 | 读取 | +| 内容 | 读/写 | 读取 | 读取 | +| 部署 | 读/写 | 无 | 读取 | +| id-token | 读/写 | 无 | 读取 | +| 议题 | 读/写 | 无 | 读取 | +| 元数据 | 读取 | 读取 | 读取 | +| 包 | 读/写 | 无 | 读取 | +{%- ifversion fpt or ghec or ghes > 3.2 or ghae-issue-6187 %} +| pages | read/write | none | read | +{%- endif %} +| pull-requests | read/write | none | read | | repository-projects | read/write | none | read | | security-events | read/write | none | read | | statuses | read/write | none | read | {% else %} | 作用域 | 访问类型 | 通过复刻的仓库访问 | | ------------------- | ---- | --------- | diff --git a/translations/zh-CN/content/actions/security-guides/encrypted-secrets.md b/translations/zh-CN/content/actions/security-guides/encrypted-secrets.md index adeebbf68d..2ac8378243 100644 --- a/translations/zh-CN/content/actions/security-guides/encrypted-secrets.md +++ b/translations/zh-CN/content/actions/security-guides/encrypted-secrets.md @@ -354,3 +354,50 @@ steps: run: cat $HOME/secrets/my_secret.json ``` {% endraw %} + + +## Storing Base64 binary blobs as secrets + +You can use Base64 encoding to store small binary blobs as secrets. You can then reference the secret in your workflow and decode it for use on the runner. For the size limits, see ["Limits for secrets"](/actions/security-guides/encrypted-secrets#limits-for-secrets). + +{% note %} + +**Note**: Note that Base64 only converts binary to text, and is not a substitute for actual encryption. + +{% endnote %} + +1. Use `base64` to encode your file into a Base64 string. 例如: + + ``` + $ base64 -i cert.der -o cert.base64 + ``` + +1. Create a secret that contains the Base64 string. 例如: + + ``` + $ gh secret set CERTIFICATE_BASE64 < cert.base64 + ✓ Set secret CERTIFICATE_BASE64 for octocat/octorepo + ``` + +1. To access the Base64 string from your runner, pipe the secret to `base64 --decode`. 例如: + + ```yaml + name: Retrieve Base64 secret + on: + push: + branches: [ octo-branch ] + jobs: + decode-secret: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Retrieve the secret and decode it to a file + env: + {% raw %}CERTIFICATE_BASE64: ${{ secrets.CERTIFICATE_BASE64 }}{% endraw %} + run: | + echo $CERTIFICATE_BASE64 | base64 --decode > cert.der + - name: Show certificate information + run: | + openssl x509 -in cert.der -inform DER -text -noout + ``` + diff --git a/translations/zh-CN/content/actions/using-workflows/events-that-trigger-workflows.md b/translations/zh-CN/content/actions/using-workflows/events-that-trigger-workflows.md index 7537d48ba4..19f48598a8 100644 --- a/translations/zh-CN/content/actions/using-workflows/events-that-trigger-workflows.md +++ b/translations/zh-CN/content/actions/using-workflows/events-that-trigger-workflows.md @@ -16,193 +16,9 @@ versions: shortTitle: 触发工作流程的事件 --- -{% data reusables.actions.enterprise-beta %} -{% data reusables.actions.enterprise-github-hosted-runners %} +## About events that trigger workflows -## About workflow triggers - -Workflow triggers are events that cause a workflow to run. These events can be: - -- Events that occur in your workflow's repository -- Events that occur outside of {% data variables.product.product_name %} and trigger a `repository_dispatch` event on {% data variables.product.product_name %} -- Scheduled times -- Manual - -For example, you can configure your workflow to run when a push is made to the default branch of your repository, when a release is created, or when an issue is opened. - -Workflow triggers are defined with the `on` key. 更多信息请参阅“[{% data variables.product.prodname_actions %} 的工作流程语法](/articles/workflow-syntax-for-github-actions#on)”。 - -以下步骤将触发工作流程运行: - -1. An event occurs on your repository. The event has an associated commit SHA and Git ref. -1. {% data variables.product.product_name %} searches the `.github/workflows` directory in your repository for workflow files that are present in the associated commit SHA or Git ref of the event. - -1. A workflow run is triggered for any workflows that have `on:` values that match the triggering event. Some events also require the workflow file to be present on the default branch of the repository in order to run. - - Each workflow run will use the version of the workflow that is present in the associated commit SHA or Git ref of the event. 当工作流程运行时,{% data variables.product.product_name %} 会在运行器环境中设置 `GITHUB_SHA`(提交 SHA)和 `GITHUB_REF`(Git 引用)环境变量。 更多信息请参阅“[使用环境变量](/actions/automating-your-workflow-with-github-actions/using-environment-variables)”。 - -### Triggering a workflow from a workflow - -{% data reusables.github-actions.actions-do-not-trigger-workflows %} 更多信息请参阅“[使用 GITHUB_TOKEN 验证身份](/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)”。 - -If you do want to trigger a workflow from within a workflow run, you can use a personal access token instead of `GITHUB_TOKEN` to trigger events that require a token. 您需要创建个人访问令牌并将其存储为密码。 为了最大限度地降低 {% data variables.product.prodname_actions %} 使用成本,请确保不要创建递归或意外的工作流程。 For more information about creating a personal access token, see "[Creating a personal access token](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)." For more information about storing a personal access token as a secret, see "[Creating and storing encrypted secrets](/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets)." - -For example, the following workflow uses a personal access token (stored as a secret called `MY_TOKEN`) to add a label to an issue via {% data variables.product.prodname_cli %}. Any workflows that run when a label is added will run once this step is performed. - -```yaml -on: - issues: - types: - - opened - -jobs: - label_issue: - runs-on: ubuntu-latest - steps: - - env: - GITHUB_TOKEN: {% raw %}${{ secrets.MY_TOKEN }}{% endraw %} - ISSUE_URL: {% raw %}${{ github.event.issue.html_url }}{% endraw %} - run: | - gh issue edit $ISSUE_URL --add-label "triage" -``` - -Conversely, the following workflow uses `GITHUB_TOKEN` to add a label to an issue. It will not trigger any workflows that run when a label is added. - -```yaml -on: - issues: - types: - - opened - -jobs: - label_issue: - runs-on: ubuntu-latest - steps: - - env: - GITHUB_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} - ISSUE_URL: {% raw %}${{ github.event.issue.html_url }}{% endraw %} - run: | - gh issue edit $ISSUE_URL --add-label "triage" -``` - -## Using events to trigger workflows - -Use the `on` key to specify what events trigger your workflow. For more information about events you can use, see "[Available events](#available-events)" below. - -{% data reusables.github-actions.actions-on-examples %} - -## Using event information - -Information about the event that triggered a workflow run is available in the `github.event` context. The properties in the `github.event` context depend on the type of event that triggered the workflow. For example, a workflow triggered when an issue is labeled would have information about the issue and label. - -### Viewing all properties of an event - -Reference the webhook event documentation for common properties and example payloads. 更多信息请参阅“[web 挂钩事件和有效负载](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads)”。 - -You can also print the entire `github.event` context to see what properties are available for the event that triggered your workflow: - -```yaml -jobs: - print_context: - runs-on: ubuntu-latest - steps: - - env: - EVENT_CONTEXT: {% raw %}${{ toJSON(github.event) }}{% endraw %} - run: | - echo $EVENT_CONTEXT -``` - -### Accessing and using event properties - -You can use the `github.event` context in your workflow. For example, the following workflow runs when a pull request that changes `package*.json`, `.github/CODEOWNERS`, or `.github/workflows/**` is opened. If the pull request author (`github.event.pull_request.user.login`) is not `octobot` or `dependabot[bot]`, then the workflow uses the {% data variables.product.prodname_cli %} to label and comment on the pull request (`github.event.pull_request.number`). - -```yaml -on: - pull_request: - types: - - opened - paths: - - '.github/workflows/**' - - '.github/CODEOWNERS' - - 'package*.json' - -jobs: - triage: - if: >- - github.event.pull_request.user.login != 'octobot' && - github.event.pull_request.user.login != 'dependabot[bot]' - runs-on: ubuntu-latest - steps: - - name: "Comment about changes we can't accept" - env: - GITHUB_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} - PR: {% raw %}${{ github.event.pull_request.html_url }}{% endraw %} - run: | - gh pr edit $PR --add-label 'invalid' - gh pr comment $PR --body 'It looks like you edited `package*.json`, `.github/CODEOWNERS`, or `.github/workflows/**`. We do not allow contributions to these files. Please review our [contributing guidelines](https://github.com/octo-org/octo-repo/blob/main/CONTRIBUTING.md) for what contributions are accepted.' -``` - -For more information about contexts, see "[Contexts](/actions/learn-github-actions/contexts)." For more information about event payloads, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads)." - -## Further controlling how your workflow will run - -If you want more granular control than events, event activity types, or event filters provide, you can use conditionals{% ifversion fpt or ghae or ghes > 3.1 or ghec %} and environments{% endif %} to control whether individual jobs or steps in your workflow will run. - -### Using conditionals - -You can use conditionals to further control whether jobs or steps in your workflow will run. For example, if you want the workflow to run when a specific label is added to an issue, you can trigger on the `issues labeled` event activity type and use a conditional to check what label triggered the workflow. The following workflow will run when any label is added to an issue in the workflow's repository, but the `run_if_label_matches` job will only execute if the label is named `bug`. - -```yaml -on: - issues: - types: - - labeled - -jobs: - run_if_label_matches: - if: github.event.label.name == 'bug' - runs-on: ubuntu-latest - steps: - - run: echo 'The label was bug' -``` - -For more information, see "[Expressions](/actions/learn-github-actions/expressions)." - -{% ifversion fpt or ghae or ghes > 3.1 or ghec %} -### Using environments to manually trigger workflow jobs - -If you want to manually trigger a specific job in a workflow, you can use an environment that requires approval from a specific team or user. First, configure an environment with required reviewers. For more information, see "[Using environments for deployment](/actions/deployment/targeting-different-environments/using-environments-for-deployment)." Then, reference the environment name in a job in your workflow using the `environment:` key. Any job referencing the environment will not run until at least one reviewer approves the job. - -For example, the following workflow will run whenever there is a push to main. The `build` job will always run. The `publish` job will only run after the `build` job successfully completes (due to `needs: [build]`) and after all of the rules (including required reviewers) for the environment called `production` pass (due to `environment: production`). - -```yaml -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: build - echo 'building' - - publish: - needs: [build] - runs-on: ubuntu-latest - environment: production - steps: - - name: publish - echo 'publishing' -``` - -{% note %} - -{% data reusables.gated-features.environments %} - -{% endnote %} -{% endif %} +Workflow triggers are events that cause a workflow to run. For more information about how to use workflow triggers, see "[Triggering a workflow](/actions/using-workflows/triggering-a-workflow)." ## Available events @@ -794,7 +610,7 @@ jobs: #### Running your workflow based on the head or base branch of a pull request -You can use the `branches` or `branches-ignore` filter to configure your workflow to only run on pull requests that target specific branches. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore)." +You can use the `branches` or `branches-ignore` filter to configure your workflow to only run on pull requests that target specific branches. 更多信息请参阅“[GitHub Actions 的工作流程语法](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore)”。 For example, this workflow will run when someone opens a pull request that targets a branch whose name starts with `releases/`: @@ -841,7 +657,7 @@ jobs: #### Running your workflow based on files changed in a pull request -You can also configure your workflow to run when a pull request changes specific files. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)." +You can also configure your workflow to run when a pull request changes specific files. 更多信息请参阅“[GitHub Actions 的工作流程语法](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)”。 For example, this workflow will run when a pull request includes a change to a JavaScript file (`.js`): @@ -978,7 +794,7 @@ on: #### Running your workflow based on the head or base branch of a pull request -You can use the `branches` or `branches-ignore` filter to configure your workflow to only run on pull requests that target specific branches. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore)." +You can use the `branches` or `branches-ignore` filter to configure your workflow to only run on pull requests that target specific branches. 更多信息请参阅“[GitHub Actions 的工作流程语法](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore)”。 For example, this workflow will run when someone opens a pull request that targets a branch whose name starts with `releases/`: @@ -1025,7 +841,7 @@ jobs: #### Running your workflow based on files changed in a pull request -You can use the `paths` or `paths-ignore` filter to configure your workflow to run when a pull request changes specific files. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)." +You can use the `paths` or `paths-ignore` filter to configure your workflow to run when a pull request changes specific files. 更多信息请参阅“[GitHub Actions 的工作流程语法](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)”。 For example, this workflow will run when a pull request includes a change to a JavaScript file (`.js`): @@ -1082,7 +898,7 @@ on: #### Running your workflow only when a push to specific branches occurs -You can use the `branches` or `branches-ignore` filter to configure your workflow to only run when specific branches are pushed. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore)." +You can use the `branches` or `branches-ignore` filter to configure your workflow to only run when specific branches are pushed. 更多信息请参阅“[GitHub Actions 的工作流程语法](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore)”。 For example, this workflow will run when someone pushes to `main` or to a branch that starts with `releases/`. @@ -1113,7 +929,7 @@ on: #### Running your workflow only when a push of specific tags occurs -You can use the `tags` or `tags-ignore` filter to configure your workflow to only run when specific tags or are pushed. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore)." +You can use the `tags` or `tags-ignore` filter to configure your workflow to only run when specific tags or are pushed. 更多信息请参阅“[GitHub Actions 的工作流程语法](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushbranchestagsbranches-ignoretags-ignore)”。 For example, this workflow will run when someone pushes a tag that starts with `v1.`. @@ -1126,7 +942,7 @@ on: #### Running your workflow only when a push affects specific files -You can use the `paths` or `paths-ignore` filter to configure your workflow to run when a push to specific files occurs. For more information, see "[Workflow syntax for GitHub Actions](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)." +You can use the `paths` or `paths-ignore` filter to configure your workflow to run when a push to specific files occurs. 更多信息请参阅“[GitHub Actions 的工作流程语法](/actions/learn-github-actions/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore)”。 For example, this workflow will run when someone pushes a change to a JavaScript file (`.js`): @@ -1168,7 +984,7 @@ on: {% data reusables.github-actions.branch-requirement %} -Runs your workflow when activity related to {% data variables.product.prodname_registry %} occurs in your repository. For more information, see "[{% data variables.product.prodname_registry %} Documentation](/packages)." +Runs your workflow when activity related to {% data variables.product.prodname_registry %} occurs in your repository. 更多信息请参阅“[{% data variables.product.prodname_registry %} 文档](/packages)”。 例如,您可以在软件包为 `published` 时运行工作流程。 @@ -1220,7 +1036,7 @@ on: {% data reusables.github-actions.branch-requirement %} -You can use the {% data variables.product.product_name %} API to trigger a webhook event called [`repository_dispatch`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#repository_dispatch) when you want to trigger a workflow for activity that happens outside of {% data variables.product.product_name %}. 更多信息请参阅“[创建仓库调度事件](/rest/reference/repos#create-a-repository-dispatch-event)”。 +当您想要触发在 {% data variables.product.product_name %} 外发生的活动的工作流程时,可以使用 {% data variables.product.product_name %} API 触发名为 [`repository_dispatch`](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads/#repository_dispatch) 的 web 挂钩事件。 更多信息请参阅“[创建仓库调度事件](/rest/reference/repos#create-a-repository-dispatch-event)”。 When you make a request to create a `repository_dispatch` event, you must specify an `event_type` to describe the activity type. By default, all `repository_dispatch` activity types trigger a workflow to run. You can use the `types` keyword to limit your workflow to run when a specific `event_type` value is sent in the `repository_dispatch` webhook payload. @@ -1371,7 +1187,7 @@ on: | --------------------------- | ---- | --------------------------- | --------------------------- | | Same as the caller workflow | n/a | Same as the caller workflow | Same as the caller workflow | -`workflow_call` is used to indicate that a workflow can be called by another workflow. When a workflow is triggered with the `workflow_call` event, the event playload in the called workflow is the same event payload from the calling workflow. For more information see, "[Reusing workflows](/actions/learn-github-actions/reusing-workflows)." +`workflow_call` is used to indicate that a workflow can be called by another workflow. When a workflow is triggered with the `workflow_call` event, the event payload in the called workflow is the same event payload from the calling workflow. For more information see, "[Reusing workflows](/actions/learn-github-actions/reusing-workflows)." The example below only runs the workflow when it's called from another workflow: diff --git a/translations/zh-CN/content/actions/using-workflows/reusing-workflows.md b/translations/zh-CN/content/actions/using-workflows/reusing-workflows.md index faa456a49e..8a82e0c89d 100644 --- a/translations/zh-CN/content/actions/using-workflows/reusing-workflows.md +++ b/translations/zh-CN/content/actions/using-workflows/reusing-workflows.md @@ -34,6 +34,8 @@ If you reuse a workflow from a different repository, any actions in the called w When a reusable workflow is triggered by a caller workflow, the `github` context is always associated with the caller workflow. The called workflow is automatically granted access to `github.token` and `secrets.GITHUB_TOKEN`. For more information about the `github` context, see "[Context and expression syntax for GitHub Actions](/actions/reference/context-and-expression-syntax-for-github-actions#github-context)." +You can view the reused workflows referenced in your {% data variables.product.prodname_actions %} workflows as dependencies in the dependency graph of the repository containing your workflows. For more information, see “[About the dependency graph](/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph).” + ### Reusable workflows and starter workflows Starter workflows allow everyone in your organization who has permission to create workflows to do so more quickly and easily. When people create a new workflow, they can choose a starter workflow and some or all of the work of writing the workflow will be done for them. Within a starter workflow, you can also reference reusable workflows to make it easy for people to benefit from reusing centrally managed workflow code. If you use a tag or branch name when referencing the reusable workflow, you can ensure that everyone who reuses that workflow will always be using the same YAML code. However, if you reference a reusable workflow by a tag or branch, be sure that you can trust that version of the workflow. For more information, see "[Security hardening for {% data variables.product.prodname_actions %}](/actions/security-guides/security-hardening-for-github-actions#reusing-third-party-workflows)." @@ -110,7 +112,7 @@ You can define inputs and secrets, which can be passed from the caller workflow runs-on: ubuntu-latest environment: production steps: - - uses: ./.github/actions/my-action@v1 + - uses: ./.github/actions/my-action with: username: ${{ inputs.username }} token: ${{ secrets.envPAT }} @@ -151,7 +153,7 @@ jobs: name: Pass input and secrets to my-action runs-on: ubuntu-latest steps: - - uses: ./.github/actions/my-action@v1 + - uses: ./.github/actions/my-action with: username: ${{ inputs.username }} token: ${{ secrets.token }} diff --git a/translations/zh-CN/content/actions/using-workflows/triggering-a-workflow.md b/translations/zh-CN/content/actions/using-workflows/triggering-a-workflow.md index b8d22a819e..4530092d78 100644 --- a/translations/zh-CN/content/actions/using-workflows/triggering-a-workflow.md +++ b/translations/zh-CN/content/actions/using-workflows/triggering-a-workflow.md @@ -12,36 +12,242 @@ topics: - Workflows - CI - CD -miniTocMaxHeadingLevel: 4 +miniTocMaxHeadingLevel: 3 --- {% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -## 概览 +## About workflow triggers -{% data reusables.actions.workflows.section-triggering-a-workflow %} +Workflow triggers are events that cause a workflow to run. These events can be: -## Defining event types +- Events that occur in your workflow's repository +- Events that occur outside of {% data variables.product.product_name %} and trigger a `repository_dispatch` event on {% data variables.product.product_name %} +- Scheduled times +- Manual -{% data reusables.actions.workflows.section-triggering-a-workflow-types %} +For example, you can configure your workflow to run when a push is made to the default branch of your repository, when a release is created, or when an issue is opened. -## 定向特定分支 +Workflow triggers are defined with the `on` key. 更多信息请参阅“[{% data variables.product.prodname_actions %} 的工作流程语法](/articles/workflow-syntax-for-github-actions#on)”。 + +以下步骤将触发工作流程运行: + +1. An event occurs on your repository. The event has an associated commit SHA and Git ref. +1. {% data variables.product.product_name %} searches the `.github/workflows` directory in your repository for workflow files that are present in the associated commit SHA or Git ref of the event. +1. A workflow run is triggered for any workflows that have `on:` values that match the triggering event. Some events also require the workflow file to be present on the default branch of the repository in order to run. + + Each workflow run will use the version of the workflow that is present in the associated commit SHA or Git ref of the event. 当工作流程运行时,{% data variables.product.product_name %} 会在运行器环境中设置 `GITHUB_SHA`(提交 SHA)和 `GITHUB_REF`(Git 引用)环境变量。 更多信息请参阅“[使用环境变量](/actions/automating-your-workflow-with-github-actions/using-environment-variables)”。 + +### Triggering a workflow from a workflow + +{% data reusables.github-actions.actions-do-not-trigger-workflows %} 更多信息请参阅“[使用 GITHUB_TOKEN 验证身份](/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)”。 + +If you do want to trigger a workflow from within a workflow run, you can use a personal access token instead of `GITHUB_TOKEN` to trigger events that require a token. 您需要创建个人访问令牌并将其存储为密码。 为了最大限度地降低 {% data variables.product.prodname_actions %} 使用成本,请确保不要创建递归或意外的工作流程。 For more information about creating a personal access token, see "[Creating a personal access token](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)." For more information about storing a personal access token as a secret, see "[Creating and storing encrypted secrets](/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets)." + +For example, the following workflow uses a personal access token (stored as a secret called `MY_TOKEN`) to add a label to an issue via {% data variables.product.prodname_cli %}. Any workflows that run when a label is added will run once this step is performed. + +```yaml +on: + issues: + types: + - opened + +jobs: + label_issue: + runs-on: ubuntu-latest + steps: + - env: + GITHUB_TOKEN: {% raw %}${{ secrets.MY_TOKEN }}{% endraw %} + ISSUE_URL: {% raw %}${{ github.event.issue.html_url }}{% endraw %} + run: | + gh issue edit $ISSUE_URL --add-label "triage" +``` + +Conversely, the following workflow uses `GITHUB_TOKEN` to add a label to an issue. It will not trigger any workflows that run when a label is added. + +```yaml +on: + issues: + types: + - opened + +jobs: + label_issue: + runs-on: ubuntu-latest + steps: + - env: + GITHUB_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} + ISSUE_URL: {% raw %}${{ github.event.issue.html_url }}{% endraw %} + run: | + gh issue edit $ISSUE_URL --add-label "triage" +``` + +## Using events to trigger workflows + +Use the `on` key to specify what events trigger your workflow. For more information about events you can use, see "[Events that trigger workflows](/actions/using-workflows/events-that-trigger-workflows)." + +### Using a single event + +{% data reusables.github-actions.on-single-example %} + +### Using multiple events + +{% data reusables.github-actions.on-multiple-example %} + +### Using activity types and filters with multiple events + +You can use activity types and filters to further control when your workflow will run. For more information, see [Using event activity types](#using-event-activity-types) and [Using filters](#using-filters). {% data reusables.github-actions.actions-multiple-types %} + +## Using event activity types + +{% data reusables.github-actions.actions-activity-types %} + +## Using filters + +{% data reusables.github-actions.actions-filters %} + +### Using filters to target specific branches for pull request events {% data reusables.actions.workflows.section-triggering-a-workflow-branches %} -## Running on specific branches or tags +### Using filters to target specific branches or tags for push events {% data reusables.actions.workflows.section-run-on-specific-branches-or-tags %} -## Specifying which branches the workflow can run on - -{% data reusables.actions.workflows.section-specifying-branches %} - -## Using specific file paths +### Using filters to target specific paths for pull request or push events {% data reusables.actions.workflows.section-triggering-a-workflow-paths %} -## Using a schedule +### Using filters to target specific branches for workflow run events -{% data reusables.actions.workflows.section-triggering-a-workflow-schedule %} +{% data reusables.actions.workflows.section-specifying-branches %} + +## Defining inputs for manually triggered workflows + +{% data reusables.github-actions.workflow-dispatch-inputs %} + +{% ifversion fpt or ghes > 3.3 or ghae-issue-4757 or ghec %} +## Defining inputs, outputs, and secrets for reusable workflows + +You can define inputs and secrets that a reusable workflow should receive from a calling workflow. You can also specify outputs that a reusable workflow will make available to a calling workflow. For more information, see "[Reusing workflows](/actions/using-workflows/reusing-workflows)." + +{% endif %} + +## Using event information + +Information about the event that triggered a workflow run is available in the `github.event` context. The properties in the `github.event` context depend on the type of event that triggered the workflow. For example, a workflow triggered when an issue is labeled would have information about the issue and label. + +### Viewing all properties of an event + +Reference the webhook event documentation for common properties and example payloads. For more information, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads)." + +You can also print the entire `github.event` context to see what properties are available for the event that triggered your workflow: + +```yaml +jobs: + print_context: + runs-on: ubuntu-latest + steps: + - env: + EVENT_CONTEXT: {% raw %}${{ toJSON(github.event) }}{% endraw %} + run: | + echo $EVENT_CONTEXT +``` + +### Accessing and using event properties + +You can use the `github.event` context in your workflow. For example, the following workflow runs when a pull request that changes `package*.json`, `.github/CODEOWNERS`, or `.github/workflows/**` is opened. If the pull request author (`github.event.pull_request.user.login`) is not `octobot` or `dependabot[bot]`, then the workflow uses the {% data variables.product.prodname_cli %} to label and comment on the pull request (`github.event.pull_request.number`). + +```yaml +on: + pull_request: + types: + - opened + paths: + - '.github/workflows/**' + - '.github/CODEOWNERS' + - 'package*.json' + +jobs: + triage: + if: >- + github.event.pull_request.user.login != 'octobot' && + github.event.pull_request.user.login != 'dependabot[bot]' + runs-on: ubuntu-latest + steps: + - name: "Comment about changes we can't accept" + env: + GITHUB_TOKEN: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} + PR: {% raw %}${{ github.event.pull_request.html_url }}{% endraw %} + run: | + gh pr edit $PR --add-label 'invalid' + gh pr comment $PR --body 'It looks like you edited `package*.json`, `.github/CODEOWNERS`, or `.github/workflows/**`. We do not allow contributions to these files. Please review our [contributing guidelines](https://github.com/octo-org/octo-repo/blob/main/CONTRIBUTING.md) for what contributions are accepted.' +``` + +For more information about contexts, see "[Contexts](/actions/learn-github-actions/contexts)." For more information about event payloads, see "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads)." + +## Further controlling how your workflow will run + +If you want more granular control than events, event activity types, or event filters provide, you can use conditionals{% ifversion fpt or ghae or ghes > 3.1 or ghec %} and environments{% endif %} to control whether individual jobs or steps in your workflow will run. + +### Using conditionals + +You can use conditionals to further control whether jobs or steps in your workflow will run. For example, if you want the workflow to run when a specific label is added to an issue, you can trigger on the `issues labeled` event activity type and use a conditional to check what label triggered the workflow. The following workflow will run when any label is added to an issue in the workflow's repository, but the `run_if_label_matches` job will only execute if the label is named `bug`. + +```yaml +on: + issues: + types: + - labeled + +jobs: + run_if_label_matches: + if: github.event.label.name == 'bug' + runs-on: ubuntu-latest + steps: + - run: echo 'The label was bug' +``` + +For more information, see "[Expressions](/actions/learn-github-actions/expressions)." + +{% ifversion fpt or ghae or ghes > 3.1 or ghec %} + +### Using environments to manually trigger workflow jobs + +If you want to manually trigger a specific job in a workflow, you can use an environment that requires approval from a specific team or user. First, configure an environment with required reviewers. For more information, see "[Using environments for deployment](/actions/deployment/targeting-different-environments/using-environments-for-deployment)." Then, reference the environment name in a job in your workflow using the `environment:` key. Any job referencing the environment will not run until at least one reviewer approves the job. + +For example, the following workflow will run whenever there is a push to main. The `build` job will always run. The `publish` job will only run after the `build` job successfully completes (due to `needs: [build]`) and after all of the rules (including required reviewers) for the environment called `production` pass (due to `environment: production`). + +```yaml +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: build + echo 'building' + + publish: + needs: [build] + runs-on: ubuntu-latest + environment: production + steps: + - name: publish + echo 'publishing' +``` + +{% note %} + +{% data reusables.gated-features.environments %} + +{% endnote %} +{% endif %} + +## Available events + +For a full list of available events, see "[Events that trigger workflows](/actions/using-workflows/events-that-trigger-workflows)." diff --git a/translations/zh-CN/content/actions/using-workflows/workflow-commands-for-github-actions.md b/translations/zh-CN/content/actions/using-workflows/workflow-commands-for-github-actions.md index 2bf4229bfe..815e9b82be 100644 --- a/translations/zh-CN/content/actions/using-workflows/workflow-commands-for-github-actions.md +++ b/translations/zh-CN/content/actions/using-workflows/workflow-commands-for-github-actions.md @@ -92,7 +92,7 @@ core.setOutput('SELECTED_COLOR', 'green'); 设置操作的输出参数。 -(可选)您也可以在操作的元数据文件中声明输出参数。 更多信息请参阅“[{% data variables.product.prodname_actions %} 的元数据语法](/articles/metadata-syntax-for-github-actions#outputs)”。 +(可选)您也可以在操作的元数据文件中声明输出参数。 For more information, see "[Metadata syntax for {% data variables.product.prodname_actions %}](/articles/metadata-syntax-for-github-actions#outputs-for-docker-container-and-javascript-actions)." ### 示例 @@ -292,7 +292,7 @@ Only the second `set-output` and `echo` workflow commands are included in the lo 您可以使用 `save-state` 命令来创建环境变量,以便与工作流程的 `pre:` 或 `post:` 操作共享。 例如,您可以使用 `pre:` 操作创建文件,将该文件位置传给 `main:` 操作,然后使用 `post:` 操作删除文件。 或者,您可以使用 `main:` 操作创建文件,将该文件位置传给 `post:` 操作,然后使用 `post:` 操作删除文件。 -如果您有多个 `pre:` 或 `post:` 操作,则只能访问使用了 `save-state` 的操作中的已保存值。 有关 `post:` 操作的更多信息,请参阅“[{% data variables.product.prodname_actions %} 的元数据语法](/actions/creating-actions/metadata-syntax-for-github-actions#post)”。 +如果您有多个 `pre:` 或 `post:` 操作,则只能访问使用了 `save-state` 的操作中的已保存值。 有关 `post:` 操作的更多信息,请参阅“[{% data variables.product.prodname_actions %} 的元数据语法](/actions/creating-actions/metadata-syntax-for-github-actions#runspost)”。 `save-state` 命令只能在操作内运行,并且对 YAML 文件不可用。 保存的值将作为环境值存储,带 `STATE_` 前缀。 diff --git a/translations/zh-CN/content/actions/using-workflows/workflow-syntax-for-github-actions.md b/translations/zh-CN/content/actions/using-workflows/workflow-syntax-for-github-actions.md index 8a1db6c9e3..02d9f85a3b 100644 --- a/translations/zh-CN/content/actions/using-workflows/workflow-syntax-for-github-actions.md +++ b/translations/zh-CN/content/actions/using-workflows/workflow-syntax-for-github-actions.md @@ -149,7 +149,7 @@ jobs: steps: - name: Pass the received secret to an action - uses: ./.github/actions/my-action@v1 + uses: ./.github/actions/my-action with: token: ${{ secrets.access-token }} ``` @@ -171,42 +171,7 @@ A boolean specifying whether the secret must be supplied. ## `on.workflow_dispatch.inputs` -When using the `workflow_dispatch` event, you can optionally specify inputs that are passed to the workflow. - -触发的工作流程接收 `github.event.input` 上下文中的输入。 更多信息请参阅“[上下文](/actions/learn-github-actions/contexts#github-context)”。 - -### 示例 -```yaml -on: - workflow_dispatch: - inputs: - logLevel: - description: 'Log level' - required: true - default: 'warning' {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %} - type: choice - options: - - info - - warning - - debug {% endif %} - tags: - description: 'Test scenario tags' - required: false {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %} - type: boolean - environment: - description: 'Environment to run tests against' - type: environment - required: true {% endif %} - -jobs: - print-tag: - runs-on: ubuntu-latest - - steps: - - name: Print the input tag to STDOUT - run: echo {% raw %} The tag is ${{ github.event.inputs.tag }} {% endraw %} -``` - +{% data reusables.github-actions.workflow-dispatch-inputs %} {% ifversion fpt or ghes > 3.1 or ghae or ghec %} ## `权限` @@ -1008,7 +973,7 @@ For more information about branch, tag, and path filter syntax, see "[`on. | `'**'` | 匹配所有分支和标记名称。 这是不使用 `branches` or `tags` 过滤器时的默认行为。 | `all/the/branches`

`every/tag` | | `'*feature'` | `*` 字符是 YAML 中的特殊字符。 当模式以 `*` 开头时,您必须使用引号。 | `mona-feature`

`feature`

`ver-10-feature` | | `v2*` | 匹配以 `v2` 开头的分支和标记名称。 | `v2`

`v2.0`

`v2.9` | -| `v[12].[0-9]+.[0-9]+` | 将所有语义版本控制分支和标记与主要版本 1 或 2 匹配 | `v1.10.1`

`v2.0.0` | +| `v[12].[0-9]+.[0-9]+` | 将所有语义版本控制分支和标记与主要版本 1 或 2 匹配. | `v1.10.1`

`v2.0.0` | ### 匹配文件路径的模式 diff --git a/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-tls.md b/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-tls.md index a5bab1c756..d8441be833 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-tls.md +++ b/translations/zh-CN/content/admin/configuration/configuring-network-settings/configuring-tls.md @@ -38,6 +38,8 @@ topics: ## 上传自定义 TLS 证书 +{% data reusables.enterprise_site_admin_settings.tls-downtime %} + {% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.privacy %} @@ -67,6 +69,8 @@ Let's Encrypt 是公共证书颁发机构,他们使用 ACME 协议颁发受浏 {% data reusables.enterprise_installation.lets-encrypt-prerequisites %} +{% data reusables.enterprise_site_admin_settings.tls-downtime %} + {% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.privacy %} diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance.md index 7a347ea3ce..afe9132dfc 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance.md +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-backups-on-your-appliance.md @@ -136,5 +136,5 @@ $ ghe-restore -c 169.154.1.1 {% endnote %} You can use these additional options with `ghe-restore` command: -- The `-c` flag overwrites the settings, certificate, and license data on the target host even if it is already configured. Omit this flag if you are setting up a staging instance for testing purposes and you wish to retain the existing configuration on the target. For more information, see the "Using using backup and restore commands" section of the [{% data variables.product.prodname_enterprise_backup_utilities %} README](https://github.com/github/backup-utils#using-the-backup-and-restore-commands). +- The `-c` flag overwrites the settings, certificate, and license data on the target host even if it is already configured. Omit this flag if you are setting up a staging instance for testing purposes and you wish to retain the existing configuration on the target. For more information, see the "Using backup and restore commands" section of the [{% data variables.product.prodname_enterprise_backup_utilities %} README](https://github.com/github/backup-utils#using-the-backup-and-restore-commands). - The `-s` flag allows you to select a different backup snapshot. diff --git a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications.md b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications.md index e0987ad337..8f9f359c87 100644 --- a/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications.md +++ b/translations/zh-CN/content/admin/configuration/configuring-your-enterprise/configuring-email-for-notifications.md @@ -88,8 +88,7 @@ settings to allow incoming emails](#configuring-dns-and-firewall-settings-to-all 4. If the test email fails, [troubleshoot your email settings](#troubleshooting-email-delivery). 5. When the test email succeeds, at the bottom of the page, click **Save settings**. ![Save settings button](/assets/images/enterprise/management-console/save-settings.png) -6. Wait for the configuration run to complete. -![Configuring your instance](/assets/images/enterprise/management-console/configuration-run.png) +{% data reusables.enterprise_site_admin_settings.wait-for-configuration-run %} ## Configuring DNS and firewall settings to allow incoming emails diff --git a/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/configuring-collectd.md b/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/configuring-collectd.md index a90586c766..de18025f1a 100644 --- a/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/configuring-collectd.md +++ b/translations/zh-CN/content/admin/enterprise-management/monitoring-your-appliance/configuring-collectd.md @@ -47,7 +47,7 @@ topics: ## 使用 `ghe-export-graphs` 导出 collectd 数据 -命令行工具 `ghe-export-graphs` 将导出 `collectd` 存储在 RRD 数据库中的数据。 此命令会将数据转换为 XML 格式并导出到一个 tarball (.tgz) 中。 +命令行工具 `ghe-export-graphs` 将导出 `collectd` 存储在 RRD 数据库中的数据。 This command turns the data into XML and exports it into a single tarball (`.tgz`). 此文件的主要用途是为 {% data variables.contact.contact_ent_support %} 团队提供关于 VM 性能的数据(无需下载整个支持包), 不应包含在常规备份导出范围中,也没有对应的导入文件。 如果您联系 {% data variables.contact.contact_ent_support %},我们可能会要求您提供此数据,以便协助故障排查。 diff --git a/translations/zh-CN/content/admin/github-actions/advanced-configuration-and-troubleshooting/troubleshooting-github-actions-for-your-enterprise.md b/translations/zh-CN/content/admin/github-actions/advanced-configuration-and-troubleshooting/troubleshooting-github-actions-for-your-enterprise.md index eeae6fb8a8..be6dc809eb 100644 --- a/translations/zh-CN/content/admin/github-actions/advanced-configuration-and-troubleshooting/troubleshooting-github-actions-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/github-actions/advanced-configuration-and-troubleshooting/troubleshooting-github-actions-for-your-enterprise.md @@ -52,9 +52,11 @@ If you use Docker container actions or service containers in your workflows, you If these settings aren't correctly configured, you might receive errors like `Resource unexpectedly moved to https://` when setting or changing your {% data variables.product.prodname_actions %} configuration. -## Runners not connecting to {% data variables.product.prodname_ghe_server %} after changing the hostname +## Runners not connecting to {% data variables.product.prodname_ghe_server %} with a new hostname -If you change the hostname of {% data variables.product.product_location %}, self-hosted runners will be unable to connect to the old hostname, and will not execute any jobs. +{% data reusables.enterprise_installation.changing-hostname-not-supported %} + +If you deploy {% data variables.product.prodname_ghe_server %} in your environment with a new hostname and the old hostname no longer resolves to your instance, self-hosted runners will be unable to connect to the old hostname, and will not execute any jobs. You will need to update the configuration of your self-hosted runners to use the new hostname for {% data variables.product.product_location %}. Each self-hosted runner will require one of the following procedures: diff --git a/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises.md b/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises.md new file mode 100644 index 0000000000..2845c1a179 --- /dev/null +++ b/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises.md @@ -0,0 +1,42 @@ +--- +title: About GitHub Actions for enterprises +shortTitle: 关于 GitHub Actions +intro: '{% data variables.product.prodname_actions %} can improve developer productivity by automating your enterprise''s software development cycle.' +versions: + ghec: '*' + ghes: '*' + ghae: '*' +type: overview +topics: + - Actions + - Enterprise +--- + +With {% data variables.product.prodname_actions %}, you can improve developer productivity by automating every phase of your enterprise's software development workflow. + +| 任务 | 更多信息 | +| --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Automatically test and build your application | "[关于持续集成](/actions/automating-builds-and-tests/about-continuous-integration)" | +| Deploy your application | "[About continuous deployment](/actions/deployment/about-deployments/about-continuous-deployment)" | +| Automatically and securely package code into artifacts and containers | "[About packaging with {% data variables.product.prodname_actions %}](/actions/publishing-packages/about-packaging-with-github-actions)" | +| Automate your project management tasks | "[Using {% data variables.product.prodname_actions %} for project management](/actions/managing-issues-and-pull-requests/using-github-actions-for-project-management)" | + +{% data variables.product.prodname_actions %} helps your team work faster at scale. When large repositories start using {% data variables.product.prodname_actions %}, teams merge significantly more pull requests per day, and the pull requests are merged significantly faster. For more information, see "[Writing and shipping code faster](https://octoverse.github.com/writing-code-faster/#scale-through-automation)" in the State of the Octoverse. + +{% data variables.product.prodname_actions %} also provides greater control over deployments. For example, you can use environments to require approval for a job to proceed, restrict which branches can trigger a workflow, or limit access to secrets.{% ifversion ghec or ghae-issue-4856 %} If your workflows need to access resources from a cloud provider that supports OpenID Connect (OIDC), you can configure your workflows to authenticate directly to the cloud provider. This will allow you to stop storing credentials as long-lived secrets and provide other security benefits. For more information, see "[About security hardening with OpenID Connect](/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)."{% endif %} + +{% data variables.product.prodname_actions %} is developer friendly, because it's integrated directly into the familiar {% data variables.product.product_name %} experience. + +You can create your own unique automations, or you can use and adapt workflows from our ecosystem of over 10,000 actions built by industry leaders and the open source community. 更多信息请参阅“[查找和自定义操作](/actions/learn-github-actions/finding-and-customizing-actions)”。 + +{% ifversion ghec %}You can enjoy the convenience of {% data variables.product.company_short %}-hosted runners, which are maintained and upgraded by {% data variables.product.company_short %}, or you{% else %}You{% endif %} can control your own private CI/CD infrastructure by using self-hosted runners. Self-hosted runners allow you to determine the exact environment and resources that complete your builds, testing, and deployments, without exposing your software development cycle to the internet. For more information, see {% ifversion ghec %}"[About {% data variables.product.company_short %}-hosted runners](/actions/using-github-hosted-runners/about-github-hosted-runners)" and{% endif %} "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners)." + +{% data variables.product.prodname_actions %} also includes tools to govern your enterprise's software development cycle and meet compliance obligations. 更多信息请参阅“[在企业中执行 {% data variables.product.prodname_actions %} 的策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise)”。 + + +To learn more about how you can successfully adopt {% data variables.product.prodname_actions %} for your enterprise, follow the "[Adopt {% data variables.product.prodname_actions %} for your enterprise](/admin/guides#adopt-github-actions-for-your-enterprise)" learning path. + +## 延伸阅读 + +- "[Understanding {% data variables.product.prodname_actions %}](/actions/learn-github-actions/understanding-github-actions)"{% ifversion ghec %} +- "[About billing for {% data variables.product.prodname_actions %}](/billing/managing-billing-for-github-actions/about-billing-for-github-actions)"{% endif %} diff --git a/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/index.md b/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/index.md index 09f91b2a8c..c0cac4ebb7 100644 --- a/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/index.md +++ b/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/index.md @@ -9,6 +9,7 @@ topics: - Enterprise - Actions children: + - /about-github-actions-for-enterprises - /introducing-github-actions-to-your-enterprise - /migrating-your-enterprise-to-github-actions - /getting-started-with-github-actions-for-github-enterprise-cloud diff --git a/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/introducing-github-actions-to-your-enterprise.md b/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/introducing-github-actions-to-your-enterprise.md index db4ad2c263..01341eb374 100644 --- a/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/introducing-github-actions-to-your-enterprise.md +++ b/translations/zh-CN/content/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/introducing-github-actions-to-your-enterprise.md @@ -14,7 +14,7 @@ topics: ## About {% data variables.product.prodname_actions %} for enterprises -{% data reusables.actions.about-actions %} With {% data variables.product.prodname_actions %}, your enterprise can automate, customize, and execute your software development workflows like testing and deployments. For more information about the basics of {% data variables.product.prodname_actions %}, see "[Understanding {% data variables.product.prodname_actions %}](/actions/learn-github-actions/understanding-github-actions)." +{% data reusables.actions.about-actions %} With {% data variables.product.prodname_actions %}, your enterprise can automate, customize, and execute your software development workflows like testing and deployments. For more information, see "[About {% data variables.product.prodname_actions %} for enterprises](/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises)." ![Diagram of jobs running on self-hosted runners](/assets/images/help/images/actions-enterprise-overview.png) diff --git a/translations/zh-CN/content/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-ldap.md b/translations/zh-CN/content/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-ldap.md index 9b58a1b10e..d9570bb938 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-ldap.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/authenticating-users-for-your-github-enterprise-server-instance/using-ldap.md @@ -178,7 +178,7 @@ topics: {% data reusables.enterprise_site_admin_settings.sign-in %} {% data reusables.enterprise_site_admin_settings.access-settings %} 3. 在左侧边栏中,单击 **LDAP users**。 ![LDAP users 选项卡](/assets/images/enterprise/site-admin-settings/ldap-users-tab.png) -4. 要搜索用户,请输入完整或部分用户名,然后单击 **Search**。 现有用户将显示在搜索结果中。 如果用户不存在,请单击 **Create** 以配置新用户帐户。 ![LDAP 搜索](/assets/images/enterprise/site-admin-settings/ldap-users-search.png) +4. 要搜索用户,请输入完整或部分用户名,然后单击 **Search**。 现有用户将显示在搜索结果中。 如果用户不存在,请单击 **Create** 以配置新用户帐户。 ![LDAP 搜索](/assets/images/enterprise/site-admin-settings/ldap-users-search.jpg) ## 更新 LDAP 帐户 diff --git a/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-identity-and-access-management-for-your-enterprise.md b/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-identity-and-access-management-for-your-enterprise.md index 869ed4782d..3b86021a4a 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-identity-and-access-management-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/about-identity-and-access-management-for-your-enterprise.md @@ -47,6 +47,7 @@ redirect_from: | -------------------------------------------- |:--------------------------------------------------------------:|:-------------------------------------------------------------:| | Active Directory Federation Services (AD FS) | {% octicon "check-circle-fill" aria-label= "The check icon" %} | | | Azure Active Directory (Azure AD) | {% octicon "check-circle-fill" aria-label="The check icon" %} | {% octicon "check-circle-fill" aria-label="The check icon" %} +| Okta | {% octicon "check-circle-fill" aria-label="The check icon" %} | {% octicon "check-circle-fill" aria-label="The check icon" %} | OneLogin | {% octicon "check-circle-fill" aria-label="The check icon" %} | | | PingOne | {% octicon "check-circle-fill" aria-label="The check icon" %} | | | Shibboleth | {% octicon "check-circle-fill" aria-label="The check icon" %} | | diff --git a/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account.md b/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account.md index 1ffb15be43..048323516d 100644 --- a/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account.md +++ b/translations/zh-CN/content/admin/identity-and-access-management/managing-iam-for-your-enterprise/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account.md @@ -15,8 +15,6 @@ redirect_from: - /admin/authentication/managing-identity-and-access-for-your-enterprise/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account --- -{% data reusables.enterprise-accounts.emu-saml-note %} - ## 关于企业帐户的 SAML 单点登录 {% data reusables.saml.dotcom-saml-explanation %} {% data reusables.saml.about-saml-enterprise-accounts %} diff --git a/translations/zh-CN/content/admin/index.md b/translations/zh-CN/content/admin/index.md index c7893c6b87..7b8cedcc2b 100644 --- a/translations/zh-CN/content/admin/index.md +++ b/translations/zh-CN/content/admin/index.md @@ -97,12 +97,14 @@ featuredLinks: - '{% ifversion ghes %}/admin/installation{% endif %}' - '{% ifversion ghae %}/admin/identity-and-access-management/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad{% endif %}' - '{% ifversion ghae %}/admin/overview/about-upgrades-to-new-releases{% endif %}' + - '{% ifversion ghae %}/get-started/signing-up-for-github/setting-up-a-trial-of-github-ae{% endif %}' - '{% ifversion ghes %}/billing/managing-your-license-for-github-enterprise{% endif %}' - '{% ifversion ghes %}/admin/configuration/command-line-utilities{% endif %}' - '{% ifversion ghec %}/admin/configuration/configuring-your-enterprise/verifying-or-approving-a-domain-for-your-enterprise{% endif %}' - '{% ifversion ghec %}/admin/user-management/managing-organizations-in-your-enterprise/viewing-the-audit-logs-for-organizations-in-your-enterprise{% endif %}' - '{% ifversion ghec %}/admin/user-management/monitoring-activity-in-your-enterprise/managing-global-webhooks{% endif %}' - '{% ifversion ghec %}/billing/managing-your-license-for-github-enterprise/using-visual-studio-subscription-with-github-enterprise/setting-up-visual-studio-subscription-with-github-enterprise{% endif %}' + - /admin/configuration/configuring-github-connect/managing-github-connect - /admin/enterprise-support/about-github-enterprise-support videos: - title: "GitHub in the Enterprise – Maya Ross" diff --git a/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-azure.md b/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-azure.md index 0753d7ca8e..82d6d08977 100644 --- a/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-azure.md +++ b/translations/zh-CN/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-azure.md @@ -40,12 +40,12 @@ shortTitle: 在 Azure 上安装 {% data reusables.enterprise_installation.create-ghe-instance %} -1. 找到最新的 {% data variables.product.prodname_ghe_server %} 设备映像。 更多关于 `vm image list` 命令的信息,请参阅 Microsoft 文档中的“[az vm image list](https://docs.microsoft.com/cli/azure/vm/image?view=azure-cli-latest#az_vm_image_list)”。 +1. 找到最新的 {% data variables.product.prodname_ghe_server %} 设备映像。 For more information about the `vm image list` command, see "[`az vm image list`](https://docs.microsoft.com/cli/azure/vm/image?view=azure-cli-latest#az_vm_image_list)" in the Microsoft documentation. ```shell $ az vm image list --all -f GitHub-Enterprise | grep '"urn":' | sort -V ``` -2. 使用找到的设备映像创建新的 VM。 更多信息请参阅 Microsoft 文档中的“[az vm 创建](https://docs.microsoft.com/cli/azure/vm?view=azure-cli-latest#az_vm_create)”。 +2. 使用找到的设备映像创建新的 VM。 For more information, see "[`az vm create`](https://docs.microsoft.com/cli/azure/vm?view=azure-cli-latest#az_vm_create)" in the Microsoft documentation. 传入以下选项:VM 名称、资源组、VM 大小、首选 Azure 地区名称、上一步中列出的设备映像 VM 的名称,以及用于高级存储的存储 SKU。 更多关于资源组的信息,请参阅 Microsoft 文档中的“[资源组](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-overview#resource-groups)”。 @@ -53,7 +53,7 @@ shortTitle: 在 Azure 上安装 $ az vm create -n VM_NAME -g RESOURCE_GROUP --size VM_SIZE -l REGION --image APPLIANCE_IMAGE_NAME --storage-sku Premium_LRS ``` -3. 在 VM 上配置安全设置,以打开所需端口。 更多信息请参阅 Microsoft 文档中的 "[az vm open-port](https://docs.microsoft.com/cli/azure/vm?view=azure-cli-latest#az_vm_open_port)"。 请参阅下表中对每个端口的说明,以确定需要打开的端口。 +3. 在 VM 上配置安全设置,以打开所需端口。 For more information, see "[`az vm open-port`](https://docs.microsoft.com/cli/azure/vm?view=azure-cli-latest#az_vm_open_port)" in the Microsoft documentation. 请参阅下表中对每个端口的说明,以确定需要打开的端口。 ```shell $ az vm open-port -n VM_NAME -g RESOURCE_GROUP --port PORT_NUMBER @@ -63,7 +63,7 @@ shortTitle: 在 Azure 上安装 {% data reusables.enterprise_installation.necessary_ports %} -4. Create and attach a new managed data disk to the VM, and configure the size based on your license count. All Azure managed disks created since June 10, 2017 are encrypted at rest by default with Storage Service Encryption (SSE). For more information about the `az vm disk attach` command, see "[az vm disk attach](https://docs.microsoft.com/cli/azure/vm/disk?view=azure-cli-latest#az_vm_disk_attach)" in the Microsoft documentation. +4. 创建新的未加密数据磁盘并将其附加至 VM,然后根据用户许可数配置大小。 For more information, see "[`az vm disk attach`](https://docs.microsoft.com/cli/azure/vm/disk?view=azure-cli-latest#az_vm_disk_attach)" in the Microsoft documentation. 传入以下选项:VM 名称(例如 `ghe-acme-corp`)、资源组、高级存储 SKU、磁盘大小(例如 `100`)以及生成的 VHD 的名称。 @@ -79,7 +79,7 @@ shortTitle: 在 Azure 上安装 ## 配置 {% data variables.product.prodname_ghe_server %} 虚拟机 -1. 在配置 VM 之前,您必须等待其进入 ReadyRole 状态。 使用 `vm list` 命令检查 VM 的状态。 更多信息请参阅 Microsoft 文档中的“[az vm 列表](https://docs.microsoft.com/cli/azure/vm?view=azure-cli-latest#az_vm_list)”。 +1. 在配置 VM 之前,您必须等待其进入 ReadyRole 状态。 使用 `vm list` 命令检查 VM 的状态。 For more information, see "[`az vm list`](https://docs.microsoft.com/cli/azure/vm?view=azure-cli-latest#az_vm_list)" in the Microsoft documentation. ```shell $ az vm list -d -g RESOURCE_GROUP -o table > Name ResourceGroup PowerState PublicIps Fqdns Location Zones diff --git a/translations/zh-CN/content/admin/overview/accessing-compliance-reports-for-your-enterprise.md b/translations/zh-CN/content/admin/overview/accessing-compliance-reports-for-your-enterprise.md new file mode 100644 index 0000000000..63768a7538 --- /dev/null +++ b/translations/zh-CN/content/admin/overview/accessing-compliance-reports-for-your-enterprise.md @@ -0,0 +1,31 @@ +--- +title: Accessing compliance reports for your enterprise +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 enterprise.' +versions: + ghec: '*' +type: how_to +topics: + - Accounts + - Enterprise + - Fundamentals +permissions: Enterprise owners can access compliance reports for the enterprise. +shortTitle: Access compliance reports +--- + +## About {% data variables.product.company_short %}'s compliance reports + +You can access {% data variables.product.company_short %}'s compliance reports in your enterprise settings. + +{% data reusables.security.compliance-report-list %} + +## Accessing compliance reports for your enterprise + +{% data reusables.enterprise-accounts.access-enterprise %} +{% data reusables.enterprise-accounts.enterprise-accounts-compliance-tab %} +1. Under "Resources", 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.security.compliance-report-screenshot %} + +## 延伸阅读 + +- "[Accessing compliance reports for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/accessing-compliance-reports-for-your-organization)" diff --git a/translations/zh-CN/content/admin/overview/index.md b/translations/zh-CN/content/admin/overview/index.md index b16bd3201a..3d331c28e9 100644 --- a/translations/zh-CN/content/admin/overview/index.md +++ b/translations/zh-CN/content/admin/overview/index.md @@ -15,6 +15,7 @@ children: - /system-overview - /about-the-github-enterprise-api - /creating-an-enterprise-account + - /accessing-compliance-reports-for-your-enterprise --- 如需了解更多信息或购买 {% data variables.product.prodname_enterprise %},请参阅 [{% data variables.product.prodname_enterprise %}](https://github.com/enterprise)。 diff --git a/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise.md b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise.md index 1dfc8445ab..eab2fd84a1 100644 --- a/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise.md +++ b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise.md @@ -100,6 +100,10 @@ You can enforce policies to control how {% data variables.product.prodname_actio {% data reusables.github-actions.private-repository-forks-overview %} +If a policy is enabled for an enterprise, the policy can be selectively disabled in individual organizations or repositories. If a policy is disabled for an enterprise, individual organizations or repositories cannot enable it. + +{% data reusables.github-actions.private-repository-forks-options %} + {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} diff --git a/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise.md b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise.md index f4108863c8..75a5107565 100644 --- a/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise.md +++ b/translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise.md @@ -146,9 +146,8 @@ You can use a SSH certificate authorities (CA) to allow members of any organizat {% data reusables.organizations.delete-ssh-ca %} {% ifversion ghec or ghae %} - ## 延伸阅读 -- "[About identity and access management for your enterprise](/admin/authentication/managing-identity-and-access-for-your-enterprise/about-identity-and-access-management-for-your-enterprise)" - +- "[About identity and access management for your enterprise](/admin/authentication/managing-identity-and-access-for-your-enterprise/about-identity-and-access-management-for-your-enterprise)"{% ifversion ghec %} +- "[Accessing compliance reports for your enterprise](/admin/overview/accessing-compliance-reports-for-your-enterprise)"{% endif %} {% endif %} diff --git a/translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/creating-a-pre-receive-hook-script.md b/translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/creating-a-pre-receive-hook-script.md index 48b09b3704..182e146c8e 100644 --- a/translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/creating-a-pre-receive-hook-script.md +++ b/translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/creating-a-pre-receive-hook-script.md @@ -90,6 +90,9 @@ The `$GITHUB_VIA` variable is available in the pre-receive hook environment when |
git refs delete api
| Deletion of a ref via the API | "[Git database](/rest/reference/git#delete-a-reference)" in the REST API documentation | |
git refs update api
| Update of a ref via the API | "[Git database](/rest/reference/git#update-a-reference)" in the REST API documentation | |
git repo contents api
| Change to a file's contents via the API | "[Create or update file contents](/rest/reference/repos#create-or-update-file-contents)" in the REST API documentation | +{%- ifversion ghes > 3.0 %} +| `merge ` | Merge of a pull request using auto-merge | "[Automatically merging a pull request](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request)" | +{%- endif %} |
merge base into head
| Update of the topic branch from the base branch when the base branch requires strict status checks (via **Update branch** in a pull request, for example) | "[About protected branches](/github/administering-a-repository/about-protected-branches#require-status-checks-before-merging)" | |
pull request branch delete button
| Deletion of a topic branch from a pull request in the web interface | "[Deleting and restoring branches in a pull request](/github/administering-a-repository/deleting-and-restoring-branches-in-a-pull-request#deleting-a-branch-used-for-a-pull-request)" | |
pull request branch undo button
| Restoration of a topic branch from a pull request in the web interface | "[Deleting and restoring branches in a pull request](/github/administering-a-repository/deleting-and-restoring-branches-in-a-pull-request#restoring-a-deleted-branch)" | diff --git a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/adding-people-to-teams.md b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/adding-people-to-teams.md index 9431452c4f..ad14b7c8e6 100644 --- a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/adding-people-to-teams.md +++ b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/adding-people-to-teams.md @@ -9,6 +9,7 @@ redirect_from: intro: '创建团队后,组织管理员可以将用户从 {% data variables.product.product_location %} 添加到团队并决定他们可以访问哪些仓库。' versions: ghes: '*' + ghae: '*' type: how_to topics: - Access management @@ -30,8 +31,12 @@ topics: {% data reusables.organizations.invite_to_team %} {% data reusables.organizations.review-team-repository-access %} +{% ifversion ghes %} + ## 将团队映射到 LDAP 组(例如,使用 LDAP 同步进行用户身份验证) {% data reusables.enterprise_management_console.badge_indicator %} 要将新成员添加到已同步至 LDAP 组的团队,请将用户添加为 LDAP 组的成员,或者联系您的 LDAP 管理员。 + +{% endif %} diff --git a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/continuous-integration-using-jenkins.md b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/continuous-integration-using-jenkins.md index 67919f01d1..f9639cf047 100644 --- a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/continuous-integration-using-jenkins.md +++ b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/continuous-integration-using-jenkins.md @@ -7,6 +7,7 @@ redirect_from: - /admin/user-management/continuous-integration-using-jenkins versions: ghes: '*' + ghae: '*' type: reference topics: - CI diff --git a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/creating-teams.md b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/creating-teams.md index 52334965f2..e638566bb1 100644 --- a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/creating-teams.md +++ b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/creating-teams.md @@ -6,6 +6,7 @@ redirect_from: - /admin/user-management/creating-teams versions: ghes: '*' + ghae: '*' type: how_to topics: - Access management @@ -32,6 +33,8 @@ A prudent combination of teams is a powerful way to control repository access. F {% data reusables.organizations.create-team-choose-parent %} {% data reusables.organizations.create_team %} +{% ifversion ghes %} + ## Creating teams with LDAP Sync enabled Instances using LDAP for user authentication can use LDAP Sync to manage a team's members. Setting the group's **Distinguished Name** (DN) in the **LDAP group** field will map a team to an LDAP group on your LDAP server. If you use LDAP Sync to manage a team's members, you won't be able to manage your team within {% data variables.product.product_location %}. The mapped team will sync its members in the background and periodically at the interval configured when LDAP Sync is enabled. For more information, see "[Enabling LDAP Sync](/enterprise/admin/authentication/using-ldap#enabling-ldap-sync)." @@ -60,3 +63,5 @@ You must be a site admin and an organization owner to create a team with LDAP sy {% data reusables.organizations.team_visibility %} {% data reusables.organizations.create-team-choose-parent %} {% data reusables.organizations.create_team %} + +{% endif %} \ No newline at end of file diff --git a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/managing-projects-using-jira.md b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/managing-projects-using-jira.md index 6bda13ac8c..0514cbc874 100644 --- a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/managing-projects-using-jira.md +++ b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/managing-projects-using-jira.md @@ -1,6 +1,6 @@ --- title: 使用 Jira 管理项目 -intro: '您可以将 Jira 与 {% data variables.product.prodname_enterprise %} 集成以进行项目管理。' +intro: '您可以将 Jira 与 {% data variables.product.product_name %} 集成以进行项目管理。' redirect_from: - /enterprise/admin/guides/installation/project-management-using-jira - /enterprise/admin/articles/project-management-using-jira @@ -10,6 +10,7 @@ redirect_from: - /admin/user-management/managing-projects-using-jira versions: ghes: '*' + ghae: '*' type: how_to topics: - Enterprise diff --git a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/removing-users-from-teams-and-organizations.md b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/removing-users-from-teams-and-organizations.md index 4c45eaf21f..734bd86ad4 100644 --- a/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/removing-users-from-teams-and-organizations.md +++ b/translations/zh-CN/content/admin/user-management/managing-organizations-in-your-enterprise/removing-users-from-teams-and-organizations.md @@ -6,6 +6,7 @@ redirect_from: - /admin/user-management/removing-users-from-teams-and-organizations versions: ghes: '*' + ghae: '*' type: how_to topics: - Access management @@ -25,6 +26,8 @@ shortTitle: 删除用户成员资格 ## 移除团队成员 +{% ifversion ghes %} + {% warning %} **注**:{% data reusables.enterprise_management_console.badge_indicator %} @@ -33,6 +36,8 @@ shortTitle: 删除用户成员资格 {% endwarning %} +{% endif %} + {% data reusables.profile.access_org %} {% data reusables.user_settings.access_org %} {% data reusables.organizations.specific_team %} diff --git a/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/managing-support-entitlements-for-your-enterprise.md b/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/managing-support-entitlements-for-your-enterprise.md index 0394f5aa69..18acc84060 100644 --- a/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/managing-support-entitlements-for-your-enterprise.md +++ b/translations/zh-CN/content/admin/user-management/managing-users-in-your-enterprise/managing-support-entitlements-for-your-enterprise.md @@ -15,7 +15,7 @@ shortTitle: 管理支持权利 拥有企业帐户支持权限的人员可以使用支持门户打开、查看和评论与企业帐户相关的支持事件单。 -企业所有人和帐单管理员自动拥有支持权利。 企业所有者可以向企业帐户拥有的组织成员添加支持权利。 +企业所有人和帐单管理员自动拥有支持权利。 Enterprise owners can add support entitlements to up to 20 additional members of organizations owned by their enterprise account. ## 向企业成员添加支持权利 diff --git a/translations/zh-CN/content/admin/user-management/monitoring-activity-in-your-enterprise/audit-logging.md b/translations/zh-CN/content/admin/user-management/monitoring-activity-in-your-enterprise/audit-logging.md index 78768940fc..395133a045 100644 --- a/translations/zh-CN/content/admin/user-management/monitoring-activity-in-your-enterprise/audit-logging.md +++ b/translations/zh-CN/content/admin/user-management/monitoring-activity-in-your-enterprise/audit-logging.md @@ -26,7 +26,7 @@ topics: {% ifversion ghes %} ## 系统事件 -所有经过审核的系统事件(包括所有推送和拉取)都会记录到 `/var/log/github/audit.log` 中。 日志每 24 小时自动轮换一次,并会保留七天。 +All audited system events are logged to `/var/log/github/audit.log`. 日志每 24 小时自动轮换一次,并会保留七天。 支持包中包含系统日志。 更多信息请参阅“[向 {% data variables.product.prodname_dotcom %} Support 提供数据](/admin/enterprise-support/providing-data-to-github-support)”。 diff --git a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token.md b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token.md index 4d6923a4ef..9218ddf5b7 100644 --- a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token.md +++ b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token.md @@ -8,6 +8,7 @@ redirect_from: - /github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line - /github/authenticating-to-github/creating-a-personal-access-token - /github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token + - /github/extending-github/git-automation-with-oauth-tokens versions: fpt: '*' ghes: '*' diff --git a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-deploy-keys.md b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-deploy-keys.md index 8602712bde..cabcaf41d5 100644 --- a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-deploy-keys.md +++ b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-deploy-keys.md @@ -18,7 +18,11 @@ shortTitle: 部署密钥 {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +3. In the "Security" section of the sidebar, click **{% octicon "key" aria-label="The key icon" %} Deploy keys**. +{% else %} 3. 在左侧边栏中,单击 **Deploy keys(部署密钥)**。 ![部署密钥设置](/assets/images/help/settings/settings-sidebar-deploy-keys.png) +{% endif %} 4. 在 Deploy keys(部署密钥)页面中,记下与您的帐户关联的部署密钥。 对于您无法识别或已过期的密钥,请单击 **Delete(删除)**。 如果有您要保留的有效部署密钥,请单击 **Approve(批准)**。 ![部署密钥列表](/assets/images/help/settings/settings-deploy-key-review.png) 更多信息请参阅“[管理部署密钥](/guides/managing-deploy-keys)”。 diff --git a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log.md b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log.md index 4291740168..319efc5029 100644 --- a/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log.md +++ b/translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/reviewing-your-security-log.md @@ -22,12 +22,10 @@ shortTitle: 安全日志 安全日志列出了过去 90 天内执行的所有操作。 {% data reusables.user_settings.access_settings %} -{% ifversion fpt or ghae or ghes or ghec %} -2. 在用户设置侧边栏中,单击 **Security log(安全日志)**。 ![安全日志选项卡](/assets/images/help/settings/audit-log-tab.png) +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Archives" section of the sidebar, click **{% octicon "log" aria-label="The log icon" %} Security log**. {% else %} -{% data reusables.user_settings.security %} -3. 在“Security history(安全历史记录)”下,将显示您的日志。 ![安全日志](/assets/images/help/settings/user_security_log.png) -4. 单击条目以查看有关该事件的更多信息。 ![安全日志](/assets/images/help/settings/user_security_history_action.png) +1. 在用户设置侧边栏中,单击 **Security log(安全日志)**。 ![安全日志选项卡](/assets/images/help/settings/audit-log-tab.png) {% endif %} {% ifversion fpt or ghae or ghes or ghec %} diff --git a/translations/zh-CN/content/authentication/troubleshooting-ssh/using-ssh-over-the-https-port.md b/translations/zh-CN/content/authentication/troubleshooting-ssh/using-ssh-over-the-https-port.md index 3ae2cce8ea..cb74b34061 100644 --- a/translations/zh-CN/content/authentication/troubleshooting-ssh/using-ssh-over-the-https-port.md +++ b/translations/zh-CN/content/authentication/troubleshooting-ssh/using-ssh-over-the-https-port.md @@ -33,7 +33,7 @@ $ ssh -T -p 443 git@ssh.github.com 如果您能在端口 443 上通过 SSH 连接到 `git@ssh.{% data variables.command_line.backticks %}`,则可以覆盖您的 SSH 设置以强制与 {% data variables.product.product_location %} 的任何连接均通过该服务器和端口运行。 -要在您的 ssh 配置中设置此项,编辑位于 `~/.ssh/config` 的文件,添加以下部分: +To set this in your SSH confifguration file, edit the file at `~/.ssh/config`, and add this section: ``` Host {% data variables.command_line.codeblock %} diff --git a/translations/zh-CN/content/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account.md b/translations/zh-CN/content/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account.md index 12262b9e92..c7fb9f89ff 100644 --- a/translations/zh-CN/content/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account.md +++ b/translations/zh-CN/content/billing/managing-billing-for-your-github-account/viewing-the-subscription-and-usage-for-your-enterprise-account.md @@ -37,6 +37,10 @@ If you want to view an overview of your subscription and usage for {% data varia ## 查看企业帐户的订阅和使用情况 +You can view the subscription and usage for your enterprise and download a file with license details. + +{% data reusables.billing.license-statuses %} + {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.license-tab %} diff --git a/translations/zh-CN/content/billing/managing-your-github-billing-settings/about-billing-on-github.md b/translations/zh-CN/content/billing/managing-your-github-billing-settings/about-billing-on-github.md index a0250ab23a..355ecead59 100644 --- a/translations/zh-CN/content/billing/managing-your-github-billing-settings/about-billing-on-github.md +++ b/translations/zh-CN/content/billing/managing-your-github-billing-settings/about-billing-on-github.md @@ -36,7 +36,7 @@ topics: {% data reusables.user_settings.access_settings %} 1. 在页面顶部用户名的右侧,单击 **Switch to another account(切换到另一个帐户)**。 ![上下文切换器按钮](/assets/images/help/settings/context-switcher-button.png) 1. 开始键入要切换到的帐户名称,然后单击帐户的名称。 ![上下文切换器菜单](/assets/images/help/settings/context-switcher-menu.png) -1. 在左侧边栏中,单击 **Billing & plans(计费和方案)**。 ![设置侧边栏中的计费和方案](/assets/images/help/organizations/billing-settings.png) +1. In the left sidebar, click **{% octicon "credit-card" aria-label="The credit card icon" %} Billing and plans**. ## 延伸阅读 diff --git a/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/viewing-license-usage-for-github-enterprise.md b/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/viewing-license-usage-for-github-enterprise.md index 5afb0ad8e4..7f1a13798f 100644 --- a/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/viewing-license-usage-for-github-enterprise.md +++ b/translations/zh-CN/content/billing/managing-your-license-for-github-enterprise/viewing-license-usage-for-github-enterprise.md @@ -30,6 +30,10 @@ You can view license usage for {% data variables.product.prodname_ghe_server %} ## Viewing license usage on {% ifversion ghec %}{% data variables.product.prodname_dotcom_the_website %}{% elsif ghes %}{% data variables.product.product_location %}{% endif %} +You can view the license usage for your enterprise and download a file with license details. + +{% data reusables.billing.license-statuses %} + {% ifversion ghec %} {% data reusables.enterprise-accounts.access-enterprise-on-dotcom %} diff --git a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts.md b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts.md new file mode 100644 index 0000000000..9d6c9f02dc --- /dev/null +++ b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts.md @@ -0,0 +1,119 @@ +--- +title: About code scanning alerts +intro: Learn about the different types of code scanning alerts and the information that helps you understand the problem each alert highlights. +product: '{% data reusables.gated-features.code-scanning %}' +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +type: overview +topics: + - Advanced Security + - Code scanning + - CodeQL +--- + +{% data reusables.code-scanning.beta %} +{% data reusables.code-scanning.enterprise-enable-code-scanning %} + +## 关于 {% data variables.product.prodname_code_scanning %} 中的警报 + +您可以设置 {% data variables.product.prodname_code_scanning %},以使用默认 {% data variables.product.prodname_codeql %} 分析、第三方分析或多种类型的分析来检查仓库中的代码。 分析完成后,生成的警报将并排显示在仓库的安全视图中。 第三方工具或自定义查询的结果可能不包括您在 {% data variables.product.company_short %} 的默认 {% data variables.product.prodname_codeql %} 分析所检测的警报中看到的所有属性。 更多信息请参阅“[为仓库设置 {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/setting-up-code-scanning-for-a-repository)”。 + +默认情况下, {% data variables.product.prodname_code_scanning %} 定期在默认分支和拉取请求中分析您的代码。 有关管理拉取请求中的警报的更多信息,请参阅“[对拉取请求中的 {% data variables.product.prodname_code_scanning %} 警报分类](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)”。 + +## About alert details + +每个警报都会高亮显示代码的问题以及识别该问题的工具名称。 You can see the line of code that triggered the alert, as well as properties of the alert, such as the alert severity{% ifversion fpt or ghes > 3.1 or ghae or ghec %}, security severity,{% endif %} and the nature of the problem. 警报还会告知该问题第一次被引入的时间。 对于由 {% data variables.product.prodname_codeql %} 分析确定的警报,您还会看到如何解决问题的信息。 + +![来自 {% data variables.product.prodname_code_scanning %} 的警报示例](/assets/images/help/repository/code-scanning-alert.png) + +If you set up {% data variables.product.prodname_code_scanning %} using {% data variables.product.prodname_codeql %}, you can also find data-flow problems in your code. 数据流分析将查找代码中的潜在安全问题,例如:不安全地使用数据、将危险参数传递给函数以及泄漏敏感信息。 + +当 {% data variables.product.prodname_code_scanning %} 报告数据流警报时,{% data variables.product.prodname_dotcom %} 将显示数据在代码中如何移动。 {% data variables.product.prodname_code_scanning_capc %} 可用于识别泄露敏感信息的代码区域,以及可能成为恶意用户攻击切入点的代码区域。 + +### About severity levels + +Alert severity levels may be `Error`, `Warning`, or `Note`. + +If {% data variables.product.prodname_code_scanning %} is enabled as a pull request check, the check will fail if it detects any results with a severity of `error`. {% ifversion fpt or ghes > 3.1 or ghae or ghec %}You can specify which severity level of code scanning alerts causes a check failure. For more information, see "[Defining the severities causing pull request check failure](/code-security/secure-coding/configuring-code-scanning#defining-the-severities-causing-pull-request-check-failure)."{% endif %} + +{% ifversion fpt or ghes > 3.1 or ghae or ghec %} +### About security severity levels + +{% data variables.product.prodname_code_scanning_capc %} displays security severity levels for alerts that are generated by security queries. Security severity levels can be `Critical`, `High`, `Medium`, or `Low`. + +To calculate the security severity of an alert, we use Common Vulnerability Scoring System (CVSS) data. CVSS is an open framework for communicating the characteristics and severity of software vulnerabilities, and is commonly used by other security products to score alerts. For more information about how severity levels are calculated, see [this blog post](https://github.blog/changelog/2021-07-19-codeql-code-scanning-new-severity-levels-for-security-alerts/). + +By default, any {% data variables.product.prodname_code_scanning %} results with a security severity of `Critical` or `High` will cause a check failure. You can specify which security severity level for {% data variables.product.prodname_code_scanning %} results should cause a check failure. For more information, see "[Defining the severities causing pull request check failure](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#defining-the-severities-causing-pull-request-check-failure)."{% endif %} + +### About labels for alerts that are not found in application code + +{% data variables.product.product_name %} assigns a category label to alerts that are not found in application code. The label relates to the location of the alert. + +- **Generated**: Code generated by the build process +- **Test**: Test code +- **Library**: Library or third-party code +- **Documentation**: Documentation + +{% data variables.product.prodname_code_scanning_capc %} categorizes files by file path. You cannot manually categorize source files. + +Here is an example from the {% data variables.product.prodname_code_scanning %} alert list of an alert marked as occurring in library code. + +![Code scanning library alert in list](/assets/images/help/repository/code-scanning-library-alert-index.png) + +On the alert page, you can see that the filepath is marked as library code (`Library` label). + +![Code scanning library alert details](/assets/images/help/repository/code-scanning-library-alert-show.png) + +{% if codeql-ml-queries %} + +## About experimental alerts + +{% data reusables.code-scanning.beta-codeql-ml-queries %} + +In repositories that run {% data variables.product.prodname_code_scanning %} using the {% data variables.product.prodname_codeql %} action, you may see some alerts that are marked as experimental. These are alerts that were found using a machine learning model to extend the capabilities of an existing {% data variables.product.prodname_codeql %} query. + +![Code scanning experimental alert in list](/assets/images/help/repository/code-scanning-experimental-alert-list.png) + +### Benefits of using machine learning models to extend queries + +Queries that use machine learning models are capable of finding vulnerabilities in code that was written using frameworks and libraries that the original query writer did not include. + +Each of the security queries for {% data variables.product.prodname_codeql %} identifies code that's vulnerable to a specific type of attack. Security researchers write the queries and include the most common frameworks and libraries. So each existing query finds vulnerable uses of common frameworks and libraries. However, developers use many different frameworks and libraries, and a manually maintained query cannot include them all. Consequently, manually maintained queries do not provide coverage for all frameworks and libraries. + +{% data variables.product.prodname_codeql %} uses a machine learning model to extend an existing security query to cover a wider range of frameworks and libraries. The machine learning model is trained to detect problems in code it's never seen before. Queries that use the model will find results for frameworks and libraries that are not described in the original query. + +### Alerts identified using machine learning + +Alerts found using a machine learning model are tagged as "Experimental alerts" to show that the technology is under active development. These alerts have a higher rate of false positive results than the queries they are based on. The machine learning model will improve based on user actions such as marking a poor result as a false positive or fixing a good result. + +![Code scanning experimental alert details](/assets/images/help/repository/code-scanning-experimental-alert-show.png) + +## Enabling experimental alerts + +The default {% data variables.product.prodname_codeql %} query suites do not include any queries that use machine learning to generate experimental alerts. To run machine learning queries during {% data variables.product.prodname_code_scanning %} you need to run the additional queries contained in one of the following query suites. + +{% data reusables.code-scanning.codeql-query-suites %} + +When you update your workflow to run an additional query suite this will increase the analysis time. + +``` yaml +- uses: github/codeql-action/init@v1 + with: + # Run extended queries including queries using machine learning + queries: security-extended +``` + +更多信息请参阅“[配置代码扫描](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs)”。 + +## Disabling experimental alerts + +The simplest way to disable queries that use machine learning to generate experimental alerts is to stop running the `security-extended` or `security-and-quality` query suite. In the example above, you would comment out the `queries` line. If you need to continue to run the `security-extended` or `security-and-quality` suite and the machine learning queries are causing problems, then you can open a ticket with [{% data variables.product.company_short %} support](https://support.github.com/contact) with the following details. + +- Ticket title: "{% data variables.product.prodname_code_scanning %}: removal from experimental alerts beta" +- Specify details of the repositories or organizations that are affected +- Request an escalation to engineering + +{% endif %} diff --git a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql.md b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql.md index 1510aef177..a56b8ccd7f 100644 --- a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql.md +++ b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql.md @@ -43,7 +43,7 @@ There are two main ways to use {% data variables.product.prodname_codeql %} anal ## About {% data variables.product.prodname_codeql %} queries -{% data variables.product.company_short %} experts, security researchers, and community contributors write and maintain the default {% data variables.product.prodname_codeql %} queries used for {% data variables.product.prodname_code_scanning %}. The queries are regularly updated to improve analysis and reduce any false positive results. The queries are open source, so you can view and contribute to the queries in the [`github/codeql`](https://github.com/github/codeql) repository. 更多信息请参阅 GitHub Security Lab 网站上的 [{% data variables.product.prodname_codeql %}](https://securitylab.github.com/tools/codeql)。 You can also write your own queries. For more information, see "[About {% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/about-codeql-queries/)" in the {% data variables.product.prodname_codeql %} documentation. +{% data variables.product.company_short %} experts, security researchers, and community contributors write and maintain the default {% data variables.product.prodname_codeql %} queries used for {% data variables.product.prodname_code_scanning %}. The queries are regularly updated to improve analysis and reduce any false positive results. The queries are open source, so you can view and contribute to the queries in the [`github/codeql`](https://github.com/github/codeql) repository. 更多信息请参阅 {% data variables.product.prodname_codeql %} 网站上的 [{% data variables.product.prodname_codeql %}](https://codeql.github.com/)。 You can also write your own queries. For more information, see "[About {% data variables.product.prodname_codeql %} queries](https://codeql.github.com/docs/writing-codeql-queries/about-codeql-queries/)" in the {% data variables.product.prodname_codeql %} documentation. You can run additional queries as part of your code scanning analysis. diff --git a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning.md b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning.md index 1b3d03e411..649eac7ccc 100644 --- a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning.md +++ b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning.md @@ -18,7 +18,6 @@ topics: - Code scanning --- - {% data reusables.code-scanning.beta %} {% data reusables.code-scanning.enterprise-enable-code-scanning %} diff --git a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning.md b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning.md index eafbc64c0b..af256d5d03 100644 --- a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning.md +++ b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning.md @@ -24,7 +24,7 @@ topics: - Python shortTitle: Configure code scanning --- - + {% data reusables.code-scanning.beta %} {% data reusables.code-scanning.enterprise-enable-code-scanning-actions %} @@ -89,7 +89,7 @@ If you scan pull requests, then the results appear as alerts in a pull request c {% ifversion fpt or ghes > 3.1 or ghae or ghec %} ### Defining the severities causing pull request check failure -By default, only alerts with the severity level of `Error`{% ifversion fpt or ghes > 3.1 or ghae or ghec %} or security severity level of `Critical` or `High`{% endif %} will cause a pull request check failure, and a check will still succeed with alerts of lower severities. You can change the levels of alert severities{% ifversion fpt or ghes > 3.1 or ghae or ghec %} and of security severities{% endif %} that will cause a pull request check failure in your repository settings. For more information about severity levels, see "[Managing code scanning alerts for your repository](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository#about-alerts-details)." +By default, only alerts with the severity level of `Error`{% ifversion fpt or ghes > 3.1 or ghae or ghec %} or security severity level of `Critical` or `High`{% endif %} will cause a pull request check failure, and a check will still succeed with alerts of lower severities. You can change the levels of alert severities{% ifversion fpt or ghes > 3.1 or ghae or ghec %} and of security severities{% endif %} that will cause a pull request check failure in your repository settings. For more information about severity levels, see "[About code scanning alerts](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-alert-details)." {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} @@ -351,7 +351,7 @@ To add one or more queries, add a `with: queries:` entry within the `uses: githu You can also specify query suites in the value of `queries`. Query suites are collections of queries, usually grouped by purpose or language. -{% data reusables.code-scanning.codeql-query-suites %} +{% data reusables.code-scanning.codeql-query-suites-explanation %} {% if codeql-packs %} ### Working with custom configuration files diff --git a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages.md b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages.md index 42c5f3df55..6dc4d24289 100644 --- a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages.md +++ b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages.md @@ -26,7 +26,7 @@ topics: - C# - Java --- - + {% data reusables.code-scanning.beta %} {% data reusables.code-scanning.enterprise-enable-code-scanning-actions %} diff --git a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/index.md b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/index.md index 622a6eb37f..6c1d00f0ab 100644 --- a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/index.md +++ b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/index.md @@ -16,6 +16,7 @@ topics: - Code scanning children: - /about-code-scanning + - /about-code-scanning-alerts - /triaging-code-scanning-alerts-in-pull-requests - /setting-up-code-scanning-for-a-repository - /managing-code-scanning-alerts-for-your-repository @@ -28,4 +29,4 @@ children: - /running-codeql-code-scanning-in-a-container - /viewing-code-scanning-logs --- - + diff --git a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md index bc07386975..7747b61120 100644 --- a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md +++ b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository.md @@ -23,62 +23,9 @@ topics: - Alerts - Repositories --- - {% data reusables.code-scanning.beta %} -## About alerts from {% data variables.product.prodname_code_scanning %} - -You can set up {% data variables.product.prodname_code_scanning %} to check the code in a repository using the default {% data variables.product.prodname_codeql %} analysis, a third-party analysis, or multiple types of analysis. When the analysis is complete, the resulting alerts are displayed alongside each other in the security view of the repository. Results from third-party tools or from custom queries may not include all of the properties that you see for alerts detected by {% data variables.product.company_short %}'s default {% data variables.product.prodname_codeql %} analysis. For more information, see "[Setting up {% data variables.product.prodname_code_scanning %} for a repository](/code-security/secure-coding/setting-up-code-scanning-for-a-repository)." - -By default, {% data variables.product.prodname_code_scanning %} analyzes your code periodically on the default branch and during pull requests. For information about managing alerts on a pull request, see "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." - -{% data reusables.code-scanning.upload-sarif-alert-limit %} - -## About alerts details - -Each alert highlights a problem with the code and the name of the tool that identified it. You can see the line of code that triggered the alert, as well as properties of the alert, such as the severity{% ifversion fpt or ghes > 3.1 or ghae or ghec %}, security severity,{% endif %} and the nature of the problem. Alerts also tell you when the issue was first introduced. For alerts identified by {% data variables.product.prodname_codeql %} analysis, you will also see information on how to fix the problem. - -![Example alert from {% data variables.product.prodname_code_scanning %}](/assets/images/help/repository/code-scanning-alert.png) - -If you set up {% data variables.product.prodname_code_scanning %} using {% data variables.product.prodname_codeql %}, this can also detect data-flow problems in your code. Data-flow analysis finds potential security issues in code, such as: using data insecurely, passing dangerous arguments to functions, and leaking sensitive information. - -When {% data variables.product.prodname_code_scanning %} reports data-flow alerts, {% data variables.product.prodname_dotcom %} shows you how data moves through the code. {% data variables.product.prodname_code_scanning_capc %} allows you to identify the areas of your code that leak sensitive information, and that could be the entry point for attacks by malicious users. - -### About severity levels - -Alert severity levels may be `Error`, `Warning`, or `Note`. - -By default, any code scanning results with a severity of `error` will cause check failure. {% ifversion fpt or ghes > 3.1 or ghae or ghec %}You can specify the severity level at which pull requests that trigger code scanning alerts should fail. For more information, see "[Defining the severities causing pull request check failure](/code-security/secure-coding/configuring-code-scanning#defining-the-severities-causing-pull-request-check-failure)."{% endif %} - -{% ifversion fpt or ghes > 3.1 or ghae or ghec %} -### About security severity levels - -{% data variables.product.prodname_code_scanning_capc %} displays security severity levels for alerts that are generated by security queries. Security severity levels can be `Critical`, `High`, `Medium`, or `Low`. - -To calculate the security severity of an alert, we use Common Vulnerability Scoring System (CVSS) data. CVSS is an open framework for communicating the characteristics and severity of software vulnerabilities, and is commonly used by other security products to score alerts. For more information about how severity levels are calculated, see [the blog post](https://github.blog/changelog/2021-07-19-codeql-code-scanning-new-severity-levels-for-security-alerts/). - -By default, any code scanning results with a security severity of `Critical` or `High` will cause a check failure. You can specify which security severity level for code scanning results should cause a check failure. For more information, see "[Defining the severities causing pull request check failure](/code-security/secure-coding/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#defining-the-severities-causing-pull-request-check-failure)."{% endif %} - -### About labels for alerts that are not found in application code - -{% data variables.product.product_name %} assigns a category label to alerts that are not found in application code. The label relates to the location of the alert. - -- **Generated**: Code generated by the build process -- **Test**: Test code -- **Library**: Library or third-party code -- **Documentation**: Documentation - -{% data variables.product.prodname_code_scanning_capc %} categorizes files by file path. You cannot manually categorize source files. - -Here is an example from the {% data variables.product.prodname_code_scanning %} alert list of an alert marked as occuring in library code. - -![Code scanning library alert in list](/assets/images/help/repository/code-scanning-library-alert-index.png) - -On the alert page, you can see that the filepath is marked as library code (`Library` label). - -![Code scanning library alert details](/assets/images/help/repository/code-scanning-library-alert-show.png) - ## Viewing the alerts for a repository Anyone with read permission for a repository can see {% data variables.product.prodname_code_scanning %} annotations on pull requests. For more information, see "[Triaging {% data variables.product.prodname_code_scanning %} alerts in pull requests](/code-security/secure-coding/triaging-code-scanning-alerts-in-pull-requests)." @@ -104,6 +51,8 @@ By default, the code scanning alerts page is filtered to show alerts for the def 1. Alerts from {% data variables.product.prodname_codeql %} analysis include a description of the problem. Click **Show more** for guidance on how to fix your code. ![Details for an alert](/assets/images/help/repository/code-scanning-alert-details.png) +For more information, see "[About {% data variables.product.prodname_code_scanning %} alerts](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts)." + {% ifversion fpt or ghes > 3.1 or ghae or ghec %} {% note %} @@ -133,7 +82,7 @@ If you enter multiple filters, the view will show alerts matching _all_ these fi {% ifversion fpt or ghes > 3.3 or ghec %} -You can prefix the `tag` filter with `-` to exclude results with that tag. For example, `-tag:style` only shows alerts that do not have the `style` tag. +You can prefix the `tag` filter with `-` to exclude results with that tag. For example, `-tag:style` only shows alerts that do not have the `style` tag{% if codeql-ml-queries %} and `-tag:experimental` will omit all experimental alerts. For more information, see "[About {% data variables.product.prodname_code_scanning %} alerts](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-experimental-alerts)."{% else %}.{% endif %} {% endif %} @@ -177,7 +126,7 @@ You can search the list of alerts. This is useful if there is a large number of {% endif %} -{% ifversion fpt or ghes > 3.3 or ghae-issue-5036 %} +{% if code-scanning-task-lists %} ## Tracking {% data variables.product.prodname_code_scanning %} alerts in issues {% data reusables.code-scanning.beta-alert-tracking-in-issues %} diff --git a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/running-codeql-code-scanning-in-a-container.md b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/running-codeql-code-scanning-in-a-container.md index e367df67c2..fda80ece5a 100644 --- a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/running-codeql-code-scanning-in-a-container.md +++ b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/running-codeql-code-scanning-in-a-container.md @@ -23,7 +23,6 @@ topics: - Java --- - {% data reusables.code-scanning.beta %} {% data reusables.code-scanning.deprecation-codeql-runner %} diff --git a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/tracking-code-scanning-alerts-in-issues-using-task-lists.md b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/tracking-code-scanning-alerts-in-issues-using-task-lists.md index 8bf8ca6ec5..5923e8163b 100644 --- a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/tracking-code-scanning-alerts-in-issues-using-task-lists.md +++ b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/tracking-code-scanning-alerts-in-issues-using-task-lists.md @@ -5,9 +5,7 @@ intro: You can add code scanning alerts to issues using task lists. This makes i product: '{% data reusables.gated-features.code-scanning %}' permissions: 'If you have write permission to a repository you can track {% data variables.product.prodname_code_scanning %} alerts in issues using task lists.' versions: - fpt: '*' - ghes: '> 3.3' - ghae: issue-5036 + feature: code-scanning-task-lists type: how_to topics: - Advanced Security diff --git a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md index e1fcdc303e..8abac897b1 100644 --- a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md +++ b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/triaging-code-scanning-alerts-in-pull-requests.md @@ -22,7 +22,6 @@ topics: - Repositories --- - {% data reusables.code-scanning.beta %} diff --git a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow.md b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow.md index d88ccb0c8f..c60e7ff48f 100644 --- a/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow.md +++ b/translations/zh-CN/content/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/troubleshooting-the-codeql-workflow.md @@ -26,7 +26,7 @@ topics: - C# - Java --- - + {% data reusables.code-scanning.beta %} {% data reusables.code-scanning.not-available %} @@ -192,6 +192,19 @@ If you split your analysis into multiple workflows as described above, we still If your analysis is still too slow to be run during `push` or `pull_request` events, then you may want to only trigger analysis on the `schedule` event. For more information, see "[Events](/actions/learn-github-actions/introduction-to-github-actions#events)." +### Check which query suites the workflow runs + +By default, there are three main query suites available for each language. If you have optimized the CodeQL database build and the process is still too long, you could reduce the number of queries you run. The default query suite is run automatically; it contains the fastest security queries with the lowest rates of false positive results. + +You may be running extra queries or query suites in addition to the default queries. Check whether the workflow defines an additional query suite or additional queries to run using the `queries` element. You can experiment with disabling the additional query suite or queries. For more information, see "[Configuring {% data variables.product.prodname_code_scanning %}](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs)." + +{% if codeql-ml-queries %} +{% note %} + +**Note:** If you run the `security-extended` or `security-and-quality` query suite for JavaScript, then some queries use experimental technology. For more information, see "[About code scanning alerts](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-experimental-alerts)." +{% endnote %} +{% endif %} + {% ifversion fpt or ghec %} ## Results differ between analysis platforms diff --git a/translations/zh-CN/content/code-security/code-scanning/index.md b/translations/zh-CN/content/code-security/code-scanning/index.md index 9844b53920..c33b298179 100644 --- a/translations/zh-CN/content/code-security/code-scanning/index.md +++ b/translations/zh-CN/content/code-security/code-scanning/index.md @@ -22,4 +22,3 @@ children: - /using-codeql-code-scanning-with-your-existing-ci-system --- - diff --git a/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning.md b/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning.md index 0a120a5059..d1f394b381 100644 --- a/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning.md +++ b/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/about-integration-with-code-scanning.md @@ -19,7 +19,7 @@ topics: - Webhooks - Integration --- - + {% data reusables.code-scanning.beta %} {% data reusables.code-scanning.enterprise-enable-code-scanning %} diff --git a/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/index.md b/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/index.md index 6e943484c6..0bf3d38e02 100644 --- a/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/index.md +++ b/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/index.md @@ -22,4 +22,3 @@ children: - /sarif-support-for-code-scanning --- - diff --git a/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning.md b/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning.md index ab3879863f..c1fc8e6166 100644 --- a/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning.md +++ b/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/sarif-support-for-code-scanning.md @@ -21,7 +21,7 @@ topics: - Integration - SARIF --- - + {% data reusables.code-scanning.beta %} {% data reusables.code-scanning.deprecation-codeql-runner %} diff --git a/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github.md b/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github.md index c0b9b3afea..0beaf40ec0 100644 --- a/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github.md +++ b/translations/zh-CN/content/code-security/code-scanning/integrating-with-code-scanning/uploading-a-sarif-file-to-github.md @@ -24,7 +24,7 @@ topics: - CI - SARIF --- - + {% data reusables.code-scanning.beta %} {% data reusables.code-scanning.enterprise-enable-code-scanning %} diff --git a/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system.md b/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system.md index fba109bb62..0ecb4a0c59 100644 --- a/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system.md +++ b/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-cli-in-your-ci-system.md @@ -166,7 +166,7 @@ codeql database analyze <database> --format=<format> \ | Option | Required | Usage | |--------|:--------:|-----| | `` | {% octicon "check-circle-fill" aria-label="Required" %} | Specify the path for the directory that contains the {% data variables.product.prodname_codeql %} database to analyze. | -| `` | | Specify {% data variables.product.prodname_codeql %} packs or queries to run. To run the standard queries used for {% data variables.product.prodname_code_scanning %}, omit this parameter. To see the other query suites included in the {% data variables.product.prodname_codeql_cli %} bundle, look in `//codeql/qlpacks/codeql-/codeql-suites`. For information about creating your own query suite, see [Creating CodeQL query suites](https://codeql.github.com/docs/codeql-cli/creating-codeql-query-suites/) in the documentation for the {% data variables.product.prodname_codeql_cli %}. +| `` | | Specify {% data variables.product.prodname_codeql %} packs or queries to run. To run the standard queries used for {% data variables.product.prodname_code_scanning %}, omit this parameter. To see the other query suites included in the {% data variables.product.prodname_codeql_cli %} bundle, look in `//qlpacks/codeql/-queries/codeql-suites`. For information about creating your own query suite, see [Creating CodeQL query suites](https://codeql.github.com/docs/codeql-cli/creating-codeql-query-suites/) in the documentation for the {% data variables.product.prodname_codeql_cli %}. | `--format` | {% octicon "check-circle-fill" aria-label="Required" %} | Specify the format for the results file generated by the command. For upload to {% data variables.product.company_short %} this should be: {% ifversion fpt or ghae or ghec %}`sarif-latest`{% else %}`sarifv2.1.0`{% endif %}. For more information, see "[SARIF support for {% data variables.product.prodname_code_scanning %}](/code-security/secure-coding/sarif-support-for-code-scanning)." | `--output` | {% octicon "check-circle-fill" aria-label="Required" %} | Specify where to save the SARIF results file.{% ifversion fpt or ghes > 3.1 or ghae or ghec %} | `--sarif-category` | {% octicon "question" aria-label="Required with multiple results sets" %} | Optional for single database analysis. Required to define the language when you analyze multiple databases for a single commit in a repository. Specify a category to include in the SARIF results file for this analysis. A category is used to distinguish multiple analyses for the same tool and commit, but performed on different languages or different parts of the code.|{% endif %}{% ifversion fpt or ghes > 3.3 or ghae or ghec %} diff --git a/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-runner-in-your-ci-system.md b/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-runner-in-your-ci-system.md index f891505bc7..7dca4c5662 100644 --- a/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-runner-in-your-ci-system.md +++ b/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/configuring-codeql-runner-in-your-ci-system.md @@ -29,7 +29,6 @@ topics: - Java --- - {% data reusables.code-scanning.deprecation-codeql-runner %} {% data reusables.code-scanning.beta %} @@ -84,7 +83,7 @@ $ /path/to-runner/codeql-runner-linux init --languages cpp,java {% data reusables.code-scanning.run-additional-queries %} -{% data reusables.code-scanning.codeql-query-suites %} +{% data reusables.code-scanning.codeql-query-suites-explanation %} 要添加一个或多个查询,请将逗号分隔的路径列表传递给 `init` 命令的 `--queries` 标志。 您也可以在配置文件中指定额外查询。 diff --git a/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/index.md b/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/index.md index 30f6285404..563dd4b85f 100644 --- a/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/index.md +++ b/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/index.md @@ -28,4 +28,3 @@ children: - /migrating-from-the-codeql-runner-to-codeql-cli --- - diff --git a/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/migrating-from-the-codeql-runner-to-codeql-cli.md b/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/migrating-from-the-codeql-runner-to-codeql-cli.md index 5f80df6908..17bd093f95 100644 --- a/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/migrating-from-the-codeql-runner-to-codeql-cli.md +++ b/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/migrating-from-the-codeql-runner-to-codeql-cli.md @@ -50,7 +50,7 @@ These examples assume that the source code has been checked out to the current w These examples also assume that the {% data variables.product.prodname_codeql_cli %} is placed on the current PATH. -In these examples, a {% data variables.product.prodname_dotcom %} token with suitable scopes is stored in the `$TOKEN` environment variable and passed to the example commands via stdin, or is stored in the `$GITHUB_TOKEN` environment variable. +In these examples, a {% data variables.product.prodname_dotcom %} token with suitable scopes is stored in the `$TOKEN` environment variable and passed to the example commands via `stdin`, or is stored in the `$GITHUB_TOKEN` environment variable. The ref name and commit SHA being checked out and analyzed in these examples are known during the workflow. For a branch, use `refs/heads/BRANCH-NAME` as the ref. For the head commit of a pull request, use `refs/pulls/NUMBER/head`. For a {% data variables.product.prodname_dotcom %}-generated merge commit of a pull request, use `refs/pulls/NUMBER/merge`. The examples below all use `refs/heads/main`. If you use a different branch name, you must modify the sample code. diff --git a/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-runner-in-your-ci-system.md b/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-runner-in-your-ci-system.md index 441e52b87a..74078a9855 100644 --- a/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-runner-in-your-ci-system.md +++ b/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/running-codeql-runner-in-your-ci-system.md @@ -25,7 +25,7 @@ topics: - CI - SARIF --- - + {% data reusables.code-scanning.deprecation-codeql-runner %} diff --git a/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/troubleshooting-codeql-runner-in-your-ci-system.md b/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/troubleshooting-codeql-runner-in-your-ci-system.md index e140d7868b..383cabad9c 100644 --- a/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/troubleshooting-codeql-runner-in-your-ci-system.md +++ b/translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scanning-with-your-existing-ci-system/troubleshooting-codeql-runner-in-your-ci-system.md @@ -24,7 +24,6 @@ topics: - CI --- - {% data reusables.code-scanning.deprecation-codeql-runner %} {% data reusables.code-scanning.beta %} diff --git a/translations/zh-CN/content/code-security/getting-started/securing-your-organization.md b/translations/zh-CN/content/code-security/getting-started/securing-your-organization.md index 92361d61a2..25412c70df 100644 --- a/translations/zh-CN/content/code-security/getting-started/securing-your-organization.md +++ b/translations/zh-CN/content/code-security/getting-started/securing-your-organization.md @@ -139,3 +139,9 @@ You can view and manage alerts from security features to address dependencies an {% ifversion fpt or ghec %}If you have a security vulnerability, you can create a security advisory to privately discuss and fix the vulnerability. For more information, see "[About {% data variables.product.prodname_security_advisories %}](/code-security/security-advisories/about-github-security-advisories)" and "[Creating a security advisory](/code-security/security-advisories/creating-a-security-advisory)." {% endif %} + +{% ifversion ghec %} +## Further reading + +"[Accessing compliance reports for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/accessing-compliance-reports-for-your-organization)" +{% endif %} \ No newline at end of file diff --git a/translations/zh-CN/content/code-security/guides.md b/translations/zh-CN/content/code-security/guides.md index f1a64f16af..8a73280649 100644 --- a/translations/zh-CN/content/code-security/guides.md +++ b/translations/zh-CN/content/code-security/guides.md @@ -30,6 +30,7 @@ includeGuides: - /code-security/secret-scanning/secret-scanning-partners - /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/tracking-code-scanning-alerts-in-issues-using-task-lists - /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning + - /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts - /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning - /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-the-codeql-workflow-for-compiled-languages - /code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/managing-code-scanning-alerts-for-your-repository diff --git a/translations/zh-CN/content/code-security/security-overview/about-the-security-overview.md b/translations/zh-CN/content/code-security/security-overview/about-the-security-overview.md index c117c1bded..69d26b5648 100644 --- a/translations/zh-CN/content/code-security/security-overview/about-the-security-overview.md +++ b/translations/zh-CN/content/code-security/security-overview/about-the-security-overview.md @@ -15,6 +15,8 @@ topics: - Security overview - Advanced Security - Alerts + - Dependabot + - Dependencies - Organizations - Teams shortTitle: About security overview @@ -26,7 +28,7 @@ shortTitle: About security overview 您可以使用安全概述来简要了解组织的安全状态,或识别需要干预的问题仓库。 -- 在组织级别,安全概述显示组织拥有的仓库的聚合和仓库特定安全信息。 +- 在组织级别,安全概述显示组织拥有的仓库的聚合和仓库特定安全信息。 You can also filter information per security feature. - 在团队级别,安全概述显示团队拥有管理权限的仓库特定安全信息。 For more information, see "[Managing team access to an organization repository](/organizations/managing-access-to-your-organizations-repositories/managing-team-access-to-an-organization-repository)." - At the repository-level, the security overview shows which security features are enabled for the repository, and offers the option to configure any available security features not currently in use. @@ -40,7 +42,7 @@ The application security team at your company can use the security overview for 在安全概述中,您可以查看、排序和筛选警报,以了解组织和特定仓库中的安全风险。 The security summary is highly interactive, allowing you to investigate specific categories of information, based on qualifiers like alert risk level, alert type, and feature enablement. You can also apply multiple filters to focus on narrower areas of interest. 例如,您可以识别具有大量 {% data variables.product.prodname_dependabot_alerts %} 的私有仓库或者没有 {% data variables.product.prodname_code_scanning %} 警报的仓库。 For more information, see "[Filtering alerts in the security overview](/code-security/security-overview/filtering-alerts-in-the-security-overview)." -{% ifversion ghec or ghes > 3.4 %} +{% if security-overview-views %} In the security overview, at both the organization and repository level, there are dedicated views for specific security features, such as secret scanning alerts and code scanning alerts. You can use these views to limit your analysis to a specific set of alerts, and narrow the results further with a range of filters specific to each view. For example, in the secret scanning alert view, you can use the `Secret type` filter to view only secret scanning alerts for a specific secret, like a GitHub Personal Access Token. At the repository level, you can use the security overview to assess the specific repository's current security status, and configure any additional security features not yet in use on the repository. diff --git a/translations/zh-CN/content/code-security/security-overview/filtering-alerts-in-the-security-overview.md b/translations/zh-CN/content/code-security/security-overview/filtering-alerts-in-the-security-overview.md index 9ab4dc774c..933ce0941e 100644 --- a/translations/zh-CN/content/code-security/security-overview/filtering-alerts-in-the-security-overview.md +++ b/translations/zh-CN/content/code-security/security-overview/filtering-alerts-in-the-security-overview.md @@ -5,6 +5,7 @@ permissions: Organization owners and security managers can access the security o product: '{% data reusables.gated-features.security-center %}' versions: fpt: '*' + ghae: issue-4554 ghes: '>3.1' ghec: '*' type: how_to @@ -99,7 +100,7 @@ Available in the organization-level overview. | ------------------------- | ----------------------- | | topic:TOPIC-NAME | 显示分类为 *TOPIC-NAME* 的仓库。 | -{% ifversion ghec or ghes > 3.4 %} +{% if security-overview-views %} ## Filter by severity @@ -121,16 +122,16 @@ Available in the code scanning alert views. All code scanning alerts have one of Available in the secret scanning alert views. -| 限定符 | 描述 | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `secret-type:SERVICE_PROVIDER` | Displays alerts for the specified secret and provider. For more information, see "[{% data variables.product.prodname_secret_scanning_caps %} partners](/code-security/secret-scanning/secret-scanning-partners) | -| `secret-type:CUSTOM-PATTERN` | Displays alerts for secrets matching the specified custom pattern. | -| {% ifversion not fpt %}For more information, see "[Defining custom patterns for secret scanning](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)."{% endif %} | | +| 限定符 | 描述 | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `secret-type:SERVICE_PROVIDER` | Displays alerts for the specified secret and provider. For more information, see "[{% data variables.product.prodname_secret_scanning_caps %} partners](/code-security/secret-scanning/secret-scanning-partners)." | +| `secret-type:CUSTOM-PATTERN` | Displays alerts for secrets matching the specified custom pattern. | +| {% ifversion not fpt %}For more information, see "[Defining custom patterns for secret scanning](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)."{% endif %} | | ## Filter by provider Available in the secret scanning alert views. -| 限定符 | 描述 | -| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `provider:PROVIDER_NAME` | Displays alerts for all secrets issues by the specified provider. For more information, see "[{% data variables.product.prodname_secret_scanning_caps %} partners](/code-security/secret-scanning/secret-scanning-partners) | +| 限定符 | 描述 | +| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `provider:PROVIDER_NAME` | Displays alerts for all secrets issues by the specified provider. For more information, see "[{% data variables.product.prodname_secret_scanning_caps %} partners](/code-security/secret-scanning/secret-scanning-partners)." | diff --git a/translations/zh-CN/content/code-security/security-overview/viewing-the-security-overview.md b/translations/zh-CN/content/code-security/security-overview/viewing-the-security-overview.md index 67c0a90372..ee6d9c8629 100644 --- a/translations/zh-CN/content/code-security/security-overview/viewing-the-security-overview.md +++ b/translations/zh-CN/content/code-security/security-overview/viewing-the-security-overview.md @@ -5,6 +5,7 @@ permissions: Organization owners and security managers can access the security o product: '{% data reusables.gated-features.security-center %}' versions: fpt: '*' + ghae: issue-5503 ghes: '>3.1' ghec: '*' type: how_to @@ -25,8 +26,8 @@ shortTitle: View the security overview {% data reusables.organizations.security-overview %} 1. 要查看有关警报类型的汇总信息,请单击 **Show more(显示更多)**。 ![显示更多按钮](/assets/images/help/organizations/security-overview-show-more-button.png) {% data reusables.organizations.filter-security-overview %} - -{% ifversion ghec or ghes > 3.4 %} +{% if security-overview-views %} +1. Alternatively and optionally, use the sidebar on the left to filter information per security feature. On each page, you can use filters that are specific to each feature to fine-tune your search. ![Screenshot of the code scanning-specific page](/assets/images/help/organizations/security-overview-code-scanning-alerts.png) ## Viewing alerts across your organization diff --git a/translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions.md b/translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions.md index e79d34bfac..6336b09402 100644 --- a/translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions.md +++ b/translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions.md @@ -16,7 +16,7 @@ topics: - Repositories - Dependencies - Pull requests -shortTitle: Use Dependabot with actions +shortTitle: Use Dependabot with Actions --- {% data reusables.dependabot.beta-security-and-version-updates %} diff --git a/translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates.md b/translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates.md index 4f9737d867..0bbd0b0aa6 100644 --- a/translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates.md +++ b/translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/configuration-options-for-dependency-updates.md @@ -27,7 +27,9 @@ shortTitle: 配置选项 {% data variables.product.prodname_dependabot %} 配置文件 *dependabot.yml* 使用 YAML 语法。 如果您是 YAML 的新用户并想要了解更多信息,请参阅“[五分钟了解 YAML](https://www.codeproject.com/Articles/1214409/Learn-YAML-in-five-minutes)”。 -必须将此文件存储在仓库的 `.github` 目录中。 添加或更新 *dependabot.yml* 文件时,这将触发对版本更新的立即检查。 下次安全警报触发安全更新的拉取请求时将使用所有同时影响安全更新的选项。 For more information, see "[Enabling and disabling {% data variables.product.prodname_dependabot %} version updates](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/enabling-and-disabling-dependabot-version-updates)" and "[Configuring {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates)." +必须将此文件存储在仓库的 `.github` 目录中。 添加或更新 *dependabot.yml* 文件时,这将触发对版本更新的立即检查。 For more information and an example, see "[Enabling and disabling {% data variables.product.prodname_dependabot %} version updates](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/enabling-and-disabling-dependabot-version-updates#enabling-dependabot-version-updates)." + +下次安全警报触发安全更新的拉取请求时将使用所有同时影响安全更新的选项。 For more information, see "[Configuring {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates)." *dependabot.yml* 文件有两个必需的顶级密钥:`version` 和 `updates`。 您可以选择性包括一个顶级`注册表`键。 该文件必须以 `version: 2` 开头。 @@ -75,7 +77,7 @@ shortTitle: 配置选项 仅对默认分支上有漏洞的包清单提出安全更新。 如果为同一分支设置配置选项(不使用 `target-branch` 时为 true),并为有漏洞的清单指定 `package-ecosystem` 和 `directory`,则安全更新的拉取请求使用相关选项。 -一般而言,安全更新会使用影响拉取请求的任何配置选项,例如添加元数据或改变其行为。 For more information about security updates, see "[Configuring {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates)." +一般而言,安全更新会使用影响拉取请求的任何配置选项,例如添加元数据或改变其行为。 有关安全更新的更多信息,请参阅“[配置 {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/configuring-dependabot-security-updates)”。 {% endnote %} @@ -168,7 +170,7 @@ updates: {% note %} -**注意**:`时间表` 定义 {% data variables.product.prodname_dependabot %} 尝试更新的时间。 但是,这不是您可收到拉取请求的唯一时间。 更新可基于 `dependabot.yml` 文件的更改、更新失败后清单文件的更改或 {% data variables.product.prodname_dependabot_security_updates %} 触发。 For more information, see "[Frequency of {% data variables.product.prodname_dependabot %} pull requests](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates#frequency-of-dependabot-pull-requests)" and "[About {% 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 %} 尝试更新的时间。 但是,这不是您可收到拉取请求的唯一时间。 更新可基于 `dependabot.yml` 文件的更改、更新失败后清单文件的更改或 {% data variables.product.prodname_dependabot_security_updates %} 触发。 更多信息请参阅“[{% data variables.product.prodname_dependabot %} 拉取请求的频率](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/about-dependabot-version-updates#frequency-of-dependabot-pull-requests)”和“[关于 {% data variables.product.prodname_dependabot_security_updates %}](/code-security/supply-chain-security/managing-vulnerabilities-in-your-projects-dependencies/about-dependabot-security-updates)”。 {% endnote %} @@ -305,7 +307,7 @@ updates: 您可以搜索仓库中是否有 `"@dependabot ignore" in:comments`,以检查仓库是否存储了 `ignore` 首选项。 如果您希望取消忽略以这种方式忽略的依赖项,请重新打开拉取请求。 -For more information about the `@dependabot ignore` commands, see "[Managing pull requests for dependency updates](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-pull-requests-for-dependency-updates#managing-dependabot-pull-requests-with-comment-commands)." +有关 `@dependabot ignore` 命令的更多信息,请参阅“[管理依赖关系更新的拉取请求](/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/managing-pull-requests-for-dependency-updates#managing-dependabot-pull-requests-with-comment-commands)”。 #### 指定要忽略的依赖项和版本 @@ -489,9 +491,9 @@ updates: ### `registries` -要允许 {% data variables.product.prodname_dependabot %} 在执行版本更新时访问私人包注册表,您必须在相关的 `updates` 配置中包括 `registries` 设置。 您可以通过将 `registrations` 设置为 `"*"` 来允许使用所有定义的注册表。 或者,您可以列出更新可以使用的注册表。 要执行此操作,请使用 _dependabot.yml_ 文件的顶层 `registries` 部分定义的注册表。 +要允许 {% data variables.product.prodname_dependabot %} 在执行版本更新时访问私人包注册表,您必须在相关的 `updates` 配置中包括 `registries` 设置。 您可以通过将 `registrations` 设置为 `"*"` 来允许使用所有定义的注册表。 或者,您可以列出更新可以使用的注册表。 要执行此操作,请使用 _dependabot.yml_ 文件的顶层 `registries` 部分定义的注册表。 For more information, see "[Configuration options for private registries](#configuration-options-for-private-registries)" below. -要允许 {% data variables.product.prodname_dependabot %} 使用 `bundler`、`mix` 和 `pip` 包管理器来更新私人注册表中的依赖项,您可以选择允许外部代码执行。 更多信息请参阅 [`insecure-external-code-execution`](#insecure-external-code-execution)。 +要允许 {% data variables.product.prodname_dependabot %} 使用 `bundler`、`mix` 和 `pip` 包管理器来更新私人注册表中的依赖项,您可以选择允许外部代码执行。 For more information, see [`insecure-external-code-execution`](#insecure-external-code-execution) above. ```yaml # Allow {% data variables.product.prodname_dependabot %} to use one of the two defined private registries diff --git a/translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/upgrading-from-dependabotcom-to-github-native-dependabot.md b/translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/upgrading-from-dependabotcom-to-github-native-dependabot.md index 167bb9140f..ed71c81e32 100644 --- a/translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/upgrading-from-dependabotcom-to-github-native-dependabot.md +++ b/translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/upgrading-from-dependabotcom-to-github-native-dependabot.md @@ -52,4 +52,4 @@ Dependabot Preview 已直接植入 {% data variables.product.prodname_dotcom %} 如果使用私人注册表,则必须将现有的 Dependabot Preview 密钥添加到仓库或组织的“ Dependabot 密钥”中。 更多信息请参阅“[管理 Dependabot 的加密密码](/code-security/supply-chain-security/managing-encrypted-secrets-for-dependabot)”。 -如果您在迁移方面有任何问题或需要帮助,您可以在 [dependabot/dependabot-core](https://github.com/dependabot/dependabot-core/issues/new?assignees=%40dependabot%2Fpreview-migration-reviewers&labels=E%3A+preview-migration&template=migration-issue.md&title=) 仓库中查看或打开议题。 +If you have any questions or need help migrating, you can view or open issues in the [`dependabot/dependabot-core`](https://github.com/dependabot/dependabot-core/issues/new?assignees=%40dependabot%2Fpreview-migration-reviewers&labels=E%3A+preview-migration&template=migration-issue.md&title=) repository. diff --git a/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review.md b/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review.md index e99fa47420..e0a109f88a 100644 --- a/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review.md +++ b/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-dependency-review.md @@ -38,7 +38,7 @@ redirect_from: 有时,您可能只想更新清单中一个依赖项的版本并生成拉取请求。 但是,如果此直接依赖项的更新版本也更新了依赖项,则拉取请求的更改可能超过您的预期。 每个清单和锁定文件的依赖项审查提供了一种简单的方法来查看更改的内容,以及任何新的依赖项版本是否包含已知的漏洞。 -通过检查拉取请求中的依赖项审查并更改被标记为有漏洞的任何依赖项,可以避免将漏洞添加到项目中。 有关依赖项审查工作的更多信息,请参阅“[审查拉取请求中的依赖项更改](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/incorporating-feedback-in-your-pull-request)”。 +通过检查拉取请求中的依赖项审查并更改被标记为有漏洞的任何依赖项,可以避免将漏洞添加到项目中。 For more information about how dependency review works, see "[Reviewing dependency changes in a pull request](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-dependency-changes-in-a-pull-request)." {% data variables.product.prodname_dependabot_alerts %} 将会查找依赖项中存在的漏洞,但避免引入潜在问题比在以后修复它们要好得多。 有关 {% data variables.product.prodname_dependabot_alerts %} 的更多信息,请参阅“[关于有漏洞依赖项的警报](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies#dependabot-alerts-for-vulnerable-dependencies)”。 diff --git a/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph.md b/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph.md index 716a544e20..9dfc90486b 100644 --- a/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph.md +++ b/translations/zh-CN/content/code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph.md @@ -77,6 +77,9 @@ The recommended formats explicitly define which versions are used for all direct | --- | --- | --- | ---| | Composer | PHP | `composer.lock` | `composer.json`, `composer.lock` | | `dotnet` CLI | .NET languages (C#, C++, F#, VB) | `.csproj`, `.vbproj`, `.nuspec`, `.vcxproj`, `.fsproj` | `.csproj`, `.vbproj`, `.nuspec`, `.vcxproj`, `.fsproj`, `packages.config` | +{%- if github-actions-in-dependency-graph %} +| {% data variables.product.prodname_actions %} workflows[1] | YAML | `.yml`, `.yaml` | `.yml`, `.yaml` | +{%- endif %} {%- ifversion fpt or ghes > 3.2 or ghae %} | Go modules | Go | `go.sum` | `go.mod`, `go.sum` | {%- elsif ghes = 3.2 %} @@ -84,18 +87,28 @@ The recommended formats explicitly define which versions are used for all direct {%- endif %} | Maven | Java, Scala | `pom.xml` | `pom.xml` | | npm | JavaScript | `package-lock.json` | `package-lock.json`, `package.json`| -| Python PIP | Python | `requirements.txt`, `pipfile.lock` | `requirements.txt`, `pipfile`, `pipfile.lock`, `setup.py`* | +| Python PIP | Python | `requirements.txt`, `pipfile.lock` | `requirements.txt`, `pipfile`, `pipfile.lock`, `setup.py`{% if github-actions-in-dependency-graph %}[2]{% else %}[1]{% endif %} | {%- ifversion fpt or ghes > 3.3 %} | Python Poetry | Python | `poetry.lock` | `poetry.lock`, `pyproject.toml` |{% endif %} | RubyGems | Ruby | `Gemfile.lock` | `Gemfile.lock`, `Gemfile`, `*.gemspec` | | Yarn | JavaScript | `yarn.lock` | `package.json`, `yarn.lock` | +{% if github-actions-in-dependency-graph %} +[1] Please note that {% data variables.product.prodname_actions %} workflows must be located in the `.github/workflows/` directory of a repository to be recognized as manifests. Any actions or workflows referenced using the syntax `jobs[*].steps[*].uses` or `jobs..uses` will be parsed as dependencies. For more information, see "[Workflow syntax for GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions)." + +[2] If you list your Python dependencies within a `setup.py` file, we may not be able to parse and list every dependency in your project. + +{% else %} +[1] If you list your Python dependencies within a `setup.py` file, we may not be able to parse and list every dependency in your project. +{% endif %} + +{% if github-actions-in-dependency-graph %} {% note %} -**Note:** If you list your Python dependencies within a `setup.py` file, we may not be able to parse and list every dependency in your project. +**Note:** {% data variables.product.prodname_actions %} workflow dependencies are displayed in the dependency graph for informational purposes. Dependabot alerts are not currently supported for {% data variables.product.prodname_actions %} workflows. {% endnote %} - +{% endif %} ## Further reading - "[Dependency graph](https://en.wikipedia.org/wiki/Dependency_graph)" on Wikipedia diff --git a/translations/zh-CN/content/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry.md b/translations/zh-CN/content/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry.md index a508c8e1a8..a8fcc99f86 100644 --- a/translations/zh-CN/content/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry.md +++ b/translations/zh-CN/content/codespaces/codespaces-reference/allowing-your-codespace-to-access-a-private-image-registry.md @@ -12,7 +12,7 @@ shortTitle: 私有映像注册表 ## 关于私人映像注册表和 {% data variables.product.prodname_codespaces %} -A registry is a secure space for storing, managing, and fetching private container images. You may use one to store one or more devcontainers. There are many examples of registries, such as {% data variables.product.prodname_dotcom %} Container Registry, Azure Container Registry, or DockerHub. +A registry is a secure space for storing, managing, and fetching private container images. You may use one to store one or more images. There are many examples of registries, such as {% data variables.product.prodname_dotcom %} Container Registry, Azure Container Registry, or DockerHub. {% data variables.product.prodname_dotcom %} Container Registry can be configured to pull container images seamlessly, without having to provide any authentication credentials to {% data variables.product.prodname_codespaces %}. For other image registries, you must create secrets in {% data variables.product.prodname_dotcom %} to store the access details, which will allow {% data variables.product.prodname_codespaces %} to access images stored in that registry. @@ -87,7 +87,7 @@ To access AWS Elastic Container Registry (ECR), you can provide an AWS access k ``` *_CONTAINER_REGISTRY_SERVER = *_CONTAINER_REGISTRY_USER = -*_container_REGISTRY_PASSWORD = +*_CONTAINER_REGISTRY_PASSWORD = ``` You must also ensure you have the appropriate AWS IAM permissions to perform the credential swap (e.g. `sts:GetServiceBearerToken`) as well as the ECR read operation (either `AmazonEC2ContainerRegistryFullAccess` or `ReadOnlyAccess`). @@ -97,7 +97,7 @@ Alternatively, if you don't want GitHub to perform the credential swap on your b ``` *_CONTAINER_REGISTRY_SERVER = *_CONTAINER_REGISTRY_USER = AWS -*_container_REGISTRY_PASSWORD = +*_CONTAINER_REGISTRY_PASSWORD = ``` Since these tokens are short lived and need to be refreshed periodically, we recommend providing an access key ID and secret. diff --git a/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization.md b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization.md index d54fdaa121..6f303d1212 100644 --- a/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization.md +++ b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization.md @@ -19,7 +19,7 @@ To learn about pricing for {% data variables.product.prodname_codespaces %}, see {% data reusables.codespaces.codespaces-billing %} -- As an an organization owner or a billing manager you can manage {% data variables.product.prodname_codespaces %} billing for your organization: ["About billing for Codespaces"](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces) +- As an organization owner or a billing manager you can manage {% data variables.product.prodname_codespaces %} billing for your organization: ["About billing for Codespaces"](/billing/managing-billing-for-github-codespaces/about-billing-for-codespaces) - For users, there is a guide that explains how billing works: ["Understanding billing for Codespaces"](/codespaces/codespaces-reference/understanding-billing-for-codespaces) diff --git a/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces.md b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces.md index 56312d6bb9..9a9facfb50 100644 --- a/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces.md +++ b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-encrypted-secrets-for-your-repository-and-organization-for-codespaces.md @@ -41,12 +41,11 @@ topics: {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} -{% data reusables.github-actions.sidebar-secret %} -1. 向下滚动页面并在 **Secrets(密钥)**下选择 **Codespaces**。 ![侧栏中的代码空间选项](/assets/images/help/codespaces/codespaces-option-secrets.png) -1. 在页面顶部,单击 **New repository secret(新仓库密钥)**。 -1. 在 **Name(名称)**输入框中键入密码的名称。 -1. 输入密码的值。 -1. 单击 **Add secret(添加密码)**。 +1. In the "Security" section of the sidebar, select **{% octicon "key-asterisk" aria-label="The key-asterisk icon" %} Secrets** then click **{% data variables.product.prodname_codespaces %}**. +2. 在页面顶部,单击 **New repository secret(新仓库密钥)**。 +3. 在 **Name(名称)**输入框中键入密码的名称。 +4. 输入密码的值。 +5. 单击 **Add secret(添加密码)**。 ## 为组织添加密钥 @@ -56,13 +55,12 @@ topics: {% data reusables.organizations.navigate-to-org %} {% data reusables.organizations.org_settings %} -{% data reusables.github-actions.sidebar-secret %} -1. 向下滚动页面并在 **Secrets(密钥)**下选择 **Codespaces**。 ![侧栏中的代码空间选项](/assets/images/help/codespaces/codespaces-option-secrets-org.png) -1. 在页面顶部,单击 **New organization secret(新组织密钥)**。 -1. 在 **Name(名称)**输入框中键入密码的名称。 -1. 输入密码的 **Value(值)**。 -1. 从 **Repository access(仓库访问权限)**下拉列表,选择访问策略。 ![已选定私有仓库的仓库访问列表](/assets/images/help/codespaces/secret-repository-access.png) -1. 单击 **Add secret(添加密码)**。 +1. In the "Security" section of the sidebar, select **{% octicon "key-asterisk" aria-label="The key-asterisk icon" %} Secrets** then click **{% data variables.product.prodname_codespaces %}**. +2. 在页面顶部,单击 **New organization secret(新组织密钥)**。 +3. 在 **Name(名称)**输入框中键入密码的名称。 +4. 输入密码的 **Value(值)**。 +5. 从 **Repository access(仓库访问权限)**下拉列表,选择访问策略。 ![已选定私有仓库的仓库访问列表](/assets/images/help/codespaces/secret-repository-access.png) +6. 单击 **Add secret(添加密码)**。 ## 审查对组织级别密码的访问权限 diff --git a/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types.md b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types.md index 14e98cf19b..e38cc1fe3e 100644 --- a/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types.md +++ b/translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/restricting-access-to-machine-types.md @@ -47,34 +47,30 @@ If you add an organization-wide policy, you should set it to the largest choice {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} -{% data reusables.organizations.click-codespaces %} -1. Under "Codespaces", click **Policy**. - - !["Policy" tab in left sidebar](/assets/images/help/organizations/codespaces-policy-sidebar.png) - -1. On the "Codespace policies" page, click **Create Policy**. -1. Enter a name for your new policy. -1. Click **Add constraint** and choose **Machine types**. +1. In the "Code, planning, and automation" section of the sidebar, select **{% octicon "codespaces" aria-label="The codespaces icon" %} {% data variables.product.prodname_codespaces %}** then click **Policy**. +2. On the "Codespace policies" page, click **Create Policy**. +3. Enter a name for your new policy. +4. Click **Add constraint** and choose **Machine types**. ![Add a constraint for machine types](/assets/images/help/codespaces/add-constraint-dropdown.png) -1. Click {% octicon "pencil" aria-label="The edit icon" %} to edit the constraint, then clear the selection of any machine types that you don't want to be available. +5. Click {% octicon "pencil" aria-label="The edit icon" %} to edit the constraint, then clear the selection of any machine types that you don't want to be available. ![Edit the machine type constraint](/assets/images/help/codespaces/edit-machine-constraint.png) -1. In the "Change policy target" area, click the dropdown button. -1. Choose either **All repositories** or **Selected repositories** to determine which repositories this policy will apply to. -1. 如果选择了 **Selected repositories(所选仓库)**: +6. In the "Change policy target" area, click the dropdown button. +7. Choose either **All repositories** or **Selected repositories** to determine which repositories this policy will apply to. +8. 如果选择了 **Selected repositories(所选仓库)**: 1. 单击 {% octicon "gear" aria-label="The settings icon" %}。 ![Edit the settings for the policy](/assets/images/help/codespaces/policy-edit.png) - 1. Select the repositories you want this policy to apply to. - 1. At the bottom of the repository list, click **Select repositories**. + 2. Select the repositories you want this policy to apply to. + 3. At the bottom of the repository list, click **Select repositories**. ![Select repositories for this policy](/assets/images/help/codespaces/policy-select-repos.png) -1. 单击 **Save(保存)**。 +9. 单击 **Save(保存)**。 ## Editing a policy diff --git a/translations/zh-CN/content/codespaces/setting-up-your-project-for-codespaces/setting-up-your-java-project-for-codespaces.md b/translations/zh-CN/content/codespaces/setting-up-your-project-for-codespaces/setting-up-your-java-project-for-codespaces.md index 013675affa..8d18a87a99 100644 --- a/translations/zh-CN/content/codespaces/setting-up-your-project-for-codespaces/setting-up-your-java-project-for-codespaces.md +++ b/translations/zh-CN/content/codespaces/setting-up-your-project-for-codespaces/setting-up-your-java-project-for-codespaces.md @@ -33,7 +33,7 @@ hidden: true If you don’t see this option, {% data variables.product.prodname_codespaces %} isn't available for your project. See [Access to {% data variables.product.prodname_codespaces %}](/codespaces/developing-in-codespaces/creating-a-codespace#access-to-codespaces) for more information. -创建代码空间时,您的项目是在专用于您的远程 VM 上创建的。 默认情况下,代码空间的容器有许多语言和运行时,包括 Java、nvm、npm 和 yarn。 它还包括一套常见的工具,例如 git、wget、rsync、openssh 和 nano。 +创建代码空间时,您的项目是在专用于您的远程 VM 上创建的。 By default, the container for your codespace has many languages and runtimes including Java, nvm, npm, and Yarn. 它还包括一套常见的工具,例如 git、wget、rsync、openssh 和 nano。 您可以通过调整 vCPU 和 RAM 的数量、[添加 dotfiles 以个性化环境](/codespaces/setting-up-your-codespace/personalizing-codespaces-for-your-account)或者修改安装的工具和脚本来自定义代码空间。 diff --git a/translations/zh-CN/content/codespaces/troubleshooting/working-with-support-for-codespaces.md b/translations/zh-CN/content/codespaces/troubleshooting/working-with-support-for-codespaces.md index 41911ce72d..dbc4cf892c 100644 --- a/translations/zh-CN/content/codespaces/troubleshooting/working-with-support-for-codespaces.md +++ b/translations/zh-CN/content/codespaces/troubleshooting/working-with-support-for-codespaces.md @@ -26,7 +26,7 @@ The name the codespace is also included in many of the log files. For example, i ### Codespaces IDs -Every codespace also has an ID (identifer). This is not shown by default in {% data variables.product.prodname_vscode %} so you may need to update the settings for the {% data variables.product.prodname_github_codespaces %} extension before you can access the ID. +Every codespace also has an ID (identifier). This is not shown by default in {% data variables.product.prodname_vscode %} so you may need to update the settings for the {% data variables.product.prodname_github_codespaces %} extension before you can access the ID. 1. In {% data variables.product.prodname_vscode %}, browser or desktop, in the Activity Bar on the left, click **Remote Explorer** to show details for the codespace. 2. If the sidebar includes a "Codespace Performance" section, hover over the "Codespace ID" and click the clipboard icon to copy the ID. diff --git a/translations/zh-CN/content/communities/maintaining-your-safety-on-github/unblocking-a-user-from-your-organization.md b/translations/zh-CN/content/communities/maintaining-your-safety-on-github/unblocking-a-user-from-your-organization.md index e6e64c105e..370066e16b 100644 --- a/translations/zh-CN/content/communities/maintaining-your-safety-on-github/unblocking-a-user-from-your-organization.md +++ b/translations/zh-CN/content/communities/maintaining-your-safety-on-github/unblocking-a-user-from-your-organization.md @@ -33,7 +33,7 @@ shortTitle: 从您的组织中解除阻止 {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} -{% data reusables.organizations.moderation-settings %} +{% data reusables.organizations.moderation-settings %}, then click **Blocked users**. 5. 在“Blocked users(已阻止的用户)”下您想要取消阻止的用户旁边,单击 **Unblock(取消阻止)**。 ![取消阻止用户按钮](/assets/images/help/organizations/org-unblock-user-button.png) ## 延伸阅读 diff --git a/translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-for-your-user-account.md b/translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-for-your-user-account.md index 399d89f9c0..6fdb84d251 100644 --- a/translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-for-your-user-account.md +++ b/translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-for-your-user-account.md @@ -27,6 +27,6 @@ shortTitle: 限制帐户中的交互 ## 限制用户帐户的交互 {% data reusables.user_settings.access_settings %} -1. 在在用户设置侧边栏中的“Moderation settings(管理设置)”下,单击 **Interaction limits(交互限制)**。 ![用户设置侧边栏中的"交互限制"选项卡](/assets/images/help/settings/settings-sidebar-interaction-limits.png) +1. In the "Access" section of the sidebar, select **{% octicon "report" aria-label="The report icon" %} Moderation** then click **Interaction limits**. {% data reusables.community.set-interaction-limit %} ![临时交互限制选项](/assets/images/help/settings/user-account-temporary-interaction-limits-options.png) diff --git a/translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-in-your-organization.md b/translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-in-your-organization.md index f1e5d5a628..4a9ccd2631 100644 --- a/translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-in-your-organization.md +++ b/translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-in-your-organization.md @@ -33,8 +33,7 @@ shortTitle: 限制组织中的交互 {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} -1. 在组织设置侧边栏中,单击 **Moderation settings(仲裁设置)**。 ![组织设置侧边栏中的"Moderation settings(仲裁设置)"](/assets/images/help/organizations/org-settings-moderation-settings.png) -1. 在“Moderation settings(仲裁设置)”下,单击 **Interaction limits(交互限制)**。 ![组织设置侧边栏中的"Interaction limits(交互限制)"](/assets/images/help/organizations/org-settings-interaction-limits.png) +1. In the "Access" section of the sidebar, select **{% octicon "report" aria-label="The report icon" %} Moderation**, then click **Interaction limits**. {% data reusables.community.set-interaction-limit %} ![临时交互限制选项](/assets/images/help/organizations/organization-temporary-interaction-limits-options.png) diff --git a/translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository.md b/translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository.md index 5cb312669a..95d1953596 100644 --- a/translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository.md +++ b/translations/zh-CN/content/communities/moderating-comments-and-conversations/limiting-interactions-in-your-repository.md @@ -28,8 +28,7 @@ shortTitle: 限制仓库中的交互 {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} -1. 在左侧边栏中,单击 **Moderation settings(仲裁设置)**。 ![仓库设置侧边栏中的"Moderation settings(仲裁设置)"](/assets/images/help/repository/repo-settings-moderation-settings.png) -1. 在“Moderation settings(仲裁设置)”下,单击 **Interaction limits(交互限制)**。 ![仓库设置中的交互限制 ](/assets/images/help/repository/repo-settings-interaction-limits.png) +1. In the "Access" section of the sidebar, select **{% octicon "comment-discussion" aria-label="The comment-discussion icon" %} Moderation options**, then click **Interaction limits**. {% data reusables.community.set-interaction-limit %} ![临时交互限制选项](/assets/images/help/repository/temporary-interaction-limits-options.png) diff --git a/translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/common-validation-errors-when-creating-issue-forms.md b/translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/common-validation-errors-when-creating-issue-forms.md new file mode 100644 index 0000000000..5a7f83ee51 --- /dev/null +++ b/translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/common-validation-errors-when-creating-issue-forms.md @@ -0,0 +1,641 @@ +--- +title: Common validation errors when creating issue forms +intro: 'You may see some of these common validation errors when creating, saving, or viewing issue forms.' +versions: + fpt: '*' + ghec: '*' +topics: + - Community +--- + + +{% data reusables.community.issue-forms-beta %} + +## Required top level key `name` is missing + +The template does not contain a `name` field, which means it is not clear what to call your issue template when giving users a list of options. + +### 示例 + +```yaml +description: "Thank you for reporting a bug!" +... +``` + +The error can be fixed by adding `name` as a key. + +```yaml +name: "Bug report" +description: "Thank you for reporting a bug!" +... +``` + +## `key` must be a string + +This error message means that a permitted key has been provided, but its value cannot be parsed as the data type is not supported. + +### 示例 + +The `description` below is being parsed as a Boolean, but it should be a string. + +```yaml +name: "Bug report" +description: true +... +``` + +The error can be fixed by providing a string as the value. Strings may need to be wrapped in double quotes to be successfully parsed. For example, strings that contain `'` must be wrapped in double quotes. + +```yaml +name: "Bug report" +description: "true" +... +``` + +Empty strings, or strings consisting of only whitespaces, are also not permissible when the field expects a string. + +```yaml +name: "" +description: "File a bug report" +assignees: " " +... +``` + +The error can be fixed by correcting the value to be a non-empty string. If the field is not required, you should delete the key-value pair. + +```yaml +name: "Bug Report" +description: "File a bug report" +... +``` + +## `input` is not a permitted key + +An unexpected key was supplied at the top level of the template. For more information about which top-level keys are supported, see "[Syntax for issue forms](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms#top-level-syntax)." + +### 示例 + +```yaml +name: "Bug report" +hello: world +... +``` + +The error can be fixed by removing the unexpected keys. + +```yaml +name: "Bug report" +... +``` + +## Forbidden keys + +YAML parses certain strings as `Boolean` values. To avoid this, we have explicitly forbidden the usage of the following keys: + +`y`, `Y`, `yes`, `Yes`, `YES`, `n`, `N`, `no`, `No`, `NO`, `true`, `True`, `TRUE`, `false`, `False`, `FALSE`, `on`, `On`, `ON`, `off`, `Off`, `OFF` + +The error can be fixed by removing the forbidden keys. + +## Body must contain at least one non-markdown field + +Issue forms must accept user input, which means that at least one of its fields must contain a user input field. A `markdown` element is static text, so a `body` array cannot contain only `markdown` elements. + +### 示例 + +```yaml +name: "Bug report" +body: +- type: markdown + attributes: + value: "Bugs are the worst!" +``` + +The error can be fixed by adding non-markdown elements that accept user input. + +```yaml +name: "Bug report" +body: +- type: markdown + attributes: + value: "Bugs are the worst!" +- type: textarea + attributes: + label: "What's wrong?" +``` + +## Body must have unique ids + +If using `id` attributes to distinguish multiple elements, each `id` attribute must be unique. + +### 示例 + +```yaml +name: "Bug report" +body: +- type: input + id: name + attributes: + label: First name +- type: input + id: name + attributes: + label: Last name +``` + +The error can be fixed by changing the `id` for one of these inputs, so that every `input` field has a unique `id` attribute. + +```yaml +name: "Bug report" +body: +- type: input + id: name + attributes: + label: First name +- type: input + id: surname + attributes: + label: Last name +``` + +## Body must have unique labels + +When there are multiple `body` elements that accept user input, the `label` attribute for each user input field must be unique. + +### 示例 + +```yaml +name: "Bug report" +body: +- type: textarea + attributes: + label: Name +- type: textarea + attributes: + label: Name +``` + +The error can be fixed by changing the `label` attribute for one of the input fields to ensure that each `label` is unique. + +```yaml +name: "Bug report" +body: +- type: textarea + attributes: + label: Name +- type: textarea + attributes: + label: Operating System +``` + +Input fields can also be differentiated by their `id` attribute. If duplicate `label` attributes are required, you can supply at least one `id` to differentiate two elements with identical labels. + +```yaml +name: "Bug report" +body: +- type: textarea + id: name_1 + attributes: + label: Name +- type: textarea + id: name_2 + attributes: + label: Name +``` + +`id` attributes are not visible in the issue body. If you want to distinguish the fields in the resulting issue, you should use distinct `label` attributes. + + +## Labels are too similar + +Similar labels may be processed into identical references. If an `id` attribute is not provided for an `input`, the `label` attribute is used to generate a reference to the `input` field. To do this, we process the `label` by leveraging the Rails [parameterize](https://apidock.com/rails/ActiveSupport/Inflector/parameterize) method. In some cases, two labels that are distinct can be processed into the same parameterized string. + +### 示例 + +```yaml +name: "Bug report" +body: +- type: input + attributes: + label: Name? +- type: input + id: name + attributes: + label: Name??????? +``` + +The error can be fixed by adding at least one differentiating alphanumeric character, `-`, or `_` to one of the clashing labels. + +```yaml +name: "Bug report" +body: +- type: input + attributes: + label: Name? +- type: input + attributes: + label: Your name +``` + +The error can also be fixed by giving one of the clashing labels a unique `id`. + +```yaml +name: "Bug report" +body: +- type: input + attributes: + label: Name? +- type: input + id: your-name + attributes: + label: Name??????? +``` + +## Checkboxes must have unique labels + +When a `checkboxes` element is present, each of its nested labels must be unique among its peers, as well as among other input types. + +### 示例 + +```yaml +name: "Bug report" +body: +- type: textarea + attributes: + label: Name +- type: checkboxes + attributes: + options: + - label: Name +``` + +The error can be fixed by changing the `label` attribute for one of these inputs. + +```yaml +name: "Bug report" +body: +- type: textarea + attributes: + label: Name +- type: checkboxes + attributes: + options: + - label: Your name +``` + +Alternatively, you can supply an `id` to any clashing top-level elements. Nested checkbox elements do not support the `id` attribute. + +```yaml +name: "Bug report" +body: +- type: textarea + id: name_1 + attributes: + label: Name +- type: checkboxes + attributes: + options: + - label: Name +``` + +`id` attributes are not visible in the issue body. If you want to distinguish the fields in the resulting issue, you should use distinct `label` attributes. + +## Body[i]: required key type is missing + +Each body block must contain the key `type`. + +Errors with `body` will be prefixed with `body[i]` where `i` represents the zero-indexed index of the body block containing the error. For example, `body[0]` tells us that the error has been caused by the first block in the `body` list. + +### 示例 + +```yaml +body: +- attributes: + value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord." + preview_only: false +``` + +The error can be fixed by adding the key `type` with a valid input type as the value. 有关可用的 `body` 输入类型及其语法,请参阅“[{% data variables.product.prodname_dotcom %} 表单架构的语法](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#keys)”。 + +```yaml +body: +- type: markdown + attributes: + value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord." + preview_only: false +``` + +## Body[i]: `x` is not a valid input type + +One of the body blocks contains a type value that is not one of the [permitted types](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#keys). + +Errors with `body` will be prefixed with `body[i]` where `i` represents the index of the body block containing the error. For example, `body[0]` tells us that the error has been caused by the first block in the `body` list. + +### 示例 + +```yaml +body: +- type: x + attributes: + value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord." + preview_only: false +``` + +The error can be fixed by changing `x` to one of the valid types. + +```yaml +body: +- type: markdown + attributes: + value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord." + preview_only: false +``` + +## Body[i]: required attribute key `value` is missing + +One of the required `value` attributes has not been provided. The error occurs when a block does not have an `attributes` key or does not have a `value` key under the `attributes` key. + +Errors with `body` will be prefixed with `body[i]` where `i` represents the index of the body block containing the error. For example, `body[0]` tells us that the error has been caused by the first block in the `body` list. + +### 示例 + +```yaml +body: +- type: markdown + attributes: + value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord." + preview_only: false +- type: markdown +``` + +The error in this example can be fixed by adding `value` as a key under `attributes` in the second list element of `body`. + +```yaml +body: +- type: markdown + attributes: + value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord." + preview_only: false +- type: markdown + attributes: + value: "This is working now!" +``` + +## Body[i]: label must be a string + +Within its `attributes` block, a value has the wrong data type. + +Errors with `body` will be prefixed with `body[i]` where `i` represents the index of the body block containing the error. For example, `body[0]` tells us that the error has been caused by the first block in the `body` list. + +### 示例 + +The `label` below is being parsed as a Boolean, but it should be a string. + + +```yaml +body: +- type: markdown + attributes: + value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord." +- type: textarea + attributes: + label: Bug Description +- type: textarea + attributes: + label: true +``` + +The error can be fixed by supplying a string value for `label`. If you want to use a `label` value that may be parsed as a Boolean, integer, or decimal, you should wrap the value in quotes. For example, `"true"` or `"1.3"` instead of `true` or `1.3`. + +```yaml +- type: markdown + attributes: + value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord." +- type: textarea + attributes: + label: Bug Description +- type: textarea + attributes: + label: Environment Details +``` + +Empty strings, or strings consisting of only whitespaces, are not permissible when an attribute expects a string. For example, `""` or `" "` are not allowed. + +If the attribute is required, the value must be a non-empty string. If the field is not required, you should delete the key-value pair. + +```yaml +body: +- type: input + attributes: + label: "Name" +``` + +## Body[i]: `id` can only contain numbers, letters, -, _ + +`id` attributes can only contain alphanumeric characters, `-`, and `_`. Your template may include non-permitted characters, such as whitespace, in an `id`. + +Errors with `body` will be prefixed with `body[i]` where `i` represents the index of the body block containing the error. For example, `body[0]` tells us that the error has been caused by the first block in the `body` list. + +### 示例 + +```yaml +name: "Bug report" +body: +- type: input + id: first name + attributes: + label: First name +``` + +The error can be fixed by ensuring that whitespaces and other non-permitted characters are removed from `id` values. + +```yaml +name: "Bug report" +body: +- type: input + id: first-name + attributes: + label: First name +``` + +## Body[i]: `x` is not a permitted key + +An unexpected key, `x`, was provided at the same indentation level as `type` and `attributes`. + +Errors with `body` will be prefixed with `body[i]` where `i` represents the index of the body block containing the error. For example, `body[0]` tells us that the error has been caused by the first block in the `body` list. + +### 示例 + +```yaml +body: +- type: markdown + x: woof + attributes: + value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord." +``` + +The error can be fixed by removing extra keys and only using `type`, `attributes`, and `id`. + +```yaml +body: +- type: markdown + attributes: + value: "Thanks for taking the time to fill out this bug! If you need real-time help, join us on Discord." +``` + +## Body[i]: `label` contains forbidden word + +To minimize the risk of private information and credentials being posted publicly in GitHub Issues, some words commonly used by attackers are not permitted in the `label` of input or textarea elements. + +Errors with `body` will be prefixed with `body[i]` where `i` represents the index of the body block containing the error. For example, `body[0]` tells us that the error has been caused by the first block in the `body` list. + +### 示例 + +```yaml +body: +- type: markdown + attributes: + value: Hello world! +- type: input + attributes: + label: Password +``` + +The error can be fixed by removing terms like "password" from any `label` fields. + +```yaml +body: +- type: markdown + attributes: + value: Hello world! +- type: input + attributes: + label: Username +``` + +## Body[i]: `x` is not a permitted attribute + +An invalid key has been supplied in an `attributes` block. + +Errors with `body` will be prefixed with `body[i]` where `i` represents the index of the body block containing the error. For example, `body[0]` tells us that the error has been caused by the first block in the `body` list. + +### 示例 + +```yaml +body: +- type: markdown + attributes: + x: "a random key!" + value: "Thanks for taking the time to fill out this bug!" +``` + +The error can be fixed by removing extra keys and only using permitted attributes. + +```yaml +body: +- type: markdown + attributes: + value: "Thanks for taking the time to fill out this bug!" +``` + +## Body[i]: `options` must be unique + +For checkboxes and dropdown input types, the choices defined in the `options` array must be unique. + +Errors with `body` will be prefixed with `body[i]` where `i` represents the index of the body block containing the error. For example, `body[0]` tells us that the error has been caused by the first block in the `body` list. + +### 示例 + +``` +body: +- type: dropdown + attributes: + label: Favorite dessert + options: + - ice cream + - ice cream + - pie +``` + +The error can be fixed by ensuring that no duplicate choices exist in the `options` array. + +``` +body: +- type: dropdown + attributes: + label: Favorite dessert + options: + - ice cream + - pie +``` + +## Body[i]: `options` must not include the reserved word, none + +"None" is a reserved word in an `options` set because it is used to indicate non-choice when a `dropdown` is not required. + +Errors with `body` will be prefixed with `body[i]` where `i` represents the index of the body block containing the error. For example, `body[0]` tells us that the error has been caused by the first block in the `body` list. + +### 示例 + +``` +body: +- type: dropdown + attributes: + label: What types of pie do you like? + options: + - Steak & Ale + - Chicken & Leek + - None + validations: + required: true +``` + +The error can be fixed by removing "None" as an option. If you want a contributor to be able to indicate that they like none of those types of pies, you can additionally remove the `required` validation. + +``` +body: +- type: dropdown + attributes: + label: What types of pie do you like? + options: + - Steak & Ale + - Chicken & Leek +``` + +In this example, "None" will be auto-populated as a selectable option. + +## Body[i]: `options` must not include booleans. Please wrap values such as 'yes', and 'true' in quotes + +There are a number of English words that become processed into Boolean values by the YAML parser unless they are wrapped in quotes. For dropdown `options`, all items must be strings rather than Booleans. + +Errors with `body` will be prefixed with `body[i]` where `i` represents the index of the body block containing the error. For example, `body[0]` tells us that the error has been caused by the first block in the `body` list. + +### 示例 + +``` +body: +- type: dropdown + attributes: + label: Do you like pie? + options: + - Yes + - No + - Maybe +``` + +The error can be fixed by wrapping each offending option in quotes, to prevent them from being processed as Boolean values. + +``` +body: +- type: dropdown + attributes: + label: Do you like pie? + options: + - "Yes" + - "No" + - Maybe +``` + +## 延伸阅读 + +- [YAML](https://yaml.org/) +- [议题表单的语法](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms) diff --git a/translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/index.md b/translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/index.md index 20ea522a9d..4b9dc23b81 100644 --- a/translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/index.md +++ b/translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/index.md @@ -21,5 +21,6 @@ children: - /syntax-for-githubs-form-schema - /creating-a-pull-request-template-for-your-repository - /manually-creating-a-single-issue-template-for-your-repository + - /common-validation-errors-when-creating-issue-forms --- diff --git a/translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema.md b/translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema.md index 5bb76e21e7..3e5e5e1d88 100644 --- a/translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema.md +++ b/translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema.md @@ -241,7 +241,7 @@ body: | 键 | 描述 | 必选 | 类型 | 默认值 | 有效值 | | --------- | -------------------------------- | -- | --- | ----------------------------------------------- | ----------------------------------------------- | -| `标签` | 预期用户输入的简短描述,以表单形式显示。 | 可选 | 字符串 | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} +| `标签` | 预期用户输入的简短描述,以表单形式显示。 | 必选 | 字符串 | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} | `说明` | 复选框集的描述,以表单形式显示。 支持 Markdown 格式。 | 可选 | 字符串 | 空字符串 | {% octicon "dash" aria-label="The dash icon" %} | `options` | 用户可以选择的复选框阵列。 有关语法,请参阅下文。 | 必选 | 数组 | {% octicon "dash" aria-label="The dash icon" %} | {% octicon "dash" aria-label="The dash icon" %} diff --git a/translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms.md b/translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms.md index 5d7817d144..f3318e81c7 100644 --- a/translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms.md +++ b/translations/zh-CN/content/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms.md @@ -40,7 +40,7 @@ body: | `说明` | 议题表单模板的描述,出现在模板选择器界面中。 | 必选 | 字符串 | | `正文` | 表单中输入类型的定义。 | 必选 | 数组 | | `assignees` | 将自动分配给使用此模板创建的议题的人员。 | 可选 | 阵列或逗号分界的字符串 | -| `labels` | 将自动添加到此模板创建的议题的标签。 | 可选 | 字符串 | +| `labels` | 将自动添加到此模板创建的议题的标签。 | 可选 | 阵列或逗号分界的字符串 | | `title` | 在议题提交表单中预填的默认标题。 | 可选 | 字符串 | 有关可用的 `body` 输入类型及其语法,请参阅“[{% data variables.product.prodname_dotcom %} 表单架构的语法](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema)”。 @@ -165,3 +165,4 @@ body: ## 延伸阅读 - [YAML](https://yaml.org/) +- [Common validation errors when creating issue forms](/communities/using-templates-to-encourage-useful-issues-and-pull-requests/common-validation-errors-when-creating-issue-forms) diff --git a/translations/zh-CN/content/developers/apps/building-github-apps/creating-a-github-app-using-url-parameters.md b/translations/zh-CN/content/developers/apps/building-github-apps/creating-a-github-app-using-url-parameters.md index 27e2822897..fc4e29ad61 100644 --- a/translations/zh-CN/content/developers/apps/building-github-apps/creating-a-github-app-using-url-parameters.md +++ b/translations/zh-CN/content/developers/apps/building-github-apps/creating-a-github-app-using-url-parameters.md @@ -99,7 +99,7 @@ shortTitle: 应用程序创建查询参数 | [`security_events`](/rest/reference/permissions-required-for-github-apps/#permission-on-security-events) | 授予对[代码扫描 API](/rest/reference/code-scanning/) 的访问权限。 可以是以下项之一:`none`、`read` 或 `write`。{% endif %} | [`single_file`](/rest/reference/permissions-required-for-github-apps/#permission-on-single-file) | 授予对[内容 API](/rest/reference/repos#contents) 的访问权限。 可以是以下项之一:`none`、`read` 或 `write`。 | | [`标星`](/rest/reference/permissions-required-for-github-apps/#permission-on-starring) | 授予对[标星 API](/rest/reference/activity#starring) 的访问权限。 可以是以下项之一:`none`、`read` 或 `write`。 | -| [`状态`](/rest/reference/permissions-required-for-github-apps/#permission-on-statuses) | 授予对[状态 API](/rest/reference/repos#statuses) 的访问权限。 可以是以下项之一:`none`、`read` 或 `write`。 | +| [`状态`](/rest/reference/permissions-required-for-github-apps/#permission-on-statuses) | 授予对[状态 API](/rest/reference/commits#commit-statuses) 的访问权限。 可以是以下项之一:`none`、`read` 或 `write`。 | | [`team_discussions`](/rest/reference/permissions-required-for-github-apps/#permission-on-team-discussions) | 授予对[团队讨论 API](/rest/reference/teams#discussions) 和[团队讨论注释 API](/rest/reference/teams#discussion-comments) 的访问权限。 可以是以下项之一:`none`、`read` 或 `write`。{% ifversion fpt or ghes or ghae-issue-4864 or ghec %} | `vulnerability_alerts` | 授予接收仓库漏洞依赖项安全警报的权限。 更多信息请参阅“[关于漏洞依赖项的警报](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies/)”。 可以是以下项之一:`none` 或 `read`。{% endif %} | `关注` | 授予列出和更改用户订阅的仓库的权限。 可以是以下项之一:`none`、`read` 或 `write`。 | diff --git a/translations/zh-CN/content/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps.md b/translations/zh-CN/content/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps.md index f3f0f6d45e..162c197d63 100644 --- a/translations/zh-CN/content/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps.md +++ b/translations/zh-CN/content/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps.md @@ -449,8 +449,8 @@ curl -H "Authorization: token OAUTH-TOKEN" {% data variables.product.api_url_pre {% ifversion fpt or ghec %} #### 组织团队同步 -* [列出团队的 idp 组](/rest/reference/teams#list-idp-groups-for-a-team) -* [创建或更新 idp 组连接](/rest/reference/teams#create-or-update-idp-group-connections) +* [List IdP groups for a team](/rest/reference/teams#list-idp-groups-for-a-team) +* [Create or update IdP group connections](/rest/reference/teams#create-or-update-idp-group-connections) * [列出组织的 IdP 组](/rest/reference/teams#list-idp-groups-for-an-organization) {% endif %} diff --git a/translations/zh-CN/content/developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app.md b/translations/zh-CN/content/developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app.md index 632fdeb9aa..aabf472d4c 100644 --- a/translations/zh-CN/content/developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app.md +++ b/translations/zh-CN/content/developers/apps/getting-started-with-apps/setting-up-your-development-environment-to-create-a-github-app.md @@ -54,7 +54,7 @@ $ git clone https://github.com/github-developer/github-app-template.git ## 步骤 1. 启动新的 Sme 通道 -为了帮助 GitHub 将 web 挂钩发送到您的本地计算机而不将其暴露在互联网上,您可以使用一个名为 Smee 的工具。 首先,转到 https://smee.io,然后单击 **Start a new channel(启动新通道)**。 如果您已经习惯使用将本地计算机暴露到互联网上的其他工具,例如 [ngrok](https://dashboard.ngrok.com/get-started) 或 [localtunnel](https://localtunnel.github.io/www/),请随意使用。 +为了帮助 GitHub 将 web 挂钩发送到您的本地计算机而不将其暴露在互联网上,您可以使用一个名为 Smee 的工具。 首先,转到 https://smee.io,然后单击 **Start a new channel(启动新通道)**。 If you're already comfortable with other tools that expose your local machine to the internet like [`ngrok`](https://dashboard.ngrok.com/get-started) or [`localtunnel`](https://localtunnel.github.io/www/), feel free to use those. ![Smee 新通道按钮](/assets/images/smee-new-channel.png) @@ -91,7 +91,7 @@ $ git clone https://github.com/github-developer/github-app-template.git `smee --url ` 命令指示 Smee 将 Smee 通道接收的所有 web 挂钩事件转发到计算机上运行的 Smee 客户端。 `--path /event_handler` 选项将事件转发到 `/event_handler` 路由,我们将在[后面的章节](#step-5-review-the-github-app-template-code)中介绍。 `--port 3000` 选项指定端口 3000,这是服务器将侦听的端口。 使用 Smee,您的计算机不需要向公共互联网开放即可从 GitHub 接收 web 挂钩。 您也可以在浏览器中打开 Smee URL 来检查 web 挂钩有效负载。 -我们建议您在完成本指南其余步骤时保持此终端窗口打开并保持 Smee 连接。 尽管您_可以_断开连接后重新连接 Smee 客户端而不会丢失唯一域(与 ngrok 不同),但您可能会发现,保持连接时在其他终端窗口中执行其他命令行任务更容易。 +我们建议您在完成本指南其余步骤时保持此终端窗口打开并保持 Smee 连接。 Although you _can_ disconnect and reconnect the Smee client without losing your unique domain (unlike `ngrok`), you may find it easier to leave it connected and do other command-line tasks in a different Terminal window. ## 步骤 2. 注册新的 GitHub 应用程序 @@ -131,7 +131,7 @@ $ git clone https://github.com/github-developer/github-app-template.git 创建应用程序后,您将被带回[应用程序设置页面](https://github.com/settings/apps)。 您还有两件事要做: -* **为应用程序生成私钥。**这是以后验证应用程序所必需的。 向下滚动页面,然后单击 **Generate a private key(生成私钥)**。 将生成的 PEM 文件(称为 _`app-name`_-_`date`_-private-key.pem 等)保存在可以再次找到的目录中。 +* **为应用程序生成私钥。**这是以后验证应用程序所必需的。 向下滚动页面,然后单击 **Generate a private key(生成私钥)**。 Save the resulting `PEM` file (called something like _`app-name`_-_`date`_-`private-key.pem`) in a directory where you can find it again. ![私钥生成对话框](/assets/images/private_key.png) diff --git a/translations/zh-CN/content/developers/apps/guides/creating-ci-tests-with-the-checks-api.md b/translations/zh-CN/content/developers/apps/guides/creating-ci-tests-with-the-checks-api.md index ae172d8eed..1fe460024b 100644 --- a/translations/zh-CN/content/developers/apps/guides/creating-ci-tests-with-the-checks-api.md +++ b/translations/zh-CN/content/developers/apps/guides/creating-ci-tests-with-the-checks-api.md @@ -157,7 +157,7 @@ end 此代码使用 [create_check_run 方法](https://rdoc.info/gems/octokit/Octokit%2FClient%2FChecks:create_check_run)调用“[创建检查运行](/rest/reference/checks#create-a-check-run)”端点。 -要创建检查运行,只有两个输入参数是必需的:`name` 和 `head_sha`。 在本快速入门中的稍后部分,我们将使用 [Rubocop](https://rubocop.readthedocs.io/en/latest/) 来实现 CI 测试,这就是在此处使用名称 "Octo Rubocop" 的原因,但是您可以为检查运行选择任何想用的名称。 +要创建检查运行,只有两个输入参数是必需的:`name` 和 `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. 您现在仅提供必需的参数以使基本功能正常工作,但是稍后您将在收集有关检查运行的更多信息时更新检查运行。 默认情况下,GitHub 将 `status` 设置为 `queued`。 diff --git a/translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/viewing-metrics-for-your-listing.md b/translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/viewing-metrics-for-your-listing.md index ca9d6d5132..bb233098eb 100644 --- a/translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/viewing-metrics-for-your-listing.md +++ b/translations/zh-CN/content/developers/github-marketplace/creating-apps-for-github-marketplace/viewing-metrics-for-your-listing.md @@ -29,7 +29,7 @@ Insights 页面显示选定时段的以下性能指标: * **Subscription value(订阅价值):**订阅的可能总收入(美元)。 此值表示在没有计划或免费试用被取消并且所有信用交易都成功的情况下的可能收入。 订阅价值包括计划在选定时段内的全部价值,从免费试用开始计算,即使在该时段内没有任何财务交易。 订阅价值还包括选定时段内升级计划的全部价值,但不包括按比例分配的金额。 要查看和下载单个交易,请参阅“[GitHub Marketplace 交易](/marketplace/github-marketplace-transactions/)”。 * **Visitors(访客数):**查看过 GitHub 应用程序上架页面的人数。 此数字包括已登录和已注销的访客。 -* **Pageviews(网页浏览量):**GitHub 应用程序上架页面获得的浏览次数。 单个访客可以产生多个网页浏览量。 +* **Pageviews(网页浏览量):**GitHub 应用程序上架页面获得的浏览次数。 A single visitor can generate more than one page view. {% note %} diff --git a/translations/zh-CN/content/developers/github-marketplace/listing-an-app-on-github-marketplace/submitting-your-listing-for-publication.md b/translations/zh-CN/content/developers/github-marketplace/listing-an-app-on-github-marketplace/submitting-your-listing-for-publication.md index 076b6d74cd..022729dab9 100644 --- a/translations/zh-CN/content/developers/github-marketplace/listing-an-app-on-github-marketplace/submitting-your-listing-for-publication.md +++ b/translations/zh-CN/content/developers/github-marketplace/listing-an-app-on-github-marketplace/submitting-your-listing-for-publication.md @@ -19,7 +19,7 @@ shortTitle: 提交您的列表 ![Marketplace 上架信息草稿的选项概述](/assets/images/marketplace/edit-marketplace-listing-overview.png) -2. 要提交已完成的应用程序上架信息,请单击 **Request publish(请求发布)**。 +2. To submit your completed app listing, click **Request publish**. !["将应用程序发布到 Marketplace"检查列表,底部有提交按钮](/assets/images/marketplace/publish-your-app-checklist-and-submission.png) diff --git a/translations/zh-CN/content/developers/github-marketplace/using-the-github-marketplace-api-in-your-app/handling-new-purchases-and-free-trials.md b/translations/zh-CN/content/developers/github-marketplace/using-the-github-marketplace-api-in-your-app/handling-new-purchases-and-free-trials.md index 54fb39ac9f..afde8edef1 100644 --- a/translations/zh-CN/content/developers/github-marketplace/using-the-github-marketplace-api-in-your-app/handling-new-purchases-and-free-trials.md +++ b/translations/zh-CN/content/developers/github-marketplace/using-the-github-marketplace-api-in-your-app/handling-new-purchases-and-free-trials.md @@ -58,7 +58,7 @@ When a customer purchases your app, you must send the customer through the OAuth * If your app is an {% data variables.product.prodname_oauth_app %}, begin the authorization flow as soon as {% data variables.product.product_name %} redirects the customer to the **Installation URL**. Follow the steps in "[Authorizing {% data variables.product.prodname_oauth_apps %}](/apps/building-oauth-apps/authorizing-oauth-apps/)." -For either type of app, the first step is to redirect the customer to https://github.com/login/oauth/authorize. +For either type of app, the first step is to redirect the customer to [https://github.com/login/oauth/authorize](https://github.com/login/oauth/authorize). After the customer completes the authorization, your app receives an OAuth access token for the customer. You'll need this token for the next step. diff --git a/translations/zh-CN/content/developers/github-marketplace/using-the-github-marketplace-api-in-your-app/handling-plan-changes.md b/translations/zh-CN/content/developers/github-marketplace/using-the-github-marketplace-api-in-your-app/handling-plan-changes.md index dfaa999146..1bdadd77a5 100644 --- a/translations/zh-CN/content/developers/github-marketplace/using-the-github-marketplace-api-in-your-app/handling-plan-changes.md +++ b/translations/zh-CN/content/developers/github-marketplace/using-the-github-marketplace-api-in-your-app/handling-plan-changes.md @@ -50,7 +50,7 @@ topics: 您可以使用升级 URL 将用户从应用程序的 UI 重定向到 GitHub 上的升级页面: -``` +```text https://www.github.com/marketplace//upgrade// ``` diff --git a/translations/zh-CN/content/developers/overview/about-githubs-apis.md b/translations/zh-CN/content/developers/overview/about-githubs-apis.md index 33bfa287d7..f5a0ccfc8d 100644 --- a/translations/zh-CN/content/developers/overview/about-githubs-apis.md +++ b/translations/zh-CN/content/developers/overview/about-githubs-apis.md @@ -3,6 +3,8 @@ title: 关于 GitHub 的 API intro: '了解 {% data variables.product.prodname_dotcom %} 的 API 以扩展和自定义您的 {% data variables.product.prodname_dotcom %} 体验。' redirect_from: - /v3/versions + - /articles/getting-started-with-the-api + - /github/extending-github/getting-started-with-the-api versions: fpt: '*' ghes: '*' diff --git a/translations/zh-CN/content/developers/overview/managing-deploy-keys.md b/translations/zh-CN/content/developers/overview/managing-deploy-keys.md index 569c67a9fc..ca2eec5233 100644 --- a/translations/zh-CN/content/developers/overview/managing-deploy-keys.md +++ b/translations/zh-CN/content/developers/overview/managing-deploy-keys.md @@ -34,11 +34,11 @@ topics: #### 设置 1. 在本地开启代理转发。 更多信息请参阅[我们的 SSH 代理转发指南][ssh-agent-forwarding]。 -2. 将部署脚本设置为使用代理转发。 例如,在 bash 脚本中,启用代理转发如下所示:`ssh -A serverA 'bash -s' < deploy.sh` +2. 将部署脚本设置为使用代理转发。 For example, on a bash script, enabling agent forwarding would look something like this: `ssh -A serverA 'bash -s' < deploy.sh` ## 使用 OAuth 令牌进行 HTTPS 克隆 -如果不想使用 SSH 密钥,您可以使用 [HTTPS 结合 OAuth 令牌][git-automation]。 +If you don't want to use SSH keys, you can use HTTPS with OAuth tokens. #### 优点 @@ -57,7 +57,7 @@ topics: #### 设置 -请参阅[使用令牌的 Git 自动化指南][git-automation]。 +See [our guide on creating a personal access token](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). ## 部署密钥 @@ -78,7 +78,7 @@ topics: #### 设置 -1. 在服务器上[运行 `ssh-keygen` 进程][generating-ssh-keys],并记住保存生成的公共/私有 RSA 密钥对的位置。 +1. [Run the `ssh-keygen` procedure][generating-ssh-keys] on your server, and remember where you save the generated public and private rsa key pair key pair. 2. 在 {% data variables.product.product_name %} 的右上角,单击您的个人资料照片,然后单击 **Your profile(您的个人资料)**。 ![个人资料导航](/assets/images/profile-page.png) 3. 在个人资料页面上,单击 **Repositories(仓库)**,然后单击仓库的名称。 ![仓库链接](/assets/images/repos.png) 4. 在仓库中,单击 **Settings(设置)**。 ![仓库设置](/assets/images/repo-settings.png) @@ -182,10 +182,8 @@ $ git clone git@{% ifversion fpt or ghec %}github.com{% else %}my-GHE-hostname.c [ssh-agent-forwarding]: /guides/using-ssh-agent-forwarding/ [generating-ssh-keys]: /articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#generating-a-new-ssh-key +[generating-ssh-keys]: /articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#generating-a-new-ssh-key [tos]: /free-pro-team@latest/github/site-policy/github-terms-of-service/ -[git-automation]: /articles/git-automation-with-oauth-tokens -[git-automation]: /articles/git-automation-with-oauth-tokens [collaborator]: /articles/inviting-collaborators-to-a-personal-repository [outside-collaborator]: /articles/adding-outside-collaborators-to-repositories-in-your-organization [team]: /articles/adding-organization-members-to-a-team - diff --git a/translations/zh-CN/content/developers/overview/using-ssh-agent-forwarding.md b/translations/zh-CN/content/developers/overview/using-ssh-agent-forwarding.md index 152a12a255..ab6e871ea0 100644 --- a/translations/zh-CN/content/developers/overview/using-ssh-agent-forwarding.md +++ b/translations/zh-CN/content/developers/overview/using-ssh-agent-forwarding.md @@ -79,7 +79,7 @@ $ ssh -T git@{% ifversion ghes or ghae %}hostname{% else %}github.com{% endif %} ### 您必须使用 SSH URL 检出代码 -SSH 转发仅适用于 SSH URL,而不是 HTTP(s) URL。 检查服务器上的 *.git/config* 文件,并确保 URL 是 SSH 样式的 URL,如下所示: +SSH 转发仅适用于 SSH URL,而不是 HTTP(s) URL。 检查服务器上的 `.git/config` 文件,并确保 URL 是 SSH 样式的 URL,如下所示: ```shell [remote "origin"] @@ -107,7 +107,7 @@ $ exit # Returns to your local command prompt ``` -在上面的示例中,先加载 *~/.ssh/config* 文件,然后读取 */etc/ssh_config* 文件。 通过运行以下命令,我们可以检查该文件以查看它是否覆盖了我们的选项: +在上面的示例中,先加载 `~/.ssh/config` 文件,然后读取 `/etc/ssh_config` 文件。 通过运行以下命令,我们可以检查该文件以查看它是否覆盖了我们的选项: ```shell $ cat /etc/ssh_config @@ -117,7 +117,7 @@ $ cat /etc/ssh_config > ForwardAgent no ``` -在此示例中,我们的 */etc/ssh_config* 文件特别表示 `ForwardAgent no`,这是一种阻止代理转发的方式。 从文件中删除此行应该会使代理转发再次起作用。 +在此示例中,我们的 `/etc/ssh_config` 文件特别表示 `ForwardAgent no`,这是一种阻止代理转发的方式。 从文件中删除此行应该会使代理转发再次起作用。 ### 您的服务器必须允许入站连接上的 SSH 代理转发 diff --git a/translations/zh-CN/content/developers/webhooks-and-events/webhooks/creating-webhooks.md b/translations/zh-CN/content/developers/webhooks-and-events/webhooks/creating-webhooks.md index b94e0c034d..5938246f6a 100644 --- a/translations/zh-CN/content/developers/webhooks-and-events/webhooks/creating-webhooks.md +++ b/translations/zh-CN/content/developers/webhooks-and-events/webhooks/creating-webhooks.md @@ -22,9 +22,9 @@ topics: ## 向互联网显示本地主机 -在本教程中,我们将使用本地服务器接收来自 {% data variables.product.prodname_dotcom %} 的消息。 因此,首先,我们需要将我们的本地发展环境显示给互联网。 我们将使用 ngrok 实现此目的。 所有主要操作系统均可免费使用 ngrok。 更多信息请参阅 [ngrok 下载页面](https://ngrok.com/download)。 +在本教程中,我们将使用本地服务器接收来自 {% data variables.product.prodname_dotcom %} 的消息。 因此,首先,我们需要将我们的本地发展环境显示给互联网。 我们将使用 ngrok 实现此目的。 所有主要操作系统均可免费使用 ngrok。 For more information, see [the `ngrok` download page](https://ngrok.com/download). -在安装 ngrok 后,您可以在命令行上运行 `./ngrok http 4567` 以暴露本地主机。 4567 是我们服务器侦听消息的端口号。 您应该会看到如下所示的行: +After installing `ngrok`, you can expose your localhost by running `./ngrok http 4567` on the command line. 4567 是我们服务器侦听消息的端口号。 您应该会看到如下所示的行: ```shell $ Forwarding http://7e9ea9dc.ngrok.io -> 127.0.0.1:4567 diff --git a/translations/zh-CN/content/discussions/managing-discussions-for-your-community/index.md b/translations/zh-CN/content/discussions/managing-discussions-for-your-community/index.md index 0cd3813489..e70233b26e 100644 --- a/translations/zh-CN/content/discussions/managing-discussions-for-your-community/index.md +++ b/translations/zh-CN/content/discussions/managing-discussions-for-your-community/index.md @@ -9,5 +9,6 @@ children: - /managing-discussions-in-your-repository - /managing-categories-for-discussions-in-your-repository - /moderating-discussions + - /viewing-insights-for-your-discussions --- diff --git a/translations/zh-CN/content/discussions/managing-discussions-for-your-community/viewing-insights-for-your-discussions.md b/translations/zh-CN/content/discussions/managing-discussions-for-your-community/viewing-insights-for-your-discussions.md new file mode 100644 index 0000000000..91a0cb9e79 --- /dev/null +++ b/translations/zh-CN/content/discussions/managing-discussions-for-your-community/viewing-insights-for-your-discussions.md @@ -0,0 +1,34 @@ +--- +title: Viewing insights for your discussions +intro: 'Discussions insights provide data about your discussions'' activity, views, and contributors.' +permissions: Repository administrators and people with maintain access to a repository can view the discussions insights dashboard. +versions: + fpt: '*' + ghec: '*' +topics: + - Discussions +shortTitle: View discussions insights +--- + +## About the discussions insights dashboard + +You can use discussions insights to help understand the contribution activity, page views, and growth of your repository's discussions community. +- **Contribution activity** shows the count of total contributions to discussions, issues, and pull requests. +- **Discussions page views** shows the total page views for discussions, segmented by logged in versus anonymous viewers. +- **Discussions daily contributors** shows the daily count of unique users who have reacted, upvoted, marked an answer, commented, or posted in the selected time period. +- **Discussions new contributors** shows the daily count of unique new users who have reacted, upvoted, marked an answer, commented, or posted in the selected time period. + +![Screenshot of the discussions dashboard](/assets/images/help/discussions/discussions-dashboard.png) + +{% tip %} + +**Tip:** To view the exact data for a time period, hover over that time period in the graph. + +{% endtip %} + +## Viewing discussions insights + +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.accessing-repository-graphs %} +3. 在左侧栏中,单击 **Community(社区)**。 ![Screenshot of the "Community" tab in left sidebar](/assets/images/help/graphs/graphs-sidebar-community-tab.png) +1. Optionally, in the upper-right corner of the page, select the **Period** dropdown menu and click the time period for which you want to view data: **30 days**, **3 months**, or **1 year**. ![Screenshot of the date range selector for discussions insights](/assets/images/help/discussions/discussions-dashboard-date-selctor.png) diff --git a/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/about-github-marketplace.md b/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/about-github-marketplace.md new file mode 100644 index 0000000000..fef163b17b --- /dev/null +++ b/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/about-github-marketplace.md @@ -0,0 +1,35 @@ +--- +title: About GitHub Marketplace +intro: '{% data variables.product.prodname_marketplace %} contains tools that add functionality and improve your workflow.' +redirect_from: + - /articles/about-github-marketplace + - /github/customizing-your-github-workflow/about-github-marketplace + - /github/customizing-your-github-workflow/exploring-integrations/about-github-marketplace +versions: + fpt: '*' + ghec: '*' +--- +You can discover, browse, and install free and paid tools, including {% data variables.product.prodname_github_apps %}, {% data variables.product.prodname_oauth_apps %}, and {% data variables.product.prodname_actions %}, in [{% data variables.product.prodname_marketplace %}](https://github.com/marketplace). + +If you purchase a paid tool, you'll pay for your tool subscription with the same billing information you use to pay for your {% data variables.product.product_name %} subscription, and receive one bill on your regular billing date. For more information, see "[About billing for {% data variables.product.prodname_marketplace %}](/articles/about-billing-for-github-marketplace)." + +You may also have the option to select a free 14-day trial on some tools. You can cancel at any time during your trial and you won't be charged, but you will automatically lose access to the tool. Your paid subscription will start at the end of the 14-day trial. For more information, see "[About billing for {% data variables.product.prodname_marketplace %}](/articles/about-billing-for-github-marketplace)." + +## Finding tools on {% data variables.product.prodname_marketplace %} + +You can discover, browse, and install apps and actions created by others on {% data variables.product.prodname_marketplace %}, see "[Searching {% data variables.product.prodname_marketplace %}](/search-github/searching-on-github/searching-github-marketplace)." + +{% data reusables.actions.actions-not-verified %} + +Anyone can list a free {% data variables.product.prodname_github_app %} or {% data variables.product.prodname_oauth_app %} on {% data variables.product.prodname_marketplace %}. Publishers of paid apps are verified by {% data variables.product.company_short %} and listings for these apps are shown with a marketplace badge {% octicon "verified" aria-label="Verified creator badge" %}. You will also see badges for unverified and verified apps. These apps were published using the previous method for verifying individual apps. For more information about the current process, see "[About GitHub Marketplace](/developers/github-marketplace/about-github-marketplace)" and "[Requirements for listing an app](/developers/github-marketplace/requirements-for-listing-an-app)." + +## Building and listing a tool on {% data variables.product.prodname_marketplace %} + +For more information on creating your own tool to list on {% data variables.product.prodname_marketplace %}, see "[Apps](/developers/apps)" and "[{% data variables.product.prodname_actions %}](/actions)." + +## Further reading + +- "[Purchasing and installing apps in {% data variables.product.prodname_marketplace %}](/articles/purchasing-and-installing-apps-in-github-marketplace)" +- "[Managing billing for {% data variables.product.prodname_marketplace %} apps](/articles/managing-billing-for-github-marketplace-apps)" +- "[{% data variables.product.prodname_marketplace %} support](/articles/github-marketplace-support)" +- "[Differences between GitHub Apps and OAuth Apps](/developers/apps/differences-between-github-apps-and-oauth-apps)" diff --git a/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/about-integrations.md b/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/about-integrations.md new file mode 100644 index 0000000000..24a8126f0b --- /dev/null +++ b/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/about-integrations.md @@ -0,0 +1,43 @@ +--- +title: 关于集成 +intro: '集成是连接 {% data variables.product.product_name %} 服务以完善和扩展工作流程的工具与服务。' +redirect_from: + - /articles/about-integrations + - /github/customizing-your-github-workflow/about-integrations + - /github/customizing-your-github-workflow/exploring-integrations/about-integrations +versions: + fpt: '*' + ghec: '*' +--- + +您可以在您的个人帐户或拥有的组织中安装集成, 也可从您具有管理员权限或者您的组织所拥有的特定仓库中的第三方安装 {% data variables.product.prodname_github_apps %}。 + +## {% data variables.product.prodname_github_apps %} 与 {% data variables.product.prodname_oauth_apps %} 之间的差异 + +集成可以是 {% data variables.product.prodname_github_apps %}, {% data variables.product.prodname_oauth_apps %},或任何使用 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 或 web 挂钩的工具。 + +{% data variables.product.prodname_github_apps %} 可提供细致的权限,申请只访问应用程序需要的内容。 {% data variables.product.prodname_github_apps %} 还提供特定的用户级权限,当应用程序安装或者集成者更改应用程序请求的权限时,每个用户都必须个别授权。 + +更多信息请参阅: +- "[{% data variables.product.prodname_github_apps %} 与 {% data variables.product.prodname_oauth_apps %} 之间的差异](/apps/differences-between-apps/)" +- "[关于应用程序](/apps/about-apps/)" +- “[用户级权限](/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/#user-level-permissions)” +- "[授权 {% data variables.product.prodname_oauth_apps %}](/github/authenticating-to-github/keeping-your-account-and-data-secure/authorizing-oauth-apps)" +- "[Authorizing {% data variables.product.prodname_github_apps %}](/github/authenticating-to-github/keeping-your-account-and-data-secure/authorizing-github-apps)" +- "[审查授权的集成](/articles/reviewing-your-authorized-integrations/)" + +如果集成者或应用程序创建者使用 {% data variables.product.prodname_github_app %} 清单流程创建了应用程序,您可以安装预配置的 {% data variables.product.prodname_github_app %}。 有关如何以自动化配置运行 {% data variables.product.prodname_github_app %} 的信息,请联系集成者或应用程序创建者。 + +如果使用 Probot 构建应用程序,您可以通过简化的配置创建 {% data variables.product.prodname_github_app %}。 更多信息请参阅 [Probot 文档](https://probot.github.io/docs/)站点。 + +## 发现 {% data variables.product.prodname_marketplace %} 中的集成 + +您可以在 {% data variables.product.prodname_marketplace %} 中查找要安装的集成或发布您自己的集成。 + +[{% data variables.product.prodname_marketplace %}](https://github.com/marketplace) 包含 {% data variables.product.prodname_github_apps %} 和 {% data variables.product.prodname_oauth_apps %}。 有关查找集成或创建您自己的集成的更多信息,请参阅“[关于 {% data variables.product.prodname_marketplace %}](/articles/about-github-marketplace)”。 + +## 直接从集成者购买的集成 + +您也可以直接从集成者购买一些集成。 作为组织成员,如果您发现喜欢使用的 {% data variables.product.prodname_github_app %},可以申请组织批准并为组织安装该应用程序。 + +如果您对其中安装应用程序的所有组织拥有的仓库具有管理员权限,可以使用仓库级权限安装 {% data variables.product.prodname_github_apps %},而无需要求组织所有者批准该应用程序。 当集成者更改应用程序的权限时,如果权限只适用于仓库,则组织所有者以及对安装应用程序的仓库具有管理员权限的人员可以审查和接受新权限。 diff --git a/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/about-webhooks.md b/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/about-webhooks.md new file mode 100644 index 0000000000..831df21b90 --- /dev/null +++ b/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/about-webhooks.md @@ -0,0 +1,32 @@ +--- +title: 关于 web 挂钩 +redirect_from: + - /post-receive-hooks + - /articles/post-receive-hooks + - /articles/creating-webhooks + - /articles/about-webhooks + - /github/extending-github/about-webhooks +intro: Web 挂钩是一种通知方式,只要仓库或组织上发生特定操作,就会发送通知到外部 web 服务器。 +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +--- + +{% tip %} + +**提示:** {% data reusables.organizations.owners-and-admins-can %} 为组织管理 web 挂钩。 {% data reusables.organizations.new-org-permissions-more-info %} + +{% endtip %} + +只要在仓库或组织上执行特定的操作,就可触发 web 挂钩。 例如,您可以配置 web 挂钩在以下情况下执行: + +* 推送到仓库 +* 打开拉取请求 +* 构建 {% data variables.product.prodname_pages %} 网站 +* 团队新增成员 + +使用 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 可以让这些 web 挂钩更新外部议题跟踪器、触发 CI 构建、更新备份镜像,甚至部署到生产服务器。 + +要设置新的 web 挂钩,您需要访问外部服务器并熟悉所涉及的技术程序。 有关构建 web 挂钩的帮助,包括可以关联的完整操作列表,请参阅“[web 挂钩](/webhooks)”。 diff --git a/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations.md b/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations.md new file mode 100644 index 0000000000..5e46b9bea5 --- /dev/null +++ b/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations.md @@ -0,0 +1,55 @@ +--- +title: GitHub 扩展和集成 +intro: '通过 {% data variables.product.product_name %} 扩展可在第三方应用程序中无缝使用 {% data variables.product.product_name %} 仓库。' +redirect_from: + - /articles/about-github-extensions-for-third-party-applications + - /articles/github-extensions-and-integrations + - /github/customizing-your-github-workflow/github-extensions-and-integrations + - /github/customizing-your-github-workflow/exploring-integrations/github-extensions-and-integrations +versions: + fpt: '*' + ghec: '*' +shortTitle: 扩展和集成 +--- + +## 编辑器工具 + +您可以在第三方编辑器工具中连接到 {% data variables.product.product_name %} 仓库,例如 Atom、Unity 和 Visual Studio 等工具。 + +### {% data variables.product.product_name %} for Atom + +使用 {% data variables.product.product_name %} for Atom 扩展,您可以从 Atom 编辑器中提交、推送、拉取和解决合并冲突等。 更多信息请参阅官方 [{% data variables.product.product_name %} for Atom 站点](https://github.atom.io/)。 + +### {% data variables.product.product_name %} for Unity + +使用 {% data variables.product.product_name %} for Unity 编辑器扩展,您可以在开源游戏开发平台 Unity 上进行开发,在 {% data variables.product.product_name %} 查看您的工作。 更多信息请参阅官方 Unity 编辑器扩展[站点](https://unity.github.com/)或[文档](https://github.com/github-for-unity/Unity/tree/master/docs)。 + +### {% data variables.product.product_name %} for Visual Studio + +使用 {% data variables.product.product_name %} for Visual Studio 扩展,您可以 Visual Studio 中处理 {% data variables.product.product_name %} 仓库。 更多信息请参阅官方 Visual Studio 扩展[站点](https://visualstudio.github.com/)或[文档](https://github.com/github/VisualStudio/tree/master/docs)。 + +### {% data variables.product.prodname_dotcom %} for Visual Studio Code + +使用 {% data variables.product.prodname_dotcom %} for Visual Studio Code 扩展,您可以在 Visual Studio Code 中审查和管理 {% data variables.product.product_name %} 拉取请求。 更多信息请参阅官方 Visual Studio Code 扩展[站点](https://vscode.github.com/)或[文档](https://github.com/Microsoft/vscode-pull-request-github)。 + +## 项目管理工具 + +您可以将 {% data variables.product.product_location %} 上的个人或组织帐户与第三方项目管理工具(如 Jira)集成。 + +### Jira Cloud 与 {% data variables.product.product_name %}.com 集成 + +您可以将 Jira Cloud 与个人或组织帐户集成,以扫描提交和拉取请求,在任何提及的 Jira 议题中创建相关的元数据和超链接。 更多信息请访问 Marketplace 中的 [Jira 集成应用程序](https://github.com/marketplace/jira-software-github)。 + +## 团队通信工具 + +您可以将 {% data variables.product.product_location %} 上的个人或组织帐户与第三方团队通信工具(如 Slack 或 Microsoft Teams)集成。 + +### Slack 与 {% data variables.product.product_name %} 集成 + +您可以订阅仓库或组织,并获得有关议题、拉取请求、提交、发布、部署审查和部署状态的实时更新。 您还可以执行关闭或打开议题等活动,并在不离开 Slack 的情况下提供丰富的议题和拉取请求参考。 + +The {% data variables.product.prodname_dotcom %} app is also compatible with [Slack Enterprise Grid](https://slack.com/intl/en-in/help/articles/360000281563-Manage-apps-on-Enterprise-Grid). 更多信息请访问 Marketplace 中的 [Slack 集成应用程序](https://github.com/marketplace/slack-github)。 + +### Microsoft Teams 与 {% data variables.product.product_name %} 集成 + +您可以订阅仓库或组织,并获得有关议题、拉取请求、提交、部署审查和部署状态的实时更新。 您也可以执行一些活动,如关闭或打开议题、评论您的议题和拉取请求,以及提供丰富的议题和拉取请求引用而不离开 Microsoft Teams。 更多信息请访问 Microsoft AppSource 中的 [Microsoft Teams 集成应用程序](https://appsource.microsoft.com/en-us/product/office/WA200002077)。 diff --git a/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/index.md b/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/index.md new file mode 100644 index 0000000000..651e5782f0 --- /dev/null +++ b/translations/zh-CN/content/get-started/customizing-your-github-workflow/exploring-integrations/index.md @@ -0,0 +1,18 @@ +--- +title: 探索集成 +intro: '您可以使用 {% data variables.product.product_name %} 社区构建的工具和服务,自定义和扩展您的 {% data variables.product.product_name %} 工作流程。' +redirect_from: + - /articles/exploring-integrations + - /github/customizing-your-github-workflow/exploring-integrations +versions: + fpt: '*' + ghec: '*' + ghes: '*' + ghae: '*' +children: + - /about-integrations + - /about-webhooks + - /about-github-marketplace + - /github-extensions-and-integrations +--- + diff --git a/translations/zh-CN/content/get-started/customizing-your-github-workflow/index.md b/translations/zh-CN/content/get-started/customizing-your-github-workflow/index.md new file mode 100644 index 0000000000..1131407cca --- /dev/null +++ b/translations/zh-CN/content/get-started/customizing-your-github-workflow/index.md @@ -0,0 +1,17 @@ +--- +title: 自定义 GitHub 工作流程 +intro: 'Learn how you can customize your {% data variables.product.prodname_dotcom %} workflow with extensions, integrations, {% data variables.product.prodname_marketplace %}, and webhooks.' +redirect_from: + - /categories/customizing-your-github-workflow + - /github/customizing-your-github-workflow +versions: + fpt: '*' + ghec: '*' + ghae: '*' + ghes: '*' +children: + - /exploring-integrations + - /purchasing-and-installing-apps-in-github-marketplace +shortTitle: 自定义工作流程 +--- + diff --git a/translations/zh-CN/content/get-started/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/index.md b/translations/zh-CN/content/get-started/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/index.md new file mode 100644 index 0000000000..021621c2f2 --- /dev/null +++ b/translations/zh-CN/content/get-started/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/index.md @@ -0,0 +1,15 @@ +--- +title: 在 GitHub Marketplace 中购买并安装应用程序 +intro: '{% data variables.product.prodname_marketplace %} 包含的应用程序中有免费和付费定价计划。 找到想用于个人帐户或组织的付费应用程序后,您可以使用现有的计费信息购买并安装该应用程序。' +redirect_from: + - /articles/purchasing-and-installing-apps-in-github-marketplace + - /github/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace +versions: + fpt: '*' + ghec: '*' +children: + - /installing-an-app-in-your-personal-account + - /installing-an-app-in-your-organization +shortTitle: 安装 Marketplace app +--- + diff --git a/translations/zh-CN/content/get-started/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/installing-an-app-in-your-organization.md b/translations/zh-CN/content/get-started/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/installing-an-app-in-your-organization.md new file mode 100644 index 0000000000..2845d303d8 --- /dev/null +++ b/translations/zh-CN/content/get-started/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/installing-an-app-in-your-organization.md @@ -0,0 +1,51 @@ +--- +title: 在组织中安装应用程序 +intro: '您可以从 {% data variables.product.prodname_marketplace %} 安装要在组织中使用的应用程序。' +redirect_from: + - /articles/installing-an-app-in-your-organization + - /github/customizing-your-github-workflow/installing-an-app-in-your-organization + - /github/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/installing-an-app-in-your-organization +versions: + fpt: '*' + ghec: '*' +shortTitle: 安装应用组织 +--- + +{% data reusables.marketplace.marketplace-apps-only %} + +{% data reusables.marketplace.marketplace-org-perms %} + +如果选择付费计划,则要使用组织现有的支付方式,在组织的当前结算日期支付应用程序订阅。 + +{% data reusables.marketplace.free-trials %} + +## 在组织中安装 {% data variables.product.prodname_github_app %} + +{% data reusables.marketplace.visit-marketplace %} +{% data reusables.marketplace.browse-to-app %} +{% data reusables.marketplace.choose-plan %} +{% data reusables.marketplace.install-buy %} +{% data reusables.marketplace.confirm-install-account-org %} +{% data reusables.marketplace.add-payment-method-org %} +{% data reusables.marketplace.complete-order-begin-installation %} +8. 如果应用程序需要访问仓库,请决定允许应用程序访问您的所有仓库还是某些仓库,然后选择 **All repositories(所有仓库)**或 **Only select repositories(仅所选仓库)**。 ![用于在所有仓库或某些仓库上安装应用程序的选项单选按钮](/assets/images/help/marketplace/marketplace-choose-repo-install-option.png) +{% data reusables.marketplace.select-installation-repos %} +{% data reusables.marketplace.review-app-perms-install %} + +## 在组织中安装 {% data variables.product.prodname_oauth_app %} + +{% data reusables.saml.saml-session-oauth %} + +{% data reusables.marketplace.visit-marketplace %} +{% data reusables.marketplace.browse-to-app %} +{% data reusables.marketplace.choose-plan %} +{% data reusables.marketplace.install-buy %} +{% data reusables.marketplace.confirm-install-account-org %} +{% data reusables.marketplace.add-payment-method-org %} +{% data reusables.marketplace.complete-order-begin-installation %} +8. 检查有关应用程序对您的个人帐户、组织和数据访问权限的信息,然后单击 **Authorize application(授权应用程序)**。 + +## 延伸阅读 + +- "[更新组织的支付方式](/articles/updating-your-organization-s-payment-method)" +- "[在个人帐户中安装应用程序](/articles/installing-an-app-in-your-personal-account)" diff --git a/translations/zh-CN/content/get-started/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/installing-an-app-in-your-personal-account.md b/translations/zh-CN/content/get-started/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/installing-an-app-in-your-personal-account.md new file mode 100644 index 0000000000..50832fe2a0 --- /dev/null +++ b/translations/zh-CN/content/get-started/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/installing-an-app-in-your-personal-account.md @@ -0,0 +1,49 @@ +--- +title: 在个人帐户中安装应用程序 +intro: '您可以从 {% data variables.product.prodname_marketplace %} 安装要在个人帐户中使用的应用程序。' +redirect_from: + - /articles/installing-an-app-in-your-personal-account + - /github/customizing-your-github-workflow/installing-an-app-in-your-personal-account + - /github/customizing-your-github-workflow/purchasing-and-installing-apps-in-github-marketplace/installing-an-app-in-your-personal-account +versions: + fpt: '*' + ghec: '*' +shortTitle: 安装应用程序用户帐户 +--- + +{% data reusables.marketplace.marketplace-apps-only %} + +如果选择付费计划,则要使用组织现有的支付方式,在个人帐户的当前结算日期支付应用程序订阅。 + +{% data reusables.marketplace.free-trials %} + +## 在个人帐户中安装 {% data variables.product.prodname_github_app %} + +{% data reusables.marketplace.visit-marketplace %} +{% data reusables.marketplace.browse-to-app %} +{% data reusables.marketplace.choose-plan %} +{% data reusables.marketplace.install-buy %} +{% data reusables.marketplace.confirm-install-account-personal %} +{% data reusables.marketplace.add-payment-method-personal %} +{% data reusables.marketplace.complete-order-begin-installation %} +8. 决定允许应用程序访问您的所有仓库还是某些仓库,然后选择 **All repositories(所有仓库)**或 **Only select repositories(仅所选仓库)**。 ![用于在所有仓库或某些仓库上安装应用程序的选项单选按钮](/assets/images/help/marketplace/marketplace-choose-repo-install-option.png) +{% data reusables.marketplace.select-installation-repos %} +{% data reusables.marketplace.review-app-perms-install %} + +## 在个人帐户中安装 {% data variables.product.prodname_oauth_app %} + +{% data reusables.saml.saml-session-oauth %} + +{% data reusables.marketplace.visit-marketplace %} +{% data reusables.marketplace.browse-to-app %} +{% data reusables.marketplace.choose-plan %} +{% data reusables.marketplace.install-buy %} +{% data reusables.marketplace.confirm-install-account-personal %} +{% data reusables.marketplace.add-payment-method-personal %} +{% data reusables.marketplace.complete-order-begin-installation %} +8. 检查有关应用程序对您的个人帐户和数据访问权限的信息,然后单击 **Authorize application(授权应用程序)**。 + +## 延伸阅读 + +- "[更新个人帐户的支付方式](/articles/updating-your-personal-account-s-payment-method)" +- "[在组织中安装应用程序](/articles/installing-an-app-in-your-organization)" diff --git a/translations/zh-CN/content/get-started/getting-started-with-git/associating-text-editors-with-git.md b/translations/zh-CN/content/get-started/getting-started-with-git/associating-text-editors-with-git.md index a2b7a4076c..4ffafad222 100644 --- a/translations/zh-CN/content/get-started/getting-started-with-git/associating-text-editors-with-git.md +++ b/translations/zh-CN/content/get-started/getting-started-with-git/associating-text-editors-with-git.md @@ -49,7 +49,7 @@ shortTitle: 关联文本编辑器 ## 使用 TextMate 作为编辑器 1. 安装 [TextMate](https://macromates.com/)。 -2. 安装 TextMate 的 `mate` shell 实用程序。 更多信息请参阅 TextMate 文档中的“[mate 和 rmate](https://macromates.com/blog/2011/mate-and-rmate/)”。 +2. 安装 TextMate 的 `mate` shell 实用程序。 For more information, see "[`mate` and `rmate`](https://macromates.com/blog/2011/mate-and-rmate/)" in the TextMate documentation. {% data reusables.command_line.open_the_multi_os_terminal %} 4. 输入此命令: ```shell diff --git a/translations/zh-CN/content/get-started/importing-your-projects-to-github/working-with-subversion-on-github/subversion-properties-supported-by-github.md b/translations/zh-CN/content/get-started/importing-your-projects-to-github/working-with-subversion-on-github/subversion-properties-supported-by-github.md index 7f93ffc676..5a4efc013a 100644 --- a/translations/zh-CN/content/get-started/importing-your-projects-to-github/working-with-subversion-on-github/subversion-properties-supported-by-github.md +++ b/translations/zh-CN/content/get-started/importing-your-projects-to-github/working-with-subversion-on-github/subversion-properties-supported-by-github.md @@ -12,15 +12,15 @@ versions: shortTitle: GitHub 支持的属性 --- -## 可执行文件 (svn:executable) +## Executable files (`svn:executable`) 我们通过在将文件模式添加到 Git 仓库之前直接进行更新来转换 `svn:executable` 属性。 -## MIME 类型 (svn:mime-type) +## MIME types (`svn:mime-type`) {% data variables.product.product_name %} 内部跟踪文件的 mime 类型和添加它们的提交。 -## 忽略未版本化的项目 (svn:ignore) +## Ignoring unversioned items (`svn:ignore`) 如果您已设置要在 Subversion 中忽略的文件和目录,{% data variables.product.product_name %} 将在内部跟踪它们。 Subversion 客户端忽略的文件与 *.gitignore* 文件中的条目完全不同。 diff --git a/translations/zh-CN/content/get-started/index.md b/translations/zh-CN/content/get-started/index.md index 918268f517..3ea2dcc101 100644 --- a/translations/zh-CN/content/get-started/index.md +++ b/translations/zh-CN/content/get-started/index.md @@ -62,6 +62,7 @@ children: - /exploring-projects-on-github - /getting-started-with-git - /using-git + - /customizing-your-github-workflow - /privacy-on-github --- diff --git a/translations/zh-CN/content/get-started/signing-up-for-github/setting-up-a-trial-of-github-ae.md b/translations/zh-CN/content/get-started/signing-up-for-github/setting-up-a-trial-of-github-ae.md index d922505b6e..716f08bbeb 100644 --- a/translations/zh-CN/content/get-started/signing-up-for-github/setting-up-a-trial-of-github-ae.md +++ b/translations/zh-CN/content/get-started/signing-up-for-github/setting-up-a-trial-of-github-ae.md @@ -12,7 +12,7 @@ shortTitle: GitHub AE trial You can set up a 90-day trial to evaluate {% data variables.product.prodname_ghe_managed %}. This process allows you to deploy a {% data variables.product.prodname_ghe_managed %} account in your existing Azure region. -- **{% data variables.product.prodname_ghe_managed %} account**: The Azure resource that contains the required components, including the instance. +- **{% data variables.product.prodname_ghe_managed %} account**: The Azure resource that contains the deployment of {% data variables.product.prodname_ghe_managed %}. - **{% data variables.product.prodname_ghe_managed %} portal**: The Azure management tool at [https://portal.azure.com](https://portal.azure.com). This is used to deploy the {% data variables.product.prodname_ghe_managed %} account. ## 设置 {% data variables.product.prodname_ghe_managed %} 的试用版 @@ -39,24 +39,24 @@ The email address you entered above will receive instructions on how to access y {% note %} -**Note:** Software updates for your {% data variables.product.prodname_ghe_managed %} instance are performed by {% data variables.product.prodname_dotcom %}. For more information, see "[About upgrades to new releases](/admin/overview/about-upgrades-to-new-releases)." +**Note:** Software updates for your {% data variables.product.prodname_ghe_managed %} deployment are performed by {% data variables.product.prodname_dotcom %}. For more information, see "[About upgrades to new releases](/admin/overview/about-upgrades-to-new-releases)." {% endnote %} ## Navigating to your enterprise -You can use the {% data variables.actions.azure_portal %} to navigate to your {% data variables.product.prodname_ghe_managed %} instance. The resulting list includes all the {% data variables.product.prodname_ghe_managed %} instances in your Azure region. +You can use the {% data variables.actions.azure_portal %} to navigate to your {% data variables.product.prodname_ghe_managed %} deployment. The resulting list includes all the {% data variables.product.prodname_ghe_managed %} deployments in your Azure region. 1. On the {% data variables.actions.azure_portal %}, in the left panel, click **All resources**. 1. From the available filters, click **All types**, then deselect **Select all** and select **GitHub AE**: ![{% data variables.actions.azure_portal %} search result](/assets/images/azure/github-ae-azure-portal-type-filter.png) ## 后续步骤 -Once your instance has been provisioned, the next step is to initialize {% data variables.product.prodname_ghe_managed %}. 更多信息请参阅“[初始化 {% data variables.product.prodname_ghe_managed %}](/github-ae@latest/admin/configuration/configuring-your-enterprise/initializing-github-ae)。” +Once your deployment has been provisioned, the next step is to initialize {% data variables.product.prodname_ghe_managed %}. 更多信息请参阅“[初始化 {% data variables.product.prodname_ghe_managed %}](/github-ae@latest/admin/configuration/configuring-your-enterprise/initializing-github-ae)。” ## 结束试用 -You can upgrade to a full license at any time during the trial period by contacting contact {% data variables.contact.contact_enterprise_sales %}. If you haven't upgraded by the last day of your trial, then the instance is automatically deleted. +You can upgrade to a full license at any time during the trial period by contacting contact {% data variables.contact.contact_enterprise_sales %}. If you haven't upgraded by the last day of your trial, then the deployment is automatically deleted. 如果需要更多时间来评估 {% data variables.product.prodname_ghe_managed %},请联系 {% data variables.contact.contact_enterprise_sales %} 申请延期。 diff --git a/translations/zh-CN/content/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-cloud.md b/translations/zh-CN/content/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-cloud.md index 5953009d94..5ec162d528 100644 --- a/translations/zh-CN/content/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-cloud.md +++ b/translations/zh-CN/content/get-started/signing-up-for-github/setting-up-a-trial-of-github-enterprise-cloud.md @@ -25,11 +25,9 @@ shortTitle: Enterprise Cloud 试用版 You can use organizations for free with {% data variables.product.prodname_free_team %}, which includes limited features. For additional features, such as SAML single sign-on (SSO), access control for {% data variables.product.prodname_pages %}, and included {% data variables.product.prodname_actions %} minutes, you can upgrade to {% data variables.product.prodname_ghe_cloud %}. For a detailed list of the features available with {% data variables.product.prodname_ghe_cloud %}, see our [Pricing](https://github.com/pricing) page. -{% data reusables.saml.saml-accounts %} For more information, see "[About identity and access management with SAML single sign-on](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on){% ifversion not ghec %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} +You can set up a trial of {% data variables.product.prodname_ghe_cloud %} to evaluate these additional features on a new or existing organization account. -{% data reusables.enterprise-accounts.emu-short-summary %} - -{% data variables.product.prodname_emus %} is not part of the free trial of {% data variables.product.prodname_ghe_cloud %}. If you're interested in {% data variables.product.prodname_emus %}, please contact [{% data variables.product.prodname_dotcom %}'s Sales team](https://enterprise.github.com/contact). +试用版也可用于 {% data variables.product.prodname_ghe_server %}。 更多信息请参阅“[设置 {% data variables.product.prodname_ghe_server %} 的试用](/articles/setting-up-a-trial-of-github-enterprise-server)”。 {% data reusables.products.which-product-to-use %} @@ -39,7 +37,11 @@ You can set up a 30-day trial to evaluate {% data variables.product.prodname_ghe 试用版包括 50 个席位。 如果需要更多席位来评估 {% data variables.product.prodname_ghe_cloud %},请联系 {% data variables.contact.contact_enterprise_sales %}。 在试用结束时,您可以选择不同数量的席位。 -试用版也可用于 {% data variables.product.prodname_ghe_server %}。 更多信息请参阅“[设置 {% data variables.product.prodname_ghe_server %} 的试用](/articles/setting-up-a-trial-of-github-enterprise-server)”。 +{% data reusables.saml.saml-accounts %} + +For more information, see "[About identity and access management with SAML single sign-on](/enterprise-cloud@latest/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on){% ifversion not ghec %}" in the {% data variables.product.prodname_ghe_cloud %} documentation.{% else %}."{% endif %} + +{% data variables.product.prodname_emus %} is not part of the free trial of {% data variables.product.prodname_ghe_cloud %}. If you're interested in {% data variables.product.prodname_emus %}, please contact [{% data variables.product.prodname_dotcom %}'s Sales team](https://enterprise.github.com/contact). ## 设置 {% data variables.product.prodname_ghe_cloud %} 的试用版 @@ -60,11 +62,13 @@ Before you can try {% data variables.product.prodname_ghe_cloud %}, you must be ## 结束试用 -在试用期间,您可以随时购买 {% data variables.product.prodname_enterprise %} 或降级到 {% data variables.product.prodname_team %}。 +You can buy {% data variables.product.prodname_enterprise %} at any time during your trial. Purchasing {% data variables.product.prodname_enterprise %} ends your trial, removing the 50-seat maximum and initiating payment. -如果在试用期结束前没有购买 {% data variables.product.prodname_enterprise %} 或 {% data variables.product.prodname_team %} , 您的组织将会降级到 {% data variables.product.prodname_free_team %},不能使用只包含在付费产品中的任何高级工具和功能,包括从那些私有仓库发布的 {% data variables.product.prodname_pages %} 站点。 如果您不打算升级,为避免失去高级功能的使用权限,请在试用结束前将仓库设为公共。 更多信息请参阅“[设置仓库可见性](/articles/setting-repository-visibility)”。 +If you don't purchase {% data variables.product.prodname_enterprise %}, when the trial ends, your organization will be downgraded. If you used an existing organization for the trial, the organization will be downgraded to the product you were using before the trial. If you created a new organization for the trial, the organization will be downgraded to {% data variables.product.prodname_free_team %}. -对于组织来说,降级到 {% data variables.product.prodname_free_team %} 还会禁用试用期间配置的任何 SAML 设置。 购买 {% data variables.product.prodname_enterprise %} 或 {% data variables.product.prodname_team %} 后,您的 SAML 设置将再次启用,以便您组织中的用户进行身份验证。 +Your organization will lose access to any functionality that is not included in the new product, such as advanced features like {% data variables.product.prodname_pages %} for private repositories. If you don't plan to upgrade, to avoid losing access to advanced features, consider making affected repositories public before your trial ends. 更多信息请参阅“[设置仓库可见性](/articles/setting-repository-visibility)”。 + +Downgrading also disables any SAML settings configured during the trial period. If you later purchase {% data variables.product.prodname_enterprise %}, your SAML settings will be enabled again for users in your organization to authenticate. {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} diff --git a/translations/zh-CN/content/get-started/using-git/about-git-subtree-merges.md b/translations/zh-CN/content/get-started/using-git/about-git-subtree-merges.md index d9e79d6f23..4732215303 100644 --- a/translations/zh-CN/content/get-started/using-git/about-git-subtree-merges.md +++ b/translations/zh-CN/content/get-started/using-git/about-git-subtree-merges.md @@ -53,7 +53,7 @@ versions: 1. 新增指向我们感兴趣的单独项目的远程 URL。 ```shell - $ git remote add -f spoon-knife git@github.com:octocat/Spoon-Knife.git + $ git remote add -f spoon-knife https://github.com/octocat/Spoon-Knife.git > Updating spoon-knife > warning: no common commits > remote: Counting objects: 1732, done. @@ -61,7 +61,7 @@ versions: > remote: Total 1732 (delta 1086), reused 1558 (delta 967) > Receiving objects: 100% (1732/1732), 528.19 KiB | 621 KiB/s, done. > Resolving deltas: 100% (1086/1086), done. - > From git://github.com/octocat/Spoon-Knife + > From https://github.com/octocat/Spoon-Knife > * [new branch] main -> Spoon-Knife/main ``` 2. 将 `Spon-Knife` 项目合并到当地 Git 项目。 这不会在本地更改任何文件,但会为下一步准备 Git。 diff --git a/translations/zh-CN/content/get-started/using-github/github-command-palette.md b/translations/zh-CN/content/get-started/using-github/github-command-palette.md index 112ea50bf5..6c6a2c5750 100644 --- a/translations/zh-CN/content/get-started/using-github/github-command-palette.md +++ b/translations/zh-CN/content/get-started/using-github/github-command-palette.md @@ -26,10 +26,12 @@ The ability to run commands directly from your keyboard, without navigating thro ## Opening the {% data variables.product.prodname_command_palette %} -Open the command palette using one of the following keyboard shortcuts: +Open the command palette using one of the following default keyboard shortcuts: - Windows and Linux: Ctrl+K or Ctrl+Alt+K - Mac: Command+K or Command+Option+K +You can customize the keyboard shortcuts you use to open the command palette in the [Accessibility section](https://github.com/settings/accessibility) of your user settings. For more information, see "[Customizing your {% data variables.product.prodname_command_palette %} keyboard shortcuts](#customizing-your-github-command-palette-keyboard-shortcuts)." + When you open the command palette, it shows your location at the top left and uses it as the scope for suggestions (for example, the `mashed-avocado` organization). ![Command palette launch](/assets/images/help/command-palette/command-palette-launch.png) @@ -42,6 +44,12 @@ When you open the command palette, it shows your location at the top left and us {% endnote %} +### Customizing your {% data variables.product.prodname_command_palette %} keyboard shortcuts + + +The default keyboard shortcuts used to open the command palette may conflict with your default OS and browser keyboard shortcuts. You have the option to customize your keyboard shortcuts in the [Accessibility section](https://github.com/settings/accessibility) of your account settings. In the command palette settings, you can customize the keyboard shortcuts for opening the command palette in both search mode and command mode. + +![Command palette keyboard shortcut settings](/assets/images/help/command-palette/command-palette-keyboard-shortcut-settings.png) ## Navigating with the {% data variables.product.prodname_command_palette %} You can use the command palette to navigate to any page that you have access to on {% data variables.product.product_name %}. @@ -96,7 +104,7 @@ You can use the {% data variables.product.prodname_command_palette %} to run com For a full list of supported commands, see "[{% data variables.product.prodname_command_palette %} reference](#github-command-palette-reference)." -1. Use Ctrl+Shift+K (Windows and Linux) or Command+Shift+K (Mac) to open the command palette in command mode. If you already have the command palette open, press > to switch to command mode. {% data variables.product.prodname_dotcom %} suggests commands based on your location. +1. The default keyboard shortcuts to open the command palette in command mode are Ctrl+Shift+K (Windows and Linux) or Command+Shift+K (Mac). If you already have the command palette open, press > to switch to command mode. {% data variables.product.prodname_dotcom %} suggests commands based on your location. ![Command palette command mode](/assets/images/help/command-palette/command-palette-command-mode.png) @@ -106,6 +114,7 @@ For a full list of supported commands, see "[{% data variables.product.prodname_ 4. Use the arrow keys to highlight the command you want and use Enter to run it. + ## Closing the command palette When the command palette is active, you can use one of the following keyboard shortcuts to close the command palette: @@ -113,6 +122,8 @@ When the command palette is active, you can use one of the following keyboard sh - Search and navigation mode: Esc or Ctrl+K (Windows and Linux) Command+K (Mac) - Command mode: Esc or Ctrl+Shift+K (Windows and Linux) Command+Shift+K (Mac) +If you have customized the command palette keyboard shortcuts in the Accessibility settings, your customized keyboard shortcuts will be used for both opening and closing the command palette. + ## {% data variables.product.prodname_command_palette %} reference ### Keystroke functions diff --git a/translations/zh-CN/content/get-started/using-github/keyboard-shortcuts.md b/translations/zh-CN/content/get-started/using-github/keyboard-shortcuts.md index 9732ccb0b3..1506792c34 100644 --- a/translations/zh-CN/content/get-started/using-github/keyboard-shortcuts.md +++ b/translations/zh-CN/content/get-started/using-github/keyboard-shortcuts.md @@ -30,48 +30,48 @@ The {% data variables.product.prodname_command_palette %} also gives you quick a | 键盘快捷键 | 描述 | | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| s/ | 聚焦于搜索栏。 更多信息请参阅“[关于在 {% data variables.product.company_short %} 上搜索](/search-github/getting-started-with-searching-on-github/about-searching-on-github)”。 | -| g n | 转到您的通知。 更多信息请参阅{% ifversion fpt or ghes or ghae or ghec %}"[关于通知](/github/managing-subscriptions-and-notifications-on-github/about-notifications){% else %}“[关于通知](/github/receiving-notifications-about-activity-on-github/about-notifications){% endif %}”。 | -| esc | 当聚焦于用户、议题或拉取请求悬停卡时,关闭悬停卡并重新聚焦于悬停卡所在的元素 | +| S/ | 聚焦于搜索栏。 更多信息请参阅“[关于在 {% data variables.product.company_short %} 上搜索](/search-github/getting-started-with-searching-on-github/about-searching-on-github)”。 | +| G N | 转到您的通知。 更多信息请参阅{% ifversion fpt or ghes or ghae or ghec %}"[关于通知](/github/managing-subscriptions-and-notifications-on-github/about-notifications){% else %}“[关于通知](/github/receiving-notifications-about-activity-on-github/about-notifications){% endif %}”。 | +| Esc | 当聚焦于用户、议题或拉取请求悬停卡时,关闭悬停卡并重新聚焦于悬停卡所在的元素 | {% if command-palette %} -controlk or commandk | Opens the {% data variables.product.prodname_command_palette %}. If you are editing Markdown text, open the command palette with Ctlaltk or optionk. For more information, see "[{% data variables.product.prodname_command_palette %}](/get-started/using-github/github-command-palette)."{% endif %} +Command+K (Mac) or
Ctrl+K (Windows/Linux) | Opens the {% data variables.product.prodname_command_palette %}. If you are editing Markdown text, open the command palette with Command+Option+K or Ctrl+Alt+K. For more information, see "[{% data variables.product.prodname_command_palette %}](/get-started/using-github/github-command-palette)."{% endif %} ## 仓库 | 键盘快捷键 | 描述 | | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| g c | 转到 **Code(代码)**选项卡 | -| g i | 转到 **Issues(议题)**选项卡。 更多信息请参阅“[关于议题](/articles/about-issues)”。 | -| g p | 转到 **Pull requests(拉取请求)**选项卡。 For more information, see "[About pull requests](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)."{% ifversion fpt or ghes or ghec %} -| g a | 转到 **Actions(操作)**选项卡。 更多信息请参阅“[关于 Actions](/actions/getting-started-with-github-actions/about-github-actions)”。{% endif %} -| g b | 转到 **Projects(项目)**选项卡。 更多信息请参阅“[关于项目板](/articles/about-project-boards)”。 | -| g w | 转到 **Wiki** 选项卡。 更多信息请参阅“[关于 wiki](/communities/documenting-your-project-with-wikis/about-wikis)”。{% ifversion fpt or ghec %} -| g g | 转到 **Discussions(讨论)**选项卡。 更多信息请参阅“[关于讨论](/discussions/collaborating-with-your-community-using-discussions/about-discussions)”。{% endif %} +| G C | 转到 **Code(代码)**选项卡 | +| G I | 转到 **Issues(议题)**选项卡。 更多信息请参阅“[关于议题](/articles/about-issues)”。 | +| G P | 转到 **Pull requests(拉取请求)**选项卡。 For more information, see "[About pull requests](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)."{% ifversion fpt or ghes or ghec %} +| G A | 转到 **Actions(操作)**选项卡。 更多信息请参阅“[关于 Actions](/actions/getting-started-with-github-actions/about-github-actions)”。{% endif %} +| G B | 转到 **Projects(项目)**选项卡。 更多信息请参阅“[关于项目板](/articles/about-project-boards)”。 | +| G W | 转到 **Wiki** 选项卡。 更多信息请参阅“[关于 wiki](/communities/documenting-your-project-with-wikis/about-wikis)”。{% ifversion fpt or ghec %} +| G G | 转到 **Discussions(讨论)**选项卡。 更多信息请参阅“[关于讨论](/discussions/collaborating-with-your-community-using-discussions/about-discussions)”。{% endif %} ## 源代码编辑 -| 键盘快捷键 | 描述 | -| --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |{% ifversion fpt or ghec %} -| . | Opens a repository or pull request in the web-based editor. For more information, see "[Web-based editor](/codespaces/developing-in-codespaces/web-based-editor)."{% endif %} -| control bcommand b | 插入 Markdown 格式用于粗体文本 | -| control icommand i | 插入 Markdown 格式用于斜体文本 | -| control kcommand k | Inserts Markdown formatting for creating a link{% ifversion fpt or ghec or ghae or ghes > 3.3 %} -| control shift 7 or command shift 7 | Inserts Markdown formatting for an ordered list | -| control shift 8 or command shift 8 | Inserts Markdown formatting for an unordered list | -| control shift . or command shift. | Inserts Markdown formatting for a quote{% endif %} -| e | 在 **Edit file(编辑文件)**选项卡中打开源代码文件 | -| control fcommand f | 开始在文件编辑器中搜索 | -| control gcommand g | 查找下一个 | -| control shift g or command shift g | 查找上一个 | -| control shift f or command option f | 替换 | -| control shift r or command shift option f | 全部替换 | -| alt g | 跳至行 | -| control zcommand z | 撤消 | -| control ycommand y | 重做 | -| command shift p | 在 **Edit file(编辑文件)** 与 **Preview changes(预览更改)**选项卡之间切换 | -| control scommand s | 填写提交消息 | +| 键盘快捷键 | 描述 | +| ----------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |{% ifversion fpt or ghec %} +| . | Opens a repository or pull request in the web-based editor. For more information, see "[Web-based editor](/codespaces/developing-in-codespaces/web-based-editor)."{% endif %} +| Command+B (Mac) or
Ctrl+B (Windows/Linux) | 插入 Markdown 格式用于粗体文本 | +| Command+I (Mac) or
Ctrl+I (Windows/Linux) | 插入 Markdown 格式用于斜体文本 | +| Command+K (Mac) or
Ctrl+K (Windows/Linux) | Inserts Markdown formatting for creating a link{% ifversion fpt or ghec or ghae or ghes > 3.3 %} +| Command+Shift+7 (Mac) or
Ctrl+Shift+7 (Windows/Linux) | Inserts Markdown formatting for an ordered list | +| Command+Shift+8 (Mac) or
Ctrl+Shift+8 (Windows/Linux) | Inserts Markdown formatting for an unordered list | +| Command+Shift+. (Mac) or
Ctrl+Shift+. (Windows/Linux) | Inserts Markdown formatting for a quote{% endif %} +| E | 在 **Edit file(编辑文件)**选项卡中打开源代码文件 | +| Command+F (Mac) or
Ctrl+F (Windows/Linux) | 开始在文件编辑器中搜索 | +| Command+G (Mac) or
Ctrl+G (Windows/Linux) | 查找下一个 | +| Command+Shift+G (Mac) or
Ctrl+Shift+G (Windows/Linux) | 查找上一个 | +| Command+Option+F (Mac) or
Ctrl+Shift+F (Windows/Linux) | 替换 | +| Command+Shift+Option+F (Mac) or
Ctrl+Shift+R (Windows/Linux) | 全部替换 | +| Alt+G | 跳至行 | +| Command+Z (Mac) or
Ctrl+Z (Windows/Linux) | 撤消 | +| Command+Y (Mac) or
Ctrl+Y (Windows/Linux) | 重做 | +| Command+Shift+P | 在 **Edit file(编辑文件)** 与 **Preview changes(预览更改)**选项卡之间切换 | +| Command+S (Mac) or
Ctrl+S (Windows/Linux) | 填写提交消息 | 有关更多键盘快捷键,请参阅 [CodeMirror 文档](https://codemirror.net/doc/manual.html#commands)。 @@ -79,149 +79,151 @@ The {% data variables.product.prodname_command_palette %} also gives you quick a | 键盘快捷键 | 描述 | | ------------ | --------------------------------------------------------------------------------------- | -| t | 激活文件查找器 | -| l | 跳至代码中的某一行 | -| w | 切换到新分支或标记 | -| y | 将 URL 展开为其规范形式。 更多信息请参阅“[获取文件的永久链接](/articles/getting-permanent-links-to-files)”。 | -| i | 显示或隐藏有关差异的评论。 更多信息请参阅“[评论拉取请求的差异](/articles/commenting-on-the-diff-of-a-pull-request)”。 | -| a | 在差异上显示或隐藏注释 | -| b | 打开追溯视图。 更多信息请参阅“[跟踪文件中的更改](/articles/tracing-changes-in-a-file)”。 | +| T | 激活文件查找器 | +| L | 跳至代码中的某一行 | +| W | 切换到新分支或标记 | +| Y | 将 URL 展开为其规范形式。 更多信息请参阅“[获取文件的永久链接](/articles/getting-permanent-links-to-files)”。 | +| I | 显示或隐藏有关差异的评论。 更多信息请参阅“[评论拉取请求的差异](/articles/commenting-on-the-diff-of-a-pull-request)”。 | +| A | 在差异上显示或隐藏注释 | +| B | 打开追溯视图。 更多信息请参阅“[跟踪文件中的更改](/articles/tracing-changes-in-a-file)”。 | ## 评论 -| 键盘快捷键 | 描述 | -| -------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| control bcommand b | 插入 Markdown 格式用于粗体文本 | -| control icommand i | 插入斜体文本的 Markdown 格式{% ifversion fpt or ghae or ghes > 3.1 or ghec %} -| control ecommand e | 在行内插入代码或命令的 Markdown 格式{% endif %} -| control kcommand k | 插入 Markdown 格式用于创建链接 | -| control shift pcommand shift p | Toggles between the **Write** and **Preview** comment tabs{% ifversion fpt or ghae or ghes > 3.2 or ghec %} -| control shift 7 or command shift 7 | Inserts Markdown formatting for an ordered list | -| control shift 8 or command shift 8 | Inserts Markdown formatting for an unordered list{% endif %} -| control enter or command enter | 提交评论 | -| control .,然后 control [已保存回复编号] | 打开已保存回复菜单,然后使用已保存回复自动填写评论字段。 更多信息请参阅“[关于已保存回复](/articles/about-saved-replies)”。{% ifversion fpt or ghae or ghes > 3.2 or ghec %} -| control shift . or command shift. | Inserts Markdown formatting for a quote{% endif %}{% ifversion fpt or ghec %} -| control gcommand g | 插入建议。 更多信息请参阅“[审查拉取请求中提议的更改](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request)”。 +| 键盘快捷键 | 描述 | +| ----------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Command+B (Mac) or
Ctrl+B (Windows/Linux) | 插入 Markdown 格式用于粗体文本 | +| Command+I (Mac) or
Ctrl+I (Windows/Linux) | 插入斜体文本的 Markdown 格式{% ifversion fpt or ghae or ghes > 3.1 or ghec %} +| Command+E (Mac) or
Ctrl+E (Windows/Linux) | 在行内插入代码或命令的 Markdown 格式{% endif %} +| Command+K (Mac) or
Ctrl+K (Windows/Linux) | 插入 Markdown 格式用于创建链接 | +| Command+Shift+P (Mac) or
Ctrl+Shift+P (Windows/Linux) | Toggles between the **Write** and **Preview** comment tabs{% ifversion fpt or ghae or ghes > 3.4 or ghec %} +| Command+Shift+V (Mac) or
Ctrl+Shift+V (Windows/Linux) | Pastes HTML link as plain text{% endif %}{% ifversion fpt or ghae or ghes > 3.2 or ghec %} +| Command+Shift+7 (Mac) or
Ctrl+Shift+7 (Windows/Linux) | Inserts Markdown formatting for an ordered list | +| Command+Shift+8 (Mac) or
Ctrl+Shift+8 (Windows/Linux) | Inserts Markdown formatting for an unordered list{% endif %} +| Command+Enter (Mac) or
Ctrl+Enter (Windows/Linux) | 提交评论 | +| Ctrl+. and then Ctrl+[saved reply number] | 打开已保存回复菜单,然后使用已保存回复自动填写评论字段。 更多信息请参阅“[关于已保存回复](/articles/about-saved-replies)”。{% ifversion fpt or ghae or ghes > 3.2 or ghec %} +| Command+Shift+. (Mac) or
Ctrl+Shift+. (Windows/Linux) | Inserts Markdown formatting for a quote{% endif %}{% ifversion fpt or ghec %} +| Command+G (Mac) or
Ctrl+G (Windows/Linux) | 插入建议。 更多信息请参阅“[审查拉取请求中提议的更改](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request)”。 {% endif %} -| r | 在您的回复中引用所选的文本。 更多信息请参阅“[基本撰写和格式语法](/articles/basic-writing-and-formatting-syntax#quoting-text)”。 | +| R | 在您的回复中引用所选的文本。 更多信息请参阅“[基本撰写和格式语法](/articles/basic-writing-and-formatting-syntax#quoting-text)”。 | + ## 议题和拉取请求列表 -| 键盘快捷键 | 描述 | -| ------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| c | 创建议题 | -| control /command / | 将光标聚焦于议题或拉取请求搜索栏。 For more information, see "[Filtering and searching issues and pull requests](/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests)."| | -| u | 按作者过滤 | -| l | 按标签过滤或编辑标签。 更多信息请参阅“[按标签过滤议题和拉取请求](/articles/filtering-issues-and-pull-requests-by-labels)”。 | -| alt 并单击 | 按标签过滤时,排除标签。 更多信息请参阅“[按标签过滤议题和拉取请求](/articles/filtering-issues-and-pull-requests-by-labels)”。 | -| m | 按里程碑过滤或编辑里程碑。 更多信息请参阅“[按里程碑过滤议题和拉取请求](/articles/filtering-issues-and-pull-requests-by-milestone)”。 | -| a | 按受理人过滤或编辑受理人。 更多信息请参阅“[按受理人过滤议题和拉取请求](/articles/filtering-issues-and-pull-requests-by-assignees)”。 | -| oenter | 打开议题 | +| 键盘快捷键 | 描述 | +| ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| C | 创建议题 | +| Command+/ (Mac) or
Ctrl+/ (Windows/Linux) | 将光标聚焦于议题或拉取请求搜索栏。 For more information, see "[Filtering and searching issues and pull requests](/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests)."| | +| U | 按作者过滤 | +| L | 按标签过滤或编辑标签。 更多信息请参阅“[按标签过滤议题和拉取请求](/articles/filtering-issues-and-pull-requests-by-labels)”。 | +| Alt 并单击 | 按标签过滤时,排除标签。 更多信息请参阅“[按标签过滤议题和拉取请求](/articles/filtering-issues-and-pull-requests-by-labels)”。 | +| M | 按里程碑过滤或编辑里程碑。 更多信息请参阅“[按里程碑过滤议题和拉取请求](/articles/filtering-issues-and-pull-requests-by-milestone)”。 | +| A | 按受理人过滤或编辑受理人。 更多信息请参阅“[按受理人过滤议题和拉取请求](/articles/filtering-issues-and-pull-requests-by-assignees)”。 | +| O or Enter | 打开议题 | ## 议题和拉取请求 -| 键盘快捷键 | 描述 | -| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| q | 请求审查者。 更多信息请参阅“[申请拉取请求审查](/articles/requesting-a-pull-request-review/)”。 | -| m | 设置里程碑。 更多信息请参阅“[将里程碑与议题及拉取请求关联](/articles/associating-milestones-with-issues-and-pull-requests/)”。 | -| l | 应用标签。 更多信息请参阅“[应用标签到议题和拉取请求](/articles/applying-labels-to-issues-and-pull-requests/)”。 | -| a | 设置受理人。 更多信息请参阅“[分配议题和拉取请求到其他 {% data variables.product.company_short %} 用户](/articles/assigning-issues-and-pull-requests-to-other-github-users/)”。 | -| cmd + shift + pcontrol + shift + p | 在 **Write(撰写)**和 **Preview(预览)**选项卡之间切换{% ifversion fpt or ghec %} -| alt 并单击 | 从任务列表创建议题时,按住 alt 并单击任务右上角的 {% octicon "issue-opened" aria-label="The issue opened icon" %} ,在当前选项卡中打开新议题表单。 更多信息请参阅“[关于任务列表](/issues/tracking-your-work-with-issues/creating-issues/about-task-lists)”。 | -| shift 并点击 | 从任务列表创建议题时,按住 shift 并单击任务右上角的 {% octicon "issue-opened" aria-label="The issue opened icon" %} ,在新选项卡中打开新议题表单。 更多信息请参阅“[关于任务列表](/issues/tracking-your-work-with-issues/creating-issues/about-task-lists)”。 | -| commandcontrol + shift 并点击 | 从任务列表创建议题时,按住 commandcontrol + shift 并单击任务右上角的 {% octicon "issue-opened" aria-label="The issue opened icon" %} ,在新窗口中打开新议题表单。 更多信息请参阅“[关于任务列表](/issues/tracking-your-work-with-issues/creating-issues/about-task-lists)”。{% endif %} +| 键盘快捷键 | 描述 | +| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Q | 请求审查者。 更多信息请参阅“[申请拉取请求审查](/articles/requesting-a-pull-request-review/)”。 | +| M | 设置里程碑。 更多信息请参阅“[将里程碑与议题及拉取请求关联](/articles/associating-milestones-with-issues-and-pull-requests/)”。 | +| L | 应用标签。 更多信息请参阅“[应用标签到议题和拉取请求](/articles/applying-labels-to-issues-and-pull-requests/)”。 | +| A | 设置受理人。 更多信息请参阅“[分配议题和拉取请求到其他 {% data variables.product.company_short %} 用户](/articles/assigning-issues-and-pull-requests-to-other-github-users/)”。 | +| Command+Shift+P (Mac) or
Ctrl+Shift+P (Windows/Linux) | 在 **Write(撰写)**和 **Preview(预览)**选项卡之间切换{% ifversion fpt or ghec %} +| Alt 并单击 | When creating an issue from a task list, open the new issue form in the current tab by holding Alt and clicking the {% octicon "issue-opened" aria-label="The issue opened icon" %} in the upper-right corner of the task. 更多信息请参阅“[关于任务列表](/issues/tracking-your-work-with-issues/creating-issues/about-task-lists)”。 | +| Shift 并点击 | When creating an issue from a task list, open the new issue form in a new tab by holding Shift and clicking the {% octicon "issue-opened" aria-label="The issue opened icon" %} in the upper-right corner of the task. 更多信息请参阅“[关于任务列表](/issues/tracking-your-work-with-issues/creating-issues/about-task-lists)”。 | +| Command and click (Mac) or
Ctrl+Shift and click (Windows/Linux) | When creating an issue from a task list, open the new issue form in the new window by holding Command or Ctrl+Shift and clicking the {% octicon "issue-opened" aria-label="The issue opened icon" %} in the upper-right corner of the task. 更多信息请参阅“[关于任务列表](/issues/tracking-your-work-with-issues/creating-issues/about-task-lists)”。{% endif %} ## 拉取请求中的更改 -| 键盘快捷键 | 描述 | -| ------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| c | 在拉取请求中打开提交列表 | -| t | 在拉取请求中打开已更改文件列表 | -| j | 将所选内容在列表中向下移动 | -| k | 将所选内容在列表中向上移动 | -| cmd + shift + enter | 添加一条有关拉取请求差异的评论 | -| alt 并单击 | 通过按下 `alt` 并单击 **Show outdated(显示已过期)**或 **Hide outdated(隐藏已过期)**,在折叠和展开拉取请求中所有过期的审查评论之间切换。{% ifversion fpt or ghes or ghae or ghec %} -| 单击,然后按住 shift 并单击 | 单击一个行号,按住 shift,然后单击另一行号,便可对拉取请求的多行发表评论。 更多信息请参阅“[评论拉取请求](/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)。” +| 键盘快捷键 | 描述 | +| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| C | 在拉取请求中打开提交列表 | +| T | 在拉取请求中打开已更改文件列表 | +| J | 将所选内容在列表中向下移动 | +| K | 将所选内容在列表中向上移动 | +| Command+Shift+Enter | 添加一条有关拉取请求差异的评论 | +| Alt 并单击 | Toggle between collapsing and expanding all outdated review comments in a pull request by holding down Alt and clicking **Show outdated** or **Hide outdated**.|{% ifversion fpt or ghes or ghae or ghec %} +| Click, then Shift and click | Comment on multiple lines of a pull request by clicking a line number, holding Shift, then clicking another line number. 更多信息请参阅“[评论拉取请求](/github/collaborating-with-issues-and-pull-requests/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request)。” {% endif %} ## 项目板 ### 移动列 -| 键盘快捷键 | 描述 | -| ------------------------------------------------------------------------------------------------- | ----------- | -| enterspace | 开始移动聚焦的列 | -| escape | 取消正在进行的移动 | -| enter | 完成正在进行的移动 | -| h | 向左移动列 | -| command + ←command + hcontrol + ←control + h | 将列移动到最左侧的位置 | -| l | 向右移动列 | -| command + →command + lcontrol + →control + l | 将列移动到最右侧的位置 | +| 键盘快捷键 | 描述 | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- | +| Enter or Space | 开始移动聚焦的列 | +| Esc | 取消正在进行的移动 | +| Enter | 完成正在进行的移动 | +| or H | 向左移动列 | +| Command+ or Command+H (Mac) or
Ctrl+ or Ctrl+H (Windows/Linux) | 将列移动到最左侧的位置 | +| or L | 向右移动列 | +| Command+ or Command+L (Mac) or
Ctrl+ or Ctrl+L (Windows/Linux) | 将列移动到最右侧的位置 | ### 移动卡片 -| 键盘快捷键 | 描述 | -| --------------------------------------------------------------------------------------------------------------------------------- | ------------- | -| enterspace | 开始移动聚焦的卡片 | -| escape | 取消正在进行的移动 | -| enter | 完成正在进行的移动 | -| j | 向下移动卡片 | -| command + ↓command + jcontrol + ↓control + j | 将卡片移动到该列的底部 | -| k | 向上移动卡片 | -| command + ↑command + kcontrol + ↑control + k | 将卡片移动到该列的顶部 | -| h | 将卡片移动到左侧列的底部 | -| shift + ←shift + h | 将卡片移动到左侧列的顶部 | -| command + ←command + hcontrol + ←control + h | 将卡片移动到最左侧列的底部 | -| command + shift + ←command + shift + hcontrol + shift + ←control + shift + h | 将卡片移动到最左侧列的顶部 | -| | 将卡片移动到右侧列的底部 | -| shift + →shift + l | 将卡片移动到右侧列的顶部 | -| command + →command + lcontrol + →control + l | 将卡片移动到最右侧列的底部 | -| command + shift + →command + shift + lcontrol + shift + →control + shift + l | 将卡片移动到最右侧列的底部 | +| 键盘快捷键 | 描述 | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | +| Enter or Space | 开始移动聚焦的卡片 | +| Esc | 取消正在进行的移动 | +| Enter | 完成正在进行的移动 | +| or J | 向下移动卡片 | +| Command+ or Command+J (Mac) or
Ctrl+ or Ctrl+J (Windows/Linux) | 将卡片移动到该列的底部 | +| or K | 向上移动卡片 | +| Command+ or Command+K (Mac) or
Ctrl+ or Ctrl+K (Windows/Linux) | 将卡片移动到该列的顶部 | +| or H | 将卡片移动到左侧列的底部 | +| Shift+ or Shift+H | 将卡片移动到左侧列的顶部 | +| Command+ or Command+H (Mac) or
Ctrl+ or Ctrl+H (Windows/Linux) | 将卡片移动到最左侧列的底部 | +| Command+Shift+ or Command+Shift+H (Mac) or
Ctrl+Shift+ or Ctrl+Shift+H (Windows/Linux) | 将卡片移动到最左侧列的顶部 | +| | 将卡片移动到右侧列的底部 | +| Shift+ or Shift+L | 将卡片移动到右侧列的顶部 | +| Command+ or Command+L (Mac) or
Ctrl+ or Ctrl+L (Windows/Linux) | 将卡片移动到最右侧列的底部 | +| Command+Shift+ or Command+Shift+L (Mac) or
Ctrl+Shift+ or Ctrl+Shift+L (Windows/Linux) | 将卡片移动到最右侧列的底部 | ### 预览卡片 | 键盘快捷键 | 描述 | | -------------- | -------- | -| esc | 关闭卡片预览窗格 | +| Esc | 关闭卡片预览窗格 | {% ifversion fpt or ghec %} ## {% data variables.product.prodname_actions %} -| 键盘快捷键 | 描述 | -| -------------------------------------------------------- | ----------------------- | -| command + space control + space | 在工作流程编辑器中,获取对工作流程文件的建议。 | -| g f | 转到工作流程文件 | -| shift + tT | 切换日志中的时间戳 | -| shift + fF | 切换全屏日志 | -| esc | 退出全屏日志 | +| 键盘快捷键 | 描述 | +| ---------------------------------------------------------------------------------------------------- | ----------------------- | +| Command+Space (Mac) or
Ctrl+Space (Windows/Linux) | 在工作流程编辑器中,获取对工作流程文件的建议。 | +| G F | 转到工作流程文件 | +| Shift+T or T | 切换日志中的时间戳 | +| Shift+F or F | 切换全屏日志 | +| Esc | 退出全屏日志 | {% endif %} ## 通知 {% ifversion fpt or ghes or ghae or ghec %} -| 键盘快捷键 | 描述 | -| -------------------- | ----- | -| e | 标记为完成 | -| shift + u | 标记为未读 | -| shift + i | 标记为已读 | -| shift + m | 取消订阅 | +| 键盘快捷键 | 描述 | +| ----------------------------- | ----- | +| E | 标记为完成 | +| Shift+U | 标记为未读 | +| Shift+I | 标记为已读 | +| Shift+M | 取消订阅 | {% else %} -| 键盘快捷键 | 描述 | -| ---------------------------------------- | ----- | -| eIy | 标记为已读 | -| shift + m | 静音线程 | +| 键盘快捷键 | 描述 | +| -------------------------------------------- | ----- | +| E or I or Y | 标记为已读 | +| Shift+M | 静音线程 | {% endif %} ## 网络图 -| 键盘快捷键 | 描述 | -| ------------------------------------------- | ------ | -| h | 向左滚动 | -| l | 向右滚动 | -| k | 向上滚动 | -| j | 向下滚动 | -| shift + ←shift + h | 一直向左滚动 | -| shift + →shift + l | 一直向右滚动 | -| shift + ↑shift + k | 一直向上滚动 | -| shift + ↓shift + j | 一直向下滚动 | +| 键盘快捷键 | 描述 | +| ------------------------------------------------------------------------------------------ | ------ | +| or H | 向左滚动 | +| or L | 向右滚动 | +| or K | 向上滚动 | +| or J | 向下滚动 | +| Shift+ (Mac) or
Shift+H (Windows/Linux) | 一直向左滚动 | +| Shift+ (Mac) or
Shift+L (Windows/Linux) | 一直向右滚动 | +| Shift+ (Mac) or
Shift+K (Windows/Linux) | 一直向上滚动 | +| Shift+ (Mac) or
Shift+J (Windows/Linux) | 一直向下滚动 | diff --git a/translations/zh-CN/content/github/copilot/research-recitation.md b/translations/zh-CN/content/github/copilot/research-recitation.md index ced0724918..cf4188c1f8 100644 --- a/translations/zh-CN/content/github/copilot/research-recitation.md +++ b/translations/zh-CN/content/github/copilot/research-recitation.md @@ -57,9 +57,9 @@ r'^\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d+\s+\d 过滤后还剩下 473 条建议。 但它们的表现形式非常不同: 1. 有些基本上只是重复另一个通过了过滤的案例。 例如,有时 {% data variables.product.prodname_dotcom %} Copilot 提出建议,开发人员键入一个评论行,然后 {% data variables.product.prodname_dotcom %} Copilot 再次提供一个非常相似的建议。 我从分析中删除了这些作为重复项的案例。 -2. 有些是长而重复的序列。 像下面的示例一样,在培训集的某个地方当然可以找到重复的 `‘

’` 块 :
![Example repetitions](/assets/images/help/copilot/example_repetitions.png)
这样的建议可能会有所帮助(测试案例、正则表达式)或没有帮助(像本案例,我怀疑)。 但无论如何,它们并不符合我开始调查时所想到的死记硬背学习的想法。 +2. 有些是长而重复的序列。 Like the following example, where the repeated blocks of `‘

’` are of course found somewhere in the training set:
![Example repetitions](/assets/images/help/copilot/example_repetitions.png)
Such suggestions can be helpful (test cases, regular expressions) or not helpful (like this case, I suspect). 但无论如何,它们并不符合我开始调查时所想到的死记硬背学习的想法。 3. 有些是标准库存,如自然数字、质数、股市股票代码或希腊字母:
![希腊字母示例](/assets/images/help/copilot/example_greek.png) -4. 有些是常见的、直接的方式,甚至是普遍的方式,以很少的自然自由度做事。 例如, 下面的中间部分触发了我使用 BeautifulSoup 包解析维基百科列表的标准方法。 事实上, 在 {% data variables.product.prodname_dotcom %} Copilot 的培训数据[5](#footnote5) 中找到的最佳匹配片段使用这种代码解析不同的文章,并继续根据结果做不同的事情。
![Example of Beautiful Soup](/assets/images/help/copilot/example_beautiful_soup.png)
这也不符合我对引文的想法。 这有点像有人说“我要把垃圾拿出来;我很快就会回来的”— 这是事实陈述,不是引文,尽管这句话以前已经说过很多次了。 +4. 有些是常见的、直接的方式,甚至是普遍的方式,以很少的自然自由度做事。 For example, the middle part of the following strikes me as very much the standard way of using the BeautifulSoup package to parse a Wikipedia list. 事实上, 在 {% data variables.product.prodname_dotcom %} Copilot 的培训数据[5](#footnote5) 中找到的最佳匹配片段使用这种代码解析不同的文章,并继续根据结果做不同的事情。
![Example of Beautiful Soup](/assets/images/help/copilot/example_beautiful_soup.png)
这也不符合我对引文的想法。 这有点像有人说“我要把垃圾拿出来;我很快就会回来的”— 这是事实陈述,不是引文,尽管这句话以前已经说过很多次了。 5. 然后还有所有其他情况。 代码或评论中至少有一些特定重叠。 这些是我最感兴趣的,也是我从现在开始要集中精力的。 此存储桶必须有一些边缘案例[6](#footnote6),并且您的里程可能因您认为应分类的方式而有所不同。 也许你甚至一开始就不同意整套存储桶。 diff --git a/translations/zh-CN/content/github/index.md b/translations/zh-CN/content/github/index.md index 3d51889658..c6652f4958 100644 --- a/translations/zh-CN/content/github/index.md +++ b/translations/zh-CN/content/github/index.md @@ -12,8 +12,6 @@ versions: ghae: '*' children: - /copilot - - /customizing-your-github-workflow - - /extending-github - /site-policy - /site-policy-deprecated --- diff --git a/translations/zh-CN/content/github/site-policy/github-government-takedown-policy.md b/translations/zh-CN/content/github/site-policy/github-government-takedown-policy.md index 8f72fcd4e0..217c3a1869 100644 --- a/translations/zh-CN/content/github/site-policy/github-government-takedown-policy.md +++ b/translations/zh-CN/content/github/site-policy/github-government-takedown-policy.md @@ -30,5 +30,8 @@ GitHub 有时会收到政府要求,要求我们删除在其地方管辖区被 ## 如果我们在 gov-takedown 仓库中发布通知,它意味着什么? 这意味着我们在指定日期收到了通知, 但*不*意味着内容是非法或错误的, 也*不*意味着通知中所指的用户犯了任何错误。 我们并不对政府请求的正误做出或暗示任何判断。 我们发布这些通知和请求只是提供信息。 +## Government takedowns based on violations of GitHub's Terms of Service +In some cases, GitHub receives reports from government officials of violations of GitHub's Terms of Service. We process those violations as we would process a Terms-of-Service violation reported by anyone else. However, we notify the affected users that the report came from a government and, as with any other case, allow them the opportunity to appeal. + ## 透明度报告 -除了在我们的 gov-takedowns 仓库中发布政府删除通知外,我们的透明度报告中也会报告这些通知。 我们还会在透明度报告中跟踪并报告基于违反 GitHub 服务条款的政府删除。 我们处理这些违规就像处理任何其他人报告的服务条款违规一样。 +In addition to posting government takedown notices in our `github/gov-takedowns` repository, we report on them in our transparency report. 我们还会在透明度报告中跟踪并报告基于违反 GitHub 服务条款的政府删除。 diff --git a/translations/zh-CN/content/issues/index.md b/translations/zh-CN/content/issues/index.md index deeac26321..2164c69112 100644 --- a/translations/zh-CN/content/issues/index.md +++ b/translations/zh-CN/content/issues/index.md @@ -33,6 +33,7 @@ featuredLinks: - title: Issue Forms for open source – Luke Hefson href: 'https://www.youtube-nocookie.com/embed/2Yh8ueUE0oY' videosHeading: GitHub Universe 2021 videos +product_video: 'https://www.youtube-nocookie.com/embed/uiaLWluYJsA' layout: product-landing beta_product: false versions: diff --git a/translations/zh-CN/content/issues/tracking-your-work-with-issues/about-task-lists.md b/translations/zh-CN/content/issues/tracking-your-work-with-issues/about-task-lists.md index af1f4b3f9f..08d8c0dc90 100644 --- a/translations/zh-CN/content/issues/tracking-your-work-with-issues/about-task-lists.md +++ b/translations/zh-CN/content/issues/tracking-your-work-with-issues/about-task-lists.md @@ -76,5 +76,5 @@ topics: ## 延伸阅读 -* "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax)"{% ifversion fpt or ghes > 3.3 or ghae-issue-5036 %} +* "[Basic writing and formatting syntax](/articles/basic-writing-and-formatting-syntax)"{% if code-scanning-task-lists %} * "[Tracking {% data variables.product.prodname_code_scanning %} alerts in issues using task lists](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/tracking-code-scanning-alerts-in-issues-using-task-lists)"{% endif %} diff --git a/translations/zh-CN/content/issues/tracking-your-work-with-issues/creating-an-issue.md b/translations/zh-CN/content/issues/tracking-your-work-with-issues/creating-an-issue.md index 180dfe1183..c356a9cc34 100644 --- a/translations/zh-CN/content/issues/tracking-your-work-with-issues/creating-an-issue.md +++ b/translations/zh-CN/content/issues/tracking-your-work-with-issues/creating-an-issue.md @@ -143,7 +143,7 @@ When you create an issue from a discussion, the contents of the discussion post | `projects` | `https://github.com/octo-org/octo-repo/issues/new?title=Bug+fix&projects=octo-org/1` 创建标题为 "Bug fix" 的议题并将其添加到组织的项目板 1。 | | `模板` | `https://github.com/octo-org/octo-repo/issues/new?template=issue_template.md` 使用模板在议题正文中创建议题。 `template` 查询参数支持仓库根目录 `docs/` 或 `.github/` 的 `ISSUE_TEMPLATE` 子目录中存储的模板。 更多信息请参阅“[使用模板鼓励有用的议题和拉取请求](/communities/using-templates-to-encourage-useful-issues-and-pull-requests)”。 | -{% ifversion fpt or ghes > 3.3 or ghae-issue-5036 %} +{% if code-scanning-task-lists %} ## Creating an issue from a {% data variables.product.prodname_code_scanning %} alert {% data reusables.code-scanning.beta-alert-tracking-in-issues %} diff --git a/translations/zh-CN/content/organizations/keeping-your-organization-secure/index.md b/translations/zh-CN/content/organizations/keeping-your-organization-secure/index.md index b45d3acee1..8efda0479f 100644 --- a/translations/zh-CN/content/organizations/keeping-your-organization-secure/index.md +++ b/translations/zh-CN/content/organizations/keeping-your-organization-secure/index.md @@ -1,6 +1,6 @@ --- title: 保护组织安全 -intro: '组织所有者有多项功能来帮助保护其项目和数据的安全。 如果您是组织的所有者,应定期检查组织的审核日志{% ifversion not ghae %}、成员 2FA 状态{% endif %} 和应用程序设置,以确保没有未授权或恶意的活动。' +intro: 'You can harden security for your organization by managing security settings,{% ifversion not ghae %} requiring two-factor authentication (2FA),{% endif %} and reviewing the activity and integrations within your organization.' redirect_from: - /articles/preventing-unauthorized-access-to-organization-information - /articles/keeping-your-organization-secure @@ -14,14 +14,8 @@ topics: - Organizations - Teams children: - - /viewing-whether-users-in-your-organization-have-2fa-enabled - - /preparing-to-require-two-factor-authentication-in-your-organization - - /requiring-two-factor-authentication-in-your-organization - - /managing-security-and-analysis-settings-for-your-organization - - /managing-allowed-ip-addresses-for-your-organization - - /restricting-email-notifications-for-your-organization - - /reviewing-the-audit-log-for-your-organization - - /reviewing-your-organizations-installed-integrations + - /managing-two-factor-authentication-for-your-organization + - /managing-security-settings-for-your-organization shortTitle: 组织安全 --- diff --git a/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/accessing-compliance-reports-for-your-organization.md b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/accessing-compliance-reports-for-your-organization.md new file mode 100644 index 0000000000..513d2880c2 --- /dev/null +++ b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/accessing-compliance-reports-for-your-organization.md @@ -0,0 +1,31 @@ +--- +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.' +versions: + ghec: '*' +type: how_to +topics: + - Organizations + - Teams +permissions: Organization owners can access compliance reports for the organization. +shortTitle: Access compliance reports +--- + +## 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 reusables.security.compliance-report-list %} + +## Accessing compliance reports for your organization + +{% data reusables.profile.access_org %} +{% data reusables.profile.org_settings %} +{% data reusables.organizations.security %} +1. Under "Compliance reports", 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.security.compliance-report-screenshot %} + +## 延伸阅读 + +- "[Accessing compliance reports for your enterprise](/admin/overview/accessing-compliance-reports-for-your-enterprise)" diff --git a/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/index.md b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/index.md new file mode 100644 index 0000000000..6c813260f9 --- /dev/null +++ b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/index.md @@ -0,0 +1,21 @@ +--- +title: Managing security settings for your organization +shortTitle: Manage security settings +intro: 'You can manage security settings and review the audit log{% ifversion ghec %}, compliance reports,{% endif %} and integrations for your organization.' +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: + - Organizations + - Teams +children: + - /managing-security-and-analysis-settings-for-your-organization + - /managing-allowed-ip-addresses-for-your-organization + - /restricting-email-notifications-for-your-organization + - /reviewing-the-audit-log-for-your-organization + - /accessing-compliance-reports-for-your-organization + - /reviewing-your-organizations-installed-integrations +--- + diff --git a/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization.md b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization.md new file mode 100644 index 0000000000..365e0a9e9d --- /dev/null +++ b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization.md @@ -0,0 +1,85 @@ +--- +title: 管理组织允许的 IP 地址 +intro: 您可以通过配置允许连接的 IP 地址列表来限制对组织资产的访问。 +product: '{% data reusables.gated-features.allowed-ip-addresses %}' +redirect_from: + - /github/setting-up-and-managing-organizations-and-teams/managing-allowed-ip-addresses-for-your-organization + - /organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization +versions: + fpt: '*' + ghae: '*' + ghec: '*' +topics: + - Organizations + - Teams +shortTitle: 管理允许的 IP 地址 +--- + +组织所有者可以管理组织允许的 IP 地址。 + +## 关于允许的 IP 地址 + +您可以通过为特定 IP 地址配置允许列表来限制对组织资产的访问。 {% data reusables.identity-and-permissions.ip-allow-lists-example-and-restrictions %} + +{% data reusables.identity-and-permissions.ip-allow-lists-cidr-notation %} + +{% data reusables.identity-and-permissions.ip-allow-lists-enable %} + +如果您设置了允许列表,您还可以选择将为组织中安装的 {% data variables.product.prodname_github_apps %} 配置的任何 IP 地址自动添加到允许列表中。 {% data variables.product.prodname_github_app %} 的创建者可以为其应用程序配置允许列表,指定应用程序运行的 IP 地址。 通过将允许列表继承到您的列表中,您可以避免申请中的连接请求被拒绝。 更多信息请参阅“[允许 {% data variables.product.prodname_github_apps %} 访问](#allowing-access-by-github-apps)”。 + +您还可以为企业帐户中的组织配置允许的 IP 地址。 更多信息请参阅“[在企业中实施安全设置策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise)”。 + +## 添加允许的 IP 地址 + +{% data reusables.profile.access_org %} +{% data reusables.profile.org_settings %} +{% data reusables.organizations.security %} +{% data reusables.identity-and-permissions.ip-allow-lists-add-ip %} +{% data reusables.identity-and-permissions.ip-allow-lists-add-description %} +{% data reusables.identity-and-permissions.ip-allow-lists-add-entry %} + +## 启用允许的 IP 地址 + +{% data reusables.profile.access_org %} +{% data reusables.profile.org_settings %} +{% data reusables.organizations.security %} +1. 在“IP allow list(IP 允许列表)”下,选择 **Enable IP allow list(启用 IP 允许列表)**。 ![允许 IP 地址的复选框](/assets/images/help/security/enable-ip-allowlist-organization-checkbox.png) +1. 单击 **Save(保存)**。 + +## 允许 {% data variables.product.prodname_github_apps %} 访问 + +如果您设置允许列表,您还可以选择将为组织中安装的 {% data variables.product.prodname_github_apps %} 配置的任何 IP 地址自动添加到允许列表中。 + +{% data reusables.identity-and-permissions.ip-allow-lists-address-inheritance %} + +{% data reusables.apps.ip-allow-list-only-apps %} + +有关如何为您创建的 {% data variables.product.prodname_github_app %} 创建允许列表的更多信息,请参阅“[管理 GitHub 应用程序允许的 IP 地址](/developers/apps/building-github-apps/managing-allowed-ip-addresses-for-a-github-app)”。 + +{% data reusables.profile.access_org %} +{% data reusables.profile.org_settings %} +{% data reusables.organizations.security %} +1. 在“IP allow list(IP允许列表)”下,选择 **Enable IP allow list configuration for installed GitHub Apps(启用已安装 GitHub 应用程序的 IP 允许列表配置)**。 ![允许 GitHub 应用程序 IP 地址的复选框](/assets/images/help/security/enable-ip-allowlist-githubapps-checkbox.png) +1. 单击 **Save(保存)**。 + +## 编辑允许的 IP 地址 + +{% data reusables.profile.access_org %} +{% data reusables.profile.org_settings %} +{% data reusables.organizations.security %} +{% data reusables.identity-and-permissions.ip-allow-lists-edit-entry %} +{% data reusables.identity-and-permissions.ip-allow-lists-edit-ip %} +{% data reusables.identity-and-permissions.ip-allow-lists-edit-description %} +1. 单击 **Update(更新)**。 + +## 删除允许的 IP 地址 + +{% data reusables.profile.access_org %} +{% data reusables.profile.org_settings %} +{% data reusables.organizations.security %} +{% data reusables.identity-and-permissions.ip-allow-lists-delete-entry %} +{% data reusables.identity-and-permissions.ip-allow-lists-confirm-deletion %} + +## 对 {% data variables.product.prodname_actions %} 使用 IP 允许列表 + +{% data reusables.github-actions.ip-allow-list-self-hosted-runners %} diff --git a/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization.md b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization.md new file mode 100644 index 0000000000..f3d678c3aa --- /dev/null +++ b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-security-and-analysis-settings-for-your-organization.md @@ -0,0 +1,171 @@ +--- +title: 管理组织的安全性和分析设置 +intro: '您可以控制功能以保护组织在 {% data variables.product.prodname_dotcom %} 上项目的安全并分析其中的代码。' +permissions: Organization owners can manage security and analysis settings for repositories in the organization. +redirect_from: + - /github/setting-up-and-managing-organizations-and-teams/managing-secret-scanning-for-your-organization + - /github/setting-up-and-managing-organizations-and-teams/managing-security-and-analysis-settings-for-your-organization + - /organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: + - Organizations + - Teams +shortTitle: 管理安全和分析 +--- + +## 关于安全性和分析设置的管理 + +{% data variables.product.prodname_dotcom %} 可帮助保护组织中的仓库。 您可以管理成员在组织中创建的所有现有或新仓库的安全性和分析功能。 {% ifversion ghec %}如果您拥有 {% data variables.product.prodname_GH_advanced_security %} 许可,则您还可以管理对这些功能的访问。 {% data reusables.advanced-security.more-info-ghas %}{% endif %}{% ifversion fpt %}Organizations that use {% data variables.product.prodname_ghe_cloud %} with a license for {% data variables.product.prodname_GH_advanced_security %} can also manage access to these features. For more information, see [the {% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization).{% endif %} + +{% data reusables.security.some-security-and-analysis-features-are-enabled-by-default %} +{% data reusables.security.security-and-analysis-features-enable-read-only %} + +## 显示安全和分析设置 + +{% data reusables.profile.access_org %} +{% data reusables.profile.org_settings %} +{% data reusables.organizations.security-and-analysis %} + +显示的页面允许您为组织中的仓库启用或禁用所有安全和分析功能。 + +{% ifversion ghec %}如果您的组织属于具有 {% data variables.product.prodname_GH_advanced_security %} 许可的企业,则该页面还包含启用和禁用 {% data variables.product.prodname_advanced_security %} 功能的选项。 使用 {% data variables.product.prodname_GH_advanced_security %} 的任何仓库都列在页面底部。{% endif %} + +{% ifversion ghes > 3.0 %}如果您具有 {% data variables.product.prodname_GH_advanced_security %} 许可,则该页面还包含启用和禁用 {% data variables.product.prodname_advanced_security %} 功能的选项。 使用 {% data variables.product.prodname_GH_advanced_security %} 的任何仓库都列在页面底部。{% endif %} + +{% ifversion ghae %}该页面还将包含启用和禁用 {% data variables.product.prodname_advanced_security %} 功能的选项。 使用 {% data variables.product.prodname_GH_advanced_security %} 的任何仓库都列在页面底部。{% endif %} + +## 为所有现有仓库启用或禁用功能 + +您可以启用或禁用所有仓库的功能。 +{% ifversion fpt or ghec %}您的更改对组织中仓库的影响取决于其可见性: + +- **依赖项图** - 您的更改仅影响私有仓库,因为该功能对公共仓库始终启用。 +- **{% data variables.product.prodname_dependabot_alerts %}** - 您的更改影响所有仓库。 +- **{% data variables.product.prodname_dependabot_security_updates %}** - 您的更改影响所有仓库。 +{%- ifversion ghec %} +- **{% data variables.product.prodname_GH_advanced_security %}** - 您的更改仅影响私有仓库,因为 {% data variables.product.prodname_GH_advanced_security %} 和相关功能对公共仓库始终启用。 +- **{% data variables.product.prodname_secret_scanning_caps %}** - 您的更改仅影响还启用了 {% data variables.product.prodname_GH_advanced_security %} 的私有仓库。 {% data variables.product.prodname_secret_scanning_caps %} 对公共仓库始终启用。 +{% endif %} + +{% endif %} + +{% data reusables.advanced-security.note-org-enable-uses-seats %} + +1. 转到组织的安全和分析设置。 更多信息请参阅“[显示安全和分析设置](#displaying-the-security-and-analysis-settings)”。 +2. 在“Configure security and analysis features(配置安全性和分析功能)”下,单击功能右侧的 **Disable all(全部禁用)**或 **Enable all(全部启用)**。 {% ifversion ghes > 3.0 or ghec %}如果您的 {% data variables.product.prodname_GH_advanced_security %} 许可中没有可用的席位,对“{% data variables.product.prodname_GH_advanced_security %}”的控制将会禁用。{% endif %} + {% ifversion fpt %} + !["Configure security and analysis(配置安全性和分析)"功能的"Enable all(全部启用)"或"Disable all(全部禁用)"按钮](/assets/images/help/organizations/security-and-analysis-disable-or-enable-all-fpt.png) + {% endif %} + {% ifversion ghec %} + !["Configure security and analysis(配置安全性和分析)"功能的"Enable all(全部启用)"或"Disable all(全部禁用)"按钮](/assets/images/help/organizations/security-and-analysis-disable-or-enable-all-ghas-ghec.png) + {% endif %} + {% ifversion ghes > 3.2 %} + !["Configure security and analysis(配置安全性和分析)"功能的"Enable all(全部启用)"或"Disable all(全部禁用)"按钮](/assets/images/enterprise/3.3/organizations/security-and-analysis-disable-or-enable-all-ghas.png) + {% endif %} + {% ifversion ghes = 3.1 or ghes = 3.2 %} + !["Configure security and analysis(配置安全性和分析)"功能的"Enable all(全部启用)"或"Disable all(全部禁用)"按钮](/assets/images/enterprise/3.1/help/organizations/security-and-analysis-disable-or-enable-all-ghas.png) + {% endif %} + {% ifversion ghes = 3.0 %} + !["Configure security and analysis(配置安全性和分析)"功能的"Enable all(全部启用)"或"Disable all(全部禁用)"按钮](/assets/images/enterprise/3.0/organizations/security-and-analysis-disable-or-enable-all-ghas.png) + {% endif %} + {% ifversion ghae %} + !["Configure security and analysis(配置安全性和分析)"功能的"Enable all(全部启用)"或"Disable all(全部禁用)"按钮](/assets/images/enterprise/github-ae/organizations/security-and-analysis-disable-or-enable-all-ghae.png) + {% endif %} + {% ifversion fpt or ghes = 3.0 or ghec %} +3. (可选)为组织中的新仓库默认启用该功能。 + {% ifversion fpt or ghec %} + ![新仓库的"Enable by default(默认启用)"选项](/assets/images/help/organizations/security-and-analysis-enable-by-default-in-modal.png) + {% endif %} + {% ifversion ghes = 3.0 %} + ![新仓库的"Enable by default(默认启用)"选项](/assets/images/enterprise/3.0/organizations/security-and-analysis-secret-scanning-enable-by-default.png) + {% endif %} + {% endif %} + {% ifversion fpt or ghes = 3.0 or ghec %} +4. 单击 **Disable FEATURE(禁用功能)**或 **Enable FEATURE(启用功能)**以禁用或启用组织中所有仓库的功能。 + {% ifversion fpt or ghec %} + ![用于禁用或启用功能的按钮](/assets/images/help/organizations/security-and-analysis-enable-dependency-graph.png) + {% endif %} + {% ifversion ghes = 3.0 %} + ![用于禁用或启用功能的按钮](/assets/images/enterprise/3.0/organizations/security-and-analysis-enable-secret-scanning.png) + {% endif %} + {% endif %} + {% ifversion ghae or ghes > 3.0 %} +3. 单击 **Enable/Disable all(全部启用/禁用)**或 **Enable/Disable for eligible repositories(对合格的仓库启用/禁用)**以确认更改。 ![用于为组织中所有符合条件的仓库启用功能的按钮](/assets/images/enterprise/github-ae/organizations/security-and-analysis-enable-secret-scanning-existing-repos-ghae.png) + {% endif %} + + {% data reusables.security.displayed-information %} + +## 添加新仓库时自动启用或禁用功能 + +1. 转到组织的安全和分析设置。 更多信息请参阅“[显示安全和分析设置](#displaying-the-security-and-analysis-settings)”。 +2. 在功能右边的“Configure security and analysis features(配置安全性和分析功能)”下,默认为组织中的新仓库{% ifversion fpt or ghec %} 或所有私有仓库{% endif %} 启用或禁用该功能。 + {% ifversion fpt %} + ![用于对新仓库启用或禁用功能的复选框](/assets/images/help/organizations/security-and-analysis-enable-or-disable-feature-checkbox-fpt.png) + {% endif %} + {% ifversion ghec %} + ![用于对新仓库启用或禁用功能的复选框](/assets/images/help/organizations/security-and-analysis-enable-or-disable-feature-checkbox-ghec.png) + {% endif %} + {% ifversion ghes > 3.2 %} + ![用于对新仓库启用或禁用功能的复选框](/assets/images/enterprise/3.3/organizations/security-and-analysis-enable-or-disable-feature-checkbox.png) + {% endif %} + {% ifversion ghes = 3.1 or ghes = 3.2 %} + ![用于对新仓库启用或禁用功能的复选框](/assets/images/enterprise/3.1/help/organizations/security-and-analysis-enable-or-disable-feature-checkbox.png) + {% endif %} + {% ifversion ghes = 3.0 %} + ![用于对新仓库启用或禁用功能的复选框](/assets/images/enterprise/3.0/organizations/security-and-analysis-enable-or-disable-secret-scanning-checkbox.png) + {% endif %} + {% ifversion ghae %} + ![用于对新仓库启用或禁用功能的复选框](/assets/images/enterprise/github-ae/organizations/security-and-analysis-enable-or-disable-secret-scanning-checkbox-ghae.png) + {% endif %} + +{% ifversion ghec or ghes > 3.2 %} + + +## 允许 {% data variables.product.prodname_dependabot %} 访问私有依赖项 + +{% data variables.product.prodname_dependabot %} 可以检查项目中过时的依赖项引用,并自动生成拉取请求来更新它们。 为此,{% data variables.product.prodname_dependabot %} 必须有权访问所有目标依赖项文件。 通常,如果一个或多个依赖项无法访问,版本更新将失败。 更多信息请参阅“[关于 {% data variables.product.prodname_dependabot %} 版本更新](/github/administering-a-repository/about-dependabot-version-updates)”。 + +默认情况下,{% data variables.product.prodname_dependabot %} 无法更新位于私有仓库或私有仓库注册表中的依赖项。 但是,如果依赖项位于与使用该依赖项之项目相同的组织内的私有 {% data variables.product.prodname_dotcom %} 仓库中,则可以通过授予对主机仓库的访问权限来允许 {% data variables.product.prodname_dependabot %} 成功更新版本。 + +如果您的代码依赖于私有注册表中的软件包,您可以在仓库级别进行配置,允许 {% data variables.product.prodname_dependabot %} 更新这些依赖项的版本。 可通过将身份验证详细信息添加到仓库的 _dependabot.yml_ 文件来做到这一点。 更多信息请参阅“[依赖项更新的配置选项](/github/administering-a-repository/configuration-options-for-dependency-updates#configuration-options-for-private-registries)。” + +要允许 {% data variables.product.prodname_dependabot %} 访问私有 {% data variables.product.prodname_dotcom %} 仓库: + +1. 转到组织的安全和分析设置。 更多信息请参阅“[显示安全和分析设置](#displaying-the-security-and-analysis-settings)”。 +1. 在“{% data variables.product.prodname_dependabot %} 私有仓库访问”下,单击 **Add private repositories(添加私有仓库)**或 **Add internal and private repositories(添加内部和私有仓库)**。 ![添加仓库按钮](/assets/images/help/organizations/dependabot-private-repository-access.png) +1. 开始键入要允许的仓库的名称。 ![带有过滤条件下拉列表的仓库搜索字段](/assets/images/help/organizations/dependabot-private-repo-choose.png) +1. 单击您想要允许的仓库。 + +1. (可选)要从列表中删除仓库,在仓库右侧单击 {% octicon "x" aria-label="The X icon" %}。 !["X" 按钮来删除仓库。](/assets/images/help/organizations/dependabot-private-repository-list.png) +{% endif %} + +{% ifversion ghes > 3.0 or ghec %} + +## 从组织中的个别仓库中移除对 {% data variables.product.prodname_GH_advanced_security %} 的访问权限 + +您可以从仓库的“Settings(设置)”选项卡管理对仓库 {% data variables.product.prodname_GH_advanced_security %} 功能的访问。 更多信息请参阅“[管理仓库的安全和分析设置](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)”。 但您也可以从“Settings(设置)”选项卡对仓库禁用 {% data variables.product.prodname_GH_advanced_security %} 功能。 + +1. 转到组织的安全和分析设置。 更多信息请参阅“[显示安全和分析设置](#displaying-the-security-and-analysis-settings)”。 +1. 要查看您组织中启用 {% data variables.product.prodname_GH_advanced_security %} 的所有仓库的列表,请滚动到“{% data variables.product.prodname_GH_advanced_security %} 仓库”部分。 ![{% data variables.product.prodname_GH_advanced_security %} repositories section](/assets/images/help/organizations/settings-security-analysis-ghas-repos-list.png) 表格列出了每个仓库的唯一提交者数量。 这是您可以通过移除 {% data variables.product.prodname_GH_advanced_security %} 访问权限释放的席位数。 更多信息请参阅“[关于 {% data variables.product.prodname_GH_advanced_security %} 的计费](/billing/managing-billing-for-github-advanced-security/about-billing-for-github-advanced-security)”。 +1. 要从仓库删除对 {% data variables.product.prodname_GH_advanced_security %} 的访问,并释放任何提交者使用的对仓库唯一的席位,请单击相邻的 {% octicon "x" aria-label="X symbol" %}。 +1. 在确认对话框中,单击击 **Remove repository(移除仓库)** 以移除对 {% data variables.product.prodname_GH_advanced_security %} 功能的访问权限。 + +{% note %} + +**注意:**如果移除对仓库 {% data variables.product.prodname_GH_advanced_security %} 的访问权限, 您应该与受影响的开发团队进行沟通,以便他们知道改变的意图。 这确保他们不会浪费时间调试运行失败的代码扫描。 + +{% endnote %} + +{% endif %} + +## 延伸阅读 + +- "[保护您的仓库](/code-security/getting-started/securing-your-repository)"{% ifversion not fpt %} +- "[About secret scanning](/github/administering-a-repository/about-secret-scanning)"{% endif %}{% ifversion not ghae %} +- “[关于依赖关系图](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)” +- "[Managing vulnerabilities in your project's dependencies](/github/managing-security-vulnerabilities/managing-vulnerabilities-in-your-projects-dependencies)"{% endif %}{% ifversion fpt or ghec or ghes > 3.2 %} +- "[自动更新依赖项](/github/administering-a-repository/keeping-your-dependencies-updated-automatically)"{% endif %} diff --git a/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/restricting-email-notifications-for-your-organization.md b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/restricting-email-notifications-for-your-organization.md new file mode 100644 index 0000000000..d70ff69e32 --- /dev/null +++ b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/restricting-email-notifications-for-your-organization.md @@ -0,0 +1,47 @@ +--- +title: 限制组织的电子邮件通知 +intro: 为防止组织信息泄露到个人电子邮件帐户,您可以限制成员可以接收有关组织活动的电子邮件通知的域。 +product: '{% data reusables.gated-features.restrict-email-domain %}' +permissions: Organization owners can restrict email notifications for an organization. +redirect_from: + - /articles/restricting-email-notifications-about-organization-activity-to-an-approved-email-domain + - /articles/restricting-email-notifications-to-an-approved-domain + - /github/setting-up-and-managing-organizations-and-teams/restricting-email-notifications-to-an-approved-domain + - /organizations/keeping-your-organization-secure/restricting-email-notifications-to-an-approved-domain + - /organizations/keeping-your-organization-secure/restricting-email-notifications-for-your-organization +versions: + fpt: '*' + ghes: '>=3.2' + ghec: '*' +type: how_to +topics: + - Enterprise + - Notifications + - Organizations + - Policy +shortTitle: 限制电子邮件通知 +--- + +## 关于电子邮件限制 + +当在组织中启用受限制的电子邮件通知时,成员只能使用与已验证或批准的域关联的电子邮件地址接收有关组织活动的电子邮件通知。 更多信息请参阅“[验证或批准组织的域](/organizations/managing-organization-settings/verifying-or-approving-a-domain-for-your-organization)”。 + +{% data reusables.enterprise-accounts.approved-domains-beta-note %} + +{% data reusables.notifications.email-restrictions-verification %} + +外部协作者不受限于已验证或批准域的电子邮件通知。 For more information about outside collaborators, see "[Roles in an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#outside-collaborators)." + +如果您的组织由企业帐户拥有,则组织成员除了能够接收来自组织的任何已验证或批准域的通知之外,还能够接收来自企业帐户的任何已验证或批准域的通知。 更多信息请参阅“[验证或批准企业的域](/admin/configuration/configuring-your-enterprise/verifying-or-approving-a-domain-for-your-enterprise)”。 + +## 限制电子邮件通知 + +在限制组织的电子邮件通知之前,您必须至少验证或批准组织的一个域名,或者企业所有者必须已验证或批准至少一个企业帐户域。 + +有关验证和批准组织域名的更多信息,请参阅“[验证或批准组织域名](/organizations/managing-organization-settings/verifying-or-approving-a-domain-for-your-organization)”。 + +{% data reusables.profile.access_org %} +{% data reusables.profile.org_settings %} +{% data reusables.organizations.verified-domains %} +{% data reusables.organizations.restrict-email-notifications %} +6. 单击 **Save(保存)**。 diff --git a/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization.md b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization.md new file mode 100644 index 0000000000..562df5e1c8 --- /dev/null +++ b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization.md @@ -0,0 +1,772 @@ +--- +title: 审查组织的审核日志 +intro: 审核日志允许组织管理员快速审查组织成员执行的操作。 其中包含操作执行人、操作内容和执行时间等详细信息。 +miniTocMaxHeadingLevel: 3 +redirect_from: + - /articles/reviewing-the-audit-log-for-your-organization + - /github/setting-up-and-managing-organizations-and-teams/reviewing-the-audit-log-for-your-organization + - /organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: + - Organizations + - Teams +shortTitle: 审核审计日志 +--- + +## 访问审核日志 + +The audit log lists events triggered by activities that affect your organization within the current month and previous six months. 只有所有者才能访问组织的审核日志。 + +{% data reusables.profile.access_org %} +{% data reusables.profile.org_settings %} +{% data reusables.audit_log.audit_log_sidebar_for_org_admins %} + +## 搜索审核日志 + +{% data reusables.audit_log.audit-log-search %} + +### 基于执行的操作搜索 + +要搜索特定事件,请在查询中使用 `action` 限定符。 审核日志中列出的操作分为以下类别: + +| 类别名称 | 描述 | +| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |{% ifversion fpt or ghec %} +| [`帐户`](#account-category-actions) | 包含与组织帐户相关的所有活动。 | +| [`advisory_credit`](#advisory_credit-category-actions) | 包含与 {% data variables.product.prodname_advisory_database %} 中安全通告的贡献者积分相关的所有活动。 更多信息请参阅“[关于 {% data variables.product.prodname_dotcom %} 安全通告](/github/managing-security-vulnerabilities/about-github-security-advisories)”。 | +| [`计费,帐单`](#billing-category-actions) | 包含与组织帐单相关的所有活动。 | +| [`business`](#business-category-actions) | 包含与企业业务设置相关的活动。 | +| [`codespaces`](#codespaces-category-actions) | Contains all activities related to your organization's codespaces. |{% endif %}{% ifversion fpt or ghec or ghes > 3.2 %} +| [`dependabot_alerts`](#dependabot_alerts-category-actions) | Contains organization-level configuration activities for {% data variables.product.prodname_dependabot_alerts %} in existing repositories. 更多信息请参阅“[关于易受攻击的依赖项的警报](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies)”。 | +| [`dependabot_alerts_new_repos`](#dependabot_alerts_new_repos-category-actions) | Contains organization-level configuration activities for {% data variables.product.prodname_dependabot_alerts %} in new repositories created in the organization. | +| [`dependabot_security_updates`](#dependabot_security_updates-category-actions) | 包含现有仓库中 {% data variables.product.prodname_dependabot_security_updates %} 的组织级配置活动。 更多信息请参阅“[配置 {% data variables.product.prodname_dependabot_security_updates %}](/github/managing-security-vulnerabilities/configuring-dependabot-security-updates)。” | +| [`dependabot_security_updates_new_repos`](#dependabot_security_updates_new_repos-category-actions) | Contains organization-level configuration activities for {% data variables.product.prodname_dependabot_security_updates %} for new repositories created in the organization.{% endif %}{% ifversion fpt or ghec %} +| [`dependency_graph`](#dependency_graph-category-actions) | 包含仓库依赖项图的组织级配置活动。 更多信息请参阅“[关于依赖关系图](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)”。 | +| [`dependency_graph_new_repos`](#dependency_graph_new_repos-category-actions) | 包含组织新建仓库的组织级配置活动。{% endif %} +| [`discussion_post`](#discussion_post-category-actions) | 包含与发布到团队页面的讨论相关的所有活动。 | +| [`discussion_post_reply`](#discussion_post_reply-category-actions) | 包含与发布到团队页面的讨论回复相关的所有活动。{% ifversion fpt or ghes or ghec %} +| [`企业`](#enterprise-category-actions) | 包含与企业设置相关的活动。 |{% endif %} +| [`挂钩`](#hook-category-actions) | 包含与 web 挂钩相关的所有活动。 | +| [`integration_installation_request`](#integration_installation_request-category-actions) | 包含与组织成员请求所有者批准用于组织的集成相关的所有活动。 | +| [`ip_allow_list`](#ip_allow_list) | Contains activities related to enabling or disabling the IP allow list for an organization. | +| [`ip_allow_list_entry`](#ip_allow_list_entry) | Contains activities related to the creation, deletion, and editing of an IP allow list entry for an organization. | +| [`议题`](#issue-category-actions) | 包含与删除议题相关的活动。 |{% ifversion fpt or ghec %} +| [`marketplace_agreement_signature`](#marketplace_agreement_signature-category-actions) | 包含与签署 {% data variables.product.prodname_marketplace %} 开发者协议相关的所有活动。 | +| [`marketplace_listing`](#marketplace_listing-category-actions) | 包含与在 {% data variables.product.prodname_marketplace %} 中上架应用程序相关的所有活动。{% endif %}{% ifversion fpt or ghes > 3.0 or ghec %} +| [`members_can_create_pages`](#members_can_create_pages-category-actions) | 包含与管理组织仓库的 {% data variables.product.prodname_pages %} 站点发布相关的所有活动。 更多信息请参阅“[管理组织的 {% data variables.product.prodname_pages %} 站点发布](/organizations/managing-organization-settings/managing-the-publication-of-github-pages-sites-for-your-organization)”。 |{% endif %} +| [`org`](#org-category-actions) | 包含与组织成员身份相关的活动。{% ifversion ghec %} +| [`org_credential_authorization`](#org_credential_authorization-category-actions) | 包含与授权凭据以用于 SAML 单点登录相关的所有活动。{% endif %}{% ifversion fpt or ghes or ghae or ghec %} +| [`organization_label`](#organization_label-category-actions) | 包含与组织中仓库的默认标签相关的所有活动。{% endif %} +| [`oauth_application`](#oauth_application-category-actions) | 包含与 OAuth 应用程序相关的所有活动。{% ifversion fpt or ghes > 3.0 or ghec %} +| [`包`](#packages-category-actions) | 包含与 {% data variables.product.prodname_registry %} 相关的所有活动。{% endif %}{% ifversion fpt or ghec %} +| [`payment_method`](#payment_method-category-actions) | 包含与组织如何支付 GitHub 相关的所有活动。{% endif %} +| [`profile_picture`](#profile_picture-category-actions) | 包含与组织的头像相关的所有活动。 | +| [`project`](#project-category-actions) | 包含与项目板相关的所有活动。 | +| [`protected_branch`](#protected_branch-category-actions) | 包含与受保护分支相关的所有活动。 | +| [`repo`](#repo-category-actions) | 包含与组织拥有的仓库相关的所有活动。{% ifversion fpt or ghec %} +| [`repository_advisory`](#repository_advisory-category-actions) | 包含与 {% data variables.product.prodname_advisory_database %} 中的安全通告相关的仓库级活动。 更多信息请参阅“[关于 {% data variables.product.prodname_dotcom %} 安全通告](/github/managing-security-vulnerabilities/about-github-security-advisories)”。 | +| [`repository_content_analysis`](#repository_content_analysis-category-actions) | 包含与[启用或禁用私有仓库的数据使用](/articles/about-github-s-use-of-your-data)相关的所有活动。{% endif %}{% ifversion fpt or ghec %} +| [`repository_dependency_graph`](#repository_dependency_graph-category-actions) | 包含与启用或禁用依赖项图相关的仓库级活动 | +| {% ifversion fpt or ghec %}私有{% endif %}仓库。 更多信息请参阅“[关于依赖项图](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)”。{% endif %}{% ifversion ghes or ghae or ghec %} | | +| [`repository_secret_scanning`](#repository_secret_scanning-category-actions) | 包含与密码扫描相关的仓库级活动。 更多信息请参阅“[关于密钥扫描](/github/administering-a-repository/about-secret-scanning)”。 |{% endif %}{% ifversion fpt or ghes or ghae-issue-4864 or ghec %} +| [`repository_vulnerability_alert`](#repository_vulnerability_alert-category-actions) | 包含与[有漏洞依赖项的 {% data variables.product.prodname_dependabot_alerts %}](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies)相关的所有活动。{% endif %}{% ifversion fpt or ghec %} +| [`repository_vulnerability_alerts`](#repository_vulnerability_alerts-category-actions) | Contains repository-level configuration activities for {% data variables.product.prodname_dependabot_alerts %}.{% endif %}{% ifversion ghec %} +| [`角色`](#role-category-actions) | Contains all activities related to [custom repository roles](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization).{% endif %}{% ifversion ghes or ghae or ghec %} +| [`secret_scanning`](#secret_scanning-category-actions) | 包含现有仓库中密码扫描的组织级配置活动。 更多信息请参阅“[关于密钥扫描](/github/administering-a-repository/about-secret-scanning)”。 | +| [`secret_scanning_new_repos`](#secret_scanning_new_repos-category-actions) | 包含组织新建仓库中密码扫描的组织级配置活动。 |{% endif %}{% ifversion fpt or ghec %} +| [`sponsors`](#sponsors-category-actions) | 包含与与赞助者按钮相关的所有事件(请参阅“[在仓库中显示赞助者按钮](/articles/displaying-a-sponsor-button-in-your-repository)”){% endif %} +| [`团队`](#team-category-actions) | 包含与您的组织中的团队相关的所有活动。 | +| [`team_discussions`](#team_discussions-category-actions) | Contains activities related to managing team discussions for an organization.{% ifversion fpt or ghec or ghes > 3.1 or ghae %} +| [`工作流程`](#workflows-category-actions) | Contains activities related to {% data variables.product.prodname_actions %} workflows.{% endif %} + +您可以使用这些词搜索特定的操作集。 例如: + + * `action:team` 会找到团队类别中的所有事件。 + * `-action:hook` 会排除 web 挂钩类别中的所有事件。 + +每个类别都有一组可进行过滤的关联操作。 例如: + + * `action:team.create` 会找到团队创建处的所有事件。 + * `-action:hook.events_changed` 会排除 web 挂钩上事件已经改动的所有事件。 + +### 基于操作时间搜索 + +使用 `created` 限定符在审核日志中根据事件发生的时间过滤事件。 {% data reusables.time_date.date_format %} {% data reusables.time_date.time_format %} + +{% data reusables.search.date_gt_lt %} + +例如: + + * `created:2014-07-08` 会找到在 2014 年 7 月 8 日发生的所有事件。 + * `created:>=2014-07-08` 查找在 2014 年 7 月 8 日或之后发生的所有事件。 + * `created:<=2014-07-08` 查找在 2014 年 7 月 8 日或之前发生的所有事件。 + * `created:2014-07-01..2014-07-31` 会找到在 2014 年 7 月发生的所有事件。 + + +{% note %} + +**Note**: The audit log contains data for the current month and every day of the previous six months. + +{% endnote %} + +### 基于位置搜索 + +使用限定符 `country`,您可以在审核日志中根据发生事件的国家/地区过滤事件。 您可以使用国家/地区的两字母短代码或完整名称。 请注意,名称中包含空格的国家/地区需要加引号。 例如: + + * `country:de` 会找到在德国发生的所有事件。 + * `country:Mexico` 会找到在墨西哥发生的所有事件。 + * `country:"United States"` 会找到在美国发生的所有事件。 + +{% ifversion fpt or ghec %} +## 导出审核日志 + +{% data reusables.audit_log.export-log %} +{% data reusables.audit_log.exported-log-keys-and-values %} +{% endif %} + +## 使用审核日志 API + +您可以使用 GraphQL API{% ifversion fpt or ghec %} 或 REST API{% endif %} 与审核日志交互。 + +{% ifversion fpt or ghec %} +The audit log API requires {% data variables.product.prodname_ghe_cloud %}.{% ifversion fpt %} {% data reusables.enterprise.link-to-ghec-trial %}{% endif %} + +### 使用 GraphQL API + +{% endif %} + +{% note %} + +**注**:审核日志 GraphQL API 可用于使用 {% data variables.product.prodname_enterprise %} 的组织。 {% data reusables.gated-features.more-info-org-products %} + +{% endnote %} + +为确保知识产权得到保护并保持组织的合规,您可以使用审核日志 GraphQL API 保留审核日志数据的副本并监控: +{% data reusables.audit_log.audit-log-api-info %} + +{% ifversion fpt or ghec %} +请注意,您不能使用 GraphQL API 检索 Git 事件。 要检索 Git 事件,请改为使用 REST API。 更多信息请参阅“[`git` 类操作](#git-category-actions)”。 +{% endif %} + +GraphQL 响应可包含长达 90 至 120 天的数据。 + +例如,您可以创建 GraphQL 请求以查看添加到组织的所有新组织成员。 更多信息请参阅“[GraphQL API 审核日志]({% ifversion ghec%}/free-pro-team@latest{% endif %}/graphql/reference/interfaces#auditentry/)”。 + +{% ifversion fpt or ghec %} + +### 使用 REST API + +{% note %} + +**注**:审核日志 REST API 可供 {% data variables.product.prodname_ghe_cloud %} 用户使用。 + +{% endnote %} + +为确保知识产权得到保护并保持组织的合规,您可以使用审核日志 REST API 保留审核日志数据的副本并监控: +{% data reusables.audit_log.audited-data-list %} + +{% data reusables.audit_log.audit-log-git-events-retention %} + +有关审核日志 REST API 的更多信息,请参阅“[组织](/rest/reference/orgs#get-the-audit-log-for-an-organization)”。 + +{% endif %} + +## 审核日志操作 + +审核日志中记录为事件的一些最常见操作的概述。 + +{% ifversion fpt or ghec %} +### `account` 类操作 + +| 操作 | 描述 | +| ----------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `billing_plan_change` | 当组织的[结算周期](/articles/changing-the-duration-of-your-billing-cycle)发生更改时触发。 | +| `plan_change` | 当组织的[订阅](/articles/about-billing-for-github-accounts)发生更改时触发。 | +| `pending_plan_change` | 当组织所有者或帐单管理员[取消或降级付费订阅](/articles/how-does-upgrading-or-downgrading-affect-the-billing-process/)时触发。 | +| `pending_subscription_change` | 当 [{% data variables.product.prodname_marketplace %} 免费试用开始或到期](/articles/about-billing-for-github-marketplace/)时触发。 | +{% endif %} + +{% ifversion fpt or ghec %} +### `advisory_credit` 类操作 + +| 操作 | 描述 | +| --------- | ---------------------------------------------------------------------------------------------------------- | +| `accept` | 当有人接受安全通告的积分时触发。 更多信息请参阅“[编辑安全通告](/github/managing-security-vulnerabilities/editing-a-security-advisory)”。 | +| `create` | 当安全通告的管理员将某人添加到积分部分时触发。 | +| `decline` | 当有人拒绝安全通告的积分时触发。 | +| `destroy` | 当安全通告的管理员将某人从积分部分删除时触发。 | +{% endif %} + +{% ifversion fpt or ghec %} +### `billing` 类操作 + +| 操作 | 描述 | +| --------------------- | ------------------------------------------------------------------------------------------------------------ | +| `change_billing_type` | 当组织[更改 {% data variables.product.prodname_dotcom %} 的支付方式](/articles/adding-or-editing-a-payment-method)时触发。 | +| `change_email` | 当组织的[帐单电子邮件地址](/articles/setting-your-billing-email)发生更改时触发。 | +{% endif %} + +### `business` 类操作 + +| 操作 | 描述 | +| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |{% ifversion fpt or ghec %} +| `set_actions_fork_pr_approvals_policy` | 为企业改变需要批准来自公共复刻的工作流程的设置时触发。 更多信息请参阅“[在企业中执行 {% data variables.product.prodname_actions %} 的策略](/enterprise-cloud@latest/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-fork-pull-requests-in-your-enterprise)”。{% endif %} +| `set_actions_retention_limit` | 为企业改变 {% data variables.product.prodname_actions %} 构件和日志的保留期时触发。 更多信息请参阅“[在企业中执行 {% data variables.product.prodname_actions %} 的策略]({% ifversion fpt %}/enterprise-cloud@latest{% endif %}/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-artifact-and-log-retention-in-your-enterprise)”。{% ifversion fpt or ghes or ghec %} +| `set_fork_pr_workflows_policy` | 更改私有仓库复刻上的工作流程策略时触发。 For more information, see "{% ifversion fpt or ghec%}[Enforcing policies for {% data variables.product.prodname_actions %} in your enterprise]({% ifversion fpt %}/enterprise-cloud@latest{% endif %}/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-fork-pull-requests-in-private-repositories){% else ifversion ghes > 2.22 %}[Enabling workflows for private repository forks](/admin/github-actions/enabling-github-actions-for-github-enterprise-server/enforcing-github-actions-policies-for-your-enterprise#enabling-workflows-for-private-repository-forks){% endif %}."{% endif %} + +{% ifversion fpt or ghec %} +### `codespaces` 类操作 + +| 操作 | 描述 | +| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `create` | 当用户[创建代码空间](/github/developing-online-with-codespaces/creating-a-codespace)时触发。 | +| `resume` | 当用户恢复暂停的代码空间时触发。 | +| `delete` | 当用户[删除代码空间](/github/developing-online-with-codespaces/deleting-a-codespace)时触发。 | +| `create_an_org_secret` | 当用户为 [{% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/managing-encrypted-secrets-for-codespaces#about-encrypted-secrets-for-codespaces) 创建组织级密钥时触发 | +| `update_an_org_secret` | 当用户为 [{% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/managing-encrypted-secrets-for-codespaces#about-encrypted-secrets-for-codespaces) 更新组织级密钥时触发。 | +| `remove_an_org_secret` | 当用户为 [{% data variables.product.prodname_codespaces %}](/github/developing-online-with-codespaces/managing-encrypted-secrets-for-codespaces#about-encrypted-secrets-for-codespaces) 删除组织级密钥时触发。 | +| `manage_access_and_security` | 当用户更新[代码空间可以访问的仓库](/github/developing-online-with-codespaces/managing-access-and-security-for-codespaces)时触发。 | +{% endif %} + +{% ifversion fpt or ghec or ghes > 3.2 %} +### `dependabot_alerts` 类操作 + +| 操作 | 描述 | +| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `禁用` | Triggered when an organization owner disables {% data variables.product.prodname_dependabot_alerts %} for all existing {% ifversion fpt or ghec %}private {% endif %}repositories. 更多信息请参阅“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)”。 | +| `启用` | Triggered when an organization owner enables {% data variables.product.prodname_dependabot_alerts %} for all existing {% ifversion fpt or ghec %}private {% endif %}repositories. | + +### `dependabot_alerts_new_repos` 类操作 + +| 操作 | 描述 | +| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `禁用` | Triggered when an organization owner disables {% data variables.product.prodname_dependabot_alerts %} for all new {% ifversion fpt or ghec %}private {% endif %}repositories. 更多信息请参阅“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)”。 | +| `启用` | Triggered when an organization owner enables {% data variables.product.prodname_dependabot_alerts %} for all new {% ifversion fpt or ghec %}private {% endif %}repositories. | + +### `dependabot_security_updates` 类操作 + +| 操作 | 描述 | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `禁用` | 当组织所有者对所有现有仓库禁用 {% data variables.product.prodname_dependabot_security_updates %} 时触发。 更多信息请参阅“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)”。 | +| `启用` | 当组织所有者对所有现有仓库启用 {% data variables.product.prodname_dependabot_security_updates %} 时触发。 | + +### `dependabot_security_updates_new_repos` 类操作 + +| 操作 | 描述 | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `禁用` | 当组织所有者对所有新仓库禁用 {% data variables.product.prodname_dependabot_security_updates %} 时触发。 更多信息请参阅“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)”。 | +| `启用` | 当组织所有者对所有新仓库启用 {% data variables.product.prodname_dependabot_security_updates %} 时触发。 | +{% endif %} + +{% ifversion fpt or ghec %} +### `dependency_graph` 类操作 + +| 操作 | 描述 | +| ---- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `禁用` | 当组织所有者对所有现有仓库禁用依赖项图时触发。 更多信息请参阅“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)”。 | +| `启用` | 当组织所有者对所有现有仓库启用依赖项图时触发。 | + +### `dependency_graph_new_repos` 类操作 + +| 操作 | 描述 | +| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `禁用` | 当组织所有者对所有新仓库禁用依赖项图时触发。 更多信息请参阅“[管理组织的安全和分析设置](/organizations/keeping-your-organization-secure/managing-security-and-analysis-settings-for-your-organization)”。 | +| `启用` | 当组织所有者对所有新仓库启用依赖项图时触发。 | +{% endif %} + +### `discussion_post` 类操作 + +| 操作 | 描述 | +| --------- | ---------------------------------------------------------------------------- | +| `update` | 当[团队讨论帖子被编辑](/articles/managing-disruptive-comments/#editing-a-comment)时触发。 | +| `destroy` | 当[团队讨论帖子被删除](/articles/managing-disruptive-comments/#deleting-a-comment)时触发。 | + +### `discussion_post_reply` 类操作 + +| 操作 | 描述 | +| --------- | ------------------------------------------------------------------------------- | +| `update` | 当[团队讨论帖子的回复被编辑](/articles/managing-disruptive-comments/#editing-a-comment)时触发。 | +| `destroy` | 当[团队讨论帖子的回复被删除](/articles/managing-disruptive-comments/#deleting-a-comment)时触发。 | + +{% ifversion fpt or ghes or ghec %} +### `enterprise` 类别操作 + +{% data reusables.actions.actions-audit-events-for-enterprise %} + +{% endif %} + +{% ifversion fpt or ghec %} +### `environment` 类别操作 + +| 操作 | 描述 | +| ----------------------- | ------------------------------------------------------------------------------------ | +| `create_actions_secret` | 在环境中创建机密时触发。 更多信息请参阅“[环境机密](/actions/reference/environments#environment-secrets)”。 | +| `delete` | 当环境被删除时触发。 更多信息请参阅“[删除环境](/actions/reference/environments#deleting-an-environment)”。 | +| `remove_actions_secret` | 从环境中删除机密时触发。 更多信息请参阅“[环境机密](/actions/reference/environments#environment-secrets)”。 | +| `update_actions_secret` | 当环境中的机密更新时触发。 更多信息请参阅“[环境机密](/actions/reference/environments#environment-secrets)”。 | +{% endif %} + +{% ifversion ghae %} +### `external_group` category actions + +{% data reusables.saml.external-group-audit-events %} + +{% endif %} + +{% ifversion ghae %} +### `external_identity` category actions + +{% data reusables.saml.external-identity-audit-events %} + +{% endif %} + +{% ifversion fpt or ghec %} +### `git` 类操作 + +{% note %} + +**注:**要访问审核日志中的 Git 事件,必须使用审核日志 REST API。 审核日志 REST API 仅供 {% data variables.product.prodname_ghe_cloud %} 用户使用。 更多信息请参阅“[组织](/rest/reference/orgs#get-the-audit-log-for-an-organization)”。 + +{% endnote %} + +{% data reusables.audit_log.audit-log-git-events-retention %} + +| 操作 | 描述 | +| ---- | ------------ | +| `克隆` | 当仓库被克隆时触发。 | +| `获取` | 从仓库获取更改时触发。 | +| `推送` | 将更改推送到仓库时触发。 | + +{% endif %} + +### `hook` 类操作 + +| 操作 | 描述 | +| ---------------- | -------------------------------------------------- | +| `create` | 当[新挂钩被添加](/articles/creating-webhooks)到组织拥有的仓库时触发. | +| `config_changed` | 当现有挂钩的配置发生更改时触发。 | +| `destroy` | 从仓库中删除现有挂钩时触发。 | +| `events_changed` | 当挂钩上的事件发生更改时触发。 | + +### `integration_installation_request` 类操作 + +| 操作 | 描述 | +| -------- | ------------------------------------------- | +| `create` | 当组织成员请求组织所有者安装集成以用于组织时触发。 | +| `close` | 当安装集成以用于组织的请求被组织所有者批准或拒绝,或者被提出请求的组成成员取消时触发。 | + +### `ip_allow_list` 类操作 + +| 操作 | 描述 | +| ---------------------------- | ------------------------------------------------------------------------ | +| `启用` | 为组织启用 IP 允许列表时触发。 | +| `禁用` | 为组织禁用 IP 允许列表时触发。 | +| `enable_for_installed_apps` | 为已安装的 {% data variables.product.prodname_github_apps %} 启用 IP 允许列表时触发。 | +| `disable_for_installed_apps` | 为已安装的 {% data variables.product.prodname_github_apps %} 禁用 IP 允许列表时触发。 | + +### `ip_allow_list_entry` 类操作 + +| 操作 | 描述 | +| --------- | --------------------------------------------------------------- | +| `create` | IP 地址添加到 IP 允许列表中时触发。 | +| `update` | Triggered when an IP address or its description was changed. | +| `destroy` | Triggered when an IP address was deleted from an IP allow list. | + +### `issue` 类操作 + +| 操作 | 描述 | +| --------- | ------------------------------------ | +| `destroy` | 当组织所有者或仓库中具有管理员权限的人从组织拥有的仓库中删除议题时触发。 | + +{% ifversion fpt or ghec %} + +### `marketplace_agreement_signature` 类操作 + +| 操作 | 描述 | +| -------- | --------------------------------------------------------------- | +| `create` | 在签署 {% data variables.product.prodname_marketplace %} 开发者协议时触发。 | + +### `marketplace_listing` 类操作 + +| 操作 | 描述 | +| --------- | -------------------------------------------------------------------- | +| `批准` | 当您的列表被批准包含在 {% data variables.product.prodname_marketplace %} 中时触发。 | +| `create` | 当您在 {% data variables.product.prodname_marketplace %} 中为应用程序创建列表时触发。 | +| `delist` | 当您的列表从 {% data variables.product.prodname_marketplace %} 中被删除时触发。 | +| `redraft` | 将您的列表被返回到草稿状态时触发。 | +| `reject` | 当您的列表被拒绝包含在 {% data variables.product.prodname_marketplace %} 中时触发。 | + +{% endif %} + +{% ifversion fpt or ghes > 3.0 or ghec %} + +### `members_can_create_pages` 类操作 + +更多信息请参阅“[管理组织的 {% data variables.product.prodname_pages %} 站点发布](/organizations/managing-organization-settings/managing-the-publication-of-github-pages-sites-for-your-organization)”。 + +| 操作 | 描述 | +|:---- |:-------------------------------------------------------------------- | +| `启用` | 当组织所有者启用在组织中的仓库发布 {% data variables.product.prodname_pages %} 站点时触发。 | +| `禁用` | 当组织所有者禁止在组织中的仓库发布 {% data variables.product.prodname_pages %} 站点时触发。 | + +{% endif %} + +### `org` 类操作 + +| 操作 | 描述 | +| --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `add_member` | Triggered when a user joins an organization.{% ifversion fpt or ghes > 3.0 or ghae or ghec %} +| `advanced_security_policy_selected_member_disabled` | 当企业所有者阻止为组织拥有的仓库启用 {% data variables.product.prodname_GH_advanced_security %} 功能时触发。 {% data reusables.advanced-security.more-information-about-enforcement-policy %} +| `advanced_security_policy_selected_member_enabled` | 当企业所有者允许为组织拥有的仓库启用 {% data variables.product.prodname_GH_advanced_security %} 功能时触发。 {% data reusables.advanced-security.more-information-about-enforcement-policy %}{% endif %}{% ifversion fpt or ghec %} +| `audit_log_export` | 组织管理员[创建组织审核日志导出](#exporting-the-audit-log)时触发。 如果导出包含查询,则日志将列出所使用的查询以及与该查询匹配的审核日志条目数量。 | +| `block_user` | 当组织所有者[阻止用户访问组织的仓库](/communities/maintaining-your-safety-on-github/blocking-a-user-from-your-organization)时触发。 | +| `cancel_invitation` | 当组织邀请被撤销时触发的。 |{% endif %}{% ifversion fpt or ghes or ghec %} +| `create_actions_secret` | 为组织创建 {% data variables.product.prodname_actions %} 机密时触发。 更多信息请参阅“[为组织创建加密密码](/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-an-organization)”。{% endif %} |{% ifversion fpt or ghec %} +| `disable_oauth_app_restrictions` | Triggered when an owner [disables {% data variables.product.prodname_oauth_app %} access restrictions](/articles/disabling-oauth-app-access-restrictions-for-your-organization) for your organization.{% ifversion ghec %} +| `disable_saml` | Triggered when an organization admin disables SAML single sign-on for an organization.{% endif %}{% endif %} +| `disable_member_team_creation_permission` | 当组织所有者将团队创建限于所有者时触发。 更多信息请参阅“[设置组织中的团队创建权限](/articles/setting-team-creation-permissions-in-your-organization)”。 |{% ifversion not ghae %} +| `disable_two_factor_requirement` | 当所有者对组织中的所有成员{% ifversion fpt or ghec %}、帐单管理员{% endif %} 和外部协作者禁用双重身份验证要求时触发。{% endif %}{% ifversion fpt or ghec %} +| `enable_oauth_app_restrictions` | Triggered when an owner [enables {% data variables.product.prodname_oauth_app %} access restrictions](/articles/enabling-oauth-app-access-restrictions-for-your-organization) for your organization.{% ifversion ghec %} +| `enable_saml` | Triggered when an organization admin [enables SAML single sign-on](/articles/enabling-and-testing-saml-single-sign-on-for-your-organization) for an organization.{% endif %}{% endif %} +| `enable_member_team_creation_permission` | 当组织所有者允许成员创建团队时触发。 更多信息请参阅“[设置组织中的团队创建权限](/articles/setting-team-creation-permissions-in-your-organization)”。 |{% ifversion not ghae %} +| `enable_two_factor_requirement` | Triggered when an owner requires two-factor authentication for all members{% ifversion fpt or ghec %}, billing managers,{% endif %} and outside collaborators in an organization.{% endif %}{% ifversion fpt or ghec %} +| `invite_member` | 当[新用户被邀请加入您的组织](/organizations/managing-membership-in-your-organization/inviting-users-to-join-your-organization)时触发。 | +| `oauth_app_access_approved` | 当所有者[授权组织访问 {% data variables.product.prodname_oauth_app %}](/articles/approving-oauth-apps-for-your-organization/) 时触发。 | +| `oauth_app_access_denied` | 当所有者对组织[禁用先前批准的 {% data variables.product.prodname_oauth_app %} 权限](/articles/denying-access-to-a-previously-approved-oauth-app-for-your-organization)时触发。 | +| `oauth_app_access_requested` | 当组织成员请求所有者对组织授予 {% data variables.product.prodname_oauth_app %} 权限时触发。{% endif %} +| `register_self_hosted_runner` | 在注册新的自托管运行器时触发。 更多信息请参阅“[将自托管运行器添加到组织](/actions/hosting-your-own-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-an-organization)”。 | +| `remove_actions_secret` | 当 {% data variables.product.prodname_actions %} 密码删除时触发。{% ifversion fpt or ghec %} +| `remove_billing_manager` | 当[所有者从组织中删除帐单管理员](/articles/removing-a-billing-manager-from-your-organization/),或者当[组织中要求使用双重身份验证](/articles/requiring-two-factor-authentication-in-your-organization)但帐单管理员未使用 2FA 或禁用 2FA 时触发。 +{% endif %} +| `remove_member` | 当[所有者从组织中删除成员](/articles/removing-a-member-from-your-organization/),{% ifversion not ghae %} 或者当[组织中要求使用双重身份验证](/articles/requiring-two-factor-authentication-in-your-organization)但组织成员未使用 2FA 或禁用 2FA 时触发{% endif %}。 当[组织成员从组织中删除自己](/articles/removing-yourself-from-an-organization/)时也会触发。 | +| `remove_outside_collaborator` | 当所有者从组织中删除外部协作者,{% ifversion not ghae %} 或者当[组织中要求使用双重身份验证](/articles/requiring-two-factor-authentication-in-your-organization)但外部协作者未使用 2FA 或禁用 2FA 时触发{% endif %}。 | +| `remove_self_hosted_runner` | 当自托管运行器被移除时触发。 更多信息请参阅“[从组织移除运行器](/actions/hosting-your-own-runners/removing-self-hosted-runners#removing-a-runner-from-an-organization)”。 |{% ifversion ghec %} +| `revoke_external_identity` | 当组织所有者撤销成员的链接身份时触发。 更多信息请参阅“[查看和管理成员对组织的 SAML 访问](/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization#viewing-and-revoking-a-linked-identity)”。 | +| `revoke_sso_session` | 当组织所有者撤销成员的 SAML 会话时触发。 更多信息请参阅“[查看和管理成员对组织的 SAML 访问](/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization#viewing-and-revoking-a-linked-identity)”。 |{% endif %} +| `runner_group_created` | 在创建自托管运行器组时触发。 更多信息请参阅“[为组织创建自托管运行器组](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#creating-a-self-hosted-runner-group-for-an-organization)”。 | +| `runner_group_removed` | 当自托管运行器组被移除时触发。 更多信息请参阅“[移除自托管运行器组](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#removing-a-self-hosted-runner-group)”。 | +| `runner_group_updated` | 当自托管运行器组的配置改变时触发。 更多信息请参阅“[更改自托管运行器组的访问策略](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#changing-the-access-policy-of-a-self-hosted-runner-group)”。 | +| `runner_group_runners_added` | 当自托管运行器添加到组时触发。 更多信息请参阅“[将自托管运行器移动到组](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#moving-a-self-hosted-runner-to-a-group)”。 | +| `runner_group_runner_removed` | 当 REST API 用于从组中删除自托管运行器时触发。 更多信息请参阅“[为组织从组中删除自托管运行器](/rest/reference/actions#remove-a-self-hosted-runner-from-a-group-for-an-organization)”。 | +| `runner_group_runners_updated` | 当运行器组成员列表更新时触发。 更多信息请参阅“[为组织设置组中的自托管运行器](/rest/reference/actions#set-self-hosted-runners-in-a-group-for-an-organization)”。{% ifversion fpt or ghes > 3.1 or ghae or ghec %} +| `self_hosted_runner_online` | 当运行器应用程序启动时触发。 只能使用 REST API 查看;在 UI 或 JSON/CSV 导出中不可见。 更多信息请参阅“[检查自托管运行器的状态](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)”。 | +| `self_hosted_runner_offline` | 当运行器应用程序停止时触发。 只能使用 REST API 查看;在 UI 或 JSON/CSV 导出中不可见。 For more information, see "[Checking the status of a self-hosted runner](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)."{% endif %}{% ifversion fpt or ghes or ghec %} +| `self_hosted_runner_updated` | 当运行器应用程序更新时触发。 可以使用 REST API 和 UI 查看;在 JSON /CSV 导出中不可见。 更多信息请参阅“[关于自托管的运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#about-self-hosted-runners)”。{% endif %}{% ifversion fpt or ghec %} +| `set_actions_fork_pr_approvals_policy` | 为组织改变需要批准来自公共复刻的工作流程的设置时触发。 更多信息请参阅“[需要批准来自公共复刻的工作流程](/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#requiring-approval-for-workflows-from-public-forks)”。{% endif %} +| `set_actions_retention_limit` | 改变 {% data variables.product.prodname_actions %} 构件和日志的保留期时触发。 更多信息请参阅“[在企业中执行 {% data variables.product.prodname_actions %} 的策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise#enforcing-a-policy-for-artifact-and-log-retention-in-your-enterprise)”。{% ifversion fpt or ghes or ghec %} +| `set_fork_pr_workflows_policy` | 更改私有仓库复刻上的工作流程策略时触发。 更多信息请参阅“[为私有仓库复刻启用工作流程](/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization#enabling-workflows-for-private-repository-forks)”。{% endif %}{% ifversion fpt or ghec %} +| `unblock_user` | 当组织所有者[取消阻止用户访问组织](/communities/maintaining-your-safety-on-github/unblocking-a-user-from-your-organization)时触发。{% endif %}{% ifversion fpt or ghes or ghec %} +| `update_actions_secret` | 当 {% data variables.product.prodname_actions %} 密码更新时触发。{% endif %} +| `update_new_repository_default_branch_setting` | 当所有者更改组织中新仓库的默认分支名称时触发。 更多信息请参阅“[管理组织中仓库的默认分支名称](/organizations/managing-organization-settings/managing-the-default-branch-name-for-repositories-in-your-organization)”。 | +| `update_default_repository_permission` | 当所有者更改组织成员的默认仓库权限级别时触发的。 | +| `update_member` | 当所有者将某人的角色从所有者更改为成员或者从成员更改为所有者时触发。 | +| `update_member_repository_creation_permission` | 当所有者更改组织成员创建仓库的权限时触发。{% ifversion fpt or ghec %} +| `update_saml_provider_settings` | 当组织的 SAML 提供程序设置被更新时触发。 | +| `update_terms_of_service` | 当组织在标准服务条款和公司服务条款之间切换时触发。 更多信息请参阅“[升级到公司服务条款](/articles/upgrading-to-the-corporate-terms-of-service)”。{% endif %} + +{% ifversion ghec %} +### `org_credential_authorization` 类操作 + +| 操作 | 描述 | +| -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `grant` | 当成员[授权用于 SAML 单点登录的凭据](/github/authenticating-to-github/authenticating-with-saml-single-sign-on)时触发。 | +| `deauthorized` | 当成员[取消授权用于 SAML 单点登录的凭据](/github/authenticating-to-github/authenticating-with-saml-single-sign-on)时触发。 | +| `revoke` | 当所有者[撤销授权的凭据](/organizations/granting-access-to-your-organization-with-saml-single-sign-on/viewing-and-managing-a-members-saml-access-to-your-organization)时触发。 | + +{% endif %} + +{% ifversion fpt or ghes or ghae or ghec %} +### `organization_label` 类操作 + +| 操作 | 描述 | +| --------- | ---------- | +| `create` | 创建默认标签时触发。 | +| `update` | 编辑默认标签时触发。 | +| `destroy` | 删除默认标签时触发。 | + +{% endif %} + +### `oauth_application` 类操作 + +| 操作 | 描述 | +| --------------- | ----------------------------------------------------------------- | +| `create` | 在创建新 {% data variables.product.prodname_oauth_app %} 时触发。 | +| `destroy` | 当现有 {% data variables.product.prodname_oauth_app %} 被删除时触发。 | +| `reset_secret` | 当 {% data variables.product.prodname_oauth_app %} 的客户端密钥被重置时触发。 | +| `revoke_tokens` | 当 {% data variables.product.prodname_oauth_app %} 的用户令牌被撤销时触发。 | +| `转让` | 当现有 {% data variables.product.prodname_oauth_app %} 被转让到新组织时触发。 | + +{% ifversion fpt or ghes > 3.0 or ghec %} +### `packages` 类操作 + +| 操作 | 描述 | +| --------------------------- | ------------------------------------------------------------------------------------------------------ | +| `package_version_published` | 当软件包版本发布时触发。 | +| `package_version_deleted` | 当特定软件包版本被删除时触发。 更多信息请参阅“[删除和恢复软件包](/packages/learn-github-packages/deleting-and-restoring-a-package)”。 | +| `package_deleted` | 在整个软件包被删除时触发。 更多信息请参阅“[删除和恢复软件包](/packages/learn-github-packages/deleting-and-restoring-a-package)”。 | +| `package_version_restored` | 当特定软件包版本被删除时触发。 更多信息请参阅“[删除和恢复软件包](/packages/learn-github-packages/deleting-and-restoring-a-package)”。 | +| `package_restored` | 在整个软件包恢复时触发。 更多信息请参阅“[删除和恢复软件包](/packages/learn-github-packages/deleting-and-restoring-a-package)”。 | + +{% endif %} + +{% ifversion fpt or ghec %} + +### `payment_method` 类操作 + +| 操作 | 描述 | +| -------- | --------------------------------- | +| `create` | 在添加新的付款方式(例如新的信用卡或 PayPal 帐户)时触发。 | +| `update` | 当现有付款方式被更新时触发。 | + +{% endif %} + +### `profile_picture` 类操作 +| 操作 | 描述 | +| ------ | ----------------- | +| update | 在设置或更新组织的资料图片时触发。 | + +### `project` 类操作 + +| 操作 | 描述 | +| ------------------------ | -------------------------------------- | +| `create` | 在创建项目板时触发。 | +| `link` | 当仓库被链接到项目板时触发。 | +| `rename` | 当项目板被重命名时触发。 | +| `update` | 当项目板被更新时触发。 | +| `delete` | 在删除项目板时触发。 | +| `unlink` | 当仓库从项目板解除链接时触发。 | +| `update_org_permission` | 当所有组织成员的基本级别权限被更改或删除时触发。 | +| `update_team_permission` | 当团队的项目板权限级别被更改,或者在项目板中添加或删除团队时触发。 | +| `update_user_permission` | 在项目板中添加或删除组织成员或外部协作者时,或者他们的权限级别被更改时触发。 | + +### `protected_branch` 类操作 + +| 操作 | 描述 | +| ----------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `create` | 在分支上启用分支保护时触发。 | +| `destroy` | 在分支上禁用分支保护时触发。 | +| `update_admin_enforced` | 为仓库管理员实施分支保护时触发。 | +| `update_require_code_owner_review` | 在分支上更新必需代码所有者审查的实施时触发。 | +| `dismiss_stale_reviews` | 在分支上更新忽略旧拉取请求的实施时触发。 | +| `update_signature_requirement_enforcement_level` | 在分支上更新必需提交签名的实施时触发。 | +| `update_pull_request_reviews_enforcement_level` | 在分支上更新必需拉取请求审查的实施时触发。 Can be one of `0`(deactivated), `1`(non-admins), `2`(everyone). | +| `update_required_status_checks_enforcement_level` | 在分支上更新必需状态检查的实施时触发。 | +| `update_strict_required_status_checks_policy` | 当分支在合并之前保持最新的要求被更改时触发。 | +| `rejected_ref_update` | 当分支更新尝试被拒绝时触发。 | +| `policy_override` | 当仓库管理员重写分支保护要求时触发。{% ifversion fpt or ghes or ghae or ghec %} +| `update_allow_force_pushes_enforcement_level` | 对受保护分支启用或禁用强制推送时触发。 | +| `update_allow_deletions_enforcement_level` | 对受保护分支启用或禁用分支删除时触发。 | +| `update_linear_history_requirement_enforcement_level` | 对受保护分支启用或禁用必要线性提交历史记录时触发。 | +{% endif %} + +{% ifversion fpt or ghes > 3.1 or ghae or ghec %} + +### `pull_request` 类操作 + +| 操作 | 描述 | +| ----------------------- | ----------------------------- | +| `create` | 在创建拉取请求时触发。 | +| `close` | 在未合并的情况下关闭拉取请求时触发。 | +| `重新激活` | 当之前关闭的拉取请求重新打开时触发。 | +| `合并` | 当拉取请求合并时触发。 | +| `indirect_merge` | 当拉取请求被视为合并时触发,因为其提交被合并到目标分支中。 | +| `ready_for_review` | 当拉请求被标记为可供审核时触发。 | +| `converted_to_draft` | 当拉请求转换为草稿时触发。 | +| `create_review_request` | 当请求审核时触发。 | +| `remove_review_request` | 当审核请求被移除时触发。 | + +### `pull_request_review` 类操作 + +| 操作 | 描述 | +| -------- | ---------- | +| `提交` | 在提交审核时触发。 | +| `忽略` | 当审核被忽略时触发。 | +| `delete` | 当审核被删除时触发。 | + +### `pull_request_review_comment` 类操作 + +| 操作 | 描述 | +| -------- | ----------- | +| `create` | 在添加审核评论时触发。 | +| `update` | 在更改审核评论时触发。 | +| `delete` | 在删除审核评论时触发。 | + +{% endif %} + +### `repo` 类操作 + +| 操作 | 描述 | +| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `access` | 当用户[更改组织中仓库的可见性](/github/administering-a-repository/setting-repository-visibility)时触发。 | +| `actions_enabled` | 为仓库启用 {% data variables.product.prodname_actions %} 时触发。 可以使用用户界面查看。 当您使用 REST API 访问审计日志时,不包括此事件。 更多信息请参阅“[使用 REST API](#using-the-rest-api)”。 | +| `add_member` | 当用户接受[邀请以获取仓库协作权限](/articles/inviting-collaborators-to-a-personal-repository)时触发。 | +| `add_topic` | 当仓库管理员向仓库[添加主题](/articles/classifying-your-repository-with-topics)时触发。{% ifversion fpt or ghes > 3.0 or ghae or ghec %} +| `advanced_security_disabled` | 当仓库管理员为仓库禁用 {% data variables.product.prodname_GH_advanced_security %} 功能时触发。 更多信息请参阅“[管理仓库的安全和分析设置](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)”。 | +| `advanced_security_enabled` | 当仓库管理员为仓库启用 {% data variables.product.prodname_GH_advanced_security %} 功能时触发。 更多信息请参阅“[管理仓库的安全和分析设置](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository)”。{% endif %} +| `archived` | 当仓库管理员[存档仓库](/articles/about-archiving-repositories)时触发。{% ifversion ghes %} +| `config.disable_anonymous_git_access` | 当公共仓库中[禁用匿名 Git 读取权限](/enterprise/{{ currentVersion }}/user/articles/enabling-anonymous-git-read-access-for-a-repository)时触发。 | +| `config.enable_anonymous_git_access` | 当公共仓库中[启用匿名 Git 读取权限](/enterprise/{{ currentVersion }}/user/articles/enabling-anonymous-git-read-access-for-a-repository)时触发。 | +| `config.lock_anonymous_git_access` | 当仓库的[匿名 Git 读取权限设置被锁定](/enterprise/{{ currentVersion }}/admin/guides/user-management/preventing-users-from-changing-anonymous-git-read-access)时触发。 | +| `config.unlock_anonymous_git_access` | 当仓库的[匿名 Git 读取权限设置被解锁](/enterprise/{{ currentVersion }}/admin/guides/user-management/preventing-users-from-changing-anonymous-git-read-access)时触发。{% endif %} +| `create` | 在[创建新仓库](/articles/creating-a-new-repository)时触发。{% ifversion fpt or ghes or ghec %} +| `create_actions_secret` | 为仓库创建 {% data variables.product.prodname_actions %} 密码时触发。 更多信息请参阅“[为仓库创建加密密码](/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository)”。{% endif %} +| `destroy` | 当[仓库被删除](/articles/deleting-a-repository)时触发。{% ifversion fpt or ghec %} +| `禁用` | 当仓库被禁用(例如,因[资金不足](/articles/unlocking-a-locked-account))时触发。{% endif %} +| `启用` | 在重新启用仓库时触发。{% ifversion fpt or ghes or ghec %} +| `remove_actions_secret` | 当 {% data variables.product.prodname_actions %} 密码被移除时触发。{% endif %} +| `remove_member` | 从[仓库中删除用户的协作者身份](/articles/removing-a-collaborator-from-a-personal-repository)时触发。 | +| `register_self_hosted_runner` | 在注册新的自托管运行器时触发。 更多信息请参阅“[将自托管运行器添加到仓库](/actions/hosting-your-own-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-a-repository)”。 | +| `remove_self_hosted_runner` | 当自托管运行器被移除时触发。 更多信息请参阅“[从仓库移除运行器](/actions/hosting-your-own-runners/removing-self-hosted-runners#removing-a-runner-from-a-repository)”。 | +| `remove_topic` | 当仓库管理员从仓库中删除主题时触发。 | +| `rename` | 在[新仓库重命名](/articles/renaming-a-repository)时触发。{% ifversion fpt or ghes > 3.1 or ghae or ghec %} +| `self_hosted_runner_online` | 当运行器应用程序启动时触发。 只能使用 REST API 查看;在 UI 或 JSON/CSV 导出中不可见。 更多信息请参阅“[检查自托管运行器的状态](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)”。 | +| `self_hosted_runner_offline` | 当运行器应用程序停止时触发。 只能使用 REST API 查看;在 UI 或 JSON/CSV 导出中不可见。 For more information, see "[Checking the status of a self-hosted runner](/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners#checking-the-status-of-a-self-hosted-runner)."{% endif %}{% ifversion fpt or ghes or ghec %} +| `self_hosted_runner_updated` | 当运行器应用程序更新时触发。 可以使用 REST API 和 UI 查看;在 JSON /CSV 导出中不可见。 更多信息请参阅“[关于自托管的运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#about-self-hosted-runners)”。{% endif %}{% ifversion fpt or ghec %} +| `set_actions_fork_pr_approvals_policy` | 改变需要批准来自公共复刻的工作流程的设置时触发。 更多信息请参阅“[管理仓库的 {% data variables.product.prodname_actions %} 设置](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#configuring-required-approval-for-workflows-from-public-forks)”。{% endif %} +| `set_actions_retention_limit` | 改变 {% data variables.product.prodname_actions %} 构件和日志的保留期时触发。 更多信息请参阅“[管理仓库的 {% data variables.product.prodname_actions %} 设置](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#configuring-the-retention-period-for-github-actions-artifacts-and-logs-in-your-repository)”。{% ifversion fpt or ghes or ghec %} +| `set_fork_pr_workflows_policy` | 更改私有仓库复刻上的工作流程策略时触发。 更多信息请参阅“[管理仓库的 {% data variables.product.prodname_actions %} 设置](/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository#enabling-workflows-for-private-repository-forks)”。{% endif %} +| `转让` | 当[仓库被转让](/articles/how-to-transfer-a-repository)时触发。 | +| `transfer_start` | 在仓库转让即将发生时触发。 | +| `unarchived` | 当仓库管理员取消存档仓库时触发。{% ifversion fpt or ghes or ghec %} +| `update_actions_secret` | 当 {% data variables.product.prodname_actions %} 密码更新时触发。{% endif %} + +{% ifversion fpt or ghec %} + +### `repository_advisory` 类操作 + +| 操作 | 描述 | +| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `close` | 当有人关闭安全通告时触发。 更多信息请参阅“[关于 {% data variables.product.prodname_dotcom %} 安全通告](/github/managing-security-vulnerabilities/about-github-security-advisories)”。 | +| `cve_request` | 当有人从 {% data variables.product.prodname_dotcom %} 为安全通告草稿申请 CVE(通用漏洞披露)编号时触发。 | +| `github_broadcast` | 当 {% data variables.product.prodname_dotcom %} 在 {% data variables.product.prodname_advisory_database %} 中公开安全通告时触发。 | +| `github_withdraw` | 当 {% data variables.product.prodname_dotcom %} 撤回错误发布的安全通告时触发。 | +| `已激活` | 当有人打开安全通告草稿时触发。 | +| `publish` | 当有人发布安全通告时触发。 | +| `重新激活` | 当有人重新打开安全通告草稿时触发。 | +| `update` | 当有人编辑草稿或发布安全通告时触发。 | + +### `repository_content_analysis` 类操作 + +| 操作 | 描述 | +| ---- | ---------------------------------------------------------------------------------------------------------------------------- | +| `启用` | 当组织所有者或对仓库有管理员权限的人[对私有仓库启用数据使用设置](/get-started/privacy-on-github/managing-data-use-settings-for-your-private-repository)时触发。 | +| `禁用` | 当组织所有者或对仓库有管理员权限的人[对私有仓库禁用数据使用设置](/get-started/privacy-on-github/managing-data-use-settings-for-your-private-repository)时触发。 | + +{% endif %}{% ifversion fpt or ghec %} + +### `repository_dependency_graph` 类操作 + +| 操作 | 描述 | +| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `禁用` | 当仓库所有者或对仓库拥有管理员权限的人对{% ifversion fpt or ghec %}私有{% endif %}仓库禁用依赖项图时触发。 更多信息请参阅“[关于依赖关系图](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)”。 | +| `启用` | 当仓库所有者或对仓库拥有管理员权限的人对{% ifversion fpt or ghec %}私有{% endif %}仓库启用依赖项图时触发。 | + +{% endif %}{% ifversion ghec or ghes or ghae %} +### `repository_secret_scanning` 类操作 + +| 操作 | 描述 | +| ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `禁用` | Triggered when a repository owner or person with admin access to the repository disables secret scanning for a {% ifversion ghec %}private or internal {% endif %}repository. 更多信息请参阅“[关于密钥扫描](/github/administering-a-repository/about-secret-scanning)”。 | +| `启用` | Triggered when a repository owner or person with admin access to the repository enables secret scanning for a {% ifversion ghec %}private or internal {% endif %}repository. | + +{% endif %}{% ifversion fpt or ghes or ghae-issue-4864 or ghec %} +### `repository_vulnerability_alert` 类操作 + +| 操作 | 描述 | +| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `create` | Triggered when {% data variables.product.product_name %} creates a {% data variables.product.prodname_dependabot %} alert for a repository that uses a vulnerable dependency. 更多信息请参阅“[关于易受攻击的依赖项的警报](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies)”。 | +| `忽略` | Triggered when an organization owner or person with admin access to the repository dismisses a {% data variables.product.prodname_dependabot %} alert about a vulnerable dependency. | +| `解决` | 当对仓库具有写入权限的人推送更改以更新和解决项目依赖项中的漏洞时触发。 | + +{% endif %}{% ifversion fpt or ghec %} +### `repository_vulnerability_alerts` 类操作 + +| 操作 | 描述 | +| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `authorized_users_teams` | 当组织所有者或对仓库有管理员权限的人更新有权接收仓库中有漏洞依赖项 {% data variables.product.prodname_dependabot_alerts %} 的人员或团队列表时触发。 更多信息请参阅“[管理仓库的安全和分析设置](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)”。 | +| `禁用` | 当仓库所有者或对仓库有管理员权限的人禁用 {% data variables.product.prodname_dependabot_alerts %} 时触发。 | +| `启用` | 当仓库所有者或对仓库有管理员权限的人启用 {% data variables.product.prodname_dependabot_alerts %} 时触发。 | + +{% endif %}{% ifversion ghec %} +### `role` category actions +| 操作 | 描述 | +| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `create` | Triggered when an organization owner creates a new custom repository role. For more information, see "[Managing custom repository roles for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." | +| `destroy` | Triggered when a organization owner deletes a custom repository role. For more information, see "[Managing custom repository roles for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." | +| `update` | Triggered when an organization owner edits an existing custom repository role. For more information, see "[Managing custom repository roles for an organization](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)." | + +{% endif %} +{% ifversion ghec or ghes or ghae %} +### `secret_scanning` 类操作 + +| 操作 | 描述 | +| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `禁用` | Triggered when an organization owner disables secret scanning for all existing{% ifversion ghec %}, private or internal{% endif %} repositories. 更多信息请参阅“[关于密钥扫描](/github/administering-a-repository/about-secret-scanning)”。 | +| `启用` | Triggered when an organization owner enables secret scanning for all existing{% ifversion ghec %}, private or internal{% endif %} repositories. | + +### `secret_scanning_new_repos` 类操作 + +| 操作 | 描述 | +| ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `禁用` | Triggered when an organization owner disables secret scanning for all new {% ifversion ghec %}private or internal {% endif %}repositories. 更多信息请参阅“[关于密钥扫描](/github/administering-a-repository/about-secret-scanning)”。 | +| `启用` | Triggered when an organization owner enables secret scanning for all new {% ifversion ghec %}private or internal {% endif %}repositories. | +{% endif %} + +{% ifversion fpt or ghec %} +### `sponsors` 类操作 + +| 操作 | 描述 | +| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `custom_amount_settings_change` | 启用或禁用自定义金额时或更改建议的自定义金额时触发(请参阅“[管理您的赞助级别](/github/supporting-the-open-source-community-with-github-sponsors/managing-your-sponsorship-tiers)”) | +| `repo_funding_links_file_action` | 更改仓库中的 FUNDING 文件时触发(请参阅“[在仓库中显示赞助按钮](/articles/displaying-a-sponsor-button-in-your-repository)”) | +| `sponsor_sponsorship_cancel` | 当您取消赞助时触发(请参阅“[降级赞助](/articles/downgrading-a-sponsorship)”) | +| `sponsor_sponsorship_create` | 当您赞助帐户时触发(请参阅“[赞助开源贡献者](/sponsors/sponsoring-open-source-contributors/sponsoring-an-open-source-contributor)”) | +| `sponsor_sponsorship_payment_complete` | 当您赞助一个帐户并且您的付款已经处理完毕后触发(请参阅“[赞助开源贡献者](/sponsors/sponsoring-open-source-contributors/sponsoring-an-open-source-contributor)”) | +| `sponsor_sponsorship_preference_change` | 当您更改是否接收被赞助帐户的电子邮件更新时触发(请参阅“[管理赞助](/sponsors/sponsoring-open-source-contributors/managing-your-sponsorship)”) | +| `sponsor_sponsorship_tier_change` | 当您升级或降级赞助时触发(请参阅“[升级赞助](/articles/upgrading-a-sponsorship)”和“[降级赞助](/articles/downgrading-a-sponsorship)”) | +| `sponsored_developer_approve` | 当您的 {% data variables.product.prodname_sponsors %} 帐户被批准时触发(请参阅“[为您的组织设置 {% data variables.product.prodname_sponsors %}](/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization)”) | +| `sponsored_developer_create` | 当您的 {% data variables.product.prodname_sponsors %} 帐户创建时触发(请参阅“<[为您的组织设置 {% data variables.product.prodname_sponsors %}](/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization)”) | +| `sponsored_developer_disable` | 帐户 {% data variables.product.prodname_sponsors %} 禁用时触发 | +| `sponsored_developer_redraft` | 当您的 {% data variables.product.prodname_sponsors %} 帐户从已批准状态恢复为草稿状态时触发 | +| `sponsored_developer_profile_update` | 在编辑您的赞助组织资料时触发(请参阅“[编辑 {% data variables.product.prodname_sponsors %} 的个人资料详细信息](/sponsors/receiving-sponsorships-through-github-sponsors/editing-your-profile-details-for-github-sponsors)”) | +| `sponsored_developer_request_approval` | 提交您对 {% data variables.product.prodname_sponsors %} 的申请以供审批时触发(请参阅“[为您的组织设置 {% data variables.product.prodname_sponsors %}](/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization)”) | +| `sponsored_developer_tier_description_update` | 当您更改赞助等级的说明时触发(请参阅“[管理赞助等级](/sponsors/receiving-sponsorships-through-github-sponsors/managing-your-sponsorship-tiers)”) | +| `sponsored_developer_update_newsletter_send` | 当您向赞助者发送电子邮件更新时触发(请参阅“[联系赞助者](/sponsors/receiving-sponsorships-through-github-sponsors/contacting-your-sponsors)”) | +| `waitlist_invite_sponsored_developer` | 当您从等候名单被邀请加入 {% data variables.product.prodname_sponsors %} 时触发(请参阅“[为您的组织设置 {% data variables.product.prodname_sponsors %}](/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization)”) | +| `waitlist_join` | 当您加入成为赞助组织的等候名单时触发(请参阅“[为您的组织设置 {% data variables.product.prodname_sponsors %}](/sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization)”) | +{% endif %} + +### `team` 类操作 + +| 操作 | 描述 | +| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `add_member` | 当组织成员被[添加到团队](/articles/adding-organization-members-to-a-team)时触发。 | +| `add_repository` | 当团队被授予控制仓库的权限时触发。 | +| `change_parent_team` | 在创建子团队或[更改子团队的父级](/articles/moving-a-team-in-your-organization-s-hierarchy)时触发。 | +| `change_privacy` | 当团队的隐私级别发生更改时触发。 | +| `create` | 在创建新团队时触发。 | +| `demote_maintainer` | Triggered when a user was demoted from a team maintainer to a team member. For more information, see "[Assigning the team maintainer role to a team member](/organizations/organizing-members-into-teams/assigning-the-team-maintainer-role-to-a-team-member)." | +| `destroy` | 从组织中删除团队时触发。 | +| `team.promote_maintainer` | Triggered when a user was promoted from a team member to a team maintainer. For more information, see "[Assigning the team maintainer role to a team member](/organizations/organizing-members-into-teams/assigning-the-team-maintainer-role-to-a-team-member)." | +| `remove_member` | [从团队中删除组织成员](/articles/removing-organization-members-from-a-team)时触发。 | +| `remove_repository` | 当仓库不再受团队控制时触发。 | + +### `team_discussions` 类操作 + +| 操作 | 描述 | +| ---- | ----------------------------------------------------------------------------------------------------- | +| `禁用` | 当组织所有者对组织禁用团队讨论时触发。 更多信息请参阅“[对组织禁用团队讨论](/articles/disabling-team-discussions-for-your-organization)”。 | +| `启用` | 当组织所有者对组织启用团队讨论时触发。 | + +{% ifversion fpt or ghec or ghes > 3.1 or ghae %} +### `workflows` 类操作 + +{% data reusables.actions.actions-audit-events-workflow %} +{% endif %} +## 延伸阅读 + +- "[Keeping your organization secure](/articles/keeping-your-organization-secure)"{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5146 %} +- "[Exporting member information for your organization](/organizations/managing-membership-in-your-organization/exporting-member-information-for-your-organization)"{% endif %} diff --git a/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-your-organizations-installed-integrations.md b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-your-organizations-installed-integrations.md new file mode 100644 index 0000000000..bc1b0317b2 --- /dev/null +++ b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-your-organizations-installed-integrations.md @@ -0,0 +1,31 @@ +--- +title: 审查组织安装的集成 +intro: 您可以审查组织安装的集成的权限级别,并配置每个集成对组织仓库的访问权限。 +redirect_from: + - /articles/reviewing-your-organization-s-installed-integrations + - /articles/reviewing-your-organizations-installed-integrations + - /github/setting-up-and-managing-organizations-and-teams/reviewing-your-organizations-installed-integrations + - /organizations/keeping-your-organization-secure/reviewing-your-organizations-installed-integrations +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: + - Organizations + - Teams +shortTitle: 审核已安装的集成 +--- + +{% data reusables.profile.access_org %} +{% data reusables.profile.org_settings %} +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Integrations" section of the sidebar, click **{% octicon "apps" aria-label="The apps icon" %} {% data variables.product.prodname_github_apps %}**. +{% elsif ghae or ghes < 3.4 %} +1. 在左侧边栏中,单击 **Installed {% data variables.product.prodname_github_apps %}s(安装的 GitHub 应用程序)**。 ![组织设置边栏中安装的 {% data variables.product.prodname_github_apps %}选项卡](/assets/images/help/organizations/org-settings-installed-github-apps.png) +{% endif %} +2. 在您要审查的 {% data variables.product.prodname_github_app %} 旁边,单击 **Configure(配置)**。 ![配置按钮](/assets/images/help/organizations/configure-installed-integration-button.png) +6. 审查 {% data variables.product.prodname_github_app %} 的权限和仓库访问权限。 ![授予 {% data variables.product.prodname_github_app %}所有仓库或特定仓库访问权限的选项](/assets/images/help/organizations/toggle-integration-repo-access.png) + - 要授予 {% data variables.product.prodname_github_app %}所有组织仓库的访问权限,请选择 **All repositories(所有仓库)**。 + - 要选择特定仓库授予应用程序的访问权限,请选择 **Only select repositories(仅选择仓库)**,然后输入仓库名称。 +7. 单击 **Save(保存)**。 diff --git a/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/index.md b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/index.md new file mode 100644 index 0000000000..df495a0d4f --- /dev/null +++ b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/index.md @@ -0,0 +1,17 @@ +--- +title: Managing two-factor authentication for your organization +shortTitle: Manage 2FA +intro: You can view whether users with access to your organization have two-factor authentication (2FA) enabled and require 2FA. +versions: + fpt: '*' + ghes: '*' + ghec: '*' +topics: + - Organizations + - Teams +children: + - /viewing-whether-users-in-your-organization-have-2fa-enabled + - /preparing-to-require-two-factor-authentication-in-your-organization + - /requiring-two-factor-authentication-in-your-organization +--- + diff --git a/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/preparing-to-require-two-factor-authentication-in-your-organization.md b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/preparing-to-require-two-factor-authentication-in-your-organization.md new file mode 100644 index 0000000000..b3d0fdb2ca --- /dev/null +++ b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/preparing-to-require-two-factor-authentication-in-your-organization.md @@ -0,0 +1,26 @@ +--- +title: 准备在组织中要求双重身份验证 +intro: 在要求双重身份验证 (2FA) 之前,您可以向用户通知即将发生的更改,并验证谁已使用 2FA。 +redirect_from: + - /articles/preparing-to-require-two-factor-authentication-in-your-organization + - /github/setting-up-and-managing-organizations-and-teams/preparing-to-require-two-factor-authentication-in-your-organization + - /organizations/keeping-your-organization-secure/preparing-to-require-two-factor-authentication-in-your-organization +versions: + fpt: '*' + ghes: '*' + ghec: '*' +topics: + - Organizations + - Teams +shortTitle: 准备需要 2FA +--- + +如果您的组织中需要 2FA,建议至少提前一周通知{% ifversion fpt or ghec %}组织成员、外部协作者和帐单管理员{% else %}组织成员和外部协作者{% endif %}。 + +需要对您的组织使用双重身份验证时,不使用 2FA 的成员、外部协作者和帐单管理员(包括自动程序帐户)将从组织中删除,并且失去访问其仓库的权限。 他们还会失去对组织私有仓库的复刻的访问权限。 + +在组织中要求 2FA 之前,建议: + - 在个人帐户上[启用 2FA](/articles/securing-your-account-with-two-factor-authentication-2fa/) + - 要求组织中的人员为其帐户设置 2FA + - 查看[组织中的用户是否启用 2FA](/articles/viewing-whether-users-in-your-organization-have-2fa-enabled/) + - 提醒用户:2FA 一旦启用,没有 2FA 的用户会自动从组织中删除 diff --git a/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization.md b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization.md new file mode 100644 index 0000000000..196d51f2f0 --- /dev/null +++ b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/requiring-two-factor-authentication-in-your-organization.md @@ -0,0 +1,82 @@ +--- +title: 您的组织中需要双重身份验证 +intro: '组织所有者可以要求{% ifversion fpt or ghec %}组织成员、外部协作者和帐单管理员{% else %}组织成员和外部协作者{% endif %}为其个人帐户启用双重身份验证,从而使恶意行为者更难以访问组织的仓库和设置。' +redirect_from: + - /articles/requiring-two-factor-authentication-in-your-organization + - /github/setting-up-and-managing-organizations-and-teams/requiring-two-factor-authentication-in-your-organization + - /organizations/keeping-your-organization-secure/requiring-two-factor-authentication-in-your-organization +versions: + fpt: '*' + ghes: '*' + ghec: '*' +topics: + - Organizations + - Teams +shortTitle: 需要 2FA +--- + +## 关于组织的双重身份验证 + +{% data reusables.two_fa.about-2fa %} 您可以要求组织中的所有{% ifversion fpt or ghec %}成员、外部协作者和帐单管理员{% else %}成员和外部协作者{% endif %}在 {% data variables.product.product_name %} 上启用双重身份验证。 有关双重身份验证的更多信息,请参阅“[使用双重身份验证 (2FA) 保护您的帐户](/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa)”。 + +{% ifversion fpt or ghec %} + +您还可以要求企业中的组织使用双重身份验证。 更多信息请参阅“[在企业中实施安全设置策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise)”。 + +{% endif %} + +{% warning %} + +**警告:** + +- 需要对您的组织使用双重身份验证时,不使用 2FA 的{% ifversion fpt or ghec %}成员、外部协作者和帐单管理员{% else %}成员和外部协作者{% endif %}(包括自动程序帐户)将从组织中删除,并且失去访问其仓库的权限。 他们还会失去对组织私有仓库的复刻的访问权限。 如果他们在从您的组织中删除后的三个月内为其个人帐户启用双重身份验证,您可以[恢复其访问权限和设置](/articles/reinstating-a-former-member-of-your-organization)。 +- 如果组织所有者、成员{% ifversion fpt or ghec %}、帐单管理员{% endif %}或外部协作者在您启用所需的双重身份验证后为其个人帐户禁用 2FA,则系统会自动将其从组织中删除。 +- 如果您是某个要求双重身份验证的组织的唯一所有者,则在不为组织禁用双重身份验证要求的情况下,您将无法为个人帐户禁用双重身份验证。 + +{% endwarning %} + +{% data reusables.two_fa.auth_methods_2fa %} + +## 基本要求 + +在要求{% ifversion fpt or ghec %}组织成员、外部协作者和帐单管理员{% else %}组织成员和外部协作者{% endif %}使用双重身份验证之前,您必须对 {% data variables.product.product_name %} 上的帐户启用双重身份验证。 更多信息请参阅“[使用双重身份验证 (2FA) 保护您的帐户](/github/authenticating-to-github/securing-your-account-with-two-factor-authentication-2fa)”。 + +在您需要使用双重身份验证之前,我们建议您通知{% ifversion fpt or ghec %}组织成员、外部协作者和帐单管理员{% else %}组织成员和外部协作者{% endif %},并要求他们为其帐户设置 2FA。 您可以查看成员和外部协作者是否已经使用 2FA。 更多信息请参阅“[查看组织中的用户是否已启用 2FA](/organizations/keeping-your-organization-secure/viewing-whether-users-in-your-organization-have-2fa-enabled)”。 + +## 您的组织中需要双重身份验证 + +{% data reusables.profile.access_org %} +{% data reusables.profile.org_settings %} +{% data reusables.organizations.security %} +{% data reusables.organizations.require_two_factor_authentication %} +{% data reusables.organizations.removed_outside_collaborators %} +{% ifversion fpt or ghec %} +8. 如果从组织中删除了任何成员或外部协作者,我们建议向他们发送邀请,以恢复其以前对组织的权限和访问权限。 他们必须启用双重身份验证,然后才能接受您的邀请。 +{% endif %} + +## 查看从您的组织中删除的人员 + +要查看在您要求双重身份验证时因为不合规而被从组织中自动删除的人员,您可以对从组织中删除的人员[搜索组织的审核日志](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#accessing-the-audit-log)。 审核日志事件将显示是否因为 2FA 不合规而删除该人员。 + +![显示因 2FA 不合规而删除的用户的审核日志事件](/assets/images/help/2fa/2fa_noncompliance_audit_log_search.png) + +{% data reusables.profile.access_org %} +{% data reusables.profile.org_settings %} +{% data reusables.audit_log.audit_log_sidebar_for_org_admins %} +4. 输入您的搜索查询。 要搜索: + - 删除的组织成员,请在搜索查询中使用 `action:org.remove_member` + - 删除的外部协作者,请在搜索查询中使用 `action:org.remove_outside_collaborator`{% ifversion fpt or ghec %} + - 删除的帐单管理员,请在搜索查询中使用 `action:org.remove_billing_manager`{% endif %} + + 您还可以在搜索中使用[时间范围](/articles/reviewing-the-audit-log-for-your-organization/#search-based-on-time-of-action)查看从组织中删除的人员。 + +## 帮助被删除的成员和外部协作者重新加入您的组织 + +如果在您启用双重身份验证使用要求时有任何成员或外部协作者被从组织中删除,他们将收到通知他们已被删除的电子邮件。 他们应当为个人帐户启用双重身份验证,并联系组织所有者来请求您的组织的访问权限。 + +## 延伸阅读 + +- “[查看组织中的用户是否已启用 2FA](/articles/viewing-whether-users-in-your-organization-have-2fa-enabled)” +- “[使用双重身份验证 (2FA) 保护您的帐户](/articles/securing-your-account-with-two-factor-authentication-2fa)” +- “[恢复组织的前成员](/articles/reinstating-a-former-member-of-your-organization)” +- “[恢复前外部协作者对组织的访问权限](/articles/reinstating-a-former-outside-collaborator-s-access-to-your-organization)” diff --git a/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/viewing-whether-users-in-your-organization-have-2fa-enabled.md b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/viewing-whether-users-in-your-organization-have-2fa-enabled.md new file mode 100644 index 0000000000..22328f419b --- /dev/null +++ b/translations/zh-CN/content/organizations/keeping-your-organization-secure/managing-two-factor-authentication-for-your-organization/viewing-whether-users-in-your-organization-have-2fa-enabled.md @@ -0,0 +1,33 @@ +--- +title: 查看组织中的用户是否已启用 2FA +intro: 您可以查看哪些组织所有者、成员和外部协作者已启用双因素身份验证。 +redirect_from: + - /articles/viewing-whether-users-in-your-organization-have-2fa-enabled + - /github/setting-up-and-managing-organizations-and-teams/viewing-whether-users-in-your-organization-have-2fa-enabled + - /organizations/keeping-your-organization-secure/viewing-whether-users-in-your-organization-have-2fa-enabled +versions: + fpt: '*' + ghes: '*' + ghec: '*' +topics: + - Organizations + - Teams +shortTitle: View 2FA usage +--- + +{% note %} + +**注:**您可以要求所有成员{% ifversion fpt or ghec %}(包括组织中的所有者、帐单管理员和{% else %}{% endif %} 外部协作者)均启用双因素身份验证。 更多信息请参阅“[您的组织中需要双重身份验证](/articles/requiring-two-factor-authentication-in-your-organization)”。 + +{% endnote %} + +{% data reusables.profile.access_org %} +{% data reusables.user_settings.access_org %} +{% data reusables.organizations.people %} +4. 要查看已启用或已禁用双因素身份验证的组织成员(包括组织所有者),在右侧单击 **2FA**,然后选择 **Enabled(启用)**或 **Disabled(禁用)**。 ![filter-org-members-by-2fa](/assets/images/help/2fa/filter-org-members-by-2fa.png) +5. 要查看组织中的外部协作者,在“People(人员)”选项卡下,单击 **Outside collaborators(外部协作者)**。 ![select-outside-collaborators](/assets/images/help/organizations/select-outside-collaborators.png) +6. 要查看哪些外部协作者已启用或已禁用双因素身份验证,在右侧单击 **2FA**,然后选择 **Enabled(启用)**或 **Disabled(禁用)**。 ![filter-outside-collaborators-by-2fa](/assets/images/help/2fa/filter-outside-collaborators-by-2fa.png) + +## 延伸阅读 + +- “[查看组织中人员的角色](/articles/viewing-people-s-roles-in-an-organization)” diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization.md index 444020bc3e..cbffbca64c 100644 --- a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization.md +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/adding-outside-collaborators-to-repositories-in-your-organization.md @@ -40,8 +40,8 @@ Before you can add someone as an outside collaborator on a repository, the perso {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} -{% ifversion fpt or ghec %} -{% data reusables.repositories.navigate-to-manage-access %} +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +{% data reusables.repositories.click-collaborators-teams %} {% data reusables.organizations.invite-teams-or-people %} 5. 在搜索字段中,开始键入您想邀请的人员的姓名,然后单击匹配列表中的姓名。 ![搜索字段以键入要邀请加入仓库的人员姓名](/assets/images/help/repository/manage-access-invite-search-field.png) 6. 在“Choose a role(选择角色)”下,选择要授予此人的权限,然后单击 **Add NAME to REPOSITORY(将姓名添加到仓库)**。 ![为此人选择权限](/assets/images/help/repository/manage-access-invite-choose-role-add.png) diff --git a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/managing-an-individuals-access-to-an-organization-repository.md b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/managing-an-individuals-access-to-an-organization-repository.md index 260f64f326..9c96b97417 100644 --- a/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/managing-an-individuals-access-to-an-organization-repository.md +++ b/translations/zh-CN/content/organizations/managing-access-to-your-organizations-repositories/managing-an-individuals-access-to-an-organization-repository.md @@ -28,9 +28,13 @@ permissions: People with admin access to a repository can manage access to the r {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +{% data reusables.repositories.click-collaborators-teams %} +{% elsif ghes < 3.4 or ghae %} {% data reusables.repositories.navigate-to-manage-access %} +{% endif %} {% data reusables.organizations.invite-teams-or-people %} -5. In the search field, start typing the name of the person to invite, then click a name in the list of matches. ![用于输入要邀请加入仓库的团队或人员名称的搜索字段](/assets/images/help/repository/manage-access-invite-search-field.png) +1. In the search field, start typing the name of the person to invite, then click a name in the list of matches. ![用于输入要邀请加入仓库的团队或人员名称的搜索字段](/assets/images/help/repository/manage-access-invite-search-field.png) 6. Under "Choose a role", select the repository role to assign the person, then click **Add NAME to REPOSITORY**. ![为团队或人员选择权限](/assets/images/help/repository/manage-access-invite-choose-role-add.png) ## 管理个人对组织仓库的访问 diff --git a/translations/zh-CN/content/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization.md b/translations/zh-CN/content/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization.md index 447d4ccc7c..d2b3061811 100644 --- a/translations/zh-CN/content/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization.md +++ b/translations/zh-CN/content/organizations/managing-organization-settings/disabling-or-limiting-github-actions-for-your-organization.md @@ -78,6 +78,10 @@ shortTitle: 禁用或限制操作 {% data reusables.github-actions.private-repository-forks-overview %} +{% ifversion ghec or ghae or ghes %}If a policy is disabled for an enterprise, it cannot be enabled for organizations.{% endif %} If a policy is disabled for an organization, it cannot be enabled for repositories. If an organization enables a policy, the policy can be disabled for individual repositories. + +{% data reusables.github-actions.private-repository-forks-options %} + ### 为组织配置私有复刻策略 {% data reusables.profile.access_org %} diff --git a/translations/zh-CN/content/organizations/managing-organization-settings/disabling-project-boards-in-your-organization.md b/translations/zh-CN/content/organizations/managing-organization-settings/disabling-project-boards-in-your-organization.md index 12c4c2956f..1e714b59e6 100644 --- a/translations/zh-CN/content/organizations/managing-organization-settings/disabling-project-boards-in-your-organization.md +++ b/translations/zh-CN/content/organizations/managing-organization-settings/disabling-project-boards-in-your-organization.md @@ -24,10 +24,13 @@ shortTitle: 禁用项目板 {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} -4. 决定是否禁用组织范围的项目板,禁用组织中的仓库项目板,或两者均禁用。 然后,在“项目”(项目)下: +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Code planning, and automation" section of the sidebar, click **{% octicon "table" aria-label="The table icon" %} Projects**. +{% endif %} +1. 决定是否禁用组织范围的项目板,禁用组织中的仓库项目板,或两者均禁用。 然后,在“项目”(项目)下: - 要禁用组织范围的项目板,请取消选择 **Enable projects for the organization(启用组织的项目)**。 - 要在组织中禁用仓库项目板,请取消选择 **Enable projects for all repositories(启用所有仓库的项目)**。 ![用于禁用单个组织或单个组织所有仓库的项目的复选框](/assets/images/help/projects/disable-org-projects-checkbox.png) -5. 单击 **Save(保存)**。 +1. 单击 **Save(保存)**。 {% data reusables.organizations.disable_project_board_results %} diff --git a/translations/zh-CN/content/organizations/managing-organization-settings/integrating-jira-with-your-organization-project-board.md b/translations/zh-CN/content/organizations/managing-organization-settings/integrating-jira-with-your-organization-project-board.md index b08abf51fe..34feae56fb 100644 --- a/translations/zh-CN/content/organizations/managing-organization-settings/integrating-jira-with-your-organization-project-board.md +++ b/translations/zh-CN/content/organizations/managing-organization-settings/integrating-jira-with-your-organization-project-board.md @@ -10,14 +10,21 @@ versions: shortTitle: 集成 Jira --- +{% ifversion ghes > 3.3 or ghae-issue-5658 %} +{% data reusables.profile.access_org %} +{% data reusables.profile.org_settings %} +1. In the left sidebar, select **{% octicon "code" aria-label="The code icon" %} Developer settings**, then click **OAuth Apps**. ![左侧边栏中的 OAuth 应用程序选项卡](/assets/images/help/organizations/org-oauth-applications-ghe.png) +1. 单击 **New OAuth App(新建 OAuth 应用程序)**。 +{% elsif ghes < 3.4 or ghae %} {% data reusables.user_settings.access_settings %} -2. 在左侧边栏的 **Organization settings(组织设置)**下,单击组织的名称。 ![侧边栏组织名称](/assets/images/help/settings/organization-settings-from-sidebar.png) -3. 在左侧边栏的 **Developer settings(开发者设置)**下,单击 **OAuth applications(OAuth 应用程序)**。 ![左侧边栏中的 OAuth 应用程序选项卡](/assets/images/help/organizations/org-oauth-applications-ghe.png) -4. 单击 **Register a new application(注册新应用程序)**。 -5. 在 **Application name(应用程序名称)**下输入 "Jira"。 -6. 在 **Homepage URL(主页 URL)**下,输入 Jira 实例的完整 URL。 -7. 在 **Authorization callback URL(授权回叫 URL)**下,输入 Jira 实例的完整 URL。 -8. 单击 **Register application(注册应用程序)**。 ![注册应用程序按钮](/assets/images/help/oauth/register-application-button.png) +1. 在左侧边栏的 **Organization settings(组织设置)**下,单击组织的名称。 ![侧边栏组织名称](/assets/images/help/settings/organization-settings-from-sidebar.png) +1. 在左侧边栏的 **Developer settings(开发者设置)**下,单击 **OAuth applications(OAuth 应用程序)**。 ![左侧边栏中的 OAuth 应用程序选项卡](/assets/images/help/organizations/org-oauth-applications-ghe.png) +1. 单击 **Register a new application(注册新应用程序)**。 +{% endif %} +1. 在 **Application name(应用程序名称)**下输入 "Jira"。 +2. 在 **Homepage URL(主页 URL)**下,输入 Jira 实例的完整 URL。 +3. 在 **Authorization callback URL(授权回叫 URL)**下,输入 Jira 实例的完整 URL。 +4. 单击 **Register application(注册应用程序)**。 ![注册应用程序按钮](/assets/images/help/oauth/register-application-button.png) 9. 在 **Organization owned applications(组织拥有的应用程序)**下,记下 "Client ID"(客户 ID)和 "Client Secret"(客户端密钥)值。 ![客户端 ID 和客户端密码](/assets/images/help/oauth/client-id-and-secret.png) {% data reusables.user_settings.jira_help_docs %} diff --git a/translations/zh-CN/content/organizations/managing-organization-settings/managing-scheduled-reminders-for-your-organization.md b/translations/zh-CN/content/organizations/managing-organization-settings/managing-scheduled-reminders-for-your-organization.md index e2ddc26111..a5c339d586 100644 --- a/translations/zh-CN/content/organizations/managing-organization-settings/managing-scheduled-reminders-for-your-organization.md +++ b/translations/zh-CN/content/organizations/managing-organization-settings/managing-scheduled-reminders-for-your-organization.md @@ -24,14 +24,13 @@ shortTitle: 管理预定提醒 {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.reminders.scheduled-reminders %} -![预定提醒按钮](/assets/images/help/organizations/scheduled-reminders-org.png) {% data reusables.reminders.add-reminder %} {% data reusables.reminders.authorize-slack %} {% data reusables.reminders.slack-channel %} {% data reusables.reminders.days-dropdown %} {% data reusables.reminders.times-dropdowns %} {% data reusables.reminders.tracked-repos %} -11. 在“Filter by team assigned to review code(按分配给审查代码的团队过滤)”下,单击 **Add a team(添加团队)**下拉列表并选择一个或多个团队。 您最多可以添加 100 个团队。 如果您选择的团队无法访问上面选择的“跟踪的仓库”,您将无法创建预定提醒。 ![添加团队下拉菜单](/assets/images/help/organizations/scheduled-reminders-add-teams.png) +1. 在“Filter by team assigned to review code(按分配给审查代码的团队过滤)”下,单击 **Add a team(添加团队)**下拉列表并选择一个或多个团队。 您最多可以添加 100 个团队。 如果您选择的团队无法访问上面选择的“跟踪的仓库”,您将无法创建预定提醒。 ![添加团队下拉菜单](/assets/images/help/organizations/scheduled-reminders-add-teams.png) {% data reusables.reminders.ignore-drafts %} {% data reusables.reminders.no-review-requests %} {% data reusables.reminders.author-reviews %} @@ -47,7 +46,6 @@ shortTitle: 管理预定提醒 {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.reminders.scheduled-reminders %} -![预定提醒按钮](/assets/images/help/organizations/scheduled-reminders-org.png) {% data reusables.reminders.edit-existing %} {% data reusables.reminders.edit-page %} {% data reusables.reminders.update-buttons %} @@ -56,7 +54,6 @@ shortTitle: 管理预定提醒 {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} {% data reusables.reminders.scheduled-reminders %} -![预定提醒按钮](/assets/images/help/organizations/scheduled-reminders-org.png) {% data reusables.reminders.delete %} ## 延伸阅读 diff --git a/translations/zh-CN/content/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization.md b/translations/zh-CN/content/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization.md index 632584be9e..2273347c3a 100644 --- a/translations/zh-CN/content/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization.md +++ b/translations/zh-CN/content/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization.md @@ -23,6 +23,7 @@ shortTitle: 管理复刻策略 {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} +{% data reusables.profile.org_member_privileges %} 1. Under "Repository forking", select **Allow forking of private {% ifversion ghec or ghes or ghae %}and internal {% endif %}repositories**. {%- ifversion fpt %} diff --git a/translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/adding-a-billing-manager-to-your-organization.md b/translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/adding-a-billing-manager-to-your-organization.md index f89933d370..6440072c1d 100644 --- a/translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/adding-a-billing-manager-to-your-organization.md +++ b/translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/adding-a-billing-manager-to-your-organization.md @@ -63,3 +63,7 @@ shortTitle: 添加帐单管理员 {% data reusables.organizations.billing-settings %} 1. 在“Billing management(帐单管理)”下的“Billing managers(帐单管理员)”旁边,单击 **Add(添加)**。 ![邀请帐单管理员](/assets/images/help/billing/settings_billing_managers_list.png) 6. 输入您要添加的人员的用户名或电子邮件地址,然后单击 **Send invitation(发送邀请)**。 ![邀请帐单管理员页面](/assets/images/help/billing/billing_manager_invite.png) + +## 延伸阅读 + +- "[Inviting people to manage your enterprise](/enterprise-cloud@latest/admin/user-management/managing-users-in-your-enterprise/inviting-people-to-manage-your-enterprise)"{% ifversion fpt %} in the {% data variables.product.prodname_ghe_cloud %} documentation{% endif %} diff --git a/translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization.md b/translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization.md index 66fbcad27b..1d667d9e3c 100644 --- a/translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization.md +++ b/translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization.md @@ -90,6 +90,8 @@ You can only choose an additional permission if it's not already included in the - **View {% data variables.product.prodname_code_scanning %} results**: Ability to view {% data variables.product.prodname_code_scanning %} alerts. - **Dismiss or reopen {% data variables.product.prodname_code_scanning %} results**: Ability to dismiss or reopen {% data variables.product.prodname_code_scanning %} alerts. - **Delete {% data variables.product.prodname_code_scanning %} results**: Ability to delete {% data variables.product.prodname_code_scanning %} alerts. +- **View {% data variables.product.prodname_dependabot_alerts %}**: Ability to view {% data variables.product.prodname_dependabot_alerts %}. +- **Dismiss or reopen {% data variables.product.prodname_dependabot_alerts %}**: Ability to dismiss or reopen {% data variables.product.prodname_dependabot_alerts %}. - **View {% data variables.product.prodname_secret_scanning %} results**: Ability to view {% data variables.product.prodname_secret_scanning %} alerts. - **Dismiss or reopen {% data variables.product.prodname_secret_scanning %} results**: Ability to dismiss or reopen {% data variables.product.prodname_secret_scanning %} alerts. diff --git a/translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta.md b/translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta.md index aeda1e0ef7..0ea73b302d 100644 --- a/translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta.md +++ b/translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta.md @@ -31,24 +31,11 @@ Alternatively, you can configure SAML SSO for an enterprise using Okta. SCIM for ## 在 Okta 中添加 {% data variables.product.prodname_ghe_cloud %} 应用程序 -{% data reusables.saml.okta-sign-into-your-account %} -1. Navigate to the [Github Enterprise Cloud - Organization](https://www.okta.com/integrations/github-enterprise-cloud-organization) application in the Okta Integration Network and click **Add Integration**. -1. (可选)在“Application label(应用程序标签)”右边输入应用程序的描述性名称。 -1. In the **GitHub Organization** field, type the name of your organization on {% data variables.product.product_location %}. 例如,如果组织的 URL 是 https://github.com/octo-org,则组织名称为 `octo-org`。 -1. 单击 **Done(完成)**。 - -## 启用和测试 SAML SSO - -{% data reusables.saml.okta-sign-into-your-account %} -{% data reusables.saml.okta-dashboard-click-applications %} -{% data reusables.saml.okta-applications-click-ghec-application-label %} -{% data reusables.saml.assign-yourself-to-okta %} {% data reusables.saml.okta-sign-on-tab %} {% data reusables.saml.okta-view-setup-instructions %} 1. 按照“如何配置 SAML 2.0”指南,使用登录 URL、发行机构 URL 和公共证书在 {% data variables.product.prodname_dotcom %} 上启用并测试 SAML SSO。 更多信息请参阅“[对组织启用并测试 SAML 单点登录](/organizations/managing-saml-single-sign-on-for-your-organization/enabling-and-testing-saml-single-sign-on-for-your-organization#enabling-and-testing-saml-single-sign-on-for-your-organization)”。 ## 在 Okta 中使用 SCIM 配置访问配置 - {% data reusables.saml.okta-dashboard-click-applications %} {% data reusables.saml.okta-applications-click-ghec-application-label %} {% data reusables.saml.okta-provisioning-tab %} diff --git a/translations/zh-CN/content/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team.md b/translations/zh-CN/content/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team.md index b285cb7e87..a9d17a0738 100644 --- a/translations/zh-CN/content/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team.md +++ b/translations/zh-CN/content/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team.md @@ -57,7 +57,11 @@ When code owners are automatically requested for review, the team is still remov {% data reusables.user_settings.access_org %} {% data reusables.organizations.specific_team %} {% data reusables.organizations.team_settings %} +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the left sidebar, click **{% octicon "code-review" aria-label="The code-review icon" %} Code review**. +{% else %} 1. In the left sidebar, click **Code review** ![Code review button](/assets/images/help/teams/review-button.png) +{% endif %} 1. Select **Only notify requested team members.** ![Code review team notifications](/assets/images/help/teams/review-assignment-notifications.png) 1. 单击 **Save changes(保存更改)**。 {% endif %} @@ -67,7 +71,11 @@ When code owners are automatically requested for review, the team is still remov {% data reusables.user_settings.access_org %} {% data reusables.organizations.specific_team %} {% data reusables.organizations.team_settings %} +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the left sidebar, click **{% octicon "code-review" aria-label="The code-review icon" %} Code review**. +{% else %} 1. In the left sidebar, click **Code review** ![Code review button](/assets/images/help/teams/review-button.png) +{% endif %} 1. 选择 **Enable auto assignment(启用自动分配)**。 ![Auto-assignment button](/assets/images/help/teams/review-assignment-enable.png) 1. 在“How many team members should be assigned to review?(应分配多少团队成员进行审查?)”下,使用下拉菜单选择多个要分配给每个拉取请求的审查者。 ![审查者人数下拉列表](/assets/images/help/teams/review-assignment-number.png) 1. 在“Routing algorithm(路由算法)”下,使用下拉菜单选择要使用的算法。 更多信息请参阅“[路由算法](#routing-algorithms)”。 ![路由算法下拉列表](/assets/images/help/teams/review-assignment-algorithm.png) diff --git a/translations/zh-CN/content/organizations/organizing-members-into-teams/managing-scheduled-reminders-for-your-team.md b/translations/zh-CN/content/organizations/organizing-members-into-teams/managing-scheduled-reminders-for-your-team.md index 96b3213f09..e79ec505e0 100644 --- a/translations/zh-CN/content/organizations/organizing-members-into-teams/managing-scheduled-reminders-for-your-team.md +++ b/translations/zh-CN/content/organizations/organizing-members-into-teams/managing-scheduled-reminders-for-your-team.md @@ -27,7 +27,6 @@ shortTitle: 预定提醒 {% data reusables.organizations.specific_team %} {% data reusables.organizations.team_settings %} {% data reusables.reminders.scheduled-reminders %} -![预定提醒按钮](/assets/images/help/teams/scheduled-reminders-teams.png) {% data reusables.reminders.add-reminder %} {% data reusables.reminders.authorize-slack %} {% data reusables.reminders.slack-channel %} @@ -51,7 +50,6 @@ shortTitle: 预定提醒 {% data reusables.organizations.specific_team %} {% data reusables.organizations.team_settings %} {% data reusables.reminders.scheduled-reminders %} -![预定提醒按钮](/assets/images/help/teams/scheduled-reminders-teams.png) {% data reusables.reminders.edit-existing %} {% data reusables.reminders.edit-page %} {% data reusables.reminders.update-buttons %} @@ -62,7 +60,6 @@ shortTitle: 预定提醒 {% data reusables.organizations.specific_team %} {% data reusables.organizations.team_settings %} {% data reusables.reminders.scheduled-reminders %} -![预定提醒按钮](/assets/images/help/teams/scheduled-reminders-teams.png) {% data reusables.reminders.delete %} ## 延伸阅读 diff --git a/translations/zh-CN/content/packages/learn-github-packages/deleting-and-restoring-a-package.md b/translations/zh-CN/content/packages/learn-github-packages/deleting-and-restoring-a-package.md index 02c71d43f7..f0094c8972 100644 --- a/translations/zh-CN/content/packages/learn-github-packages/deleting-and-restoring-a-package.md +++ b/translations/zh-CN/content/packages/learn-github-packages/deleting-and-restoring-a-package.md @@ -176,7 +176,7 @@ To review who can delete a package version, see "[Required permissions to delete - 您在删除后 30 天内恢复包。 - 相同的包名称空间和版本仍然可用,并且不重复用于新包。 -例如,如果您删除了名为 `octo-package` 且范围为 repo `octo-repo-owner/octo-repo` 的 rubygem 包,则您仅在包名称空间 `rubygem.pkg.github.com/octo-repo-owner/octo-repo/octo-package` 仍然可用且 30 天未过时才可恢复包。 +For example, if you have a deleted RubyGems package named `octo-package` that was scoped to the repo `octo-repo-owner/octo-repo`, then you can only restore the package if the package namespace `rubygem.pkg.github.com/octo-repo-owner/octo-repo/octo-package` is still available, and 30 days have not yet passed. {% ifversion fpt or ghec %} To restore a deleted package, you must also meet one of these permission requirements: diff --git a/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry.md b/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry.md index 22d46ba47a..d801f5049b 100644 --- a/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry.md +++ b/translations/zh-CN/content/packages/working-with-a-github-packages-registry/working-with-the-rubygems-registry.md @@ -23,7 +23,7 @@ shortTitle: RubyGems registry ## Prerequisites -- You must have rubygems 2.4.1 or higher. To find your rubygems version: +- You must have RubyGems 2.4.1 or higher. To find your RubyGems version: ```shell $ gem --version @@ -86,7 +86,7 @@ If you don't have a *~/.gemrc* file, create a new *~/.gemrc* file using this exa ``` -To authenticate with Bundler, configure Bundler to use your personal access token, replacing *USERNAME* with your {% data variables.product.prodname_dotcom %} username, *TOKEN* with your personal access token, and *OWNER* with the name of the user or organization account that owns the repository containing your project.{% ifversion ghes %} Replace `REGISTRY-URL` with the URL for your instance's Rubygems registry. If your instance has subdomain isolation enabled, use `rubygems.HOSTNAME`. If your instance has subdomain isolation disabled, use `HOSTNAME/_registry/rubygems`. In either case, replace *HOSTNAME* with the hostname of your {% data variables.product.prodname_ghe_server %} instance.{% elsif ghae %}Replace `REGISTRY-URL` with the URL for your instance's Rubygems registry, `rubygems.HOSTNAME`. Replace *HOSTNAME* with the hostname of {% data variables.product.product_location %}.{% endif %} +To authenticate with Bundler, configure Bundler to use your personal access token, replacing *USERNAME* with your {% data variables.product.prodname_dotcom %} username, *TOKEN* with your personal access token, and *OWNER* with the name of the user or organization account that owns the repository containing your project.{% ifversion ghes %} Replace `REGISTRY-URL` with the URL for your instance's RubyGems registry. If your instance has subdomain isolation enabled, use `rubygems.HOSTNAME`. If your instance has subdomain isolation disabled, use `HOSTNAME/_registry/rubygems`. In either case, replace *HOSTNAME* with the hostname of your {% data variables.product.prodname_ghe_server %} instance.{% elsif ghae %}Replace `REGISTRY-URL` with the URL for your instance's Rubygems registry, `rubygems.HOSTNAME`. Replace *HOSTNAME* with the hostname of {% data variables.product.product_location %}.{% endif %} ```shell $ bundle config https://{% ifversion fpt or ghec %}rubygems.pkg.github.com{% else %}REGISTRY-URL{% endif %}/OWNER USERNAME:TOKEN diff --git a/translations/zh-CN/content/pages/configuring-a-custom-domain-for-your-github-pages-site/verifying-your-custom-domain-for-github-pages.md b/translations/zh-CN/content/pages/configuring-a-custom-domain-for-your-github-pages-site/verifying-your-custom-domain-for-github-pages.md index 8c7a2b3524..fc37d655fb 100644 --- a/translations/zh-CN/content/pages/configuring-a-custom-domain-for-your-github-pages-site/verifying-your-custom-domain-for-github-pages.md +++ b/translations/zh-CN/content/pages/configuring-a-custom-domain-for-your-github-pages-site/verifying-your-custom-domain-for-github-pages.md @@ -23,7 +23,7 @@ It's also possible to verify a domain for your organization{% ifversion ghec %} ## Verifying a domain for your user site {% data reusables.user_settings.access_settings %} -1. 在左侧边栏中,单击 **Pages(页面)**。 ![Pages option in the settings menu](/assets/images/help/settings/user-settings-pages.png) +1. In the "Code, planning, and automation" section of the sidebar, click **{% octicon "browser" aria-label="The pages icon" %} Pages**. {% data reusables.pages.settings-verify-domain-setup %} 1. Wait for your DNS configuration to change, this may be immediate or take up to 24 hours. You can confirm the change to your DNS configuration by running the `dig` command on the command line. In the command below, replace `USERNAME` with your username and `example.com` with the domain you're verifying. If your DNS configuration has updated, you should see your new TXT record in the output. ``` @@ -37,7 +37,7 @@ Organization owners can verify custom domains for their organization. {% data reusables.profile.access_org %} {% data reusables.profile.org_settings %} -1. 在左侧边栏中,单击 **Pages(页面)**。 ![Pages option in the settings menu](/assets/images/help/settings/org-settings-pages.png) +1. In the "Code, planning, and automation" section of the sidebar, click **{% octicon "browser" aria-label="The browser icon" %} Pages**. {% data reusables.pages.settings-verify-domain-setup %} 1. Wait for your DNS configuration to change, this may be immediate or take up to 24 hours. You can confirm the change to your DNS configuration by running the `dig` command on the command line. In the command below, replace `ORGANIZATION` with the name of your organization and `example.com` with the domain you're verifying. If your DNS configuration has updated, you should see your new TXT record in the output. ``` diff --git a/translations/zh-CN/content/pages/quickstart.md b/translations/zh-CN/content/pages/quickstart.md index bd8068c3a2..12d738d1bb 100644 --- a/translations/zh-CN/content/pages/quickstart.md +++ b/translations/zh-CN/content/pages/quickstart.md @@ -25,12 +25,12 @@ This guide will lead you through creating a user site at `username.github.io`. {% data reusables.repositories.create_new %} 1. Enter `username.github.io` as the repository name. Replace `username` with your {% data variables.product.prodname_dotcom %} username. For example, if your username is `octocat`, the repository name should be `octocat.github.io`. ![Repository name field](/assets/images/help/pages/create-repository-name-pages.png) {% data reusables.repositories.sidebar-settings %} -1. 在左侧边栏中,单击 **Pages(页面)**。 ![左侧边栏中的页面选项卡](/assets/images/help/pages/pages-tab.png) +{% data reusables.pages.sidebar-pages %} 1. Click **Choose a theme**. ![选择主题按钮](/assets/images/help/pages/choose-theme.png) -1. The Theme Chooser will open. Browse the available themes, then click **Select theme** to select a theme. It's easy to change your theme later, so if you're not sure, just choose one for now. ![主题选项和选择主题按钮](/assets/images/help/pages/select-theme.png) -1. After you select a theme, your repository's `README.md` file will open in the file editor. The `README.md` file is where you will write the content for your site. You can edit the file or keep the default content for now. -1. When you are done editing the file, click **Commit changes**. -1. Visit `username.github.io` to view your new website. **注:**对站点的更改在推送到 {% data variables.product.product_name %} 后,最长可能需要 20 分钟才会发布。 +2. The Theme Chooser will open. Browse the available themes, then click **Select theme** to select a theme. It's easy to change your theme later, so if you're not sure, just choose one for now. ![主题选项和选择主题按钮](/assets/images/help/pages/select-theme.png) +3. After you select a theme, your repository's `README.md` file will open in the file editor. The `README.md` file is where you will write the content for your site. You can edit the file or keep the default content for now. +4. When you are done editing the file, click **Commit changes**. +5. Visit `username.github.io` to view your new website. **注:**对站点的更改在推送到 {% data variables.product.product_name %} 后,最长可能需要 20 分钟才会发布。 ## Changing the title and description diff --git a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks.md b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks.md index 69eeeb7aea..81b982920e 100644 --- a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks.md +++ b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks.md @@ -35,7 +35,7 @@ topics: _Checks_ are different from _statuses_ in that they provide line annotations, more detailed messaging, and are only available for use with {% data variables.product.prodname_github_apps %}. -组织所有者和能够推送到仓库的用户可使用 {% data variables.product.product_name %} 的 API 创建检查和状态。 更多信息请参阅“[检查](/rest/reference/checks)”和“[状态](/rest/reference/repos#statuses)”。 +组织所有者和能够推送到仓库的用户可使用 {% data variables.product.product_name %} 的 API 创建检查和状态。 更多信息请参阅“[检查](/rest/reference/checks)”和“[状态](/rest/reference/commits#commit-statuses)”。 ## 检查 diff --git a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request.md b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request.md index 47571710d4..249ceb2fa2 100644 --- a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request.md +++ b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request.md @@ -162,6 +162,7 @@ gh pr create --web ## 延伸阅读 - "[从复刻创建拉取请求](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork)" +- "[Keeping your pull request in sync with the base branch](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch)" - “[更改拉取请求的基本分支](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-base-branch-of-a-pull-request)” - “[从侧边栏向项目板添加议题和拉取请求](/articles/adding-issues-and-pull-requests-to-a-project-board/#adding-issues-and-pull-requests-to-a-project-board-from-the-sidebar)” - "[关于使用查询参数自动化议题和拉取请求](/issues/tracking-your-work-with-issues/creating-issues/about-automation-for-issues-and-pull-requests-with-query-parameters)" diff --git a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/index.md b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/index.md index d9f18c560f..a9adb5e672 100644 --- a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/index.md +++ b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/index.md @@ -22,6 +22,7 @@ children: - /using-query-parameters-to-create-a-pull-request - /changing-the-stage-of-a-pull-request - /requesting-a-pull-request-review + - /keeping-your-pull-request-in-sync-with-the-base-branch - /changing-the-base-branch-of-a-pull-request - /committing-changes-to-a-pull-request-branch-created-from-a-fork shortTitle: 提议更改 diff --git a/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch.md b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch.md new file mode 100644 index 0000000000..0366b951bd --- /dev/null +++ b/translations/zh-CN/content/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch.md @@ -0,0 +1,53 @@ +--- +title: Keeping your pull request in sync with the base branch +intro: 'After you open a pull request, you can update the head branch, which contains your changes, with any changes that have been made in the base branch.' +permissions: People with write permissions to the repository to which the head branch of the pull request belongs can update the head branch with changes that have been made in the base branch. +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: + - Pull requests +shortTitle: Update the head branch +--- + +## About keeping your pull request in sync + +Before merging your pull requests, other changes may get merged into the base branch causing your pull request's head branch to be out of sync. Updating your pull request with the latest changes from the base branch can help catch problems prior to merging. + +You can update a pull request's head branch from the command line or the pull request page. The **Update branch** button is displayed when all of these are true: + +* There are no merge conflicts between the pull request branch and the base branch. +* The pull request branch is not up to date with the base branch. +* The base branch requires branches to be up to date before merging{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %} or the setting to always suggest updating branches is enabled{% endif %}. + +For more information, see "[Require status checks before merging](/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches){% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}" and "[Managing suggestions to update pull request branches](/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-suggestions-to-update-pull-request-branches){% endif %}." + +If there are changes to the base branch that cause merge conflicts in your pull request branch, you will not be able to update the branch until all conflicts are resolved. For more information, see "[About merge conflicts](/pull-requests/collaborating-with-pull-requests/addressing-merge-conflicts/about-merge-conflicts)." + +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %} +From the pull request page you can update your pull request's branch using a traditional merge or by rebasing. A traditional merge results in a merge commit that merges the base branch into the head branch of the pull request. Rebasing applies the changes from _your_ branch onto the latest version of the base branch. The result is a branch with a linear history, since no merge commit is created. +{% else %} +Updating your branch from the pull request page performs a traditional merge. The resulting merge commit merges the base branch into the head branch of the pull request. +{% endif %} + +## Updating your pull request branch + +{% data reusables.repositories.sidebar-pr %} + +1. In the "Pull requests" list, click the pull request you'd like to update. + +{% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %} +1. In the merge section near the bottom of the page, you can: + - Click **Update branch** to perform a traditional merge. ![Button to update branch](/assets/images/help/pull_requests/pull-request-update-branch-with-dropdown.png) + - Click the update branch drop down menu, click **Update with rebase**, and then click **Rebase branch** to update by rebasing on the base branch. ![Drop-down menu showing merge and rebase options](/assets/images/help/pull_requests/pull-request-update-branch-rebase-option.png) +{% else %} +1. In the merge section near the bottom of the page, click **Update branch** to perform a traditional merge. ![Button to update branch](/assets/images/help/pull_requests/pull-request-update-branch.png) +{% endif %} + +## 延伸阅读 + +- "[关于拉取请求](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests)" +- "[Changing the stage of a pull request](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request)" +- "[提交更改至创建自复刻的拉取请求分支](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork)" diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-rebasing-for-pull-requests.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-rebasing-for-pull-requests.md index 489b1c7a00..ddd27b8037 100644 --- a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-rebasing-for-pull-requests.md +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-rebasing-for-pull-requests.md @@ -19,4 +19,4 @@ shortTitle: 配置提交变基 {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} -3. 在“Merge(合并)”按钮下,选择 **Allow rebase merging(允许变基合并)**。 这将允许贡献者通过将其个人提交变基到基本分支来合并拉取请求。 如果您还选择了另一种合并方法,则贡献者在合并拉取请求时能够选择合并提交的类型。 {% data reusables.repositories.squash-and-rebase-linear-commit-hisitory %} ![拉取请求变基提交](/assets/images/help/repository/pr-merge-rebase.png) +3. Under {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}"Pull Requests"{% else %}"Merge button"{% endif %}, select **Allow rebase merging**. 这将允许贡献者通过将其个人提交变基到基本分支来合并拉取请求。 如果您还选择了另一种合并方法,则贡献者在合并拉取请求时能够选择合并提交的类型。 {% data reusables.repositories.squash-and-rebase-linear-commit-hisitory %} ![拉取请求变基提交](/assets/images/help/repository/pr-merge-rebase.png) diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests.md index 6d95de8d4b..c206a26832 100644 --- a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests.md +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests.md @@ -21,8 +21,8 @@ shortTitle: 配置提交压缩 {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} -3. 在“Merge(合并)”按钮下,可选择 **Allow merge commits(允许合并提交)**。 这将允许贡献者合并具有完整提交历史记录的拉取请求。 ![allow_standard_merge_commits](/assets/images/help/repository/pr-merge-full-commits.png) -4. 在“Merge(合并)”按钮下,选择 **Allow squash merging(允许压缩合并)**。 这将允许贡献者通过将所有提交压缩到单个提交中来合并拉取请求。 如果除了 **Allow squash merging(允许压缩合并)**之外,您还选择了另一种合并方法,则贡献者在合并拉取请求时能够选择合并提交的类型。 {% data reusables.repositories.squash-and-rebase-linear-commit-hisitory %} ![拉取请求压缩提交](/assets/images/help/repository/pr-merge-squash.png) +3. Under {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}"Pull Requests"{% else %}"Merge button"{% endif %}, optionally select **Allow merge commits**. 这将允许贡献者合并具有完整提交历史记录的拉取请求。 ![allow_standard_merge_commits](/assets/images/help/repository/pr-merge-full-commits.png) +4. Under {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}"Pull Requests"{% else %}"Merge button"{% endif %}, select **Allow squash merging**. 这将允许贡献者通过将所有提交压缩到单个提交中来合并拉取请求。 如果除了 **Allow squash merging(允许压缩合并)**之外,您还选择了另一种合并方法,则贡献者在合并拉取请求时能够选择合并提交的类型。 {% data reusables.repositories.squash-and-rebase-linear-commit-hisitory %} ![拉取请求压缩提交](/assets/images/help/repository/pr-merge-squash.png) ## 延伸阅读 diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/index.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/index.md index 3200ff0be4..141f209e8e 100644 --- a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/index.md +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/index.md @@ -16,6 +16,7 @@ children: - /configuring-commit-squashing-for-pull-requests - /configuring-commit-rebasing-for-pull-requests - /using-a-merge-queue + - /managing-suggestions-to-update-pull-request-branches - /managing-auto-merge-for-pull-requests-in-your-repository - /managing-the-automatic-deletion-of-branches shortTitle: 配置 PR 合并 diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository.md index 6a27eccd45..02ecdc499b 100644 --- a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository.md +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-auto-merge-for-pull-requests-in-your-repository.md @@ -26,4 +26,4 @@ shortTitle: 管理自动合并 {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} -1. 在“Merge button(合并按钮)”下,选择或取消选择 **Allow auto-merge(允许自动合并)**。 ![允许或禁止自动合并的复选框](/assets/images/help/pull_requests/allow-auto-merge-checkbox.png) +1. Under {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}"Pull Requests"{% else %}"Merge button"{% endif %}, select or deselect **Allow auto-merge**. ![允许或禁止自动合并的复选框](/assets/images/help/pull_requests/allow-auto-merge-checkbox.png) diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-suggestions-to-update-pull-request-branches.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-suggestions-to-update-pull-request-branches.md new file mode 100644 index 0000000000..a724a1302b --- /dev/null +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-suggestions-to-update-pull-request-branches.md @@ -0,0 +1,23 @@ +--- +title: Managing suggestions to update pull request branches +intro: You can give users the ability to always update a pull request branch when it is not up to date with the base branch. +versions: + fpt: '*' + ghes: '> 3.4' + ghae: issue-6069 + ghec: '*' +topics: + - Repositories +shortTitle: Manage branch updates +permissions: People with maintainer permissions can enable or disable the setting to suggest updating pull request branches. +--- + +## About suggestions to update a pull request branch + +If you enable the setting to always suggest updating pull request branches in your repository, people with write permissions will always have the ability, on the pull request page, to update a pull request's head branch when it's not up to date with the base branch. When not enabled, the ability to update is only available when the base branch requires branches to be up to date before merging and the branch is not up to date. For more information, see "[Keeping your pull request in sync with the base branch](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch)." + +## Managing suggestions to update a pull request branch + +{% data reusables.repositories.navigate-to-repo %} +{% data reusables.repositories.sidebar-settings %} +3. Under "Pull Requests", select or unselect **Always suggest updating pull request branches**. ![Checkbox to enable or disable always suggest updating branch](/assets/images/help/repository/always-suggest-updating-branches.png) diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches.md index caf7df9159..9043262f77 100644 --- a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches.md +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-the-automatic-deletion-of-branches.md @@ -19,7 +19,7 @@ shortTitle: 自动删除分支 {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} -3. 在“Merge(合并)”按钮下,选择或取消选择 **Automatically delete head branches(自动删除头部分支)**。 ![启用或禁用分支自动删除的复选框](/assets/images/help/repository/automatically-delete-branches.png) +3. Under {% ifversion fpt or ghec or ghes > 3.4 or ghae-issue-6069 %}"Pull Requests"{% else %}"Merge button"{% endif %}, select or unselect **Automatically delete head branches**. ![启用或禁用分支自动删除的复选框](/assets/images/help/repository/automatically-delete-branches.png) ## 延伸阅读 - "[合并拉取请求](/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request)" diff --git a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches.md b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches.md index c23e489ed8..feae43c962 100644 --- a/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches.md +++ b/translations/zh-CN/content/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/about-protected-branches.md @@ -84,7 +84,7 @@ remote: error: Changes have been requested. 必需状态检查确保在协作者可以对受保护分支进行更改前,所有必需的 CI 测试都已通过。 更多信息请参阅“[配置受保护分支](/articles/configuring-protected-branches/)”和“[启用必需状态检查](/articles/enabling-required-status-checks)”。 更多信息请参阅“[关于状态检查](/github/collaborating-with-issues-and-pull-requests/about-status-checks)”。 -必须配置仓库使用状态 API 后才可启用必需状态检查。 更多信息请参阅 REST 文档中的“[仓库](/rest/reference/repos#statuses)”。 +必须配置仓库使用状态 API 后才可启用必需状态检查。 更多信息请参阅 REST 文档中的“[仓库](/rest/reference/commits#commit-statuses)”。 启用必需状态检查后,必须通过所有必需状态检查,协作者才能将更改合并到受保护分支。 所有必需状态检查通过后,必须将任何提交推送到另一个分支,然后合并或直接推送到受保护分支。 diff --git a/translations/zh-CN/content/repositories/creating-and-managing-repositories/transferring-a-repository.md b/translations/zh-CN/content/repositories/creating-and-managing-repositories/transferring-a-repository.md index 5b82ec66c2..965b635b8e 100644 --- a/translations/zh-CN/content/repositories/creating-and-managing-repositories/transferring-a-repository.md +++ b/translations/zh-CN/content/repositories/creating-and-managing-repositories/transferring-a-repository.md @@ -52,7 +52,8 @@ Prerequisites for repository transfers: $ git remote set-url origin new_url ``` -- When you transfer a repository from an organization to a user account, the repository's read-only collaborators will not be transferred. This is because collaborators can't have read-only access to repositories owned by a user account. For more information about repository permission levels, see "[Permission levels for a user account repository](/github/setting-up-and-managing-your-github-user-account/permission-levels-for-a-user-account-repository)" and "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)." +- When you transfer a repository from an organization to a user account, the repository's read-only collaborators will not be transferred. This is because collaborators can't have read-only access to repositories owned by a user account. For more information about repository permission levels, see "[Permission levels for a user account repository](/github/setting-up-and-managing-your-github-user-account/permission-levels-for-a-user-account-repository)" and "[Repository roles for an organization](/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization)."{% ifversion fpt or ghec %} +- Sponsors who have access to the repository through a sponsorship tier may be affected. For more information, see "[Adding a repository to a sponsorship tier](/sponsors/receiving-sponsorships-through-github-sponsors/managing-your-sponsorship-tiers#adding-a-repository-to-a-sponsorship-tier)".{% endif %} 更多信息请参阅“[管理远程仓库](/github/getting-started-with-github/managing-remote-repositories)”。 diff --git a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md index 2e4f77e92f..bfc685a54e 100644 --- a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md +++ b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners.md @@ -51,6 +51,8 @@ To reduce the size of your CODEOWNERS file, consider using wildcard patterns to CODEOWNERS 文件使用遵循 [gitignore](https://git-scm.com/docs/gitignore#_pattern_format) 文件中所用大多数规则的模式,但有[一些例外](#syntax-exceptions)。 模式后接一个或多个使用标准 `@username` 或 `@org/team-name` 格式的 {% data variables.product.prodname_dotcom %} 用户名或团队名称。 Users must have `read` access to the repository and teams must have explicit `write` access, even if the team's members already have access. You can also refer to a user by an email address that has been added to their account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.product.product_location %}{% endif %}, for example `user@example.com`. 如果 CODEOWNERS 文件中的任何行包含无效语法,则该文件将不会被检测并且不会用于请求审查。 + +CODEOWNERS paths are case sensitive, because {% data variables.product.prodname_dotcom %} uses a case sensitive file system. Since CODEOWNERS are evaluated by {% data variables.product.prodname_dotcom %}, even systems that are case insensitive (for example, macOS) must use paths and files that are cased correctly in the CODEOWNERS file. ### CODEOWNERS 文件示例 ``` # This is a comment. @@ -98,6 +100,10 @@ apps/ @octocat # subdirectories. /docs/ @doctocat +# In this example, any change inside the `/scripts` directory +# will require approval from @doctocat or @octocat. +/scripts/ @doctocat @octocat + # In this example, @octocat owns any file in the `/apps` # directory in the root of your repository except for the `/apps/github` # subdirectory, as its owners are left empty. @@ -113,21 +119,6 @@ gitignore 文件有一些语法规则在 CODEOWNERS 文件中不起作用: ## CODEOWNERS and branch protection Repository owners can add branch protection rules to ensure that changed code is reviewed by the owners of the changed files. 更多信息请参阅“[关于受保护分支](/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches)”。 -### CODEOWNERS 文件示例 -``` -# In this example, any change inside the `/apps` directory -# will require approval from @doctocat. -/apps/ @doctocat - -# In this example, any change inside the `/apps` directory -# will require approval from @doctocat or @octocat. -/apps/ @doctocat @octocat - -# In this example, any change inside the `/apps` directory -# will require approval from a member of the @example-org/content team. -/apps/ @example-org/content-team -``` - ## 延伸阅读 diff --git a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository.md b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository.md index 03d2328d39..2236315e27 100644 --- a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository.md +++ b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository.md @@ -87,6 +87,10 @@ You can configure this behavior for a repository using the procedure below. 修 {% data reusables.github-actions.private-repository-forks-overview %} +If a policy is disabled for an {% ifversion ghec or ghae or ghes %}enterprise or{% endif %} organization, it cannot be enabled for a repository. + +{% data reusables.github-actions.private-repository-forks-options %} + ### 为仓库配置私有复刻策略 {% data reusables.repositories.navigate-to-repo %} @@ -99,7 +103,7 @@ You can configure this behavior for a repository using the procedure below. 修 {% data reusables.github-actions.workflow-permissions-intro %} -默认权限也可以在组织设置中配置。 如果在组织设置中选择了更受限制的默认值,则在仓库设置中自动选择相同的选项,并禁用许可的选项。 +The default permissions can also be configured in the organization settings. If the more restricted default has been selected in the organization settings, the same option is auto-selected in your repository settings and the permissive option is disabled. {% data reusables.github-actions.workflow-permissions-modifying %} @@ -137,11 +141,11 @@ You can configure whether {% if internal-actions%}actions and {% endif %}workflo ## Configuring the retention period for {% data variables.product.prodname_actions %} artifacts and logs in your repository -您可以为仓库中的 {% data variables.product.prodname_actions %} 构件和日志配置保留期。 +You can configure the retention period for {% data variables.product.prodname_actions %} artifacts and logs in your repository. {% data reusables.actions.about-artifact-log-retention %} -您还可以为工作流程创建的特定构件自定义保留期。 更多信息请参阅“[设置构件的保留期](/actions/managing-workflow-runs/removing-workflow-artifacts#setting-the-retention-period-for-an-artifact)”。 +You can also define a custom retention period for a specific artifact created by a workflow. For more information, see "[Setting the retention period for an artifact](/actions/managing-workflow-runs/removing-workflow-artifacts#setting-the-retention-period-for-an-artifact)." ## 设置仓库的保留期 diff --git a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources.md b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources.md index 5f1db6a869..f887726845 100644 --- a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources.md +++ b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources.md @@ -22,8 +22,12 @@ Anyone with admin permissions to a repository can configure autolink references {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} -3. 在左侧边栏中,单击 **Autolink references(自动链接引用)**。 ![左侧边栏中的自动链接引用选项卡](/assets/images/help/repository/autolink-references-tab.png) -4. 单击 **Add autolink reference(添加自动链接引用)**。 ![填写自动链接引用信息的按钮](/assets/images/help/repository/add-autolink-reference-details.png) +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Integrations" section of the sidebar, click **{% octicon "cross-reference" aria-label="The cross-reference icon" %} Autolink references**. +{% else %} +1. 在左侧边栏中,单击 **Autolink references(自动链接引用)**。 ![左侧边栏中的自动链接引用选项卡](/assets/images/help/repository/autolink-references-tab.png) +{% endif %} +1. 单击 **Add autolink reference(添加自动链接引用)**。 ![填写自动链接引用信息的按钮](/assets/images/help/repository/add-autolink-reference-details.png) 5. 在“Reference prefix(引用前缀)”下,输入您希望协作者用来为外部资源生成自动链接的、简短有意义的前缀。 ![输入外部系统缩写的字段](/assets/images/help/repository/add-reference-prefix-field.png) 6. 在“Target URL(目标 URL)”中,输入您想要链接到的外部系统的链接。 确保将 `` 保留为引用号的变量。 ![要输入外部系统 URL 的字段](/assets/images/help/repository/add-target-url-field.png) 7. 单击 **Add autolink reference(添加自动链接引用)**。 ![添加自动链接引用的按钮](/assets/images/help/repository/add-autolink-reference.png) diff --git a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository.md b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository.md index 74af0c0bc4..ea7e21bb8a 100644 --- a/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository.md +++ b/translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository.md @@ -28,7 +28,7 @@ For more information about repository roles, see "[Permission levels for a user {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.navigate-to-manage-access %} +{% data reusables.repositories.click-collaborators-teams %} 4. 在“Manage access(管理访问权限)”下的搜索字段中,开始输入您要查找的团队或人员的名称。 ![用于过滤具有访问权限的团队或人员列表的搜索字段](/assets/images/help/repository/manage-access-filter.png) ## 更改团队或人员的权限 @@ -42,7 +42,7 @@ For more information about repository roles, see "[Permission levels for a user {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.navigate-to-manage-access %} +{% data reusables.repositories.click-collaborators-teams %} {% data reusables.organizations.invite-teams-or-people %} 5. 在搜索字段中,开始输入要邀请的团队或人员的名称,然后单击匹配列表中的名称。 ![用于输入要邀请加入仓库的团队或人员名称的搜索字段](/assets/images/help/repository/manage-access-invite-search-field.png) 6. Under "Choose a role", select the repository role to grant to the team or person, then click **Add NAME to REPOSITORY**. ![为团队或人员选择权限](/assets/images/help/repository/manage-access-invite-choose-role-add.png) @@ -51,7 +51,7 @@ For more information about repository roles, see "[Permission levels for a user {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} -{% data reusables.repositories.navigate-to-manage-access %} +{% data reusables.repositories.click-collaborators-teams %} 4. 在“Manage access(管理访问权限)”下,找到要删除其访问权限的团队或人员,然后单击 {% octicon "trash" aria-label="The trash icon" %}。 ![用于删除访问权限的回收站图标](/assets/images/help/repository/manage-access-remove.png) ## 延伸阅读 diff --git a/translations/zh-CN/content/repositories/working-with-files/using-files/index.md b/translations/zh-CN/content/repositories/working-with-files/using-files/index.md index e206e20283..8fd80fa5d2 100644 --- a/translations/zh-CN/content/repositories/working-with-files/using-files/index.md +++ b/translations/zh-CN/content/repositories/working-with-files/using-files/index.md @@ -8,7 +8,7 @@ versions: ghec: '*' children: - /navigating-code-on-github - - /tracking-changes-in-a-file + - /viewing-a-file - /getting-permanent-links-to-files - /working-with-non-code-files --- diff --git a/translations/zh-CN/content/repositories/working-with-files/using-files/viewing-a-file.md b/translations/zh-CN/content/repositories/working-with-files/using-files/viewing-a-file.md new file mode 100644 index 0000000000..7e9ec9f5dd --- /dev/null +++ b/translations/zh-CN/content/repositories/working-with-files/using-files/viewing-a-file.md @@ -0,0 +1,49 @@ +--- +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 + - /articles/tracking-changes-in-a-file + - /github/managing-files-in-a-repository/tracking-changes-in-a-file + - /github/managing-files-in-a-repository/managing-files-on-github/tracking-changes-in-a-file + - /repositories/working-with-files/using-files/tracking-changes-in-a-file +versions: + fpt: '*' + ghes: '*' + ghae: '*' + ghec: '*' +topics: + - Repositories +shortTitle: View files and track file changes +--- + +## Viewing or copying the raw file content + +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. Click the file that you want to view. +2. In the upper-right corner of the file view, click **Raw**. ![Screenshot of the Raw button in the file header](/assets/images/help/repository/raw-file-button.png) +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" %}**. + +## Viewing the line-by-line revision history for a file + +使用追溯视图时,您可以查看整个文件的逐行修订历史记录,也可以通过单击 {% octicon "versions" aria-label="The prior blame icon" %} 查看文件中某一行的修订历史记录。 每次单击 {% octicon "versions" aria-label="The prior blame icon" %} 后,您将看到该行以前的修订信息,包括提交更改的人员和时间。 + +![Git 追溯视图](/assets/images/help/repository/git_blame.png) + +在文件或拉取请求中,您还可以使用 {% octicon "kebab-horizontal" aria-label="The horizontal kebab octicon" %} 菜单查看所选行或行范围的 Git 追溯。 + +![带有查看所选行 Git 追溯选项的 Kebab 菜单](/assets/images/help/repository/view-git-blame-specific-line.png) + +{% tip %} + +**提示:**在命令行中,您还可以使用 `git blame` 查看文件内各行的修订历史记录。 更多信息请参阅 [Git 的 `git blame` 文档](https://git-scm.com/docs/git-blame)。 + +{% endtip %} + +{% data reusables.repositories.navigate-to-repo %} +2. 单击以打开您想要查看其行历史记录的文件。 +3. 在文件视图的右上角,单击 **Blame(追溯)**可打开追溯视图。 ![追溯按钮](/assets/images/help/repository/blame-button.png) +4. 要查看特定行的早期修订,或重新追溯,请单击 {% octicon "versions" aria-label="The prior blame icon" %},直至找到您有兴趣查看的更改。 ![追溯前按钮](/assets/images/help/repository/prior-blame-button.png) diff --git a/translations/zh-CN/content/repositories/working-with-files/using-files/working-with-non-code-files.md b/translations/zh-CN/content/repositories/working-with-files/using-files/working-with-non-code-files.md index afe2c5f187..e4dfcbc1ed 100644 --- a/translations/zh-CN/content/repositories/working-with-files/using-files/working-with-non-code-files.md +++ b/translations/zh-CN/content/repositories/working-with-files/using-files/working-with-non-code-files.md @@ -116,7 +116,7 @@ SVG 目前不支持内联脚本或动画。 ``` -例如,如果您的型号的 URL 是 [github.com/skalnik/secret-bear-clip/blob/master/stl/clip.stl](https://github.com/skalnik/secret-bear-clip/blob/master/stl/clip.stl),则嵌入的代码是: +For example, if your model's URL is [`github.com/skalnik/secret-bear-clip/blob/master/stl/clip.stl`](https://github.com/skalnik/secret-bear-clip/blob/master/stl/clip.stl), your embed code would be: ```html diff --git a/translations/zh-CN/content/rest/guides/building-a-ci-server.md b/translations/zh-CN/content/rest/guides/building-a-ci-server.md index 25f48872e9..2b4594fa97 100644 --- a/translations/zh-CN/content/rest/guides/building-a-ci-server.md +++ b/translations/zh-CN/content/rest/guides/building-a-ci-server.md @@ -132,7 +132,7 @@ end 所有这些通信都会流回我们的聊天室。 使用此示例并不需要构建自己的 CI 设置。 您始终可以依赖 [GitHub 集成][integrations]。 -[status API]: /rest/reference/repos#statuses +[status API]: /rest/reference/commits#commit-statuses [ngrok]: https://ngrok.com/ [using ngrok]: /webhooks/configuring/#using-ngrok [platform samples]: https://github.com/github/platform-samples/tree/master/api/ruby/building-a-ci-server diff --git a/translations/zh-CN/content/rest/guides/delivering-deployments.md b/translations/zh-CN/content/rest/guides/delivering-deployments.md index b3cf0bdffe..67f057f501 100644 --- a/translations/zh-CN/content/rest/guides/delivering-deployments.md +++ b/translations/zh-CN/content/rest/guides/delivering-deployments.md @@ -20,7 +20,7 @@ topics: 本指南将使用该 API 来演示您可以使用的设置。 在我们的场景中,我们将: -* 合并拉取请求 +* Merge a pull request. * 在 CI 完成后,我们将相应地设置拉取请求的状态。 * 合并拉取请求后,我们将在服务器上运行部署。 diff --git a/translations/zh-CN/content/rest/guides/getting-started-with-the-rest-api.md b/translations/zh-CN/content/rest/guides/getting-started-with-the-rest-api.md index 63df4bdb73..17a964632a 100644 --- a/translations/zh-CN/content/rest/guides/getting-started-with-the-rest-api.md +++ b/translations/zh-CN/content/rest/guides/getting-started-with-the-rest-api.md @@ -390,7 +390,7 @@ $ {% data variables.product.api_url_pre %}/users/defunkt `304` 状态表示该资源自上次请求以来没有发生改变,该响应将不包含任何正文。 As a bonus, `304` responses don't count against your [rate limit][rate-limiting]. -耶! 现在您了解 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 的基础知识了! +现在您了解 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 的基础知识了! * 基本 & OAuth 身份验证 * 获取和创建仓库及议题 diff --git a/translations/zh-CN/content/rest/guides/index.md b/translations/zh-CN/content/rest/guides/index.md index 21b80f4aa6..9769999965 100644 --- a/translations/zh-CN/content/rest/guides/index.md +++ b/translations/zh-CN/content/rest/guides/index.md @@ -25,4 +25,4 @@ children: - /getting-started-with-the-checks-api --- -文档的这一部分旨在让您使用实际 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 应用程序开始运行。 我们将涵盖您需要知道的一切,从身份验证到操作结果,再到将结果与其他应用程序相结合。 这里的每个教程都包含一个项目,并且每个项目都将存储在我们的公共[平台样本](https://github.com/github/platform-samples)仓库中并形成文档。 ![Electrocat](/assets/images/electrocat.png) +文档的这一部分旨在让您使用实际 {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API 应用程序开始运行。 我们将涵盖您需要知道的一切,从身份验证到操作结果,再到将结果与其他应用程序相结合。 这里的每个教程都包含一个项目,并且每个项目都将存储在我们的公共[平台样本](https://github.com/github/platform-samples)仓库中并形成文档。 ![The Octocat](/assets/images/electrocat.png) diff --git a/translations/zh-CN/content/rest/overview/resources-in-the-rest-api.md b/translations/zh-CN/content/rest/overview/resources-in-the-rest-api.md index a909156e4c..889a487617 100644 --- a/translations/zh-CN/content/rest/overview/resources-in-the-rest-api.md +++ b/translations/zh-CN/content/rest/overview/resources-in-the-rest-api.md @@ -43,9 +43,9 @@ $ curl -I {% data variables.product.api_url_pre %}/users/octocat/orgs > Content-Type: application/json; charset=utf-8 > ETag: "a00049ba79152d03380c34652f2cb612" > X-GitHub-Media-Type: github.v3 -> X-RateLimit-Limit: 5000 -> X-RateLimit-Remaining: 4987 -> X-RateLimit-Reset: 1350085394{% ifversion ghes %} +> x-ratelimit-limit: 5000 +> x-ratelimit-remaining: 4987 +> x-ratelimit-reset: 1350085394{% ifversion ghes %} > X-GitHub-Enterprise-Version: {{ currentVersion | remove: "enterprise-server@" }}.0{% elsif ghae %} > X-GitHub-Enterprise-Version: GitHub AE{% endif %} > Content-Length: 5 @@ -411,16 +411,16 @@ The returned HTTP headers of any API request show your current rate limit status $ curl -I {% data variables.product.api_url_pre %}/users/octocat > HTTP/2 200 > Date: Mon, 01 Jul 2013 17:27:06 GMT -> X-RateLimit-Limit: 60 -> X-RateLimit-Remaining: 56 -> X-RateLimit-Reset: 1372700873 +> x-ratelimit-limit: 60 +> x-ratelimit-remaining: 56 +> x-ratelimit-reset: 1372700873 ``` Header Name | Description -----------|-----------| -`X-RateLimit-Limit` | The maximum number of requests you're permitted to make per hour. -`X-RateLimit-Remaining` | The number of requests remaining in the current rate limit window. -`X-RateLimit-Reset` | The time at which the current rate limit window resets in [UTC epoch seconds](http://en.wikipedia.org/wiki/Unix_time). +`x-ratelimit-limit` | The maximum number of requests you're permitted to make per hour. +`x-ratelimit-remaining` | The number of requests remaining in the current rate limit window. +`x-ratelimit-reset` | The time at which the current rate limit window resets in [UTC epoch seconds](http://en.wikipedia.org/wiki/Unix_time). If you need the time in a different format, any modern programming language can get the job done. For example, if you open up the console on your web browser, you can easily get the reset time as a JavaScript Date object. @@ -434,9 +434,9 @@ If you exceed the rate limit, an error response returns: ```shell > HTTP/2 403 > Date: Tue, 20 Aug 2013 14:50:41 GMT -> X-RateLimit-Limit: 60 -> X-RateLimit-Remaining: 0 -> X-RateLimit-Reset: 1377013266 +> x-ratelimit-limit: 60 +> x-ratelimit-remaining: 0 +> x-ratelimit-reset: 1377013266 > { > "message": "API rate limit exceeded for xxx.xxx.xxx.xxx. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)", @@ -452,9 +452,9 @@ If your OAuth App needs to make unauthenticated calls with a higher rate limit, $ curl -u my_client_id:my_client_secret {% data variables.product.api_url_pre %}/user/repos > HTTP/2 200 > Date: Mon, 01 Jul 2013 17:27:06 GMT -> X-RateLimit-Limit: 5000 -> X-RateLimit-Remaining: 4966 -> X-RateLimit-Reset: 1372700873 +> x-ratelimit-limit: 5000 +> x-ratelimit-remaining: 4966 +> x-ratelimit-reset: 1372700873 ``` {% note %} @@ -541,9 +541,9 @@ $ curl -I {% data variables.product.api_url_pre %}/user > ETag: "644b5b0155e6404a9cc4bd9d8b1ae730" > Last-Modified: Thu, 05 Jul 2012 15:31:30 GMT > Vary: Accept, Authorization, Cookie -> X-RateLimit-Limit: 5000 -> X-RateLimit-Remaining: 4996 -> X-RateLimit-Reset: 1372700873 +> x-ratelimit-limit: 5000 +> x-ratelimit-remaining: 4996 +> x-ratelimit-reset: 1372700873 $ curl -I {% data variables.product.api_url_pre %}/user -H 'If-None-Match: "644b5b0155e6404a9cc4bd9d8b1ae730"' > HTTP/2 304 @@ -551,18 +551,18 @@ $ curl -I {% data variables.product.api_url_pre %}/user -H 'If-None-Match: "644b > ETag: "644b5b0155e6404a9cc4bd9d8b1ae730" > Last-Modified: Thu, 05 Jul 2012 15:31:30 GMT > Vary: Accept, Authorization, Cookie -> X-RateLimit-Limit: 5000 -> X-RateLimit-Remaining: 4996 -> X-RateLimit-Reset: 1372700873 +> x-ratelimit-limit: 5000 +> x-ratelimit-remaining: 4996 +> x-ratelimit-reset: 1372700873 $ curl -I {% data variables.product.api_url_pre %}/user -H "If-Modified-Since: Thu, 05 Jul 2012 15:31:30 GMT" > HTTP/2 304 > Cache-Control: private, max-age=60 > Last-Modified: Thu, 05 Jul 2012 15:31:30 GMT > Vary: Accept, Authorization, Cookie -> X-RateLimit-Limit: 5000 -> X-RateLimit-Remaining: 4996 -> X-RateLimit-Reset: 1372700873 +> x-ratelimit-limit: 5000 +> x-ratelimit-remaining: 4996 +> x-ratelimit-reset: 1372700873 ``` ## Cross origin resource sharing @@ -580,7 +580,7 @@ Here's a sample request sent from a browser hitting $ curl -I {% data variables.product.api_url_pre %} -H "Origin: http://example.com" HTTP/2 302 Access-Control-Allow-Origin: * -Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval +Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval ``` This is what the CORS preflight request looks like: @@ -591,7 +591,7 @@ HTTP/2 204 Access-Control-Allow-Origin: * Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-GitHub-OTP, X-Requested-With Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE -Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval +Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval Access-Control-Max-Age: 86400 ``` @@ -609,9 +609,9 @@ $ curl {% data variables.product.api_url_pre %}?callback=foo > /**/foo({ > "meta": { > "status": 200, -> "X-RateLimit-Limit": "5000", -> "X-RateLimit-Remaining": "4966", -> "X-RateLimit-Reset": "1372700873", +> "x-ratelimit-limit": "5000", +> "x-ratelimit-remaining": "4966", +> "x-ratelimit-reset": "1372700873", > "Link": [ // pagination headers and other links > ["{% data variables.product.api_url_pre %}?page=2", {"rel": "next"}] > ] @@ -712,3 +712,4 @@ If no `Time-Zone` header is specified and you make an authenticated call to the If the steps above don't result in any information, we use UTC as the timezone to create the git commit. [pagination-guide]: /guides/traversing-with-pagination + diff --git a/translations/zh-CN/content/rest/reference/permissions-required-for-github-apps.md b/translations/zh-CN/content/rest/reference/permissions-required-for-github-apps.md index c046cc50c1..52f78a4d1a 100644 --- a/translations/zh-CN/content/rest/reference/permissions-required-for-github-apps.md +++ b/translations/zh-CN/content/rest/reference/permissions-required-for-github-apps.md @@ -175,6 +175,9 @@ _搜索_ {% ifversion fpt -%} - [`GET /repos/:owner/:repo/pages/health`](/rest/reference/pages#get-a-dns-health-check-for-github-pages) (:write) {% endif -%} +{% ifversion ghes > 3.3 -%} +- [`GET /repos/:owner/:repo/replicas/caches`](/rest/reference/repos#list-repository-cache-replication-status) (:read) +{% endif -%} - [`PUT /repos/:owner/:repo/topics`](/rest/reference/repos#replace-all-repository-topics) (:write) - [`POST /repos/:owner/:repo/transfer`](/rest/reference/repos#transfer-a-repository) (:write) {% ifversion fpt -%} diff --git a/translations/zh-CN/content/rest/reference/pulls.md b/translations/zh-CN/content/rest/reference/pulls.md index f368bb0351..4a5e75bf21 100644 --- a/translations/zh-CN/content/rest/reference/pulls.md +++ b/translations/zh-CN/content/rest/reference/pulls.md @@ -45,7 +45,7 @@ miniTocMaxHeadingLevel: 3 | `review_comments` | 此拉取请求的[审查评论](/rest/reference/pulls#comments)的 API 位置。 | | `review_comment` | 用于为此拉取请求仓库中的[审查评论](/rest/reference/pulls#comments)构建 API 位置的 [URL 模板](/rest#hypermedia)。 | | `commits` | 此拉取请求的[提交](#list-commits-on-a-pull-request)的 API 位置。 | -| `状态` | 此拉取请求的[提交状态](/rest/reference/repos#statuses)的 API 位置,即其`头部`分支的状态。 | +| `状态` | 此拉取请求的[提交状态](/rest/reference/commits#commit-statuses)的 API 位置,即其`头部`分支的状态。 | {% for operation in currentRestOperations %} {% unless operation.subcategory %}{% include rest_operation %}{% endunless %} diff --git a/translations/zh-CN/content/rest/reference/scim.md b/translations/zh-CN/content/rest/reference/scim.md index ca9c457f0c..8a884ec24d 100644 --- a/translations/zh-CN/content/rest/reference/scim.md +++ b/translations/zh-CN/content/rest/reference/scim.md @@ -33,15 +33,15 @@ SCIM API 由 SCIM 启用的身份提供程序 (IdP) 用来自动预配 {% data v ### 支持的 SCIM 用户属性 -| 名称 | 类型 | 描述 | -| ---------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `userName` | `字符串` | 用户的用户名。 | -| `name.givenName` | `字符串` | 用户的名字 | -| `name.lastName` | `字符串` | 用户的姓氏。 | -| `emails` | `数组` | 用户电子邮件列表。 | -| `externalId` | `字符串` | 此标识符由 SAML 提供程序生成,并且被 SAML 提供程序用作唯一 ID 来匹配 GitHub 用户。 您可以在 SAML 提供程序上查找用户的 `externalID`,或者使用 [List SCIM 预配的身份](#list-scim-provisioned-identities)端点并过滤其他已知的属性,如用户的 GitHub 用户名或电子邮件地址。 | -| `id` | `字符串` | GitHub SCIM 端点生成的标识符。 | -| `active` | `布尔值` | 用于表示身份是处于活动状态 (true) 还是应解除预配 (false)。 | +| 名称 | 类型 | 描述 | +| ----------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `userName` | `字符串` | 用户的用户名。 | +| `name.givenName` | `字符串` | 用户的名字 | +| `name.familyName` | `字符串` | 用户的姓氏。 | +| `emails` | `数组` | 用户电子邮件列表。 | +| `externalId` | `字符串` | 此标识符由 SAML 提供程序生成,并且被 SAML 提供程序用作唯一 ID 来匹配 GitHub 用户。 您可以在 SAML 提供程序上查找用户的 `externalID`,或者使用 [List SCIM 预配的身份](#list-scim-provisioned-identities)端点并过滤其他已知的属性,如用户的 GitHub 用户名或电子邮件地址。 | +| `id` | `字符串` | GitHub SCIM 端点生成的标识符。 | +| `active` | `布尔值` | 用于表示身份是处于活动状态 (true) 还是应解除预配 (false)。 | {% note %} diff --git a/translations/zh-CN/content/search-github/getting-started-with-searching-on-github/sorting-search-results.md b/translations/zh-CN/content/search-github/getting-started-with-searching-on-github/sorting-search-results.md index f7178fa0d2..19cb5fd638 100644 --- a/translations/zh-CN/content/search-github/getting-started-with-searching-on-github/sorting-search-results.md +++ b/translations/zh-CN/content/search-github/getting-started-with-searching-on-github/sorting-search-results.md @@ -47,19 +47,19 @@ topics: `sort:author-date` 限定符按作者日期降序或升序排序。 -| 限定符 | 示例 | -| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `sort:author-date` 或 `sort:author-date-desc` | [**feature org:github sort:author-date**](https://github.com/search?utf8=%E2%9C%93&q=feature+org%3Agithub+sort%3Aauthor-date&type=Commits) 匹配 {% data variables.product.product_name %} 所拥有仓库中含有 "feature" 字样的提交,按作者日期降序排序。 | -| `sort:author-date-asc` | [**feature org:github sort:author-date-asc**](https://github.com/search?utf8=%E2%9C%93&q=feature+org%3Agithub+sort%3Aauthor-date-asc&type=Commits) 匹配 {% data variables.product.product_name %} 所拥有仓库中含有 "feature" 字样的提交,按作者日期升序排序。 | +| 限定符 | 示例 | +| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sort:author-date` 或 `sort:author-date-desc` | [**feature org:github sort:author-date**](https://github.com/search?utf8=%E2%9C%93&q=feature+org%3Agithub+sort%3Aauthor-date&type=Commits) 匹配 {% data variables.product.product_name %} 所拥有仓库中含有 "feature" 字样的提交,按作者日期降序排序。 | +| `sort:author-date-asc` | [**`feature org:github sort:author-date-asc`**](https://github.com/search?utf8=%E2%9C%93&q=feature+org%3Agithub+sort%3Aauthor-date-asc&type=Commits) matches commits containing the word "feature" in repositories owned by {% data variables.product.product_name %}, sorted by ascending author date. | ## 按提交者日期排序 `sort:committer-date` 限定符按提交者日期降序或升序排序。 -| 限定符 | 示例 | -| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `sort:committer-date` 或 `sort:committer-date-desc` | [**feature org:github sort:committer-date**](https://github.com/search?utf8=%E2%9C%93&q=feature+org%3Agithub+sort%3Acommitter-date&type=Commits) 匹配 {% data variables.product.product_name %} 所拥有仓库中含有 "feature" 字样的提交,按提交者日期降序排序。 | -| `sort:committer-date-asc` | [**feature org:github sort:committer-date-asc**](https://github.com/search?utf8=%E2%9C%93&q=feature+org%3Agithub+sort%3Acommitter-date-asc&type=Commits) 匹配 {% data variables.product.product_name %} 所拥有仓库中含有 "feature" 字样的提交,按提交者日期升序排序。 | +| 限定符 | 示例 | +| -------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `sort:committer-date` 或 `sort:committer-date-desc` | [**feature org:github sort:committer-date**](https://github.com/search?utf8=%E2%9C%93&q=feature+org%3Agithub+sort%3Acommitter-date&type=Commits) 匹配 {% data variables.product.product_name %} 所拥有仓库中含有 "feature" 字样的提交,按提交者日期降序排序。 | +| `sort:committer-date-asc` | [**`feature org:github sort:committer-date-asc`**](https://github.com/search?utf8=%E2%9C%93&q=feature+org%3Agithub+sort%3Acommitter-date-asc&type=Commits) matches commits containing the word "feature" in repositories owned by {% data variables.product.product_name %}, sorted by ascending committer date. | ## 按更新日期排序 @@ -72,5 +72,5 @@ topics: ## 延伸阅读 -- "[About searching on {% data variables.product.prodname_dotcom %}](/search-github/getting-started-with-searching-on-github/about-searching-on-github)" +- “[关于在 {% data variables.product.prodname_dotcom %} 上搜索](/search-github/getting-started-with-searching-on-github/about-searching-on-github)” - "[过滤和搜索议题和拉取请求](/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests)" diff --git a/translations/zh-CN/content/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax.md b/translations/zh-CN/content/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax.md index a2e62f3188..c4095de808 100644 --- a/translations/zh-CN/content/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax.md +++ b/translations/zh-CN/content/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax.md @@ -73,9 +73,10 @@ shortTitle: 了解搜索语法 缩小搜索结果范围的另一种途径是排除特定的子集。 您可以为任何搜索限定符添加 `-` 前缀,以排除该限定符匹配的所有结果。 -| 查询 | 示例 | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| -QUALIFIER | **[mentions:defunkt -org:github](https://github.com/search?utf8=%E2%9C%93&q=mentions%3Adefunkt+-org%3Agithub&type=Issues)** 匹配提及 @defunkt 且不在 GitHub 组织仓库中的议题. | +| 查询 | 示例 | +| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| -QUALIFIER | **[`cats stars:>10 -language:javascript`](https://github.com/search?q=cats+stars%3A>10+-language%3Ajavascript&type=Repositories)** matches repositories with the word "cats" that have more than 10 stars but are not written in JavaScript. | +| | **[`mentions:defunkt -org:github`](https://github.com/search?utf8=%E2%9C%93&q=mentions%3Adefunkt+-org%3Agithub&type=Issues)** matches issues mentioning @defunkt that are not in repositories in the GitHub organization | ## 对带有空格的查询使用引号 diff --git a/translations/zh-CN/content/search-github/searching-on-github/searching-code.md b/translations/zh-CN/content/search-github/searching-on-github/searching-code.md index 50d2118af9..0c70513149 100644 --- a/translations/zh-CN/content/search-github/searching-on-github/searching-code.md +++ b/translations/zh-CN/content/search-github/searching-on-github/searching-code.md @@ -62,11 +62,11 @@ topics: 您可使用 `path` 限定符搜索仓库中特定位置显示的源代码。 使用 `path:/` 可搜索位于仓库根目录级别的文件。 或者,指定目录名称或目录路径以搜索位于该命令或其任何子目录中的文件。 -| 限定符 | 示例 | -| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| path:/ | [**octocat filename:readme path:/**](https://github.com/search?utf8=%E2%9C%93&q=octocat+filename%3Areadme+path%3A%2F&type=Code) 匹配位于仓库根目录级别且含有 "octocat" 字样的 _readme_ 文件。 | -| path:DIRECTORY | [**form path:cgi-bin language:perl**](https://github.com/search?q=form+path%3Acgi-bin+language%3Aperl&type=Code) matches Perl files with the word "form" in the cgi-bin directory, or in any of its subdirectories. | -| path:PATH/TO/DIRECTORY | [**console path:app/public language:javascript**](https://github.com/search?q=console+path%3A%22app%2Fpublic%22+language%3Ajavascript&type=Code) matches JavaScript files with the word "console" in the app/public directory, or in any of its subdirectories (even if they reside in app/public/js/form-validators). | +| 限定符 | 示例 | +| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| path:/ | [**octocat filename:readme path:/**](https://github.com/search?utf8=%E2%9C%93&q=octocat+filename%3Areadme+path%3A%2F&type=Code) 匹配位于仓库根目录级别且含有 "octocat" 字样的 _readme_ 文件。 | +| path:DIRECTORY | [**form path:cgi-bin language:perl**](https://github.com/search?q=form+path%3Acgi-bin+language%3Aperl&type=Code) matches Perl files with the word "form" in the cgi-bin directory, or in any of its subdirectories. | +| path:PATH/TO/DIRECTORY | [**`console path:app/public language:javascript`**](https://github.com/search?q=console+path%3A%22app%2Fpublic%22+language%3Ajavascript&type=Code) matches JavaScript files with the word "console" in the app/public directory, or in any of its subdirectories (even if they reside in app/public/js/form-validators). | ## 按语言搜索 diff --git a/translations/zh-CN/content/search-github/searching-on-github/searching-for-packages.md b/translations/zh-CN/content/search-github/searching-on-github/searching-for-packages.md index bb4e85932f..afd255ec34 100644 --- a/translations/zh-CN/content/search-github/searching-on-github/searching-for-packages.md +++ b/translations/zh-CN/content/search-github/searching-on-github/searching-for-packages.md @@ -31,10 +31,10 @@ redirect_from: 要查找特定用户或组织拥有的包,请使用 `user` 或 `org` 限定符。 -| 限定符 | 示例 | -| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -| user:USERNAME | [**user:codertocat**](https://github.com/search?q=user%3Acodertocat&type=RegistryPackages) 匹配 @codertocat 拥有的包 | -| org:ORGNAME | [**org:github**](https://github.com/search?q=org%3Agithub&type=RegistryPackages) 匹配 {% data variables.product.prodname_dotcom %} 组织拥有的包 | +| 限定符 | 示例 | +| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| user:USERNAME | [**`user:codertocat`**](https://github.com/search?q=user%3Acodertocat&type=RegistryPackages) matches packages owned by @codertocat | +| org:ORGNAME | [**`org:github`**](https://github.com/search?q=org%3Agithub&type=RegistryPackages) matches packages owned by the {% data variables.product.prodname_dotcom %} organization | ## 按包可见性过滤 diff --git a/translations/zh-CN/content/search-github/searching-on-github/searching-for-repositories.md b/translations/zh-CN/content/search-github/searching-on-github/searching-for-repositories.md index 4cf28ebd0c..974fac0002 100644 --- a/translations/zh-CN/content/search-github/searching-on-github/searching-for-repositories.md +++ b/translations/zh-CN/content/search-github/searching-on-github/searching-for-repositories.md @@ -111,17 +111,17 @@ shortTitle: 搜索仓库 您可以根据仓库中代码的语言搜索仓库。 -| 限定符 | 示例 | -| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| language:LANGUAGE | [**rails language:javascript**](https://github.com/search?q=rails+language%3Ajavascript&type=Repositories) 匹配具有 "rails" 字样、以 JavaScript 编写的仓库。 | +| 限定符 | 示例 | +| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| language:LANGUAGE | [**`rails language:javascript`**](https://github.com/search?q=rails+language%3Ajavascript&type=Repositories) matches repositories with the word "rails" that are written in JavaScript. | ## 按主题搜索 您可以找到按特定主题分类的所有仓库。 更多信息请参阅“[使用主题对仓库分类](/github/administering-a-repository/classifying-your-repository-with-topics)”。 -| 限定符 | 示例 | -| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | -| topic:TOPIC | [**topic:jekyll**](https://github.com/search?utf8=%E2%9C%93&q=topic%3Ajekyll&type=Repositories&ref=searchresults)匹配已归类为 "jekyll" 主题的仓库。 | +| 限定符 | 示例 | +| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| topic:TOPIC | [**`topic:jekyll`**](https://github.com/search?utf8=%E2%9C%93&q=topic%3Ajekyll&type=Repositories&ref=searchresults) matches repositories that have been classified with the topic "Jekyll." | ## 按主题数量搜索 @@ -178,10 +178,10 @@ shortTitle: 搜索仓库 您可以使用限定符 `help-wanted-issues:>n` 和 `good-first-issues:>n` 搜索具有最少数量标签为 `help-wanted` 或 `good-first-issue` 议题的仓库。 更多信息请参阅“[通过标签鼓励对项目做出有益的贡献](/communities/setting-up-your-project-for-healthy-contributions/encouraging-helpful-contributions-to-your-project-with-labels)”。 -| 限定符 | 示例 | -| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `good-first-issues:>n` | [**good-first-issues:>2 javascript**](https://github.com/search?utf8=%E2%9C%93&q=javascript+good-first-issues%3A%3E2&type=) 匹配具有超过两个标签为 `good-first-issue` 的议题且包含 "javascript" 字样的仓库。 | -| `help-wanted-issues:>n` | [**help-wanted-issues:>4 react**](https://github.com/search?utf8=%E2%9C%93&q=react+help-wanted-issues%3A%3E4&type=) 匹配具有超过四个标签为 `help-wanted` 的议题且包含 "React" 字样的仓库。 | +| 限定符 | 示例 | +| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `good-first-issues:>n` | [**`good-first-issues:>2 javascript`**](https://github.com/search?utf8=%E2%9C%93&q=javascript+good-first-issues%3A%3E2&type=) matches repositories with more than two issues labeled `good-first-issue` and that contain the word "javascript." | +| `help-wanted-issues:>n` | [**help-wanted-issues:>4 react**](https://github.com/search?utf8=%E2%9C%93&q=react+help-wanted-issues%3A%3E4&type=) 匹配具有超过四个标签为 `help-wanted` 的议题且包含 "React" 字样的仓库。 | ## 基于赞助能力的搜索 diff --git a/translations/zh-CN/content/search-github/searching-on-github/searching-issues-and-pull-requests.md b/translations/zh-CN/content/search-github/searching-on-github/searching-issues-and-pull-requests.md index 1e808b5920..e0f96871ba 100644 --- a/translations/zh-CN/content/search-github/searching-on-github/searching-issues-and-pull-requests.md +++ b/translations/zh-CN/content/search-github/searching-on-github/searching-issues-and-pull-requests.md @@ -103,18 +103,18 @@ shortTitle: 搜索议题和 PR `mentions` 限定符查找提及特定用户的议题。 更多信息请参阅“[提及人员和团队](/articles/basic-writing-and-formatting-syntax/#mentioning-people-and-teams)”。 -| 限定符 | 示例 | -| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | -| mentions:USERNAME | [**resque mentions:defunkt**](https://github.com/search?q=resque+mentions%3Adefunkt&type=Issues) 匹配含有 "resque" 字样、提及 @defunkt 的议题。 | +| 限定符 | 示例 | +| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| mentions:USERNAME | [**`resque mentions:defunkt`**](https://github.com/search?q=resque+mentions%3Adefunkt&type=Issues) matches issues with the word "resque" that mention @defunkt. | ## 按团队提及搜索 对于您所属的组织和团队,您可以使用 `team` 限定符查找提及该组织内特定团队的议题或拉取请求。 将这些示例名称替换为您的组织和团队的名称以执行搜索。 -| 限定符 | 示例 | -| ------------------------- | ------------------------------------------------------------- | -| team:ORGNAME/TEAMNAME | **team:jekyll/owners** 匹配提及 `@jekyll/owners` 团队的议题。 | -| | **team:myorg/ops is:open is:pr** 匹配提及 `@myorg/ops` 团队的打开拉取请求。 | +| 限定符 | 示例 | +| ------------------------- | ------------------------------------------------------------------------------------- | +| team:ORGNAME/TEAMNAME | **`team:jekyll/owners`** matches issues where the `@jekyll/owners` team is mentioned. | +| | **team:myorg/ops is:open is:pr** 匹配提及 `@myorg/ops` 团队的打开拉取请求。 | ## 按评论者搜索 @@ -176,7 +176,7 @@ shortTitle: 搜索议题和 PR ## 按提交状态搜索 -您可以基于提交的状态过滤拉取请求。 This is especially useful if you are using [the Status API](/rest/reference/repos#statuses) or a CI service. +您可以基于提交的状态过滤拉取请求。 This is especially useful if you are using [the Status API](/rest/reference/commits#commit-statuses) or a CI service. | 限定符 | 示例 | | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -291,19 +291,19 @@ shortTitle: 搜索议题和 PR {% data reusables.search.date_gt_lt %} -| 限定符 | 示例 | -| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| merged:YYYY-MM-DD | [**language:javascript merged:<2011-01-01**](https://github.com/search?q=language%3Ajavascript+merged%3A%3C2011-01-01+&type=Issues) 匹配 2011 年以前合并的 JavaScript 仓库中的拉取请求。 | -| | [**fast in:title language:ruby merged:>=2014-05-01**](https://github.com/search?q=fast+in%3Atitle+language%3Aruby+merged%3A%3E%3D2014-05-01+&type=Issues) 匹配 2014 年 5 月之后合并、标题中含有 "fast" 字样、以 Ruby 编写的拉取请求。 | +| 限定符 | 示例 | +| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| merged:YYYY-MM-DD | [**`language:javascript merged:<2011-01-01`**](https://github.com/search?q=language%3Ajavascript+merged%3A%3C2011-01-01+&type=Issues) matches pull requests in JavaScript repositories that were merged before 2011. | +| | [**fast in:title language:ruby merged:>=2014-05-01**](https://github.com/search?q=fast+in%3Atitle+language%3Aruby+merged%3A%3E%3D2014-05-01+&type=Issues) 匹配 2014 年 5 月之后合并、标题中含有 "fast" 字样、以 Ruby 编写的拉取请求。 | ## 基于拉取请求是否已合并搜索 您可以使用 `is` 限定符基于拉取请求已合并还是未合并进行过滤。 -| 限定符 | 示例 | -| ------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| `is:merged` | [**bugfix is:pr is:merged**](https://github.com/search?utf8=%E2%9C%93&q=bugfix+is%3Apr+is%3Amerged&type=) 匹配含有 "bugfix" 字样的已合并拉取请求。 | -| `is:unmerged` | [**error is:unmerged**](https://github.com/search?utf8=%E2%9C%93&q=error+is%3Aunmerged&type=) 匹配含有 "error" 字样的已关闭议题和拉取请求。 | +| 限定符 | 示例 | +| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `is:merged` | [**bug is:pr is:merged**](https://github.com/search?utf8=%E2%9C%93&q=bugfix+is%3Apr+is%3Amerged&type=) matches merged pull requests with the word "bug." | +| `is:unmerged` | [**error is:unmerged**](https://github.com/search?utf8=%E2%9C%93&q=error+is%3Aunmerged&type=) 匹配含有 "error" 字样的已关闭议题和拉取请求。 | ## 基于仓库是否已存档搜索 diff --git a/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/managing-your-sponsorship-tiers.md b/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/managing-your-sponsorship-tiers.md index 6036891b2c..9c1ef47b56 100644 --- a/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/managing-your-sponsorship-tiers.md +++ b/translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/managing-your-sponsorship-tiers.md @@ -49,6 +49,43 @@ shortTitle: 管理付款等级 {% data reusables.sponsors.tier-update %} {% data reusables.sponsors.retire-tier %} +## Adding a repository to a sponsorship tier + +{% data reusables.sponsors.sponsors-only-repos %} + +### About adding repositories to a sponsorship tier + +To add a repository to a tier, the repository must be private and owned by an organization, and you must have admin access to the repository. + +When you add a repository to a tier, {% data variables.product.company_short %} will automatically send repository invitations to new sponsors and remove access when a sponsorship is cancelled. + +Only personal accounts, not organizations, can be invited to private repositories associated with a sponsorship tier. + +You can also manually add or remove collaborators to the repository, and {% data variables.product.company_short %} will not override these in the sync. + +### About transfers for repositories that are added to sponsorship tiers + +If you transfer a repository that has been added to a sponsorship tier, sponsors who have access to the repository through the tier may be affected. + +- If the sponsored profile is for an organization and the repository is transferred to a different organization, current sponsors will be transferred, but new sponsors will not be added. The new owner of the repository can remove existing sponsors. +- If the sponsored profile is for a personal account, the repository is transferred to an organization, and the personal account has admin access to the new repository, existing sponsors will be transferred, and new sponsors will continue to be added to the repository. +- If the repository is transferred to a personal account, all sponsors will be removed and new sponsors will not be added to the repository. + +### Adding a repository a sponsorship tier + +{% data reusables.sponsors.navigate-to-sponsors-dashboard %} +{% data reusables.sponsors.navigate-to-sponsor-tiers-tab %} +{% data reusables.sponsors.edit-tier %} +1. Select **Grant sponsors access to a private repository**. + + ![Screenshot of checkbox to grant sponsors access to a private repository](/assets/images/help/sponsors/grant-sponsors-access-to-repo-checkbox.png) + +1. Select the dropdown menu and click the repository you want to add. + + ![Screenshot of dropdown menu to choose the repository to grant sponsors access to](/assets/images/help/sponsors/grant-sponsors-access-to-repo-dropdown.png) + +{% data reusables.sponsors.tier-update %} + ## 启用具有自定义金额的等级 {% data reusables.sponsors.navigate-to-sponsors-dashboard %} diff --git a/translations/zh-CN/data/features/code-scanning-task-lists.yml b/translations/zh-CN/data/features/code-scanning-task-lists.yml new file mode 100644 index 0000000000..0de30490f7 --- /dev/null +++ b/translations/zh-CN/data/features/code-scanning-task-lists.yml @@ -0,0 +1,5 @@ +--- +versions: + fpt: '*' + ghec: '*' + ghae: 'issue-5036' diff --git a/translations/zh-CN/data/features/codeql-ml-queries.yml b/translations/zh-CN/data/features/codeql-ml-queries.yml new file mode 100644 index 0000000000..c74f86b77f --- /dev/null +++ b/translations/zh-CN/data/features/codeql-ml-queries.yml @@ -0,0 +1,7 @@ +--- +#Reference: #5604. +#Documentation for the beta release of CodeQL queries boosted by machine learning +#to generate experiemental alerts in code scanning. +versions: + fpt: '*' + ghec: '*' diff --git a/translations/zh-CN/data/features/github-actions-in-dependency-graph.yml b/translations/zh-CN/data/features/github-actions-in-dependency-graph.yml new file mode 100644 index 0000000000..1690a6b771 --- /dev/null +++ b/translations/zh-CN/data/features/github-actions-in-dependency-graph.yml @@ -0,0 +1,7 @@ +--- +#Reference: #5813. +#Documentation for GitHub Actions workflow dependencies appearing in the dependency graph +versions: + fpt: '*' + ghae: 'issue-5813' + ghec: '*' diff --git a/translations/zh-CN/data/features/security-overview-views.yml b/translations/zh-CN/data/features/security-overview-views.yml new file mode 100644 index 0000000000..bef4f54c9d --- /dev/null +++ b/translations/zh-CN/data/features/security-overview-views.yml @@ -0,0 +1,7 @@ +--- +#Reference: #5503. +#Documentation for the security overview individual views +versions: + ghes: '> 3.4' + ghae: 'issue-5503' + ghec: '*' diff --git a/translations/zh-CN/data/learning-tracks/actions.yml b/translations/zh-CN/data/learning-tracks/actions.yml index 2c53f7896e..79cafb12fa 100644 --- a/translations/zh-CN/data/learning-tracks/actions.yml +++ b/translations/zh-CN/data/learning-tracks/actions.yml @@ -41,6 +41,7 @@ adopting_github_actions_for_your_enterprise: title: 'Adopt GitHub Actions for your enterprise' description: 'Learn how to plan and implement a roll out of {% data variables.product.prodname_actions %} in your enterprise.' guides: + - /admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises - /actions/learn-github-actions/understanding-github-actions - /admin/github-actions/getting-started-with-github-actions-for-your-enterprise/introducing-github-actions-to-your-enterprise - /admin/github-actions/getting-started-with-github-actions-for-your-enterprise/migrating-your-enterprise-to-github-actions diff --git a/translations/zh-CN/data/learning-tracks/admin.yml b/translations/zh-CN/data/learning-tracks/admin.yml index b918b1009b..6cceba3ea6 100644 --- a/translations/zh-CN/data/learning-tracks/admin.yml +++ b/translations/zh-CN/data/learning-tracks/admin.yml @@ -42,6 +42,7 @@ adopting_github_actions_for_your_enterprise: title: 'Adopt GitHub Actions for your enterprise' description: 'Learn how to plan and implement a roll out of {% data variables.product.prodname_actions %} in your enterprise.' guides: + - /admin/github-actions/getting-started-with-github-actions-for-your-enterprise/about-github-actions-for-enterprises - /actions/learn-github-actions/understanding-github-actions - /admin/github-actions/getting-started-with-github-actions-for-your-enterprise/introducing-github-actions-to-your-enterprise - /admin/github-actions/getting-started-with-github-actions-for-your-enterprise/migrating-your-enterprise-to-github-actions diff --git a/translations/zh-CN/data/product-examples/README.md b/translations/zh-CN/data/product-examples/README.md index eab550485d..f21daf87a5 100644 --- a/translations/zh-CN/data/product-examples/README.md +++ b/translations/zh-CN/data/product-examples/README.md @@ -2,7 +2,7 @@ 使用 `product-landing` 布局的页面可以选择包含 `Examples` 部分。 目前,我们支持三种类型的示例: -1. 代码示例 请参阅 https://docs.github.com/en/actions#code-examples。 +1. 代码示例 请参阅 https://docs.github.com/en/codespaces#code-examples。 2. 社区示例 请参阅 https://docs.github.com/en/discussions#community-examples。 @@ -10,7 +10,7 @@ ## 工作原理 -每个产品的示例数据定义在 `data/product-landing-examples` 中,名为 **product** 的子目录中,以及名为 **example type** 的 YML 文件中(例如,`data/product-examples/sponsors/user-examples.yml` 或 `data/product-examples/actions/code-examples.yml`)。 我们目前只支持每个产品一种示例。 +Example data for each product is defined in `data/product-landing-examples`, in a subdirectory named for the **product** and a YML file named for the **example type** (e.g., `data/product-examples/sponsors/user-examples.yml` or `data/product-examples/codespaces/code-examples.yml`). 我们目前只支持每个产品一种示例。 ### 版本 diff --git a/translations/zh-CN/data/product-examples/actions/code-examples.yml b/translations/zh-CN/data/product-examples/actions/code-examples.yml deleted file mode 100644 index 92d52cb5bf..0000000000 --- a/translations/zh-CN/data/product-examples/actions/code-examples.yml +++ /dev/null @@ -1,335 +0,0 @@ ---- -- - title: 示例服务 - description: 使用服务容器的示例工作流程 - languages: JavaScript - href: actions/example-services - tags: - - 服务容器 -- - title: 声明设置 GitHub 标签 - description: 声明设置跨仓库标签的 GitHub Actions - languages: JavaScript - href: lannonbr/issue-label-manager-action - tags: - - 议题 - - labels -- - title: 声明同步 GitHub 标签 - description: 以声明方式同步 GitHub 标签的 GitHub Actions - languages: 'Go, Dockerfile' - href: micnncim/action-label-syncer - tags: - - 议题 - - labels -- - title: 向 GitHub 添加版本 - description: 在操作中发布 GitHub 版本 - languages: 'Dockerfile, Shell' - href: elgohr/Github-Release-Action - tags: - - 发行版 - - 发布 -- - title: 向 Dockerhub 发布 Docker 映像 - description: 用于生成和发布 Docker 映像的 GitHub 操作 - languages: 'Dockerfile, Shell' - href: elgohr/Publish-Docker-Github-Action - tags: - - docker - - 发布 - - 构建 -- - title: 使用文件中的内容创建议题 - description: 使用文件中的内容创建议题的 GitHub Actions - languages: 'JavaScript, Python' - href: peter-evans/create-issue-from-file - tags: - - 议题 -- - title: 使用资产发布 GitHub 版本 - description: 用于创建 GitHub 版本的 GitHub Actions - languages: 'TypeScript, Shell, JavaScript' - href: softprops/action-gh-release - tags: - - 发行版 - - 发布 -- - title: GitHub Project Automation+ - description: 使用任何 web 挂钩事件自动执行 GitHub 项目卡 - languages: JavaScript - href: alex-page/github-project-automation-plus - tags: - - projects - - automation - - 议题 - - 拉取请求 -- - title: 使用 Web 界面在本地运行 GitHub Actions - description: 本地运行 GitHub Actions 工作流程(本地) - languages: 'JavaScript, HTML, Dockerfile, CSS' - href: phishy/wflow - tags: - - local-development - - devops - - docker -- - title: 在本地运行 GitHub Actions - description: 在终端中本地运行 GitHub Actions - languages: 'Go, Shell' - href: nektos/act - tags: - - local-development - - devops - - docker -- - title: 生成和发布 Android 调试 APK - description: 从 Android 项目生成和发布调试 APK - languages: 'Shell, Dockerfile' - href: ShaunLWM/action-release-debugapk - tags: - - android - - 构建 -- - title: 为 GitHub Actions 生成序列生成编号 - description: 用于生成序列生成编号的 GitHub Actions。 - languages: JavaScript - href: einaregilsson/build-number - tags: - - 构建 - - automation -- - title: 要推回到仓库的 GitHub Actions - description: 将 Git 更改推送到 GitHub 仓库,而不会遇到身份验证困难 - languages: 'JavaScript, Shell' - href: ad-m/github-push-action - tags: - - 发布 -- - title: 根据您的事件生成发行说明 - description: 根据事件自动生成发行说明的操作 - languages: 'Shell, Dockerfile' - href: Decathlon/release-notes-generator-action - tags: - - 发行版 - - 发布 -- - title: 基于提供的 markdown 文件创建 GitHub wiki 页面 - description: 基于提供的 markdown 文件创建 GitHub wiki 页面 - languages: 'Shell, Dockerfile' - href: Decathlon/wiki-page-creator-action - tags: - - wiki - - 发布 -- - title: 自动标记您的拉取请求(使用提交的文件) - description: 自动标记拉取请求(使用提交的文件)的 GitHub 操作 - languages: 'TypeScript, Dockerfile, JavaScript' - href: Decathlon/pull-request-labeler-action - tags: - - projects - - 议题 - - labels -- - title: 根据作者团队名称向拉取请求添加标签 - description: 根据作者名称标记拉取请求的 GitHub 操作 - languages: 'TypeScript, JavaScript' - href: JulienKode/team-labeler-action - tags: - - 拉取请求 - - labels -- - title: 使用 PR/Push 获取文件更改列表 - description: 此操作可让您获取仓库已更改的文件的输出 - languages: 'TypeScript, Shell, JavaScript' - href: trilom/file-changes-action - tags: - - 工作流程 - - 仓库 -- - title: 任何工作流程中的私人操作 - description: 允许轻松重复利用私人 GitHub Actions - languages: 'TypeScript, JavaScript, Shell' - href: InVisionApp/private-action-loader - tags: - - 工作流程 - - tools -- - title: 使用议题的内容标记您的议题 - description: 使用标签和受理人自动标记议题的 GitHub Actions - languages: 'JavaScript, TypeScript' - href: damccorm/tag-ur-it - tags: - - 工作流程 - - tools - - labels - - 议题 -- - title: 回滚 GitHub 版本 - description: 回滚或删除版本的 GitHub Actions - languages: 'JavaScript' - href: author/action-rollback - tags: - - 工作流程 - - 发行版 -- - title: 锁定已关闭的议题和拉取请求 - description: 在一段时间不活动后锁定关闭的议题和拉取请求的 GitHub Actions - languages: 'JavaScript' - href: dessant/lock-threads - tags: - - 议题 - - 拉取请求 - - 工作流程 -- - title: 获取两个分支之间的提交差异数 - description: 此 GitHub Actions 比较两个分支,并提供它们之间的提交数 - languages: 'JavaScript, Shell' - href: jessicalostinspace/commit-difference-action - tags: - - 提交 - - 差异 - - 工作流程 -- - title: 基于 Git 引用生成发行说明 - description: 生成变更日志和发行说明的 GitHub Actions - languages: 'JavaScript, Shell' - href: metcalfc/changelog-generator - tags: - - cicd - - release-notes - - 工作流程 - - 变更日志 -- - title: 对 GitHub 仓库和提交实施策略 - description: 管道的策略实施 - languages: 'Go, Makefile, Dockerfile, Shell' - href: talos-systems/conform - tags: - - docker - - build-automation - - 工作流程 -- - title: 基于议题自动标记 - description: 根据议题描述自动标记议题 - languages: 'TypeScript, JavaScript, Dockerfile' - href: Renato66/auto-label - tags: - - labels - - 工作流程 - - automation -- - title: 将配置的 GitHub Actions 更新到最新版本 - description: 用于检查所有操作是否为最新的 CLI 工具 - languages: 'C#, Inno Setup, PowerShell, Shell' - href: fabasoad/ghacu - tags: - - versions - - cli - - 工作流程 -- - title: 创建议题分支 - description: 自动创建议题分支的 GitHub Actions - languages: 'JavaScript, Shell' - href: robvanderleek/create-issue-branch - tags: - - probot - - 议题 - - labels -- - title: 删除旧构件 - description: 自定义构件清理 - languages: 'JavaScript, Shell' - href: c-hive/gha-remove-artifacts - tags: - - 构件 - - 工作流程 -- - title: 将定义的文件/二进制文件同步到 Wiki 或外部仓库 - description: 自动将更改同步到外部仓库(例如 wiki)的 GitHub Actions - languages: 'Shell, Dockerfile' - href: kai-tub/external-repo-sync-action - tags: - - wiki - - sync - - 工作流程 -- - title: 基于任何文件创建/更新/删除 GitHub Wiki 页面 - description: 使用 rsync 更新 GitHub wiki,允许排除文件和目录以及实际删除文件 - languages: 'Shell, Dockerfile' - href: Andrew-Chen-Wang/github-wiki-action - tags: - - wiki - - docker - - 工作流程 -- - title: Prow GitHub Actions - description: 策略实施、聊天操作和自动 PR 合并的自动化 - languages: 'TypeScript, JavaScript' - href: jpmcb/prow-github-actions - tags: - - chat-ops - - prow - - 工作流程 -- - title: 检查工作流程中的 GitHub 状态 - description: 检查工作流程中的 GitHub 状态 - languages: 'TypeScript, JavaScript' - href: crazy-max/ghaction-github-status - tags: - - 状态 - - 监视 - - 工作流程 -- - title: 将 GitHub 上的标签作为代码管理 - description: 用于管理标签的 GitHub Actions(创建/重命名/更新/删除) - languages: 'TypeScript, JavaScript' - href: crazy-max/ghaction-github-labeler - tags: - - labels - - 工作流程 - - automation -- - title: 在免费和开源项目中分配资金 - description: 持续向项目贡献者和依赖项分配资金 - languages: 'Python, Dockerfile, Shell, Ruby' - href: protontypes/libreselery - tags: - - sponsors - - funding - - payment -- - title: GitHub 的 Herald 规则 - description: 将审查者、订阅者、标签和受理人添加到您的 PR - languages: 'TypeScript, JavaScript' - href: gagoar/use-herald-action - tags: - - reviewers - - labels - - assignees - - 拉取请求 -- - title: 代码所有者验证器 - description: 确保 GitHub CODEOWNERS 文件的正确性,支持公共和私有 GitHub 仓库以及 GitHub Enterprise 安装 - languages: 'Go, Shell, Makefile, Dockerfile' - href: mszostok/codeowners-validator - tags: - - codeowners - - 验证 - - 工作流程 -- - title: Copybara 操作 - description: 在仓库之间移动和转化代码(非常适合从单个仓库维护几个仓库) - languages: 'TypeScript, JavaScript, Shell' - href: olivr/copybara-action - tags: - - monorepo - - copybara - - 工作流程 -- - title: 将静态文件部署到 GitHub Pages - description: 用于将网站自动发布到 GitHub Pages 的 GitHub Actions - languages: 'TypeScript, JavaScript' - href: peaceiris/actions-gh-pages - tags: - - 发布 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/13.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/13.yml index b66f9f8886..c97c31e4b6 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/2-20/13.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/13.yml @@ -2,8 +2,8 @@ date: '2020-08-11' sections: security_fixes: - - '**关键:**在 GitHub 页面中发现了一个远程代码执行漏洞,允许攻击者执行命令,作为构建 GitHub Pages 网站的一部分。此问题源于在 Pages 构建过程中使用了过时和有漏洞的依赖项。要利用此漏洞,攻击者需要在 GitHub Enterprise Server 实例 上构建 GitHub Pages 站点的权限。此漏洞影响 GitHub Enterprise Server 的所有版本。为缓解此漏洞的影响,Kramdown 已更新以解决 CVE-2020-14001。{% comment %} https://github.com/github/pages/pull/2836, https://github.com/github/pages/pull/2827 {% endcomment %}' - - '**高:**攻击者在 GitHub Enterprise Server 上执行时可能会将恶意参数注入 Git 子命令。这可能允许攻击者用部分用户控制的内容覆盖任意文件,并可能在 GitHub Enterprise Server 实例上执行任意命令。要利用此漏洞,攻击者需要访问 GitHub Enterprise Server 实例中仓库的权限。但由于已实施其他保护措施,因此我们无法确定积极利用这一漏洞的方法。此漏洞是通过 GitHub Security Bug Bounty 计划报告的。 {% comment %} https://github.com/github/github/pull/151097 {% endcomment %}' + - '{% octicon "alert" aria-label="The alert icon" %} **Critical:** A remote code execution vulnerability was identified in GitHub Pages that could allow an attacker to execute commands as part building a GitHub Pages site. This issue was due to an outdated and vulnerable dependency used in the Pages build process. To exploit this vulnerability, an attacker would need permission to create and build a GitHub Pages site on the GitHub Enterprise Server instance. This vulnerability affected all versions of GitHub Enterprise Server. To mitigate this vulnerability, Kramdown has been updated to address CVE-2020-14001. {% comment %} https://github.com/github/pages/pull/2836, https://github.com/github/pages/pull/2827 {% endcomment %}' + - '**High:** An attacker could inject a malicious argument into a Git sub-command when executed on GitHub Enterprise Server. This could allow an attacker to overwrite arbitrary files with partially user-controlled content and potentially execute arbitrary commands on the GitHub Enterprise Server instance. To exploit this vulnerability, an attacker would need permission to access repositories within the GitHub Enterprise Server instance. However, due to other protections in place, we could not identify a way to actively exploit this vulnerability. This vulnerability was reported through the GitHub Security Bug Bounty program. {% comment %} https://github.com/github/github/pull/151097 {% endcomment %}' - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/21811, https://github.com/github/enterprise2/pull/21700 {% endcomment %}' bugs: - 'Consul 配置错误阻止在独立实例中处理一些后台任务。 {% comment %} https://github.com/github/enterprise2/pull/21464 {% endcomment %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-20/15.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-20/15.yml index b5622c9f32..01f9c1eed7 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/2-20/15.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-20/15.yml @@ -2,7 +2,7 @@ date: '2020-08-26' sections: security_fixes: - >- - **CRITICAL:** A remote code execution vulnerability was identified in GitHub Pages that could be exploited when building a GitHub Pages site. User-controlled configuration of the underlying parsers used by GitHub Pages were not sufficiently restricted and made it possible to execute commands on the GitHub Enterprise Server instance. To exploit this vulnerability, an attacker would need permission to create and build a GitHub Pages site on the GitHub Enterprise Server instance. This vulnerability affected all versions of GitHub Enterprise Server. The underlying issues contributing to this vulnerability were identified both internally and through the GitHub Security Bug Bounty program. We have issued CVE-2020-10518. {% comment %} https://github.com/github/pages/pull/2883, https://github.com/github/pages/pull/2902, https://github.com/github/pages/pull/2894, https://github.com/github/pages/pull/2877, https://github.com/github/pages-gem/pull/700, + {% octicon "alert" aria-label="The alert icon" %} **Critical:** A remote code execution vulnerability was identified in GitHub Pages that could be exploited when building a GitHub Pages site. User-controlled configuration of the underlying parsers used by GitHub Pages were not sufficiently restricted and made it possible to execute commands on the GitHub Enterprise Server instance. To exploit this vulnerability, an attacker would need permission to create and build a GitHub Pages site on the GitHub Enterprise Server instance. This vulnerability affected all versions of GitHub Enterprise Server. The underlying issues contributing to this vulnerability were identified both internally and through the GitHub Security Bug Bounty program. We have issued CVE-2020-10518. {% comment %} https://github.com/github/pages/pull/2883, https://github.com/github/pages/pull/2902, https://github.com/github/pages/pull/2894, https://github.com/github/pages/pull/2877, https://github.com/github/pages-gem/pull/700, https://github.com/github/pages/pull/2890, https://github.com/github/pages/pull/2898, https://github.com/github/pages/pull/2909, https://github.com/github/pages/pull/2891, https://github.com/github/pages/pull/2884, https://github.com/github/pages/pull/2889 {% endcomment %} - '**MEDIUM:** An improper access control vulnerability was identified that allowed authenticated users of the instance to determine the names of unauthorized private repositories given their numerical IDs. This vulnerability did not allow unauthorized access to any repository content besides the name. This vulnerability affected all versions of GitHub Enterprise Server prior to 2.22 and has been assigned [CVE-2020-10517](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10517). The vulnerability was reported via the [GitHub Bug Bounty program](https://bounty.github.com). {% comment %} https://github.com/github/github/pull/151987, https://github.com/github/github/pull/151713 {% endcomment %}' - 'Packages have been updated to the latest security versions. {% comment %} https://github.com/github/enterprise2/pull/21852, https://github.com/github/enterprise2/pull/21828, https://github.com/github/enterprise2/pull/22153, https://github.com/github/enterprise2/pull/21920, https://github.com/github/enterprise2/pull/22215, https://github.com/github/enterprise2/pull/22190 {% endcomment %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/4.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/4.yml index 49b79ff5ee..bf65a175da 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/2-21/4.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/4.yml @@ -2,8 +2,8 @@ date: '2020-08-11' sections: security_fixes: - - '**关键:**在 GitHub 页面中发现了一个远程代码执行漏洞,允许攻击者执行命令,作为构建 GitHub Pages 网站的一部分。此问题源于在 Pages 构建过程中使用了过时和有漏洞的依赖项。要利用此漏洞,攻击者需要在 GitHub Enterprise Server 实例 上构建 GitHub Pages 站点的权限。此漏洞影响 GitHub Enterprise Server 的所有版本。为缓解此漏洞的影响,Kramdown 已更新以解决 CVE-2020-14001。 {% comment %} https://github.com/github/pages/pull/2835, https://github.com/github/pages/pull/2827 {% endcomment %}' - - '**高:**攻击者在 GitHub Enterprise Server 上执行时可能会将恶意参数注入 Git 子命令。这可能允许攻击者用部分用户控制的内容覆盖任意文件,并可能在 GitHub Enterprise Server 实例上执行任意命令。要利用此漏洞,攻击者需要访问 GHES 实例中仓库的权限。但由于已实施其他保护措施,因此我们无法确定积极利用这一漏洞的方法。此漏洞是通过 GitHub Security Bug Bounty 计划报告的。 {% comment %} https://github.com/github/github/pull/150936, https://github.com/github/github/pull/150634 {% endcomment %}' + - '{% octicon "alert" aria-label="The alert icon" %} **Critical:** A remote code execution vulnerability was identified in GitHub Pages that could allow an attacker to execute commands as part building a GitHub Pages site. This issue was due to an outdated and vulnerable dependency used in the Pages build process. To exploit this vulnerability, an attacker would need permission to create and build a GitHub Pages site on the GitHub Enterprise Server instance. This vulnerability affected all versions of GitHub Enterprise Server. To mitigate this vulnerability, Kramdown has been updated to address CVE-2020-14001. {% comment %} https://github.com/github/pages/pull/2835, https://github.com/github/pages/pull/2827 {% endcomment %}' + - '**High:** High: An attacker could inject a malicious argument into a Git sub-command when executed on GitHub Enterprise Server. This could allow an attacker to overwrite arbitrary files with partially user-controlled content and potentially execute arbitrary commands on the GitHub Enterprise Server instance. To exploit this vulnerability, an attacker would need permission to access repositories within the GHES instance. However, due to other protections in place, we could not identify a way to actively exploit this vulnerability. This vulnerability was reported through the GitHub Security Bug Bounty program. {% comment %} https://github.com/github/github/pull/150936, https://github.com/github/github/pull/150634 {% endcomment %}' - '包已更新到最新的安全版本。{% comment %} https://github.com/github/enterprise2/pull/21679, https://github.com/github/enterprise2/pull/21542, https://github.com/github/enterprise2/pull/21812, https://github.com/github/enterprise2/pull/21700 {% endcomment %}' bugs: - 'Consul 配置错误阻止在独立实例中处理一些后台任务。 {% comment %} https://github.com/github/enterprise2/pull/21463 {% endcomment %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/2-21/6.yml b/translations/zh-CN/data/release-notes/enterprise-server/2-21/6.yml index f8d72193cd..c9ef772868 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/2-21/6.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/2-21/6.yml @@ -2,9 +2,9 @@ date: '2020-08-26' sections: security_fixes: - >- - **CRITICAL:** A remote code execution vulnerability was identified in GitHub Pages that could be exploited when building a GitHub Pages site. User-controlled configuration of the underlying parsers used by GitHub Pages were not sufficiently restricted and made it possible to execute commands on the GitHub Enterprise Server instance. To exploit this vulnerability, an attacker would need permission to create and build a GitHub Pages site on the GitHub Enterprise Server instance. This vulnerability affected all versions of GitHub Enterprise Server. The underlying issues contributing to this vulnerability were identified both internally and through the GitHub Security Bug Bounty program. We have issued CVE-2020-10518. {% comment %} https://github.com/github/pages/pull/2882, https://github.com/github/pages/pull/2902, https://github.com/github/pages/pull/2894, https://github.com/github/pages/pull/2877, https://github.com/github/pages-gem/pull/700, + {% octicon "alert" aria-label="The alert icon" %} **Critical:** A remote code execution vulnerability was identified in GitHub Pages that could be exploited when building a GitHub Pages site. User-controlled configuration of the underlying parsers used by GitHub Pages were not sufficiently restricted and made it possible to execute commands on the GitHub Enterprise Server instance. To exploit this vulnerability, an attacker would need permission to create and build a GitHub Pages site on the GitHub Enterprise Server instance. This vulnerability affected all versions of GitHub Enterprise Server. The underlying issues contributing to this vulnerability were identified both internally and through the GitHub Security Bug Bounty program. We have issued CVE-2020-10518. {% comment %} https://github.com/github/pages/pull/2882, https://github.com/github/pages/pull/2902, https://github.com/github/pages/pull/2894, https://github.com/github/pages/pull/2877, https://github.com/github/pages-gem/pull/700, https://github.com/github/pages/pull/2889, https://github.com/github/pages/pull/2899, https://github.com/github/pages/pull/2903, https://github.com/github/pages/pull/2890, https://github.com/github/pages/pull/2891, https://github.com/github/pages/pull/2884 {% endcomment %} - - '**MEDIUM:** An improper access control vulnerability was identified that allowed authenticated users of the instance to determine the names of unauthorized private repositories given their numerical IDs. This vulnerability did not allow unauthorized access to any repository content besides the name. This vulnerability affected all versions of GitHub Enterprise Server prior to 2.22 and has been assigned [CVE-2020-10517](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10517). The vulnerability was reported via the [GitHub Bug Bounty program](https://bounty.github.com). {% comment %} https://github.com/github/github/pull/151986, https://github.com/github/github/pull/151713 {% endcomment %}' + - '**Medium:** An improper access control vulnerability was identified that allowed authenticated users of the instance to determine the names of unauthorized private repositories given their numerical IDs. This vulnerability did not allow unauthorized access to any repository content besides the name. This vulnerability affected all versions of GitHub Enterprise Server prior to 2.22 and has been assigned [CVE-2020-10517](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-10517). The vulnerability was reported via the [GitHub Bug Bounty program](https://bounty.github.com). {% comment %} https://github.com/github/github/pull/151986, https://github.com/github/github/pull/151713 {% endcomment %}' - 'Packages have been updated to the latest security versions. {% comment %} https://github.com/github/enterprise2/pull/21853, https://github.com/github/enterprise2/pull/21828, https://github.com/github/enterprise2/pull/22154, https://github.com/github/enterprise2/pull/21920, https://github.com/github/enterprise2/pull/22216, https://github.com/github/enterprise2/pull/22190 {% endcomment %}' bugs: - 'A message was not logged when the ghe-config-apply process had finished running ghe-es-auto-expand. {% comment %} https://github.com/github/enterprise2/pull/22178, https://github.com/github/enterprise2/pull/22171 {% endcomment %}' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/21.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/21.yml index 2c0ec91ff6..9ccd94c77a 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-0/21.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/21.yml @@ -3,6 +3,7 @@ date: '2021-12-07' sections: security_fixes: - Support bundles could include sensitive files if they met a specific set of conditions. + - A UI misrepresentation vulnerability was identified in GitHub Enterprise Server that allowed more permissions to be granted during a GitHub App's user-authorization web flow than was displayed to the user during approval. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.3 and was fixed in versions 3.2.5, 3.1.13, 3.0.21. This vulnerability was reported via the GitHub Bug Bounty program and has been assigned [CVE-2021-41598](https://www.cve.org/CVERecord?id=CVE-2021-41598). bugs: - Running `ghe-config-apply` could sometimes fail because of permission issues in `/data/user/tmp/pages`. - A misconfiguration in the Management Console caused scheduling errors. diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/22.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/22.yml index 3474566233..612a802d17 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-0/22.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/22.yml @@ -2,7 +2,7 @@ date: '2021-12-13' sections: security_fixes: - - '**CRITICAL:** A remote code execution vulnerability in the Log4j library, identified as [CVE-2021-44228](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228), affected all versions of {% data variables.product.prodname_ghe_server %} prior to 3.3.1. The Log4j library is used in an open source service running on the {% data variables.product.prodname_ghe_server %} instance. This vulnerability was fixed in {% data variables.product.prodname_ghe_server %} versions 3.0.22, 3.1.14, 3.2.6, and 3.3.1. For more information, please see [this post](https://github.blog/2021-12-13-githubs-response-to-log4j-vulnerability-cve-2021-44228/) on the GitHub Blog.' + - '{% octicon "alert" aria-label="The alert icon" %} **Critical:** A remote code execution vulnerability in the Log4j library, identified as [CVE-2021-44228](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228), affected all versions of {% data variables.product.prodname_ghe_server %} prior to 3.3.1. The Log4j library is used in an open source service running on the {% data variables.product.prodname_ghe_server %} instance. This vulnerability was fixed in {% data variables.product.prodname_ghe_server %} versions 3.0.22, 3.1.14, 3.2.6, and 3.3.1. For more information, please see [this post](https://github.blog/2021-12-13-githubs-response-to-log4j-vulnerability-cve-2021-44228/) on the GitHub Blog.' - '**December 17, 2021 update**: The fixes in place for this release also mitigate [CVE-2021-45046](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-45046), which was published after this release. No additional upgrade for {% data variables.product.prodname_ghe_server %} is required to mitigate both CVE-2021-44228 and CVE-2021-45046.' known_issues: - 在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-0/24.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-0/24.yml new file mode 100644 index 0000000000..0145605022 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-0/24.yml @@ -0,0 +1,21 @@ +--- +date: '2022-02-01' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - Pages would become unavailable following a MySQL secret rotation until `nginx` was manually restarted. + - When setting the maintenance schedule with a ISO 8601 date, the actual scheduled time wouldn't match due to the timezone not being transformed to UTC. + - The version number would not be correctly updated after a installing a hotpatch using `ghe-cluster-each`. + - Spurious error messages concerning the `cloud-config.service` would be output to the console. + - When using CAS authentication and the "Reactivate suspended users" option was enabled, suspended users were not automatically reactivated. + changes: + - The GitHub Connect data connection record now includes a count of the number of active and dormant users and the configured dormancy period. + known_issues: + - 在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。 + - 自定义防火墙规则在升级过程中被删除。 + - Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。 + - 如果议题包含文件路径长于 255 个字符的同一仓库中 blob 的永久链接,则议题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。 + - 当副本节点在高可用性配置下离线时,{% data variables.product.product_name %} 仍可能将 {% data variables.product.prodname_pages %} 请求路由到离线节点,从而减少用户的 {% data variables.product.prodname_pages %} 可用性。 + - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/13.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/13.yml index 5b0a24dfa4..781daeca61 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-1/13.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/13.yml @@ -3,6 +3,7 @@ date: '2021-12-07' sections: security_fixes: - Support bundles could include sensitive files if they met a specific set of conditions. + - A UI misrepresentation vulnerability was identified in GitHub Enterprise Server that allowed more permissions to be granted during a GitHub App's user-authorization web flow than was displayed to the user during approval. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.3 and was fixed in versions 3.2.5, 3.1.13, 3.0.21. This vulnerability was reported via the GitHub Bug Bounty program and has been assigned [CVE-2021-41598](https://www.cve.org/CVERecord?id=CVE-2021-41598). bugs: - Running `ghe-config-apply` could sometimes fail because of permission issues in `/data/user/tmp/pages`. - A misconfiguration in the Management Console caused scheduling errors. diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/14.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/14.yml index 7976fb59e4..e2e2b72cd5 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-1/14.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/14.yml @@ -2,7 +2,7 @@ date: '2021-12-13' sections: security_fixes: - - '**CRITICAL:** A remote code execution vulnerability in the Log4j library, identified as [CVE-2021-44228](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228), affected all versions of {% data variables.product.prodname_ghe_server %} prior to 3.3.1. The Log4j library is used in an open source service running on the {% data variables.product.prodname_ghe_server %} instance. This vulnerability was fixed in {% data variables.product.prodname_ghe_server %} versions 3.0.22, 3.1.14, 3.2.6, and 3.3.1. For more information, please see [this post](https://github.blog/2021-12-13-githubs-response-to-log4j-vulnerability-cve-2021-44228/) on the GitHub Blog.' + - '{% octicon "alert" aria-label="The alert icon" %} **Critical:** A remote code execution vulnerability in the Log4j library, identified as [CVE-2021-44228](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228), affected all versions of {% data variables.product.prodname_ghe_server %} prior to 3.3.1. The Log4j library is used in an open source service running on the {% data variables.product.prodname_ghe_server %} instance. This vulnerability was fixed in {% data variables.product.prodname_ghe_server %} versions 3.0.22, 3.1.14, 3.2.6, and 3.3.1. For more information, please see [this post](https://github.blog/2021-12-13-githubs-response-to-log4j-vulnerability-cve-2021-44228/) on the GitHub Blog.' - '**December 17, 2021 update**: The fixes in place for this release also mitigate [CVE-2021-45046](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-45046), which was published after this release. No additional upgrade for {% data variables.product.prodname_ghe_server %} is required to mitigate both CVE-2021-44228 and CVE-2021-45046.' known_issues: - '{% data variables.product.prodname_registry %} npm 注册表不再返回元数据响应的时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。' diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-1/16.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-1/16.yml new file mode 100644 index 0000000000..ae3114314a --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-1/16.yml @@ -0,0 +1,25 @@ +--- +date: '2022-02-01' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - Pages would become unavailable following a MySQL secret rotation until `nginx` was manually restarted. + - When setting the maintenance schedule with a ISO 8601 date, the actual scheduled time wouldn't match due to the timezone not being transformed to UTC. + - Spurious error messages concerning the `cloud-config.service` would be output to the console. + - The version number would not be correctly updated after a installing a hotpatch using `ghe-cluster-each`. + - Webhook table cleanup jobs could run simultaneously, causing resource contention and increasing job run time. + - When using CAS authentication and the "Reactivate suspended users" option was enabled, suspended users were not automatically reactivated. + - The ability to limit email-based notifications to users with emails on a verified or approved domain did not work correctly. + - Several documentation links resulted in a 404 Not Found error. + changes: + - The GitHub Connect data connection record now includes a count of the number of active and dormant users and the configured dormancy period. + known_issues: + - '{% data variables.product.prodname_registry %} npm 注册表不再返回元数据响应的时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。' + - 在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。 + - 自定义防火墙规则在升级过程中被删除。 + - Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。 + - 如果议题包含文件路径长于 255 个字符的同一仓库中 blob 的永久链接,则议题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。 + - If {% data variables.product.prodname_actions %} is enabled for {% data variables.product.prodname_ghe_server %}, teardown of a replica node with `ghe-repl-teardown` will succeed, but may return `ERROR:Running migrations`. + - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/5.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/5.yml index 5569566ebe..f8311e8c59 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-2/5.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/5.yml @@ -3,6 +3,7 @@ date: '2021-12-07' sections: security_fixes: - Support bundles could include sensitive files if they met a specific set of conditions. + - A UI misrepresentation vulnerability was identified in GitHub Enterprise Server that allowed more permissions to be granted during a GitHub App's user-authorization web flow than was displayed to the user during approval. This vulnerability affected all versions of GitHub Enterprise Server prior to 3.3 and was fixed in versions 3.2.5, 3.1.13, 3.0.21. This vulnerability was reported via the GitHub Bug Bounty program and has been assigned [CVE-2021-41598](https://www.cve.org/CVERecord?id=CVE-2021-41598). bugs: - In some cases when Actions was not enabled, `ghe-support-bundle` reported an unexpected message `Unable to find MS SQL container.` - Running `ghe-config-apply` could sometimes fail because of permission issues in `/data/user/tmp/pages`. diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/6.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/6.yml index 7cd48b20a1..4ea8259572 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-2/6.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/6.yml @@ -2,7 +2,7 @@ date: '2021-12-13' sections: security_fixes: - - '**CRITICAL:** A remote code execution vulnerability in the Log4j library, identified as [CVE-2021-44228](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228), affected all versions of {% data variables.product.prodname_ghe_server %} prior to 3.3.1. The Log4j library is used in an open source service running on the {% data variables.product.prodname_ghe_server %} instance. This vulnerability was fixed in {% data variables.product.prodname_ghe_server %} versions 3.0.22, 3.1.14, 3.2.6, and 3.3.1. For more information, please see [this post](https://github.blog/2021-12-13-githubs-response-to-log4j-vulnerability-cve-2021-44228/) on the GitHub Blog.' + - '{% octicon "alert" aria-label="The alert icon" %} **Critical:** A remote code execution vulnerability in the Log4j library, identified as [CVE-2021-44228](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228), affected all versions of {% data variables.product.prodname_ghe_server %} prior to 3.3.1. The Log4j library is used in an open source service running on the {% data variables.product.prodname_ghe_server %} instance. This vulnerability was fixed in {% data variables.product.prodname_ghe_server %} versions 3.0.22, 3.1.14, 3.2.6, and 3.3.1. For more information, please see [this post](https://github.blog/2021-12-13-githubs-response-to-log4j-vulnerability-cve-2021-44228/) on the GitHub Blog.' - '**December 17, 2021 update**: The fixes in place for this release also mitigate [CVE-2021-45046](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-45046), which was published after this release. No additional upgrade for {% data variables.product.prodname_ghe_server %} is required to mitigate both CVE-2021-44228 and CVE-2021-45046.' known_issues: - 在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。 diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-2/8.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-2/8.yml new file mode 100644 index 0000000000..4ba202aa11 --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-2/8.yml @@ -0,0 +1,26 @@ +--- +date: '2022-02-01' +sections: + security_fixes: + - 包已更新到最新的安全版本。 + bugs: + - Pages would become unavailable following a MySQL secret rotation until `nginx` was manually restarted. + - Migrations could fail when {% data variables.product.prodname_actions %} was enabled. + - When setting the maintenance schedule with a ISO 8601 date, the actual scheduled time wouldn't match due to the timezone not being transformed to UTC. + - Spurious error messages concerning the `cloud-config.service` would be output to the console. + - The version number would not be correctly updated after a installing a hotpatch using `ghe-cluster-each`. + - Webhook table cleanup jobs could run simultaneously, causing resource contention and increasing job run time. + - When run from the primary, `ghe-repl-teardown` on a replica would not remove the replica from the MSSQL availability group. + - When using CAS authentication and the "Reactivate suspended users" option was enabled, suspended users were not automatically reactivated. + - The ability to limit email-based notifications to users with emails on a verified or approved domain did not work correctly. + - A long-running database migration related to Security Alert settings could delay upgrade completion. + changes: + - The GitHub Connect data connection record now includes a count of the number of active and dormant users and the configured dormancy period. + known_issues: + - 在新建的没有任何用户的 {% data variables.product.prodname_ghe_server %} 上,攻击者可以创建第一个管理员用户。 + - 自定义防火墙规则在升级过程中被删除。 + - Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。 + - 如果议题包含文件路径长于 255 个字符的同一仓库中 blob 的永久链接,则议题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。 + - '{% data variables.product.prodname_registry %} npm 注册表不再返回元数据响应的时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。' + - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-3/1.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-3/1.yml index 805090cf85..9fea6fe634 100644 --- a/translations/zh-CN/data/release-notes/enterprise-server/3-3/1.yml +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-3/1.yml @@ -2,7 +2,7 @@ date: '2021-12-13' sections: security_fixes: - - '**CRITICAL:** A remote code execution vulnerability in the Log4j library, identified as [CVE-2021-44228](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228), affected all versions of {% data variables.product.prodname_ghe_server %} prior to 3.3.1. The Log4j library is used in an open source service running on the {% data variables.product.prodname_ghe_server %} instance. This vulnerability was fixed in {% data variables.product.prodname_ghe_server %} versions 3.0.22, 3.1.14, 3.2.6, and 3.3.1. For more information, please see [this post](https://github.blog/2021-12-13-githubs-response-to-log4j-vulnerability-cve-2021-44228/) on the GitHub Blog.' + - '{% octicon "alert" aria-label="The alert icon" %} **Critical:** A remote code execution vulnerability in the Log4j library, identified as [CVE-2021-44228](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-44228), affected all versions of {% data variables.product.prodname_ghe_server %} prior to 3.3.1. The Log4j library is used in an open source service running on the {% data variables.product.prodname_ghe_server %} instance. This vulnerability was fixed in {% data variables.product.prodname_ghe_server %} versions 3.0.22, 3.1.14, 3.2.6, and 3.3.1. For more information, please see [this post](https://github.blog/2021-12-13-githubs-response-to-log4j-vulnerability-cve-2021-44228/) on the GitHub Blog.' - '**December 17, 2021 update**: The fixes in place for this release also mitigate [CVE-2021-45046](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-45046), which was published after this release. No additional upgrade for {% data variables.product.prodname_ghe_server %} is required to mitigate both CVE-2021-44228 and CVE-2021-45046.' known_issues: - After upgrading to {% data variables.product.prodname_ghe_server %} 3.3, {% data variables.product.prodname_actions %} may fail to start automatically. To resolve this issue, connect to the appliance via SSH and run the `ghe-actions-start` command. diff --git a/translations/zh-CN/data/release-notes/enterprise-server/3-3/3.yml b/translations/zh-CN/data/release-notes/enterprise-server/3-3/3.yml new file mode 100644 index 0000000000..06aa240abb --- /dev/null +++ b/translations/zh-CN/data/release-notes/enterprise-server/3-3/3.yml @@ -0,0 +1,29 @@ +--- +date: '2022-02-01' +sections: + security_fixes: + - '**MEDIUM**: Secret Scanning API calls could return alerts for repositories outside the scope of the request.' + - 包已更新到最新的安全版本。 + bugs: + - Pages would become unavailable following a MySQL secret rotation until `nginx` was manually restarted. + - Migrations could fail when {% data variables.product.prodname_actions %} was enabled. + - When setting the maintenance schedule with a ISO 8601 date, the actual scheduled time wouldn't match due to the timezone not being transformed to UTC. + - Spurious error messages concerning the `cloud-config.service` would be output to the console. + - The version number would not be correctly updated after a installing a hotpatch using `ghe-cluster-each`. + - Webhook table cleanup jobs could run simultaneously, causing resource contention and increasing job run time. + - When run from the primary, `ghe-repl-teardown` on a replica would not remove the replica from the MSSQL availability group. + - The ability to limit email-based notifications to users with emails on a verified or approved domain did not work correctly. + - When using CAS authentication and the "Reactivate suspended users" option was enabled, suspended users were not automatically reactivated. + - A long-running database migration related to Security Alert settings could delay upgrade completion. + changes: + - The GitHub Connect data connection record now includes a count of the number of active and dormant users and the configured dormancy period. + known_issues: + - After upgrading to {% data variables.product.prodname_ghe_server %} 3.3, {% data variables.product.prodname_actions %} may fail to start automatically. To resolve this issue, connect to the appliance via SSH and run the `ghe-actions-start` command. + - On a freshly set up {% data variables.product.prodname_ghe_server %} instance without any users, an attacker could create the first admin user. + - 自定义防火墙规则在升级过程中被删除。 + - Git LFS 跟踪的文件[通过 Web 界面上传](https://github.com/blog/2105-upload-files-to-your-repositories) 被错误地直接添加到仓库。 + - 如果议题包含文件路径长于 255 个字符的同一仓库中 blob 的永久链接,则议题无法关闭。 + - 对 GitHub Connect 启用“用户可以搜索 GitHub.com”后,私有和内部仓库中的议题不包括在 GitHub.com 搜索结果中。 + - '{% data variables.product.prodname_registry %} npm 注册表不再返回元数据响应的时间值。这样做是为了大幅改善性能。作为元数据响应的一部分,我们继续拥有返回时间值所需的所有数据,并将在我们解决现有性能问题后恢复返回这个值。' + - Resource limits that are specific to processing pre-receive hooks may cause some pre-receive hooks to fail. + - '{% data variables.product.prodname_actions %} storage settings cannot be validated and saved in the {% data variables.enterprise.management_console %} when "Force Path Style" is selected, and must instead be configured with the `ghe-actions-precheck` command line utility.' diff --git a/translations/zh-CN/data/reusables/actions/oidc-permissions-token.md b/translations/zh-CN/data/reusables/actions/oidc-permissions-token.md new file mode 100644 index 0000000000..abc7dba354 --- /dev/null +++ b/translations/zh-CN/data/reusables/actions/oidc-permissions-token.md @@ -0,0 +1,13 @@ +The job or workflow run requires a `permissions` setting with [`id-token: write`](/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token). This allows the JWT to be requested from GitHub's OIDC provider using one of these approaches: + +- Using environment variables on the runner (`ACTIONS_ID_TOKEN_REQUEST_URL` and `ACTIONS_ID_TOKEN_REQUEST_TOKEN`). +- Using `getIDToken()` from the Actions toolkit. + +If you only need to fetch an OIDC token for a single job, then this permission can be set within that job. 例如: + +```yaml{:copy} +permissions: + id-token: write +``` + +You may need to specify additional permissions here, depending on your workflow's requirements. \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/actions/workflows/section-triggering-a-workflow-paths.md b/translations/zh-CN/data/reusables/actions/workflows/section-triggering-a-workflow-paths.md index bcf62c40c4..8bf9c2d08d 100644 --- a/translations/zh-CN/data/reusables/actions/workflows/section-triggering-a-workflow-paths.md +++ b/translations/zh-CN/data/reusables/actions/workflows/section-triggering-a-workflow-paths.md @@ -52,7 +52,7 @@ on: - '!sub-project/docs/**' ``` -### Git 差异比较 +#### Git 差异比较 {% note %} diff --git a/translations/zh-CN/data/reusables/apps/checks-availability.md b/translations/zh-CN/data/reusables/apps/checks-availability.md index c0b3ffd3cd..afea5d2e35 100644 --- a/translations/zh-CN/data/reusables/apps/checks-availability.md +++ b/translations/zh-CN/data/reusables/apps/checks-availability.md @@ -1 +1 @@ -检查 API 的写入权限仅适用于 GitHub 应用程序。 OAuth 应用程序和经过身份验证的用户可以查看检查运行和检查套件,但无法创建它们。 如果您没有构建 GitHub 应用程序,您可能对[状态 API](/rest/reference/repos#statuses) 感兴趣。 +检查 API 的写入权限仅适用于 GitHub 应用程序。 OAuth 应用程序和经过身份验证的用户可以查看检查运行和检查套件,但无法创建它们。 如果您没有构建 GitHub 应用程序,您可能对[状态 API](/rest/reference/commits#commit-statuses) 感兴趣。 diff --git a/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_org_admins.md b/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_org_admins.md index e1409a47ad..7111b2d945 100644 --- a/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_org_admins.md +++ b/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_org_admins.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Archives" section of the sidebar, click **{% octicon "log" aria-label="The log icon" %} Security log**. +{% else %} 1. 在 Setting(设置)边栏中,单击 **Audit log(审核日志)**。 ![边栏中的组织审核日志设置](/assets/images/help/organizations/org-settings-audit-log.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_site_admins.md b/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_site_admins.md index 059906212d..1a327d39fa 100644 --- a/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_site_admins.md +++ b/translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_site_admins.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +3. In the "Archives" section of the sidebar, click **{% octicon "log" aria-label="The log icon" %} Security log**. +{% else %} 3. 在左侧边栏中,单击 **Audit log(审核日志)**。 ![审核日志选项卡](/assets/images/enterprise/site-admin-settings/audit-log-tab.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/billing/license-statuses.md b/translations/zh-CN/data/reusables/billing/license-statuses.md new file mode 100644 index 0000000000..eea8e721f5 --- /dev/null +++ b/translations/zh-CN/data/reusables/billing/license-statuses.md @@ -0,0 +1,6 @@ +{% ifversion ghec %} +If your license includes {% data variables.product.prodname_vss_ghe %}, you can identify whether a user account on {% data variables.product.prodname_dotcom_the_website %} has successfully matched with a {% data variables.product.prodname_vs %} subscriber by downloading the CSV file that contains additional license details. The license status will be one of the following. +- "Matched": The user account on {% data variables.product.prodname_dotcom_the_website %} is linked with a {% data variables.product.prodname_vs %} subscriber. +- "Pending Invitation": An invitation was sent to a {% data variables.product.prodname_vs %} subscriber, but the subscriber has not accepted the invitation. +- Blank: There is no {% data variables.product.prodname_vs %} association to consider for the user account on {% data variables.product.prodname_dotcom_the_website %}. +{% endif %} \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/code-scanning/beta-alert-tracking-in-issues.md b/translations/zh-CN/data/reusables/code-scanning/beta-alert-tracking-in-issues.md index 7db5b9879a..6664cbfafc 100644 --- a/translations/zh-CN/data/reusables/code-scanning/beta-alert-tracking-in-issues.md +++ b/translations/zh-CN/data/reusables/code-scanning/beta-alert-tracking-in-issues.md @@ -1,4 +1,4 @@ -{% ifversion fpt or ghes > 3.3 or ghae-issue-5036 %} +{% if code-scanning-task-lists %} {% note %} diff --git a/translations/zh-CN/data/reusables/code-scanning/beta-codeql-ml-queries.md b/translations/zh-CN/data/reusables/code-scanning/beta-codeql-ml-queries.md new file mode 100644 index 0000000000..133b760b30 --- /dev/null +++ b/translations/zh-CN/data/reusables/code-scanning/beta-codeql-ml-queries.md @@ -0,0 +1,9 @@ +{% if codeql-ml-queries %} + +{% note %} + +**Note:** Experimental alerts for {% data variables.product.prodname_code_scanning %} are created using experimental technology in the {% data variables.product.prodname_codeql %} action. This feature is currently available as a beta release for JavaScript code and is subject to change. + +{% endnote %} + +{% endif %} diff --git a/translations/zh-CN/data/reusables/code-scanning/codeql-query-suites-explanation.md b/translations/zh-CN/data/reusables/code-scanning/codeql-query-suites-explanation.md new file mode 100644 index 0000000000..af6fd15a54 --- /dev/null +++ b/translations/zh-CN/data/reusables/code-scanning/codeql-query-suites-explanation.md @@ -0,0 +1,5 @@ +以下查询套件内置于 {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %},可供使用。 + +{% data reusables.code-scanning.codeql-query-suites %} + +When you specify a query suite, the {% data variables.product.prodname_codeql %} analysis engine will run the default set of queries and any extra queries defined in the additional query suite. {% if codeql-ml-queries %}The `security-extended` and `security-and-quality` query suites for JavaScript contain experimental queries. For more information, see "[About {% data variables.product.prodname_code_scanning %} alerts](/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-alerts#about-experimental-alerts)."{% endif %} diff --git a/translations/zh-CN/data/reusables/code-scanning/codeql-query-suites.md b/translations/zh-CN/data/reusables/code-scanning/codeql-query-suites.md index f9b919f834..53e5dbe60f 100644 --- a/translations/zh-CN/data/reusables/code-scanning/codeql-query-suites.md +++ b/translations/zh-CN/data/reusables/code-scanning/codeql-query-suites.md @@ -1,8 +1,4 @@ -以下查询套件内置于 {% data variables.product.prodname_codeql %} {% data variables.product.prodname_code_scanning %},可供使用。 - | 查询套件 | 描述 | |:---------------------- |:--------------------------------------- | | `security-extended` | 严重性和精度低于默认查询的查询 | | `security-and-quality` | 来自 `security-extended` 的查询,加上可维护性和可靠性查询 | - -在指定查询套件时,{% data variables.product.prodname_codeql %} 分析引擎将运行套件中包含的查询,以及默认查询集。 diff --git a/translations/zh-CN/data/reusables/codespaces/codespaces-billing.md b/translations/zh-CN/data/reusables/codespaces/codespaces-billing.md index 3b9dc197a0..4c5e38bbf7 100644 --- a/translations/zh-CN/data/reusables/codespaces/codespaces-billing.md +++ b/translations/zh-CN/data/reusables/codespaces/codespaces-billing.md @@ -1,9 +1,9 @@ {% data variables.product.prodname_codespaces %} are billed in US dollars (USD) according to their compute and storage usage. ### Calculating compute usage -The total number of uptime minutes for which the {% data variables.product.prodname_codespaces %} instances are active. Compute usage is calculated by the actual number of minutes used by all codespaces. These totals are reported to the billing service daily, and are billed monthly. +Compute usage is defined as the total number of uptime minutes for which a {% data variables.product.prodname_codespaces %} instance is active. Compute usage is calculated by summing the actual number of minutes used by all codespaces. These totals are reported to the billing service daily, and are billed monthly. -Uptime is controlled by stopping your codespace which can be done manually or based on period of inactivity. For more information, see "[Closing or stopping your codespace](/codespaces/getting-started/deep-dive#closing-or-stopping-your-codespace)". +Uptime is controlled by stopping your codespace, which can be done manually or automatically after a developer specified period of inactivity. For more information, see "[Closing or stopping your codespace](/codespaces/getting-started/deep-dive#closing-or-stopping-your-codespace)". ### Calculating storage usage For {% data variables.product.prodname_codespaces %} billing purposes, this includes all storage used by all codespaces in your account. This includes any files used by the codespaces, such as cloned repositories, configuration files, and extensions, among others. These totals are reported to the billing service daily, and are billed monthly. 到月底,{% data variables.product.prodname_dotcom %} 会将您的存储量舍入到最接近的 MB。 diff --git a/translations/zh-CN/data/reusables/dependabot/dependabot-secrets-button.md b/translations/zh-CN/data/reusables/dependabot/dependabot-secrets-button.md index 090e35d2e2..52c7d535ab 100644 --- a/translations/zh-CN/data/reusables/dependabot/dependabot-secrets-button.md +++ b/translations/zh-CN/data/reusables/dependabot/dependabot-secrets-button.md @@ -1,2 +1,5 @@ -1. In the sidebar, click **{% data variables.product.prodname_dependabot %}**.{% ifversion fpt or ghec %} ![{% data variables.product.prodname_dependabot %} secrets sidebar option](/assets/images/help/dependabot/dependabot-secrets.png){% else %} -![{% data variables.product.prodname_dependabot %} secrets sidebar option](/assets/images/enterprise/3.3/dependabot/dependabot-secrets.png){% endif %} +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Security" section of the sidebar, select **{% octicon "key-asterisk" aria-label="The key-asterisk icon" %} Secrets**, then click **{% data variables.product.prodname_dependabot %}**. +{% elsif ghes > 3.2%} +1. 在侧边栏中,单击 **{% data variables.product.prodname_dependabot %}**。 ![{% data variables.product.prodname_dependabot %} 密钥边栏选项](/assets/images/enterprise/3.3/dependabot/dependabot-secrets.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/enterprise-accounts/emu-password-reset-session.md b/translations/zh-CN/data/reusables/enterprise-accounts/emu-password-reset-session.md index 5d4180b8ef..21c3437455 100644 --- a/translations/zh-CN/data/reusables/enterprise-accounts/emu-password-reset-session.md +++ b/translations/zh-CN/data/reusables/enterprise-accounts/emu-password-reset-session.md @@ -1 +1 @@ -If you need to reset the password for your setup user, use an incognito or private browsing window to request a new password. When the email arrives with the link to reset your password, copy the link into your browser. For more information on resetting your password, see "[Requesting a new password ](/github/authenticating-to-github/keeping-your-account-and-data-secure/updating-your-github-access-credentials#requesting-a-new-password)." +If you need to reset the password for your setup user, contact {% data variables.contact.github_support %} through the {% data variables.contact.contact_enterprise_portal %}. diff --git a/translations/zh-CN/data/reusables/enterprise_management_console/save-settings.md b/translations/zh-CN/data/reusables/enterprise_management_console/save-settings.md index ad4495169a..abf2d6c5d8 100644 --- a/translations/zh-CN/data/reusables/enterprise_management_console/save-settings.md +++ b/translations/zh-CN/data/reusables/enterprise_management_console/save-settings.md @@ -1,2 +1,2 @@ 1. 在左侧边栏下,单击 **Save settings(保存设置)**。 ![{% data variables.enterprise.management_console %} 中的 Save settings 按钮](/assets/images/enterprise/management-console/save-settings.png) -1. 等待配置运行完毕。 +{% data reusables.enterprise_site_admin_settings.wait-for-configuration-run %} \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/enterprise_site_admin_settings/tls-downtime.md b/translations/zh-CN/data/reusables/enterprise_site_admin_settings/tls-downtime.md new file mode 100644 index 0000000000..a1cc2ae3c0 --- /dev/null +++ b/translations/zh-CN/data/reusables/enterprise_site_admin_settings/tls-downtime.md @@ -0,0 +1,5 @@ +{% warning %} + +**Warning:** Configuring TLS causes a small amount of downtime for {% data variables.product.product_location %}. + +{% endwarning %} diff --git a/translations/zh-CN/data/reusables/enterprise_site_admin_settings/wait-for-configuration-run.md b/translations/zh-CN/data/reusables/enterprise_site_admin_settings/wait-for-configuration-run.md new file mode 100644 index 0000000000..bfbfefb4de --- /dev/null +++ b/translations/zh-CN/data/reusables/enterprise_site_admin_settings/wait-for-configuration-run.md @@ -0,0 +1,3 @@ +1. 等待配置运行完毕。 + + ![配置实例](/assets/images/enterprise/management-console/configuration-run.png) diff --git a/translations/zh-CN/data/reusables/gated-features/user-repo-collaborators.md b/translations/zh-CN/data/reusables/gated-features/user-repo-collaborators.md index f560e75486..319b8698fd 100644 --- a/translations/zh-CN/data/reusables/gated-features/user-repo-collaborators.md +++ b/translations/zh-CN/data/reusables/gated-features/user-repo-collaborators.md @@ -1 +1,4 @@ -如果您使用的是 {% data variables.product.prodname_free_user %},您可以在公共和私有仓库中添加无限的协作者。 +{% ifversion fpt %} +If you're using +{% data variables.product.prodname_free_user %}, you can add unlimited collaborators on public and private repositories. +{% endif %} \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/github-actions/actions-activity-types.md b/translations/zh-CN/data/reusables/github-actions/actions-activity-types.md new file mode 100644 index 0000000000..cf0e471d18 --- /dev/null +++ b/translations/zh-CN/data/reusables/github-actions/actions-activity-types.md @@ -0,0 +1,22 @@ +Some events have activity types that give you more control over when your workflow should run. Use `on..types` to define the type of event activity that will trigger a workflow run. + +For example, the `issue_comment` event has the `created`, `edited`, and `deleted` activity types. If your workflow triggers on the `label` event, it will run whenever a label is created, edited, or deleted. If you specify the `created` activity type for the `label` event, your workflow will run when a label is created but not when a label is edited or deleted. + +```yaml +on: + label: + types: + - created +``` + +If you specify multiple activity types, only one of those event activity types needs to occur to trigger your workflow. If multiple triggering event activity types for your workflow occur at the same time, multiple workflow runs will be triggered. For example, the following workflow triggers when an issue is opened or labeled. If an issue with two labels is opened, three workflow runs will start: one for the issue opened event and two for the two issue labeled events. + +```yaml +on: + issue: + types: + - opened + - labeled +``` + +有关每个事件及其活动类型的更多信息,请参阅“[触发工作流程的事件](/actions/using-workflows/events-that-trigger-workflows)”。 diff --git a/translations/zh-CN/data/reusables/github-actions/actions-filters.md b/translations/zh-CN/data/reusables/github-actions/actions-filters.md new file mode 100644 index 0000000000..549ef0190e --- /dev/null +++ b/translations/zh-CN/data/reusables/github-actions/actions-filters.md @@ -0,0 +1,11 @@ +Some events have filters that give you more control over when your workflow should run. + +For example, the `push` event has a `branches` filter that causes your workflow to run only when a push to a branch that matches the `branches` filter occurs, instead of when any push occurs. + +```yaml +on: + push: + branches: + - main + - 'releases/**' +``` \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/github-actions/actions-multiple-types.md b/translations/zh-CN/data/reusables/github-actions/actions-multiple-types.md new file mode 100644 index 0000000000..0a904faa5c --- /dev/null +++ b/translations/zh-CN/data/reusables/github-actions/actions-multiple-types.md @@ -0,0 +1,18 @@ +If you specify activity types or filters for an event and your workflow triggers on multiple events, you must configure each event separately. You must append a colon (`:`) to all events, including events without configuration. + +For example, a workflow with the following `on` value will run when: + +- A label is created +- A push is made to the `main` branch in the repository +- A push is made to a {% data variables.product.prodname_pages %}-enabled branch + +```yaml +on: + label: + types: + - created + push: + branches: + - main + page_build: +``` diff --git a/translations/zh-CN/data/reusables/github-actions/actions-on-examples.md b/translations/zh-CN/data/reusables/github-actions/actions-on-examples.md index 9590cce8e5..26d4a25747 100644 --- a/translations/zh-CN/data/reusables/github-actions/actions-on-examples.md +++ b/translations/zh-CN/data/reusables/github-actions/actions-on-examples.md @@ -1,75 +1,19 @@ ### Using a single event -For example, a workflow with the following `on` value will run when a push is made to any branch in the workflow's repository: - -```yaml -on: push -``` +{% data reusables.github-actions.on-single-example %} ### Using multiple events -You can specify a single event or multiple events. For example, a workflow with the following `on` value will run when a push is made to any branch in the repository or when someone forks the repository: - -```yaml -on: [push, fork] -``` - -If you specify multiple events, only one of those events needs to occur to trigger your workflow. If multiple triggering events for your workflow occur at the same time, multiple workflow runs will be triggered. +{% data reusables.github-actions.on-multiple-example %} ### Using activity types -Some events have activity types that give you more control over when your workflow should run. - -For example, the `issue_comment` event has the `created`, `edited`, and `deleted` activity types. If your workflow triggers on the `label` event, it will run whenever a label is created, edited, or deleted. If you specify the `created` activity type for the `label` event, your workflow will run when a label is created but not when a label is edited or deleted. - -```yaml -on: - label: - types: - - created -``` - -If you specify multiple activity types, only one of those event activity types needs to occur to trigger your workflow. If multiple triggering event activity types for your workflow occur at the same time, multiple workflow runs will be triggered. For example, the following workflow triggers when an issue is opened or labeled. If an issue with two labels is opened, three workflow runs will start: one for the issue opened event and two for the two issue labeled events. - -```yaml -on: - issue: - types: - - opened - - labeled -``` +{% data reusables.github-actions.actions-activity-types %} ### Using filters -Some events have filters that give you more control over when your workflow should run. - -For example, the `push` event has a `branches` filter that causes your workflow to run only when a push to a branch that matches the `branches` filter occurs, instead of when any push occurs. - -```yaml -on: - push: - branches: - - main - - 'releases/**' -``` +{% data reusables.github-actions.actions-filters %} ### Using activity types and filters with multiple events -If you specify activity types or filters for an event and your workflow triggers on multiple events, you must configure each event separately. You must append a colon (`:`) to all events, including events without configuration. - -For example, a workflow with the following `on` value will run when: - -- A label is created -- A push is made to the `main` branch in the repository -- A push is made to a {% data variables.product.prodname_pages %}-enabled branch - -```yaml -on: - label: - types: - - created - push: - branches: - - main - page_build: -``` \ No newline at end of file +{% data reusables.github-actions.actions-multiple-types %} \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/github-actions/on-multiple-example.md b/translations/zh-CN/data/reusables/github-actions/on-multiple-example.md new file mode 100644 index 0000000000..66a7708123 --- /dev/null +++ b/translations/zh-CN/data/reusables/github-actions/on-multiple-example.md @@ -0,0 +1,7 @@ +You can specify a single event or multiple events. For example, a workflow with the following `on` value will run when a push is made to any branch in the repository or when someone forks the repository: + +```yaml +on: [push, fork] +``` + +If you specify multiple events, only one of those events needs to occur to trigger your workflow. If multiple triggering events for your workflow occur at the same time, multiple workflow runs will be triggered. diff --git a/translations/zh-CN/data/reusables/github-actions/on-single-example.md b/translations/zh-CN/data/reusables/github-actions/on-single-example.md new file mode 100644 index 0000000000..b8c7046c3e --- /dev/null +++ b/translations/zh-CN/data/reusables/github-actions/on-single-example.md @@ -0,0 +1,5 @@ +For example, a workflow with the following `on` value will run when a push is made to any branch in the workflow's repository: + +```yaml +on: push +``` diff --git a/translations/zh-CN/data/reusables/github-actions/private-repository-forks-options.md b/translations/zh-CN/data/reusables/github-actions/private-repository-forks-options.md new file mode 100644 index 0000000000..4face09e25 --- /dev/null +++ b/translations/zh-CN/data/reusables/github-actions/private-repository-forks-options.md @@ -0,0 +1,3 @@ +- **Run workflows from fork pull requests(从复刻拉取请求运行工作流程)** - 允许用户使用具有只读权限、没有密码访问权限的 `GITHUB_TOKEN`从复刻拉取请求运行工作流程。 +- **Send write tokens to workflows from pull requests(从拉取请求向工作流程发送写入令牌)** - 允许从复刻拉取请求以使用具有写入权限的 `GITHUB_TOKEN`。 +- **Send secrets to workflows from pull requests(从拉取请求向工作流程发送密码)** - 使所有密码可用于拉取请求。 diff --git a/translations/zh-CN/data/reusables/github-actions/private-repository-forks-overview.md b/translations/zh-CN/data/reusables/github-actions/private-repository-forks-overview.md index cbf507d7ae..761c7e2db7 100644 --- a/translations/zh-CN/data/reusables/github-actions/private-repository-forks-overview.md +++ b/translations/zh-CN/data/reusables/github-actions/private-repository-forks-overview.md @@ -1,5 +1 @@ -如果您依赖于使用私有仓库的复刻,您可以配置策略来控制用户如何在 `pull_request` 事件上运行工作流程。 Available to private {% ifversion ghec or ghes or ghae %}and internal{% endif %} repositories only, you can configure these policy settings for {% ifversion ghec %}enterprises, {% elsif ghes or ghae %}your enterprise, {% endif %}organizations, or repositories.{% ifversion ghec or ghes or ghae %} For enterprises, the policies are applied to all repositories in all organizations.{% endif %} - -- **Run workflows from fork pull requests(从复刻拉取请求运行工作流程)** - 允许用户使用具有只读权限、没有密码访问权限的 `GITHUB_TOKEN`从复刻拉取请求运行工作流程。 -- **Send write tokens to workflows from pull requests(从拉取请求向工作流程发送写入令牌)** - 允许从复刻拉取请求以使用具有写入权限的 `GITHUB_TOKEN`。 -- **Send secrets to workflows from pull requests(从拉取请求向工作流程发送密码)** - 使所有密码可用于拉取请求。 +如果您依赖于使用私有仓库的复刻,您可以配置策略来控制用户如何在 `pull_request` 事件上运行工作流程。 Available to private {% ifversion ghec or ghes or ghae %}and internal{% endif %} repositories only, you can configure these policy settings for {% ifversion ghec %}enterprises, {% elsif ghes or ghae %}your enterprise, {% endif %}organizations, or repositories. diff --git a/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-check-mac-linux.md b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-check-mac-linux.md new file mode 100644 index 0000000000..c51ca1a34a --- /dev/null +++ b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-check-mac-linux.md @@ -0,0 +1,3 @@ +```shell +./run.sh --check --url https://github.com/octo-org/octo-repo --pat ghp_abcd1234 +``` \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-configure.md b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-configure.md index b86d3f1e49..482e224aa3 100644 --- a/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-configure.md +++ b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-configure.md @@ -14,3 +14,6 @@ - 运行 `config` 脚本配置自托管运行器应用程序,并向 {% data variables.product.prodname_actions %} 注册。 `config` 脚本需要目标 URL 和自动生成的时间限制令牌来验证请求。 - 在 Windows上,`config` 脚本还会询问您是否想将自托管运行器应用程序安装为服务。 对于 Linux 和 macOS,您可以在完成添加运行器后安装服务。 更多信息请参阅“[将自托管运行器应用程序配置为服务](/actions/automating-your-workflow-with-github-actions/configuring-the-self-hosted-runner-application-as-a-service)”。 - 运行自托管运行器应用程序以将机器连接到 {% data variables.product.prodname_actions %}。 +{% ifversion fpt or ghec or ghes > 3.2 %} + - If you are setting up a cluster of runners, you can install another tool to automatically scale your runners. 更多信息请参阅“[使用自托管运行器自动缩放](/actions/hosting-your-own-runners/autoscaling-with-self-hosted-runners)”。 +{% endif %} diff --git a/translations/zh-CN/data/reusables/github-actions/sidebar-secret.md b/translations/zh-CN/data/reusables/github-actions/sidebar-secret.md index 011cc0a84b..4eabba8e7e 100644 --- a/translations/zh-CN/data/reusables/github-actions/sidebar-secret.md +++ b/translations/zh-CN/data/reusables/github-actions/sidebar-secret.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the left sidebar, click **{% octicon "key-asterisk" aria-label="The key-asterisk icon" %} Secrets**. +{% elsif ghes < 3.4 or ghae %} 1. 在左侧边栏中,单击 **Secrets(密码)**。 +{% endif %} diff --git a/translations/zh-CN/data/reusables/github-actions/supported-github-runners.md b/translations/zh-CN/data/reusables/github-actions/supported-github-runners.md index 383da9c0c7..a23bc3e851 100644 --- a/translations/zh-CN/data/reusables/github-actions/supported-github-runners.md +++ b/translations/zh-CN/data/reusables/github-actions/supported-github-runners.md @@ -64,10 +64,10 @@ Ubuntu 18.04 macOS Big Sur 11

@@ -75,7 +75,7 @@ The macos-latest label currently uses the macOS 10.15 runner image. macOS Catalina 10.15 @@ -83,6 +83,12 @@ macOS Catalina 10.15
-macos-11 +macos-latestmacos-11 -The macos-latest label currently uses the macOS 10.15 runner image. +The macos-latest label currently uses the macOS 11 runner image.
-macos-latestmacos-10.15 +macos-10.15
+{% note %} + +**Note:** The `-latest` virtual environments are the latest stable images that {% data variables.product.prodname_dotcom %} provides, and might not be the most recent version of the operating system available from the operating system vendor. + +{% endnote %} + {% warning %} Note: Beta and Deprecated Images are provided "as-is", "with all faults" and "as available" and are excluded from the service level agreement and warranty. Beta Images may not be covered by customer support. diff --git a/translations/zh-CN/data/reusables/github-actions/workflow-dispatch-inputs.md b/translations/zh-CN/data/reusables/github-actions/workflow-dispatch-inputs.md new file mode 100644 index 0000000000..641db1aa32 --- /dev/null +++ b/translations/zh-CN/data/reusables/github-actions/workflow-dispatch-inputs.md @@ -0,0 +1,34 @@ +When using the `workflow_dispatch` event, you can optionally specify inputs that are passed to the workflow. + +触发的工作流程接收 `github.event.input` 上下文中的输入。 更多信息请参阅“[上下文](/actions/learn-github-actions/contexts#github-context)”。 + +```yaml +on: + workflow_dispatch: + inputs: + logLevel: + description: 'Log level' + required: true + default: 'warning' {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %} + type: choice + options: + - info + - warning + - debug {% endif %} + tags: + description: 'Test scenario tags' + required: false {% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5511 %} + type: boolean + environment: + description: 'Environment to run tests against' + type: environment + required: true {% endif %} + +jobs: + print-tag: + runs-on: ubuntu-latest + + steps: + - name: Print the input tag to STDOUT + run: echo {% raw %} The tag is ${{ github.event.inputs.tag }} {% endraw %} +``` diff --git a/translations/zh-CN/data/reusables/organizations/billing-settings.md b/translations/zh-CN/data/reusables/organizations/billing-settings.md index e7b3ec8d5a..feb35fd556 100644 --- a/translations/zh-CN/data/reusables/organizations/billing-settings.md +++ b/translations/zh-CN/data/reusables/organizations/billing-settings.md @@ -1,4 +1,4 @@ {% data reusables.user_settings.access_settings %} -2. 在设置侧边栏中,单击 **Organizations(组织)**。 ![侧边栏中的组织设置](/assets/images/help/settings/settings-sidebar-organizations.png) +1. In the "Access" section of the sidebar, click **{% octicon "organization" aria-label="The organization icon" %} Organizations**. {% data reusables.profile.org_settings %} -4. 如果您是组织所有者,请在左侧边栏中单击 **Billing & plans(帐单和计划)**。 ![组织设置侧边栏中的计划方案](/assets/images/help/organizations/billing-settings.png) +1. If you are an organization owner, in the "Access" section of the sidebar, click **{% octicon "credit-card" aria-label="The credit-card icon" %} Billing and plans**. diff --git a/translations/zh-CN/data/reusables/organizations/billing_plans.md b/translations/zh-CN/data/reusables/organizations/billing_plans.md index 32b13ca571..ed5792ba3e 100644 --- a/translations/zh-CN/data/reusables/organizations/billing_plans.md +++ b/translations/zh-CN/data/reusables/organizations/billing_plans.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Access" section of the sidebar, click **{% octicon "credit-card" aria-label="The credit card icon" %} Billing and plans**. +{% elsif ghes < 3.4 or ghae %} 1. 在组织的 Settings(设置)侧边栏中,单击 **Billing & plans(帐单和计划)**。 ![帐单设置](/assets/images/help/billing/settings_organization_billing_plans_tab.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/organizations/block_users.md b/translations/zh-CN/data/reusables/organizations/block_users.md index 93cece43b6..10efc741f5 100644 --- a/translations/zh-CN/data/reusables/organizations/block_users.md +++ b/translations/zh-CN/data/reusables/organizations/block_users.md @@ -1 +1 @@ -1. 在组织的 Settings(设置)侧边栏中,单击 **Blocked users(被阻止的用户)**。 ![组织设置中被阻止的用户](/assets/images/help/organizations/org-settings-block-users.png) +1. In the "Access" section of the sidebar, select **{% octicon "report" aria-label="The report icon" %} Moderation**, then click **Blocked users**. diff --git a/translations/zh-CN/data/reusables/organizations/click-codespaces.md b/translations/zh-CN/data/reusables/organizations/click-codespaces.md index fa9c09b609..2f409b474f 100644 --- a/translations/zh-CN/data/reusables/organizations/click-codespaces.md +++ b/translations/zh-CN/data/reusables/organizations/click-codespaces.md @@ -1 +1 @@ -1. 在左侧边栏中,单击 **Codespaces**。 ![左侧边栏中的"Codespaces"选项卡](/assets/images/help/organizations/codespaces-sidebar-tab.png) +1. In the left sidebar, click **{% octicon "codespaces" aria-label="The codespaces icon" %} Codespaces**. diff --git a/translations/zh-CN/data/reusables/organizations/github-apps-settings-sidebar.md b/translations/zh-CN/data/reusables/organizations/github-apps-settings-sidebar.md index b52ff17a49..a606fbb1fe 100644 --- a/translations/zh-CN/data/reusables/organizations/github-apps-settings-sidebar.md +++ b/translations/zh-CN/data/reusables/organizations/github-apps-settings-sidebar.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the left sidebar, select **{% octicon "code" aria-label="The code icon" %} Developer settings** then click **{% data variables.product.prodname_github_apps %}**. +{% elsif ghes < 3.4 or ghae %} 1. 在左侧边栏中,单击 **{% data variables.product.prodname_github_apps %}**。 ![{% data variables.product.prodname_github_apps %} 设置](/assets/images/help/organizations/github-apps-settings-sidebar.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/organizations/member-privileges.md b/translations/zh-CN/data/reusables/organizations/member-privileges.md index af24c6cc18..e2427fc02c 100644 --- a/translations/zh-CN/data/reusables/organizations/member-privileges.md +++ b/translations/zh-CN/data/reusables/organizations/member-privileges.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Access" section of the sidebar, click **{% octicon "people" aria-label="The people icon" %} Member privileges**. +{% elsif ghae or ghes < 3.4 %} 4. 在左侧边栏中,单击 **Member privileges(成员权限)**。 ![组织设置中的成员权限选项](/assets/images/help/organizations/org-settings-member-privileges.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/organizations/moderation-settings.md b/translations/zh-CN/data/reusables/organizations/moderation-settings.md index 1760193680..b79fd4132d 100644 --- a/translations/zh-CN/data/reusables/organizations/moderation-settings.md +++ b/translations/zh-CN/data/reusables/organizations/moderation-settings.md @@ -1 +1 @@ -1. 在左侧边栏中,单击 **Moderation settings(仲裁设置)**。 ![Moderation settings in organization's settings](/assets/images/help/organizations/org-settings-moderation-settings.png) +1. In the "Access" section of the sidebar, select **{% octicon "report" aria-label="The report icon" %} Moderation** diff --git a/translations/zh-CN/data/reusables/organizations/oauth_app_access.md b/translations/zh-CN/data/reusables/organizations/oauth_app_access.md index 6b01d0f357..a2dc8773f5 100644 --- a/translations/zh-CN/data/reusables/organizations/oauth_app_access.md +++ b/translations/zh-CN/data/reusables/organizations/oauth_app_access.md @@ -1,3 +1 @@ -{% ifversion fpt or ghec %} - 1. 在 Setting(设置)侧边栏中,单击 **Third-party access(第三方访问)**。 ![左侧边栏中的 {% data variables.product.prodname_oauth_app %} 访问选项卡](/assets/images/help/settings/settings-sidebar-third-party-access.png) -{% endif %} +1. In the "Integrations" section of the sidebar, click **{% octicon "key" aria-label="The key icon" %} Third-party access**. diff --git a/translations/zh-CN/data/reusables/organizations/org-settings-repository-roles.md b/translations/zh-CN/data/reusables/organizations/org-settings-repository-roles.md index 36412844f2..937618670b 100644 --- a/translations/zh-CN/data/reusables/organizations/org-settings-repository-roles.md +++ b/translations/zh-CN/data/reusables/organizations/org-settings-repository-roles.md @@ -1 +1 @@ -4. 在左边栏中,单击 **Repository roles(仓库角色)**。 ![组织设置中的仓库角色选项卡](/assets/images/help/organizations/org-settings-repository-roles.png) +1. In the "Access" section of the sidebar, click **{% octicon "id-badge" aria-label="The ID badge icon" %} Repository roles**. diff --git a/translations/zh-CN/data/reusables/organizations/repository-defaults.md b/translations/zh-CN/data/reusables/organizations/repository-defaults.md index 1482a43ed2..9d30bab3cc 100644 --- a/translations/zh-CN/data/reusables/organizations/repository-defaults.md +++ b/translations/zh-CN/data/reusables/organizations/repository-defaults.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Code, planning, and automation" section of the sidebar, select **{% octicon "repo" aria-label="The repo icon" %} Repository**, then click **Repository defaults**. +{% elsif ghes < 3.4 or ghae %} 1. 在左边栏中,单击 **Repository defaults(仓库默认值)**。 ![仓库默认值选项卡](/assets/images/help/organizations/repo-defaults-tab.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/organizations/repository-labels.md b/translations/zh-CN/data/reusables/organizations/repository-labels.md index 0d9782e24b..29ff1db260 100644 --- a/translations/zh-CN/data/reusables/organizations/repository-labels.md +++ b/translations/zh-CN/data/reusables/organizations/repository-labels.md @@ -1 +1 @@ -1. 在左侧边栏中,单击 **Repository labels(仓库标签)**。 ![仓库标签选项卡](/assets/images/help/organizations/repo-labels-tab.png) +1. 在左侧边栏中,单击 **Repository labels(仓库标签)**。 diff --git a/translations/zh-CN/data/reusables/organizations/security-and-analysis.md b/translations/zh-CN/data/reusables/organizations/security-and-analysis.md index 67cf5ff384..37774fc461 100644 --- a/translations/zh-CN/data/reusables/organizations/security-and-analysis.md +++ b/translations/zh-CN/data/reusables/organizations/security-and-analysis.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Security" section of the sidebar, click **{% octicon "codescan" aria-label="The codescan icon" %} Code security and analysis**. +{% elsif ghes < 3.4 or ghae %} 1. 在左侧边栏中,单击 **Security & analysis(安全和分析)**。 ![组织设置中的"Security & analysis(安全和分析)"选项卡](/assets/images/help/organizations/org-settings-security-and-analysis.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/organizations/security.md b/translations/zh-CN/data/reusables/organizations/security.md index ef78aea678..9a20cf5fe7 100644 --- a/translations/zh-CN/data/reusables/organizations/security.md +++ b/translations/zh-CN/data/reusables/organizations/security.md @@ -1,3 +1,7 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Security" section of the sidebar, click **{% octicon "shield-lock" aria-label="The shield-lock icon" %} Authentication security**. +{% else %} 1. 在左边栏中,单击 **Organization security(组织安全)**。 ![组织安全设置](/assets/images/help/organizations/org-security-settings-tab.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/organizations/teams_sidebar.md b/translations/zh-CN/data/reusables/organizations/teams_sidebar.md index c9a4975123..8725b2c756 100644 --- a/translations/zh-CN/data/reusables/organizations/teams_sidebar.md +++ b/translations/zh-CN/data/reusables/organizations/teams_sidebar.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Access" section of the sidebar, click **{% octicon "comment-discussion" aria-label="The comment-discussion icon" %} Team discussions**. +{% else %} 1. 在 Settings(设置)侧边栏中,单击 **Teams(团队)**。 ![组织设置侧边栏中的团队选项卡](/assets/images/help/settings/settings-sidebar-team-settings.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/organizations/verified-domains.md b/translations/zh-CN/data/reusables/organizations/verified-domains.md index 4f14c36bf6..2c428cfd09 100644 --- a/translations/zh-CN/data/reusables/organizations/verified-domains.md +++ b/translations/zh-CN/data/reusables/organizations/verified-domains.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Security" section of the sidebar, click **{% octicon "verified" aria-label="The verified icon" %} Verified and approved domains**. +{% elsif ghes < 3.4 or ghae %} 1. 在左侧边栏中,单击 **Verified & approved domains(已验证并批准的域名)**。 ![“已验证并批准的域名”选项卡](/assets/images/help/organizations/verified-domains-button.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/pages/sidebar-pages.md b/translations/zh-CN/data/reusables/pages/sidebar-pages.md index 542e8e1d28..39aac8496d 100644 --- a/translations/zh-CN/data/reusables/pages/sidebar-pages.md +++ b/translations/zh-CN/data/reusables/pages/sidebar-pages.md @@ -1,3 +1,5 @@ -{% ifversion fpt or ghes > 3.1 or ghec %} +{% ifversion fpt or ghes > 3.3 or ghec or ghae-issue-5658 %} +1. In the "Code & operations" section of the sidebar, click **{% octicon "browser" aria-label="The browser icon" %} Pages**. +{% else %} 1. 在左侧边栏中,单击 **Pages(页面)**。 ![左侧边栏中的页面选项卡](/assets/images/help/pages/pages-tab.png) {% endif %} diff --git a/translations/zh-CN/data/reusables/profile/org_member_privileges.md b/translations/zh-CN/data/reusables/profile/org_member_privileges.md new file mode 100644 index 0000000000..c0462ae849 --- /dev/null +++ b/translations/zh-CN/data/reusables/profile/org_member_privileges.md @@ -0,0 +1 @@ +3. Under "Access", click **Member privileges**. ![Screenshot of the member privileges tab](/assets/images/help/organizations/member-privileges.png) diff --git a/translations/zh-CN/data/reusables/reminders/scheduled-reminders.md b/translations/zh-CN/data/reusables/reminders/scheduled-reminders.md index c71cf07ead..b45b072c3c 100644 --- a/translations/zh-CN/data/reusables/reminders/scheduled-reminders.md +++ b/translations/zh-CN/data/reusables/reminders/scheduled-reminders.md @@ -1 +1 @@ -1. 在左侧边栏中,单击 **Scheduled reminders(预定提醒)**。 +1. In the "Integrations" section of the sidebar, click **{% octicon "clock" aria-label="The clock icon" %} Scheduled reminders**. diff --git a/translations/zh-CN/data/reusables/repositories/click-collaborators-teams.md b/translations/zh-CN/data/reusables/repositories/click-collaborators-teams.md new file mode 100644 index 0000000000..300fea61ad --- /dev/null +++ b/translations/zh-CN/data/reusables/repositories/click-collaborators-teams.md @@ -0,0 +1 @@ +1. In the "Access" section of the sidebar, click **{% octicon "people" aria-label="The people icon" %} Collaborators & teams**. diff --git a/translations/zh-CN/data/reusables/repositories/navigate-to-security-and-analysis.md b/translations/zh-CN/data/reusables/repositories/navigate-to-security-and-analysis.md index 957be37239..5db73f5e10 100644 --- a/translations/zh-CN/data/reusables/repositories/navigate-to-security-and-analysis.md +++ b/translations/zh-CN/data/reusables/repositories/navigate-to-security-and-analysis.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Security" section of the sidebar, click **{% octicon "shield-lock" aria-label="The shield-lock icon" %} Security & analysis**. +{% elsif ghes < 3.4 or ghae %} 1. 在左侧边栏中,单击 **Security & analysis(安全和分析)**。 ![仓库设置中的"Security & analysis(安全和分析)"选项卡](/assets/images/help/repository/security-and-analysis-tab.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/repositories/repository-branches.md b/translations/zh-CN/data/reusables/repositories/repository-branches.md index 73e04bea88..679e2d97d8 100644 --- a/translations/zh-CN/data/reusables/repositories/repository-branches.md +++ b/translations/zh-CN/data/reusables/repositories/repository-branches.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Code & operations" section of the sidebar, click **{% octicon "git-branch" aria-label="The git-branch icon" %} Branches**. +{% elsif ghes < 3.4 or ghae %} 1. 在左侧菜单中,单击 **Branches(分支)**。 ![仓库选项子菜单](/assets/images/help/repository/repository-options-branch.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/repositories/sidebar-moderation-reported-content.md b/translations/zh-CN/data/reusables/repositories/sidebar-moderation-reported-content.md index 09e191d5ec..6d184ae816 100644 --- a/translations/zh-CN/data/reusables/repositories/sidebar-moderation-reported-content.md +++ b/translations/zh-CN/data/reusables/repositories/sidebar-moderation-reported-content.md @@ -1 +1 @@ -1. 在左侧边栏中,单击 **Reported content(已报告的内容)**。 ![仓库 Settings(设置)侧边栏中的“Reported content(已报告的内容)”](/assets/images/help/repository/repo-settings-reported-content.png) +1. In the "Access" section of the sidebar, select **{% octicon "comment-discussion" aria-label="The comment-discussion icon" %} Moderation options**, then click **Reported content**. diff --git a/translations/zh-CN/data/reusables/repositories/sidebar-notifications.md b/translations/zh-CN/data/reusables/repositories/sidebar-notifications.md index 28fc5bc9a4..a5de73765d 100644 --- a/translations/zh-CN/data/reusables/repositories/sidebar-notifications.md +++ b/translations/zh-CN/data/reusables/repositories/sidebar-notifications.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Integrations" section of the sidebar, click **{% octicon "mail" aria-label="The mail icon" %} Email notifications**. +{% else %} 1. 单击 **Notifications(通知)**。 ![侧边栏中的通知按钮](/assets/images/help/settings/notifications_menu.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/secret-scanning/partner-secret-list-private-repo.md b/translations/zh-CN/data/reusables/secret-scanning/partner-secret-list-private-repo.md index 9bb6d6cc97..a92cceeae9 100644 --- a/translations/zh-CN/data/reusables/secret-scanning/partner-secret-list-private-repo.md +++ b/translations/zh-CN/data/reusables/secret-scanning/partner-secret-list-private-repo.md @@ -155,6 +155,8 @@ Plivo | Plivo Auth Token | plivo_auth_token{% endif %} Postman | Postman API Key PyPI | PyPI API Token | pypi_api_token{% endif %} {%- ifversion fpt or ghec or ghes > 3.1 or ghae %} RubyGems | RubyGems API Key | rubygems_api_key{% endif %} Samsara | Samsara API Token | samsara_api_token Samsara | Samsara OAuth Access Token | samsara_oauth_access_token +{%- ifversion fpt or ghec or ghes > 3.4 or ghae %} +Segment | Segment Public API Token | segment_public_api_token{% endif %} {%- ifversion fpt or ghec or ghes > 3.1 or ghae %} SendGrid | SendGrid API Key | sendgrid_api_key{% endif %} {%- ifversion fpt or ghec or ghes > 3.2 %} diff --git a/translations/zh-CN/data/reusables/security/compliance-report-list.md b/translations/zh-CN/data/reusables/security/compliance-report-list.md new file mode 100644 index 0000000000..7bce73219d --- /dev/null +++ b/translations/zh-CN/data/reusables/security/compliance-report-list.md @@ -0,0 +1,4 @@ +- SOC 1, Type 2 +- SOC 2, Type 2 +- Cloud Security Alliance CAIQ self-assessment (CSA CAIQ) +- {% data variables.product.prodname_dotcom_the_website %} Services Continuity and Incident Management Plan \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/security/compliance-report-screenshot.md b/translations/zh-CN/data/reusables/security/compliance-report-screenshot.md new file mode 100644 index 0000000000..984c8d6d8b --- /dev/null +++ b/translations/zh-CN/data/reusables/security/compliance-report-screenshot.md @@ -0,0 +1 @@ +![Screenshot of download button to the right of a compliance report](/assets/images/help/settings/compliance-report-download.png) \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/sponsors/sponsors-only-repos.md b/translations/zh-CN/data/reusables/sponsors/sponsors-only-repos.md new file mode 100644 index 0000000000..0361572c97 --- /dev/null +++ b/translations/zh-CN/data/reusables/sponsors/sponsors-only-repos.md @@ -0,0 +1 @@ +You can give all sponsors in a tier access to a private repository by adding the repository to the tier. \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/sponsors/tier-details.md b/translations/zh-CN/data/reusables/sponsors/tier-details.md index 5a698121ed..ed6a1a0f92 100644 --- a/translations/zh-CN/data/reusables/sponsors/tier-details.md +++ b/translations/zh-CN/data/reusables/sponsors/tier-details.md @@ -3,10 +3,11 @@ 您可以自定义每个等级的奖励。 例如,一个等级的奖励可以包括: - 提早使用新版本 - README 中的徽标或名称 -- 访问私有仓库 - 每周时事通讯更新 - 您的赞助者将享受其他奖励 ✨ +{% data reusables.sponsors.sponsors-only-repos %} For more information, see "[Adding a repository to a sponsorship tier](/sponsors/receiving-sponsorships-through-github-sponsors/managing-your-sponsorship-tiers#adding-a-repository-to-a-sponsorship-tier)." + 您可以加入欢迎消息,其中包含有关访问或接收奖励的信息,这些信息在付款后和欢迎电子邮件中可见。 一旦您发布某个等级,便不能编辑这个等级的价格。 而只能撤销该等级并新建一个等级。 现有赞助者将保留在已撤销的等级中,直到他们更改其赞助等级、取消其赞助或其一次性赞助期满。 diff --git a/translations/zh-CN/data/reusables/user-settings/oauth_apps.md b/translations/zh-CN/data/reusables/user-settings/oauth_apps.md index c942d79126..05f0a79025 100644 --- a/translations/zh-CN/data/reusables/user-settings/oauth_apps.md +++ b/translations/zh-CN/data/reusables/user-settings/oauth_apps.md @@ -1 +1 @@ -1. 在左边栏中,单击 **OAuth Apps(OAuth 应用程序)**。 ![OAuth 应用程序部分](/assets/images/help/settings/developer-settings-oauth-apps.png) +1. 在左侧边栏中,单击 **{% data variables.product.prodname_oauth_apps %}**。 ![OAuth 应用程序部分](/assets/images/help/settings/developer-settings-oauth-apps.png) diff --git a/translations/zh-CN/data/reusables/user_settings/access_applications.md b/translations/zh-CN/data/reusables/user_settings/access_applications.md index 22e6ffde79..1c307bc2a7 100644 --- a/translations/zh-CN/data/reusables/user_settings/access_applications.md +++ b/translations/zh-CN/data/reusables/user_settings/access_applications.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Integrations" section of the sidebar, click **{% octicon "apps" aria-label="The apps icon" %} Applications**. +{% else %} 1. 在左侧边栏中,单击 **Applications**。 ![应用程序选项卡](/assets/images/help/settings/settings-applications.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/user_settings/accessibility_settings.md b/translations/zh-CN/data/reusables/user_settings/accessibility_settings.md index b23486a3ff..2c9e37e2f4 100644 --- a/translations/zh-CN/data/reusables/user_settings/accessibility_settings.md +++ b/translations/zh-CN/data/reusables/user_settings/accessibility_settings.md @@ -1 +1 @@ -1. In the navigation on the left hand side, click the **Accessibility** link. ![Screenshot of the user settings navigation. The Accessibility link is highlighted.](/assets/images/help/settings/accessibility-tab.png) +1. In the left sidebar, click **{% octicon "accessibility" aria-label="The accessibility icon" %} Accessibility**. diff --git a/translations/zh-CN/data/reusables/user_settings/account_settings.md b/translations/zh-CN/data/reusables/user_settings/account_settings.md index 3638f2871a..e3cd5d53e4 100644 --- a/translations/zh-CN/data/reusables/user_settings/account_settings.md +++ b/translations/zh-CN/data/reusables/user_settings/account_settings.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-next %} +1. In the left sidebar, click **{% octicon "gear" aria-label="The gear icon" %} Account**. +{% else %} 1. 在左侧边栏中,单击 **Account(帐户)**。 ![帐户设置菜单选项](/assets/images/help/settings/settings-sidebar-account-settings.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/user_settings/appearance-settings.md b/translations/zh-CN/data/reusables/user_settings/appearance-settings.md index 81424365c6..fdd66ad0d7 100644 --- a/translations/zh-CN/data/reusables/user_settings/appearance-settings.md +++ b/translations/zh-CN/data/reusables/user_settings/appearance-settings.md @@ -1,3 +1,7 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the left sidebar, click **{% octicon "paintbrush" aria-label="The paintbrush icon" %} Appearance**. +{% else %} 1. 在用户设置侧边栏中,单击 **Appearance(外观)**。 - ![用户设置侧边栏中的"外观"选项卡](/assets/images/help/settings/appearance-tab.png) \ No newline at end of file + ![用户设置侧边栏中的"外观"选项卡](/assets/images/help/settings/appearance-tab.png) +{% endif %} \ No newline at end of file diff --git a/translations/zh-CN/data/reusables/user_settings/billing_plans.md b/translations/zh-CN/data/reusables/user_settings/billing_plans.md index 704e61bc4d..333102205b 100644 --- a/translations/zh-CN/data/reusables/user_settings/billing_plans.md +++ b/translations/zh-CN/data/reusables/user_settings/billing_plans.md @@ -1 +1 @@ -1. 在用户设置侧边栏中,单击 **Billing & plans(帐单与计划)**。 ![帐单与计划设置](/assets/images/help/settings/settings-sidebar-billing-plans.png) +1. In the "Access" section of the sidebar, click **{% octicon "credit-card" aria-label="The credit-card icon" %} Billing and plans**. diff --git a/translations/zh-CN/data/reusables/user_settings/blocked_users.md b/translations/zh-CN/data/reusables/user_settings/blocked_users.md index 9ea134fc86..b7ba502dca 100644 --- a/translations/zh-CN/data/reusables/user_settings/blocked_users.md +++ b/translations/zh-CN/data/reusables/user_settings/blocked_users.md @@ -1 +1 @@ -1. In your user settings sidebar, click **Blocked users** under **Moderation settings**. ![被阻止的用户选项卡](/assets/images/help/settings/settings-sidebar-blocked-users.png) +1. In the "Access" section of the sidebar, select **{% octicon "report" aria-label="The report icon" %} Moderation** then click **Blocked users**. diff --git a/translations/zh-CN/data/reusables/user_settings/codespaces-tab.md b/translations/zh-CN/data/reusables/user_settings/codespaces-tab.md index a55f54e643..5aa532885e 100644 --- a/translations/zh-CN/data/reusables/user_settings/codespaces-tab.md +++ b/translations/zh-CN/data/reusables/user_settings/codespaces-tab.md @@ -1 +1 @@ -1. 在左侧边栏中,单击 **Codespaces**。 ![用户设置侧边栏中的 Codespaces 选项卡](/assets/images/help/settings/codespaces-tab.png) +1. In the "Code, planning, and automation" section of the sidebar, click **{% octicon "codespaces" aria-label="The codespaces icon" %} Codespaces**. diff --git a/translations/zh-CN/data/reusables/user_settings/developer_settings.md b/translations/zh-CN/data/reusables/user_settings/developer_settings.md index fcf644f8b9..bd27b9e487 100644 --- a/translations/zh-CN/data/reusables/user_settings/developer_settings.md +++ b/translations/zh-CN/data/reusables/user_settings/developer_settings.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the left sidebar, click **{% octicon "code" aria-label="The code icon" %} Developer settings**. +{% else %} 1. 在左侧边栏中,单击 **Developer settings**。 ![开发者设置](/assets/images/help/settings/developer-settings.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/user_settings/emails.md b/translations/zh-CN/data/reusables/user_settings/emails.md index 22083af940..872d53bdea 100644 --- a/translations/zh-CN/data/reusables/user_settings/emails.md +++ b/translations/zh-CN/data/reusables/user_settings/emails.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Access" section of the sidebar, click **{% octicon "mail" aria-label="The mail icon" %} Emails**. +{% else %} 1. 在左侧边栏中,单击 **Emails(电子邮件)**。 ![电子邮件选项卡](/assets/images/help/settings/settings-sidebar-emails.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/user_settings/organizations.md b/translations/zh-CN/data/reusables/user_settings/organizations.md index 3df184cdfe..d593508a58 100644 --- a/translations/zh-CN/data/reusables/user_settings/organizations.md +++ b/translations/zh-CN/data/reusables/user_settings/organizations.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Access" section of the sidebar, click **{% octicon "organization" aria-label="The organization icon" %} Organizations**. +{% else %} 1. 在用户设置侧边栏中,单击 **Organizations(组织)**。 ![组织的用户设置](/assets/images/help/settings/settings-user-orgs.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/user_settings/repo-tab.md b/translations/zh-CN/data/reusables/user_settings/repo-tab.md index e5d4521b02..84701bb7be 100644 --- a/translations/zh-CN/data/reusables/user_settings/repo-tab.md +++ b/translations/zh-CN/data/reusables/user_settings/repo-tab.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Code planning, and automation" section of the sidebar, click **{% octicon "repo" aria-label="The repo icon" %} Repositories**. +{% else %} 1. 在左侧边栏中,单击 **Repositories(仓库)**。 ![仓库选项卡](/assets/images/help/settings/repos-tab.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/user_settings/saved_replies.md b/translations/zh-CN/data/reusables/user_settings/saved_replies.md index e894761ec5..45ece51af1 100644 --- a/translations/zh-CN/data/reusables/user_settings/saved_replies.md +++ b/translations/zh-CN/data/reusables/user_settings/saved_replies.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Code, planning, and automation" section of the sidebar, click **{% octicon "reply" aria-label="The reply icon" %} Saved replies**. +{% else %} 1. 在左侧边栏中,单击 **Saved replies(已保存回复)**。 ![已保存回复选项卡](/assets/images/help/settings/saved-replies-tab.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/user_settings/security-analysis.md b/translations/zh-CN/data/reusables/user_settings/security-analysis.md index 754ff74f87..6fb9cc957f 100644 --- a/translations/zh-CN/data/reusables/user_settings/security-analysis.md +++ b/translations/zh-CN/data/reusables/user_settings/security-analysis.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Security" section of the sidebar, click **{% octicon "shield-lock" aria-label="The shield-lock icon" %} Code security and analysis**. +{% else %} 1. 在左侧边栏中,单击 **Security & analysis(安全和分析)**。 ![安全和分析设置](/assets/images/help/settings/settings-sidebar-security-analysis.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/user_settings/security.md b/translations/zh-CN/data/reusables/user_settings/security.md index 41285e94c1..8998e91180 100644 --- a/translations/zh-CN/data/reusables/user_settings/security.md +++ b/translations/zh-CN/data/reusables/user_settings/security.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Access" section of the sidebar, click **{% octicon "shield-lock" aria-label="The shield-lock icon" %} Password and authentication**. +{% else %} 1. 在左侧边栏中,单击 **Account security(帐户安全)**。 ![用户帐户安全设置](/assets/images/help/settings/settings-sidebar-account-security.png) +{% endif %} diff --git a/translations/zh-CN/data/reusables/user_settings/ssh.md b/translations/zh-CN/data/reusables/user_settings/ssh.md index 56ec9e7e15..35ecc516f5 100644 --- a/translations/zh-CN/data/reusables/user_settings/ssh.md +++ b/translations/zh-CN/data/reusables/user_settings/ssh.md @@ -1 +1,5 @@ +{% ifversion fpt or ghec or ghes > 3.3 or ghae-issue-5658 %} +1. In the "Access" section of the sidebar, click **{% octicon "key" aria-label="The key icon" %} SSH and GPG keys**. +{% else %} 1. 在用户设置侧边栏中,单击 **SSH and GPG keys(SSH 和 GPG 密钥)**。 ![身份验证密钥](/assets/images/help/settings/settings-sidebar-ssh-keys.png) +{% endif %} diff --git a/translations/zh-CN/data/ui.yml b/translations/zh-CN/data/ui.yml index c9552e1e20..190081755e 100644 --- a/translations/zh-CN/data/ui.yml +++ b/translations/zh-CN/data/ui.yml @@ -13,6 +13,7 @@ header: ghes_release_notes_upgrade_patch_only: '📣 这不是 Enterprise Server 最新的补丁版本。' ghes_release_notes_upgrade_release_only: '📣 这不是 Enterprise Server 的最新版本。' ghes_release_notes_upgrade_patch_and_release: '📣 这不是此版本系列的最新修补版,也不是 Enterprise Server 的最新版本。' + sign_up_cta: 注册 picker: language_picker_default_text: Choose a language product_picker_default_text: All products @@ -37,11 +38,12 @@ toc: guides: 指南 whats_new: 新增内容 videos: 视频 + all_changelogs: All changelog posts pages: article_version: '文章版本' miniToc: 本文内容 contributor_callout: 这篇文章的参与者和维护者是 - all_enterprise_releases: 所有企业版本 + all_enterprise_releases: All Enterprise Server releases errors: oops: 哎呀! something_went_wrong: 看来出现了错误。 @@ -159,10 +161,12 @@ product_landing: release_notes_for: 发行说明 upgrade_from: 升级自 browse_all_docs: 浏览所有文档 + browse_all: Browse all + docs: 文档 explore_release_notes: 浏览发行说明 + view: 查看所有 product_guides: - start: 开始 - start_path: 开始路径 + start_path: Start learning path learning_paths: '{{ productMap[currentProduct].name }} 学习路径' learning_paths_desc: 学习路径是一系列帮助您掌握特定主题的指南。 guides: '{{ productMap[currentProduct].name }} 指南'