diff --git a/translations/ja-JP/content/actions/creating-actions/releasing-and-maintaining-actions.md b/translations/ja-JP/content/actions/creating-actions/releasing-and-maintaining-actions.md index dd6856d998..a75f639e0f 100644 --- a/translations/ja-JP/content/actions/creating-actions/releasing-and-maintaining-actions.md +++ b/translations/ja-JP/content/actions/creating-actions/releasing-and-maintaining-actions.md @@ -9,6 +9,7 @@ topics: - Community versions: fpt: '*' + ghec: '*' ghes: '*' ghae: '*' --- @@ -16,7 +17,7 @@ versions: {% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -## はじめに +## Introduction After you create an action, you'll want to continue releasing new features while working with community contributions. This tutorial describes an example process you can follow to release and maintain actions in open source. The example: @@ -37,7 +38,7 @@ JavaScript actions are Node.js repositories with metadata. However, JavaScript a * Dependent packages are committed alongside the code, typically in a compiled and minified form. This means that automated builds and secure community contributions are important. -{% ifversion fpt %} +{% ifversion fpt or ghec %} * Tagged releases can be published directly to {% data variables.product.prodname_marketplace %} and consumed by workflows across {% data variables.product.prodname_dotcom %}. @@ -54,7 +55,7 @@ To support the developer process in the next section, add two {% data variables. ### Example developer process -Here is an example process that you can follow to automatically run tests, create a release{% ifversion fpt%} and publish to {% data variables.product.prodname_marketplace %}{% endif %}, and publish your action. +Here is an example process that you can follow to automatically run tests, create a release{% ifversion fpt or ghec%} and publish to {% data variables.product.prodname_marketplace %}{% endif %}, and publish your action. 1. Do feature work in branches per GitHub flow. For more information, see "[GitHub flow](/get-started/quickstart/github-flow)." * Whenever a commit is pushed to the feature branch, your testing workflow will automatically run the tests. @@ -65,13 +66,13 @@ Here is an example process that you can follow to automatically run tests, creat * **Note:** for security reasons, workflows triggered by `pull_request` from forks have restricted `GITHUB_TOKEN` permissions and do not have access to secrets. If your tests or other workflows triggered upon pull request require access to secrets, consider using a different event like a [manual trigger](/actions/reference/events-that-trigger-workflows#manual-events) or a [`pull_request_target`](/actions/reference/events-that-trigger-workflows#pull_request_target). Read more [here](/actions/reference/events-that-trigger-workflows#pull-request-events-for-forked-repositories). -3. Create a semantically tagged release. {% ifversion fpt %} You may also publish to {% data variables.product.prodname_marketplace %} with a simple checkbox. {% endif %} For more information, see "[Managing releases in a repository](/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release)"{% ifversion fpt %} and "[Publishing actions in {% data variables.product.prodname_marketplace %}](/actions/creating-actions/publishing-actions-in-github-marketplace#publishing-an-action)"{% endif %}. +3. Create a semantically tagged release. {% ifversion fpt or ghec %} You may also publish to {% data variables.product.prodname_marketplace %} with a simple checkbox. {% endif %} For more information, see "[Managing releases in a repository](/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release)"{% ifversion fpt or ghec %} and "[Publishing actions in {% data variables.product.prodname_marketplace %}](/actions/creating-actions/publishing-actions-in-github-marketplace#publishing-an-action)"{% endif %}. * When a release is published or edited, your release workflow will automatically take care of compilation and adjusting tags. * We recommend creating releases using semantically versioned tags – for example, `v1.1.3` – and keeping major (`v1`) and minor (`v1.1`) tags current to the latest appropriate commit. For more information, see "[About custom actions](/actions/creating-actions/about-custom-actions#using-release-management-for-actions)" and "[About semantic versioning](https://docs.npmjs.com/about-semantic-versioning). -### 結果 +### Results Unlike some other automated release management strategies, this process intentionally does not commit dependencies to the `main` branch, only to the tagged release commits. By doing so, you encourage users of your action to reference named tags or `sha`s, and you help ensure the security of third party pull requests by doing the build yourself during a release. @@ -81,12 +82,12 @@ Using semantic releases means that the users of your actions can pin their workf {% data variables.product.product_name %} provides tools and guides to help you work with the open source community. Here are a few tools we recommend setting up for healthy bidirectional communication. By providing the following signals to the community, you encourage others to use, modify, and contribute to your action: -* Maintain a `README` with plenty of usage examples and guidance. 詳しい情報については「[README について](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes)」を参照してください。 -* Include a workflow status badge in your `README` file. For more information, see "[Adding a workflow status badge](/actions/managing-workflow-runs/adding-a-workflow-status-badge)." Also visit [shields.io](https://shields.io/) to learn about other badges that you can add.{% ifversion fpt %} +* Maintain a `README` with plenty of usage examples and guidance. For more information, see "[About READMEs](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes)." +* Include a workflow status badge in your `README` file. For more information, see "[Adding a workflow status badge](/actions/managing-workflow-runs/adding-a-workflow-status-badge)." Also visit [shields.io](https://shields.io/) to learn about other badges that you can add.{% ifversion fpt or ghec %} * Add community health files like `CODE_OF_CONDUCT`, `CONTRIBUTING`, and `SECURITY`. For more information, see "[Creating a default community health file](/github/building-a-strong-community/creating-a-default-community-health-file#supported-file-types)."{% endif %} * Keep issues current by utilizing actions like [actions/stale](https://github.com/actions/stale). -## 参考リンク +## Further reading Examples where similar patterns are employed include: diff --git a/translations/ja-JP/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md b/translations/ja-JP/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md index 0eeb48fcec..6713a9da75 100644 --- a/translations/ja-JP/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md +++ b/translations/ja-JP/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md @@ -1,7 +1,7 @@ --- title: Using environments for deployment shortTitle: Use environments for deployment -intro: 保護ルールとシークレットを持つ環境を設定できます。 A workflow job that references an environment must follow any protection rules for the environment before running or accessing the environment's secrets. +intro: You can configure environments with protection rules and secrets. A workflow job that references an environment must follow any protection rules for the environment before running or accessing the environment's secrets. product: '{% data reusables.gated-features.environments %}' miniTocMaxHeadingLevel: 3 redirect_from: @@ -17,56 +17,58 @@ versions: {% data reusables.actions.ae-beta %} -## 環境について +## About environments Environments are used to describe a general deployment target like `production`, `staging`, or `development`. When a {% data variables.product.prodname_actions %} workflow deploys to an environment, the environment is displayed on the main page of the repository. For more information about viewing deployments to environments, see "[Viewing deployment history](/developers/overview/viewing-deployment-history)." -保護ルールとシークレットを持つ環境を設定できます。 ワークフローのジョブが環境を参照すると、その環境の保護ルールをすべてパスするまではジョブは開始されません。 すべての環境の保護ルールをパスするまで、ジョブは環境で定義されているシークレットにアクセスできません。 +You can configure environments with protection rules and secrets. When a workflow job references an environment, the job won't start until all of the environment's protection rules pass. A job also cannot access secrets that are defined in an environment until all the environment protection rules pass. {% ifversion fpt %} {% note %} -**Note:** If you don't use {% data variables.product.prodname_ghe_cloud %} and convert a repository from public to private, any configured protection rules or environment secrets will be ignored, and you will not be able to configure any environments. リポジトリをパブリックに変換して戻せば、以前に設定されていた保護ルールや環境のシークレットにアクセスできるようになります。 {% data reusables.enterprise.link-to-ghec-trial %} +**Note:** You can only configure environments for public repositories. If you convert a repository from public to private, any configured protection rules or environment secrets will be ignored, and you will not be able to configure any environments. If you convert your repository back to public, you will have access to any previously configured protection rules and environment secrets. + +Organizations that use {% data variables.product.prodname_ghe_cloud %} can configure environments for private repositories. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/deployment/targeting-different-environments/using-environments-for-deployment). {% data reusables.enterprise.link-to-ghec-trial %} {% endnote %} {% endif %} -## 環境の保護ルール +## Environment protection rules -環境の保護ルールは、その環境を参照しているジョブが進行する前に特定の条件をパスすることを要求します。 {% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}環境保護ルールを使用して、手動による承認を要求したり、ジョブを遅延させたり、環境を特定のブランチに制限したりすることができます。{% else %}環境保護ルールを使用して、手動による承認を要求したり、ジョブを遅延させたりすることができます。{% endif %} +Environment protection rules require specific conditions to pass before a job referencing the environment can proceed. {% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}You can use environment protection rules to require a manual approval, delay a job, or restrict the environment to certain branches.{% else %}You can use environment protection rules to require a manual approval or delay a job.{% endif %} -### 必須のレビュー担当者 +### Required reviewers -必須のレビュー担当者を使って、特定の人もしくはTeamがその環境を参照するワークフローのジョブを承認しなければならないようにすることができます。 最大で6人のユーザもしくはTeamをレビュー担当者とすることができます。 レビュー担当者は、少なくともそのリポジトリの読み取りアクセス権を持っていなければなりません。 ジョブが進行するため承認が必要なレビュー担当者は1人だけです。 +Use required reviewers to require a specific person or team to approve workflow jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. -必須のレビュー担当者を持つ環境を参照しているジョブのレビューに関する詳しい情報については「[デプロイメントのレビュー](/actions/managing-workflow-runs/reviewing-deployments)」を参照してください。 +For more information on reviewing jobs that reference an environment with required reviewers, see "[Reviewing deployments](/actions/managing-workflow-runs/reviewing-deployments)." -### 待機タイマー +### Wait timer -ジョブが最初にトリガーされた後、特定の時間ジョブを遅延させるために、待機タイマーを使ってください。 時間(分)は、0から43,200(30日)の間の整数でなければなりません。 +Use a wait timer to delay a job for a specific amount of time after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). {% ifversion fpt or ghae-next or ghes > 3.1 or ghec %} -### デプロイメントブランチ +### Deployment branches -デプロイメントブランチを使用して、環境にデプロイできるブランチを制限します。 環境のデプロイメントブランチのオプションは以下のとおりです。 +Use deployment branches to restrict which branches can deploy to the environment. Below are the options for deployment branches for an environment: -* **すべてのブランチ**: リポジトリ内のすべてのブランチを環境にデプロイできます。 -* **保護されたブランチ**: 環境にデプロイできるのはブランチ保護ルールが有効になっているブランチのみです。 リポジトリ内のどのブランチにもブランチ保護ルールが定義されていない場合は、すべてのブランチをデプロイできます。 ブランチ保護ルールの詳細については、「[保護されたブランチについて](/github/administering-a-repository/about-protected-branches)」を参照してください。 -* **選択したブランチ**: 環境にデプロイできるのは指定した名前パターンに一致するブランチのみです。 +* **All branches**: All branches in the repository can deploy to the environment. +* **Protected branches**: Only branches with branch protection rules enabled can deploy to the environment. If no branch protection rules are defined for any branch in the repository, then all branches can deploy. For more information about branch protection rules, see "[About protected branches](/github/administering-a-repository/about-protected-branches)." +* **Selected branches**: Only branches that match your specified name patterns can deploy to the environment. - たとえば、デプロイメントブランチルールとして `releases/*` を指定した場合、名前が `releases/` で始まるブランチのみが環境にデプロイできます。 (ワイルドカード文字は `/` と一致しません。 `release/` で始まり、追加の単一スラッシュを含むブランチを一致させるには、`release/*/*` を使用します。) `main` をデプロイメントブランチルールとして追加すると、`main` という名前のブランチも環境にデプロイできます。 デプロイメントブランチの構文オプションの詳細については、[Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch) のドキュメントを参照してください。 + For example, if you specify `releases/*` as a deployment branch rule, only branches whose name begins with `releases/` can deploy to the environment. (Wildcard characters will not match `/`. To match branches that begin with `release/` and contain an additional single slash, use `release/*/*`.) If you add `main` as a deployment branch rule, a branch named `main` can also deploy to the environment. For more information about syntax options for deployment branches, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). {% endif %} -## 環境のシークレット +## Environment secrets -環境に保存されたシークレットは、その環境を参照するワークフロージョブからのみ利用できます。 環境が承認を必要とするなら、ジョブは必須のレビュー担当者の一人が承認するまで環境のシークレットにアクセスできません。 シークレットに関する詳しい情報については「[暗号化されたシークレット](/actions/reference/encrypted-secrets)」を参照してください。 +Secrets stored in an environment are only available to workflow jobs that reference the environment. If the environment requires approval, a job cannot access environment secrets until one of the required reviewers approves it. For more information about secrets, see "[Encrypted secrets](/actions/reference/encrypted-secrets)." {% note %} -**注釈:** セルフホストランナーで実行されるワークフローは、環境を使用している場合でも、分離されたコンテナでは実行されません。 Environment secrets should be treated with the same level of security as repository and organization secrets. 詳しい情報については「[GitHub Actionsのためのセキュリティ強化](/actions/learn-github-actions/security-hardening-for-github-actions#hardening-for-self-hosted-runners)」を参照してください。 +**Note:** Workflows that run on self-hosted runners are not run in an isolated container, even if they use environments. Environment secrets should be treated with the same level of security as repository and organization secrets. For more information, see "[Security hardening for GitHub Actions](/actions/learn-github-actions/security-hardening-for-github-actions#hardening-for-self-hosted-runners)." {% endnote %} -## 環境の作成 +## Creating an environment {% data reusables.github-actions.permissions-statement-environment %} @@ -77,7 +79,7 @@ Environments are used to describe a general deployment target like `production`, {% data reusables.github-actions.name-environment %} 1. Optionally, specify people or teams that must approve workflow jobs that use this environment. 1. Select **Required reviewers**. - 1. Enter up to 6 people or teams. ジョブが進行するため承認が必要なレビュー担当者は1人だけです。 + 1. Enter up to 6 people or teams. Only one of the required reviewers needs to approve the job for it to proceed. 1. Click **Save protection rules**. 2. Optionally, specify the amount of time to wait before allowing workflow jobs that use this environment to proceed. 1. Select **Wait timer**. @@ -86,37 +88,37 @@ Environments are used to describe a general deployment target like `production`, 3. Optionally, specify what branches can deploy to this environment. For more information about the possible values, see "[Deployment branches](#deployment-branches)." 1. Select the desired option in the **Deployment branches** dropdown. 1. If you chose **Selected branches**, enter the branch name patterns that you want to allow. -4. Optionally, add environment secrets. These secrets are only available to workflow jobs that use the environment. Additionally, workflow jobs that use this environment can only access these secrets after any configured rules (for example, required reviewers) pass. シークレットに関する詳しい情報については「[暗号化されたシークレット](/actions/reference/encrypted-secrets)」を参照してください。 +4. Optionally, add environment secrets. These secrets are only available to workflow jobs that use the environment. Additionally, workflow jobs that use this environment can only access these secrets after any configured rules (for example, required reviewers) pass. For more information about secrets, see "[Encrypted secrets](/actions/reference/encrypted-secrets)." 1. Under **Environment secrets**, click **Add Secret**. 1. Enter the secret name. 1. Enter the secret value. - 1. [**Add secret(シークレットの追加)**] をクリックします。 + 1. Click **Add secret**. -{% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}REST API を介して環境を作成および設定することもできます。 詳しい情報については、「[環境](/rest/reference/repos#environments)」および「[シークレット](/rest/reference/actions#secrets)」を参照してください。{% endif %} +{% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}You can also create and configure environments through the REST API. For more information, see "[Environments](/rest/reference/repos#environments)" and "[Secrets](/rest/reference/actions#secrets)."{% endif %} -存在しない環境を参照するワークフローを実行すると、参照された名前を持つ環境が作成されます。 新しく作成される環境には、保護ルールやシークレットは設定されていません。 リポジトリのワークフローを編集できる人は、ワークフローファイルを通じて環境を作成できますが、その環境を設定できるのはリポジトリ管理者だけです。 +Running a workflow that references an environment that does not exist will create an environment with the referenced name. The newly created environment will not have any protection rules or secrets configured. Anyone that can edit workflows in the repository can create environments via a workflow file, but only repository admins can configure the environment. ## Using an environment -ワークフロー内の各ジョブは、1つの環境を参照できます。 この環境を参照するとジョブがランナーに送信される前に、環境に設定された保護ルールをパスしなければなりません。 The job can access the environment's secrets only after the job is sent to a runner. +Each job in a workflow can reference a single environment. Any protection rules configured for the environment must pass before a job referencing the environment is sent to a runner. The job can access the environment's secrets only after the job is sent to a runner. -ワークフローが環境を参照する場合、その環境はリポジトリのデプロイメントに現れます。 現在及び以前のデプロイメントの表示に関する詳細については「[デプロイメント履歴の表示](/developers/overview/viewing-deployment-history)」を参照してください。 +When a workflow references an environment, the environment will appear in the repository's deployments. For more information about viewing current and previous deployments, see "[Viewing deployment history](/developers/overview/viewing-deployment-history)." {% data reusables.actions.environment-example %} -## 環境の削除 +## Deleting an environment {% data reusables.github-actions.permissions-statement-environment %} -環境を削除すると、その環境に関連づけられたすべてのシークレットと保護ルールが削除されます。 削除された環境の保護ルールのために待機していたジョブは、自動的に失敗します。 +Deleting an environment will delete all secrets and protection rules associated with the environment. Any jobs currently waiting because of protection rules from the deleted environment will automatically fail. {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.github-actions.sidebar-environment %} -1. 削除する環境の横にある {% octicon "trash" aria-label="The trash icon" %} をクリックします。 -2. **I understand, delete this environment(分かりました、この環境を削除してください)**をクリックしてください。 +1. Next to the environment that you want to delete, click {% octicon "trash" aria-label="The trash icon" %}. +2. Click **I understand, delete this environment**. -{% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}REST API を介して環境を削除することもできます。 詳しい情報については、「[環境](/rest/reference/repos#environments)」を参照してください。{% endif %} +{% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}You can also delete environments through the REST API. For more information, see "[Environments](/rest/reference/repos#environments)."{% endif %} ## How environments relate to deployments @@ -124,6 +126,6 @@ Environments are used to describe a general deployment target like `production`, You can access these objects through the REST API or GraphQL API. You can also subscribe to these webhook events. For more information, see "[Repositories](/rest/reference/repos#deployments)" (REST API), "[Objects]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/reference/objects#deployment)" (GraphQL API), or "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment)." -## 次のステップ +## Next steps {% data variables.product.prodname_actions %} provides several features for managing your deployments. For more information, see "[Deploying with GitHub Actions](/actions/deployment/deploying-with-github-actions)." diff --git a/translations/ja-JP/content/actions/guides.md b/translations/ja-JP/content/actions/guides.md index 9d997caff4..2c15577f19 100644 --- a/translations/ja-JP/content/actions/guides.md +++ b/translations/ja-JP/content/actions/guides.md @@ -65,3 +65,4 @@ includeGuides: - /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions - /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot --- + diff --git a/translations/ja-JP/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md b/translations/ja-JP/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md index a5e86468c5..ebfb2eed08 100644 --- a/translations/ja-JP/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md +++ b/translations/ja-JP/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md @@ -1,6 +1,6 @@ --- -title: セルフホストランナーの追加 -intro: リポジトリ、Organization、Enterpriseにセルフホストランナーを追加できます。 +title: Adding self-hosted runners +intro: 'You can add a self-hosted runner to a repository, an organization, or an enterprise.' redirect_from: - /github/automating-your-workflow-with-github-actions/adding-self-hosted-runners - /actions/automating-your-workflow-with-github-actions/adding-self-hosted-runners @@ -18,25 +18,25 @@ shortTitle: Add self-hosted runners {% data reusables.actions.enterprise-github-hosted-runners %} {% data reusables.actions.ae-beta %} -リポジトリ、Organization、Enterpriseにセルフホストランナーを追加できます。 +You can add a self-hosted runner to a repository, an organization, or an enterprise. -Organization または Enterprise 管理者の場合は、Organization または Enterprise レベルでセルフホストランナーを追加することをお勧めします。 このアプローチにより、Organization または Enterprise 内の複数のリポジトリでランナーを使用できるようになり、ランナーを1か所で管理することもできます。 +If you are an organization or enterprise administrator, you might want to add your self-hosted runners at the organization or enterprise level. This approach makes the runner available to multiple repositories in your organization or enterprise, and also lets you to manage your runners in one place. -セルフホストランナーでサポートされているオペレーティングシステム、あるいはプロキシサーバーとセルフホストランナーを使う方法に関する情報については、「[セルフホストランナーについて](/github/automating-your-workflow-with-github-actions/about-self-hosted-runners)」を参照してください。 +For information on supported operating systems for self-hosted runners, or using self-hosted runners with a proxy server, see "[About self-hosted runners](/github/automating-your-workflow-with-github-actions/about-self-hosted-runners)." {% ifversion not ghae %} {% warning %} -**警告:** {% data reusables.github-actions.self-hosted-runner-security %} +**Warning:** {% data reusables.github-actions.self-hosted-runner-security %} -詳しい情報については「[セルフホストランナーについて](/github/automating-your-workflow-with-github-actions/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)」を参照してください。 +For more information, see "[About self-hosted runners](/github/automating-your-workflow-with-github-actions/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)." {% endwarning %} {% endif %} -## リポジトリへのセルフホストランナーの追加 +## Adding a self-hosted runner to a repository -単一のリポジトリにセルフホストランナーを追加できます。 セルフホストランナーをユーザのリポジトリに追加するには、リポジトリのオーナーでなければなりません。 Organizationのリポジトリの場合は、Organizationのオーナーであるか、そのリポジトリの管理アクセスを持っていなければなりません。 For information about how to add a self-hosted runner with the REST API, see "[Self-hosted runners](/rest/reference/actions#self-hosted-runners)." +You can add self-hosted runners to a single repository. To add a self-hosted runner to a user repository, you must be the repository owner. For an organization repository, you must be an organization owner or have admin access to the repository. For information about how to add a self-hosted runner with the REST API, see "[Self-hosted runners](/rest/reference/actions#self-hosted-runners)." {% ifversion fpt or ghec %} {% data reusables.repositories.navigate-to-repo %} @@ -50,15 +50,14 @@ Organization または Enterprise 管理者の場合は、Organization または {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.github-actions.settings-sidebar-actions-runners %} -1. GitHub Insightsの -{% ifversion fpt or ghes > 3.1 or ghae or ghec %}"ランナー"{% else %}"セルフホストランナー"{% endif %} で、[**Add runner**] をクリックします。 +1. Under {% ifversion fpt or ghes > 3.1 or ghae or ghec %}"Runners"{% else %}"Self-hosted runners"{% endif %}, click **Add runner**. {% data reusables.github-actions.self-hosted-runner-configure %} {% endif %} {% data reusables.github-actions.self-hosted-runner-check-installation-success %} -## Organizationへのセルフホストランナーの追加 +## Adding a self-hosted runner to an organization -セルフホストランナーをOrganizationのレベルで追加し、Organization内の複数のリポジトリのジョブを処理するために使うことができます。 Organizationにセルフホストランナーを追加するには、Organizationのオーナーでなければなりません。 For information about how to add a self-hosted runner with the REST API, see "[Self-hosted runners](/rest/reference/actions#self-hosted-runners)." +You can add self-hosted runners at the organization level, where they can be used to process jobs for multiple repositories in an organization. To add a self-hosted runner to an organization, you must be an organization owner. For information about how to add a self-hosted runner with the REST API, see "[Self-hosted runners](/rest/reference/actions#self-hosted-runners)." {% ifversion fpt or ghec %} {% data reusables.organizations.navigate-to-org %} @@ -72,8 +71,7 @@ Organization または Enterprise 管理者の場合は、Organization または {% data reusables.organizations.navigate-to-org %} {% data reusables.organizations.org_settings %} {% data reusables.github-actions.settings-sidebar-actions-runners %} -1. GitHub Insightsの -{% ifversion fpt or ghes > 3.1 or ghae or ghec %}"ランナー"{% else %}"セルフホストランナー"{% endif %} で、[**Add runner**] をクリックします。 +1. Under {% ifversion fpt or ghes > 3.1 or ghae or ghec %}"Runners"{% else %}"Self-hosted runners"{% endif %}, click **Add runner**. {% data reusables.github-actions.self-hosted-runner-configure %} {% endif %} @@ -81,14 +79,16 @@ Organization または Enterprise 管理者の場合は、Organization または {% data reusables.github-actions.self-hosted-runner-public-repo-access %} -## セルフホストランナーを Enterprise に追加する +## Adding a self-hosted runner to an enterprise -セルフホストランナーを Enterprise に追加して、複数の Organization に割り当てることができます。 Organization の管理者は、そのランナーを使用できるリポジトリを制御できます。 +{% ifversion fpt %}If you use {% data variables.product.prodname_ghe_cloud %}, you{% elsif ghec or ghes or ghae %}You{% endif %} can add self-hosted runners to an enterprise, where they can be assigned to multiple organizations. The organization admins are then able to control which repositories can use it. {% ifversion fpt %}For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/hosting-your-own-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-an-enterprise).{% endif %} -新しいランナーがデフォルトグループに割り当てられます。 ランナーを登録した後、ランナーのグループを変更できます。 詳しい情報については、「[セルフホストランナーへのアクセスを管理する](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#moving-a-self-hosted-runner-to-a-group)」を参照してください。 +{% ifversion ghec or ghes or ghae %} -{% ifversion fpt or ghec %} -セルフホストランナーを Enterprise アカウントに追加するには、Enterprise のオーナーである必要があります。 For information about how to add a self-hosted runner with the REST API, see the [Enterprise Administration GitHub Actions APIs](/rest/reference/enterprise-admin#github-actions). +New runners are assigned to the default group. You can modify the runner's group after you've registered the runner. For more information, see "[Managing access to self-hosted runners](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#moving-a-self-hosted-runner-to-a-group)." + +{% ifversion ghec %} +To add a self-hosted runner to an enterprise account, you must be an enterprise owner. For information about how to add a self-hosted runner with the REST API, see the [Enterprise Administration GitHub Actions APIs](/rest/reference/enterprise-admin#github-actions). {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} @@ -98,23 +98,25 @@ Organization または Enterprise 管理者の場合は、Organization または {% data reusables.github-actions.self-hosted-runner-configure %} {% endif %} {% ifversion ghae or ghes %} -セルフホストランナーを -{% data variables.product.product_location %} の Enterprise レベルで削除するには、サイト管理者である必要があります。 +To add a self-hosted runner at the enterprise level of {% data variables.product.product_location %}, you must be a site administrator. {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} {% data reusables.enterprise-accounts.actions-runners-tab %} -1. [**Add new**] をクリックし、[**New runner**] をクリックします。 +1. Click **Add new**, then click **New runner**. {% data reusables.github-actions.self-hosted-runner-configure %} {% endif %} +{% ifversion ghec or ghae or ghes %} {% data reusables.github-actions.self-hosted-runner-check-installation-success %} {% data reusables.github-actions.self-hosted-runner-public-repo-access %} +{% endif %} -### Enterprise ランナーをリポジトリで利用可能にする +### Making enterprise runners available to repositories -デフォルトでは、Enterprise の「デフォルト」のセルフホストランナーグループのランナーは、Enterprise 内のすべての Organization で使用できますが、各 Organization のすべてのリポジトリで使用できるわけではありません。 +By default, runners in an enterprise's "Default" self-hosted runner group are available to all organizations in the enterprise, but are not available to all repositories in each organization. -Enterprise レベルのセルフホストランナーグループを Organization リポジトリで使用できるようにするには、ランナーグループの Organization の継承設定を変更して、Organization 内のリポジトリでランナーを使用できるようにする必要がある場合があります。 +To make an enterprise-level self-hosted runner group available to an organization repository, you might need to change the organization's inherited settings for the runner group to make the runner available to repositories in the organization. -ランナーグループのアクセス設定の変更に関する詳しい情報については、「[グループを使用したセルフホストランナーへのアクセスを管理する](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#changing-the-access-policy-of-a-self-hosted-runner-group)」を参照してください。 +For more information on changing runner group access settings, see "[Managing access to self-hosted runners using groups](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#changing-the-access-policy-of-a-self-hosted-runner-group)." +{% endif %} diff --git a/translations/ja-JP/content/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups.md b/translations/ja-JP/content/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups.md index 131a85ddfd..4f0148b6c3 100644 --- a/translations/ja-JP/content/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups.md +++ b/translations/ja-JP/content/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups.md @@ -1,6 +1,6 @@ --- -title: グループを使用してセルフホストランナーへのアクセスを管理する -intro: ポリシーを使用して、Organization または Enterprise に追加されたセルフホストランナーへのアクセスを制限できます。 +title: Managing access to self-hosted runners using groups +intro: You can use policies to limit access to self-hosted runners that have been added to an organization or enterprise. redirect_from: - /actions/hosting-your-own-runners/managing-access-to-self-hosted-runners versions: @@ -17,31 +17,36 @@ shortTitle: Manage runner groups {% data reusables.actions.enterprise-github-hosted-runners %} {% data reusables.actions.ae-beta %} -## セルフホストランナーのグループについて +## About self-hosted runner groups -{% ifversion fpt or ghec %} +{% ifversion fpt %} {% note %} -**注釈:** すべての Organization には、単一のデフォルトのセルフホストランナーグループがあります。 Only enterprise accounts and organizations owned by enterprise accounts can create and manage additional self-hosted runner groups. +**Note:** All organizations have a single default self-hosted runner group. Only enterprise accounts and organizations owned by enterprise accounts can create and manage additional self-hosted runner groups. {% endnote %} + +Self-hosted runner groups are used to control access to self-hosted runners. Organization admins can configure access policies that control which repositories in an organization have access to the runner group. + +If you use {% data variables.product.prodname_ghe_cloud %}, you can create additional runner groups; enterprise admins can configure access policies that control which organizations in an enterprise have access to the runner group; and organization admins can assign additional granular repository access policies to the enterprise runner group. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups). {% endif %} -セルフホストランナーグループは、Organization レベルおよび Enterprise レベルでセルフホストランナーへのアクセスを制御するために使用されます。 Enterprise の管理者は、Enterprise 内のどの Organization がランナーグループにアクセスできるかを制御するアクセスポリシーを設定できます。 Organization の管理者は、Organization 内のどのリポジトリがランナーグループにアクセスできるかを制御するアクセスポリシーを設定できます。 +{% ifversion ghec or ghes or ghae %} +Self-hosted runner groups are used to control access to self-hosted runners at the organization and enterprise level. Enterprise admins can configure access policies that control which organizations in an enterprise have access to the runner group. Organization admins can configure access policies that control which repositories in an organization have access to the runner group. -Enterprise の管理者が Organization にランナーグループへのアクセスを許可すると、Organization の管理者は、Organization のセルフホストランナー設定にリストされたランナーグループを表示できます。 Organization の管理者は、追加の詳細なリポジトリアクセスポリシーを Enterprise ランナーグループに割り当てることができます。 +When an enterprise admin grants an organization access to a runner group, organization admins can see the runner group listed in the organization's self-hosted runner settings. The organizations admins can then assign additional granular repository access policies to the enterprise runner group. -新しいランナーが作成されると、それらは自動的にデフォルトグループに割り当てられます。 ランナーは一度に1つのグループにのみ参加できます。 ランナーはデフォルトグループから別のグループに移動できます。 詳しい情報については、「[セルフホストランナーをグループに移動する](#moving-a-self-hosted-runner-to-a-group)」を参照してください。 +When new runners are created, they are automatically assigned to the default group. Runners can only be in one group at a time. You can move runners from the default group to another group. For more information, see "[Moving a self-hosted runner to a group](#moving-a-self-hosted-runner-to-a-group)." -## Organization のセルフホストランナーグループを作成する +## Creating a self-hosted runner group for an organization -すべての Organization には、単一のデフォルトのセルフホストランナーグループがあります。 Enterprise アカウント内の Organization は、追加のセルフホストグループを作成できます。 Organization の管理者は、個々のリポジトリにランナーグループへのアクセスを許可できます。 For information about how to create a self-hosted runner group with the REST API, see "[Self-hosted runner groups](/rest/reference/actions#self-hosted-runner-groups)." +All organizations have a single default self-hosted runner group. Organizations within an enterprise account can create additional self-hosted groups. Organization admins can allow individual repositories access to a runner group. For information about how to create a self-hosted runner group with the REST API, see "[Self-hosted runner groups](/rest/reference/actions#self-hosted-runner-groups)." -セルフホストランナーは、作成時にデフォルトグループに自動的に割り当てられ、一度に 1 つのグループのメンバーになることができます。 ランナーはデフォルトグループから作成した任意のグループに移動できます。 +Self-hosted runners are automatically assigned to the default group when created, and can only be members of one group at a time. You can move a runner from the default group to any group you create. -グループを作成する場合、ランナーグループにアクセスできるリポジトリを定義するポリシーを選択する必要があります。 +When creating a group, you must choose a policy that defines which repositories have access to the runner group. -{% ifversion fpt or ghec %} +{% ifversion ghec %} {% data reusables.organizations.navigate-to-org %} {% data reusables.organizations.org_settings %} {% data reusables.github-actions.settings-sidebar-actions-runner-groups %} @@ -52,7 +57,7 @@ Enterprise の管理者が Organization にランナーグループへのアク **Warning**: {% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %} - 詳しい情報については「[セルフホストランナーについて](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)」を参照してください。 + For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)." {% endwarning %} {% data reusables.github-actions.self-hosted-runner-create-group %} @@ -63,8 +68,8 @@ Enterprise の管理者が Organization にランナーグループへのアク {% data reusables.github-actions.settings-sidebar-actions-runners %} 1. In the "Self-hosted runners" section, click **Add new**, and then **New group**. - ![新しいランナーを追加](/assets/images/help/settings/actions-org-add-runner-group.png) -1. ランナーグループの名前を入力し、リポジトリアクセスのポリシーを割り当てます。 + ![Add runner group](/assets/images/help/settings/actions-org-add-runner-group.png) +1. Enter a name for your runner group, and assign a policy for repository access. {% ifversion ghes or ghae %} You can configure a runner group to be accessible to a specific list of repositories, or to all repositories in the organization. By default, only private repositories can access runners in a runner group, but you can override this. This setting can't be overridden if configuring an organization's runner group that was shared by an enterprise.{% endif %} @@ -74,23 +79,23 @@ Enterprise の管理者が Organization にランナーグループへのアク {% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %} - 詳しい情報については「[セルフホストランナーについて](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)」を参照してください。 + For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)." {% endwarning %} - ![ランナーグループのオプションを追加](/assets/images/help/settings/actions-org-add-runner-group-options.png) -1. [**Save group**] をクリックしてグループを作成し、ポリシーを適用します。 + ![Add runner group options](/assets/images/help/settings/actions-org-add-runner-group-options.png) +1. Click **Save group** to create the group and apply the policy. {% endif %} -## Enterprise のセルフホストランナーグループを作成する +## Creating a self-hosted runner group for an enterprise -Enterprise は、セルフホストランナーをグループに追加して、アクセス管理を行うことができます。 Enterprise は、Enterprise アカウント内の特定の Organization がアクセスできるセルフホストランナーのグループを作成できます。 Organization の管理者は、追加の詳細なリポジトリアクセスポリシーを Enterprise ランナーグループに割り当てることができます。 For information about how to create a self-hosted runner group with the REST API, see the [Enterprise Administration GitHub Actions APIs](/rest/reference/enterprise-admin#github-actions). +Enterprises can add their self-hosted runners to groups for access management. Enterprises can create groups of self-hosted runners that are accessible to specific organizations in the enterprise account. Organization admins can then assign additional granular repository access policies to the enterprise runner groups. For information about how to create a self-hosted runner group with the REST API, see the [Enterprise Administration GitHub Actions APIs](/rest/reference/enterprise-admin#github-actions). -セルフホストランナーは、作成時にデフォルトグループに自動的に割り当てられ、一度に 1 つのグループのメンバーになることができます。 登録処理中にランナーを特定のグループに割り当てることも、後でランナーをデフォルトグループからカスタムグループに移動することもできます。 +Self-hosted runners are automatically assigned to the default group when created, and can only be members of one group at a time. You can assign the runner to a specific group during the registration process, or you can later move the runner from the default group to a custom group. -グループを作成するときは、ランナーグループにアクセスできる Organization を定義するポリシーを選択する必要があります。 +When creating a group, you must choose a policy that defines which organizations have access to the runner group. -{% ifversion fpt or ghec %} +{% ifversion ghec %} {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} @@ -104,7 +109,7 @@ Enterprise は、セルフホストランナーをグループに追加して、 {% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %} - 詳しい情報については「[セルフホストランナーについて](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)」を参照してください。 + For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)." {% endwarning %} {% data reusables.github-actions.self-hosted-runner-create-group %} @@ -114,10 +119,10 @@ Enterprise は、セルフホストランナーをグループに追加して、 {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} {% data reusables.enterprise-accounts.actions-runners-tab %} -1. [**Add new**] をクリックしてから、[**New group**] をクリックします。 +1. Click **Add new**, and then **New group**. - ![新しいランナーを追加](/assets/images/help/settings/actions-enterprise-account-add-runner-group.png) -1. ランナーグループの名前を入力し、Organization アクセスのポリシーを割り当てます。 + ![Add runner group](/assets/images/help/settings/actions-enterprise-account-add-runner-group.png) +1. Enter a name for your runner group, and assign a policy for organization access. You can configure a runner group to be accessible to a specific list of organizations, or all organizations in the enterprise. By default, only private repositories can access runners in a runner group, but you can override this. This setting can't be overridden if configuring an organization's runner group that was shared by an enterprise. @@ -127,17 +132,18 @@ Enterprise は、セルフホストランナーをグループに追加して、 {% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %} - 詳しい情報については「[セルフホストランナーについて](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)」を参照してください。 + For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)." {% endwarning %} - ![ランナーグループのオプションを追加](/assets/images/help/settings/actions-enterprise-account-add-runner-group-options.png) -1. [**Save group**] をクリックしてグループを作成し、ポリシーを適用します。 + ![Add runner group options](/assets/images/help/settings/actions-enterprise-account-add-runner-group-options.png) +1. Click **Save group** to create the group and apply the policy. +{% endif %} {% endif %} -## セルフホストランナーグループのアクセスポリシーを変更する +## Changing the access policy of a self-hosted runner group -ランナーグループのアクセスポリシーを更新したり、ランナーグループの名前を変更したりすることができます。 +You can update the access policy of a runner group, or rename a runner group. {% ifversion fpt or ghec %} {% data reusables.github-actions.self-hosted-runner-groups-navigate-to-repo-org-enterprise %} {% data reusables.github-actions.settings-sidebar-actions-runner-groups-selection %} @@ -149,13 +155,15 @@ Enterprise は、セルフホストランナーをグループに追加して、 {% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %} - 詳しい情報については「[セルフホストランナーについて](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)」を参照してください。 + For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)." {% endwarning %} {% endif %} {% ifversion ghae or ghes %} {% data reusables.github-actions.self-hosted-runner-configure-runner-group-access %} {% endif %} + +{% ifversion ghec or ghes or ghae %} ## Automatically adding a self-hosted runner to a group You can use the configuration script to automatically add a new self-hosted runner to a group. For example, this command registers a new self-hosted runner and uses the `--runnergroup` parameter to add it to a group named `rg-runnergroup`. @@ -170,32 +178,40 @@ The command will fail if the runner group doesn't exist: Could not find any self-hosted runner group named "rg-runnergroup". ``` -## セルフホストランナーをグループに移動する +## Moving a self-hosted runner to a group If you don't specify a runner group during the registration process, your new self-hosted runners are automatically assigned to the default group, and can then be moved to another group. -{% ifversion fpt or ghec or ghes > 3.1 or ghae-next %} +{% ifversion ghec or ghes > 3.1 or ghae-next %} {% data reusables.github-actions.self-hosted-runner-navigate-to-org-enterprise %} 1. In the "Runners" list, click the runner that you want to configure. -1. Select the Runner group dropdown menu. -1. In "Move runner to group", choose a destination group for the runner. -{% else %} -1. In the "Self-hosted runners" section of the settings page, locate the current group of the runner you want to move and expand the list of group members. ![ランナーグループのメンバーを表示](/assets/images/help/settings/actions-org-runner-group-members.png) -1. セルフホストランナーの横にあるチェックボックスを選択し、[**Move to group**] をクリックして、利用可能な移動先を確認します。 ![ランナーグループのメンバーを移動](/assets/images/help/settings/actions-org-runner-group-member-move.png) -1. 移動先のグループをクリックして、ランナーを移動します。 ![ランナーグループのメンバーを移動](/assets/images/help/settings/actions-org-runner-group-member-move-destination.png) +2. Select the Runner group dropdown menu. +3. In "Move runner to group", choose a destination group for the runner. {% endif %} -## セルフホストランナーグループを削除する +{% ifversion ghes < 3.2 or ghae %} +1. In the "Self-hosted runners" section of the settings page, locate the current group of the runner you want to move and expand the list of group members. + ![View runner group members](/assets/images/help/settings/actions-org-runner-group-members.png) +2. Select the checkbox next to the self-hosted runner, and then click **Move to group** to see the available destinations. + ![Runner group member move](/assets/images/help/settings/actions-org-runner-group-member-move.png) +3. To move the runner, click on the destination group. + ![Runner group member move](/assets/images/help/settings/actions-org-runner-group-member-move-destination.png) +{% endif %} +## Removing a self-hosted runner group -セルフホストランナーは、グループが削除されると自動的にデフォルトグループに戻ります。 +Self-hosted runners are automatically returned to the default group when their group is removed. -{% ifversion fpt or ghes > 3.1 or ghae-next or ghec %} +{% ifversion ghes > 3.1 or ghae-next or ghec %} {% data reusables.github-actions.self-hosted-runner-groups-navigate-to-repo-org-enterprise %} 1. In the list of groups, to the right of the group you want to delete, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}. -1. グループを削除するには、[**Remove group**] をクリックします。 -1. 確認プロンプトを確認し、[**Remove this runner group**] をクリックします。 -{% else %} -1. In the "Self-hosted runners" section of the settings page, locate the group you want to delete, and click the {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} button. ![ランナーグループの設定を表示](/assets/images/help/settings/actions-org-runner-group-kebab.png) - -1. グループを削除するには、[**Remove group**] をクリックします。 ![ランナーグループの設定を表示](/assets/images/help/settings/actions-org-runner-group-remove.png) - -1. 確認プロンプトを確認し、[**Remove this runner group**] をクリックします。 +2. To remove the group, click **Remove group**. +3. Review the confirmation prompts, and click **Remove this runner group**. +{% endif %} +{% ifversion ghes < 3.2 or ghae %} +1. In the "Self-hosted runners" section of the settings page, locate the group you want to delete, and click the {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} button. + ![View runner group settings](/assets/images/help/settings/actions-org-runner-group-kebab.png) + +1. To remove the group, click **Remove group**. + ![View runner group settings](/assets/images/help/settings/actions-org-runner-group-remove.png) + +1. Review the confirmation prompts, and click **Remove this runner group**. +{% endif %} {% endif %} diff --git a/translations/ja-JP/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md b/translations/ja-JP/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md index b492e034f7..31a9273648 100644 --- a/translations/ja-JP/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md +++ b/translations/ja-JP/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md @@ -1,6 +1,6 @@ --- title: Removing self-hosted runners -intro: 'You can permanently remove a self-hosted runner from a repository, an organization, or an enterprise.' +intro: 'You can permanently remove a self-hosted runner from a repository{% ifversion fpt %} or organization{% elsif ghec or ghes or gahe %}, an organization, or an enterprise{% endif %}.' redirect_from: - /github/automating-your-workflow-with-github-actions/removing-self-hosted-runners - /actions/automating-your-workflow-with-github-actions/removing-self-hosted-runners @@ -73,6 +73,10 @@ To remove a self-hosted runner from an organization, you must be an organization {% endif %} ## Removing a runner from an enterprise +{% ifversion fpt %} +If you use {% data variables.product.prodname_ghe_cloud %}, you can also remove runners from an enterprise. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/hosting-your-own-runners/removing-self-hosted-runners#removing-a-runner-from-an-enterprise). +{% endif %} +{% ifversion ghec or ghes or ghae %} {% note %} **Note:** {% data reusables.github-actions.self-hosted-runner-removal-impact %} @@ -80,9 +84,10 @@ To remove a self-hosted runner from an organization, you must be an organization {% data reusables.github-actions.self-hosted-runner-auto-removal %} {% endnote %} + {% data reusables.github-actions.self-hosted-runner-reusing %} -{% ifversion fpt or ghec %} +{% ifversion ghec %} To remove a self-hosted runner from an enterprise account, you must be an enterprise owner. We recommend that you also have access to the self-hosted runner machine. For information about how to add a self-hosted runner with the REST API, see the [Enterprise Administration GitHub Actions APIs](/rest/reference/enterprise-admin#github-actions). {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} @@ -98,3 +103,4 @@ To remove a self-hosted runner at the enterprise level of {% data variables.prod {% data reusables.enterprise-accounts.actions-runners-tab %} {% data reusables.github-actions.self-hosted-runner-removing-a-runner %} {% endif %} +{% endif %} diff --git a/translations/ja-JP/content/actions/learn-github-actions/workflow-syntax-for-github-actions.md b/translations/ja-JP/content/actions/learn-github-actions/workflow-syntax-for-github-actions.md index 1e65fc3ac3..0f7c9d3e51 100644 --- a/translations/ja-JP/content/actions/learn-github-actions/workflow-syntax-for-github-actions.md +++ b/translations/ja-JP/content/actions/learn-github-actions/workflow-syntax-for-github-actions.md @@ -465,7 +465,7 @@ In this example, `job3` uses the `always()` conditional expression so that it al ## `jobs..runs-on` -**Required**. The type of machine to run the job on. The machine can be either a {% data variables.product.prodname_dotcom %}-hosted runner or a self-hosted runner. +**Required**. The type of machine to run the job on. The machine can be either a {% data variables.product.prodname_dotcom %}-hosted runner or a self-hosted runner. You can provide `runs-on` as a single string or as an array of strings. {% ifversion ghae %} ### {% data variables.actions.hosted_runner %}s diff --git a/translations/ja-JP/content/admin/guides.md b/translations/ja-JP/content/admin/guides.md index 88b78e03dc..f6ce6a071c 100644 --- a/translations/ja-JP/content/admin/guides.md +++ b/translations/ja-JP/content/admin/guides.md @@ -137,3 +137,4 @@ includeGuides: - /admin/user-management/suspending-and-unsuspending-users - /admin/overview/creating-an-enterprise-account --- + diff --git a/translations/ja-JP/content/code-security/guides.md b/translations/ja-JP/content/code-security/guides.md index 75295a939c..d232a22a1f 100644 --- a/translations/ja-JP/content/code-security/guides.md +++ b/translations/ja-JP/content/code-security/guides.md @@ -1,6 +1,6 @@ --- -title: コードセキュリティのためのガイド -intro: 'コードのセキュリティの改善を{% data variables.product.product_name %}が支援する様々な方法について学んでください。' +title: Guides for code security +intro: 'Learn about the different ways that {% data variables.product.product_name %} can help you improve your code''s security.' allowTitleToDifferFromFilename: true layout: product-guides versions: @@ -78,3 +78,4 @@ includeGuides: - /code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph - /code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository --- + diff --git a/translations/ja-JP/content/code-security/secret-scanning/managing-alerts-from-secret-scanning.md b/translations/ja-JP/content/code-security/secret-scanning/managing-alerts-from-secret-scanning.md index 79ba60e8b1..f1d15dceea 100644 --- a/translations/ja-JP/content/code-security/secret-scanning/managing-alerts-from-secret-scanning.md +++ b/translations/ja-JP/content/code-security/secret-scanning/managing-alerts-from-secret-scanning.md @@ -1,6 +1,6 @@ --- -title: シークレットスキャンからのアラートを管理する -intro: リポジトリにチェックインしたシークレットのアラートを表示したりクローズしたりすることができます。 +title: Managing alerts from secret scanning +intro: You can view and close alerts for secrets checked in to your repository. product: '{% data reusables.gated-features.secret-scanning %}' redirect_from: - /github/administering-a-repository/managing-alerts-from-secret-scanning @@ -16,51 +16,55 @@ topics: - Advanced Security - Alerts - Repositories -shortTitle: シークレットのアラートの管理 +shortTitle: Manage secret alerts --- {% data reusables.secret-scanning.beta %} -## {% data variables.product.prodname_secret_scanning %}アラートの管理 +## Managing {% data variables.product.prodname_secret_scanning %} alerts {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} -3. 左サイトバーで、[**Secret scanning alerts**] をクリックします。 +3. In the left sidebar, click **Secret scanning alerts**. {% ifversion fpt or ghes or ghec %} - ![[Secret scanning alert] タブ](/assets/images/help/repository/sidebar-secrets.png) + !["Secret scanning alerts" tab](/assets/images/help/repository/sidebar-secrets.png) {% endif %} {% ifversion ghae %} - ![[Secret scanning alert] タブ](/assets/images/enterprise/github-ae/repository/sidebar-secrets-ghae.png) + !["Secret scanning alerts" tab](/assets/images/enterprise/github-ae/repository/sidebar-secrets-ghae.png) {% endif %} -4. [Secret scanning] の下で、表示するアラートをクリックします。 +4. Under "Secret scanning" click the alert you want to view. {% ifversion fpt or ghec %} - ![シークレットスキャンからのアラートのリスト](/assets/images/help/repository/secret-scanning-click-alert.png) + ![List of alerts from secret scanning](/assets/images/help/repository/secret-scanning-click-alert.png) {% endif %} {% ifversion ghes %} - ![シークレットスキャンからのアラートのリスト](/assets/images/help/repository/secret-scanning-click-alert-ghe.png) + ![List of alerts from secret scanning](/assets/images/help/repository/secret-scanning-click-alert-ghe.png) {% endif %} {% ifversion ghae %} - ![シークレットスキャンからのアラートのリスト](/assets/images/enterprise/github-ae/repository/secret-scanning-click-alert-ghae.png) + ![List of alerts from secret scanning](/assets/images/enterprise/github-ae/repository/secret-scanning-click-alert-ghae.png) + {% endif %} +5. {% ifversion fpt or ghec %} + Optionally, use the "Close as" drop-down menu and click a reason for resolving an alert. + {%- elsif ghes or ghae %} + Optionally, use the "Mark as" drop-down menu and click a reason for resolving an alert. {% endif %} -5. 必要に応じて、[Mark as] ドロップダウンメニューを使用して、アラートを解決する理由をクリックします。 {% ifversion fpt or ghec %} - ![シークレットスキャンからのアラートを解決するためのドロップダウンメニュー](/assets/images/help/repository/secret-scanning-resolve-alert.png) + ![Drop-down menu for resolving an alert from secret scanning](/assets/images/help/repository/secret-scanning-resolve-alert.png) {% endif %} {% ifversion ghes or ghae %} - ![シークレットスキャンからのアラートを解決するためのドロップダウンメニュー](/assets/images/help/repository/secret-scanning-resolve-alert-ghe.png) + ![Drop-down menu for resolving an alert from secret scanning](/assets/images/help/repository/secret-scanning-resolve-alert-ghe.png) {% endif %} -## 侵害されたシークレットを保護する +## Securing compromised secrets -シークレットがリポジトリにコミットされたら、シークレットが侵害されたと考える必要があります。 {% data variables.product.prodname_dotcom %} は、侵害されたシークレットに対して次のアクションを行うことをおすすめします。 +Once a secret has been committed to a repository, you should consider the secret compromised. {% data variables.product.prodname_dotcom %} recommends the following actions for compromised secrets: -- 侵害された {% data variables.product.prodname_dotcom %} の個人アクセストークンについては、侵害されたトークンを削除し、新しいトークンを作成し、古いトークンを使っていたサービスを更新してください。 詳しい情報については[コマンドラインのための個人のアクセストークンの作成](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)を参照してください。 -- それ以外のすべてのシークレットについては、最初に {% data variables.product.product_name %} にコミットされたシークレットが有効であることを確認してください。 有効である場合は、新しいシークレットを作成し、古いシークレットを使用するサービスを更新してから、古いシークレットを削除します。 +- For a compromised {% data variables.product.prodname_dotcom %} personal access token, delete the compromised token, create a new token, and update any services that use the old token. For more information, see "[Creating a personal access token for the command line](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)." +- For all other secrets, first verify that the secret committed to {% data variables.product.product_name %} is valid. If so, create a new secret, update any services that use the old secret, and then delete the old secret. {% ifversion fpt or ghes > 3.1 or ghae-issue-4910 or ghec %} -## {% data variables.product.prodname_secret_scanning %}アラートの通知の設定 +## Configuring notifications for {% data variables.product.prodname_secret_scanning %} alerts -新しいシークレットが検出されると、{% data variables.product.product_name %}は通知設定に従ってリポジトリのセキュリティアラートにアクセスできるすべてのユーザに通知します。 You will receive alerts if you are watching the repository, have enabled notifications for security alerts or for all the activity on the repository, are the author of the commit that contains the secret and are not ignoring the repository. +When a new secret is detected, {% data variables.product.product_name %} notifies all users with access to security alerts for the repository according to their notification preferences. You will receive alerts if you are watching the repository, have enabled notifications for security alerts or for all the activity on the repository, are the author of the commit that contains the secret and are not ignoring the repository. -詳しい情報については、「[リポジトリのセキュリティ及び分析の設定の管理](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)」及び「[通知の設定](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#configuring-your-watch-settings-for-an-individual-repository)」を参照してください。 +For more information, see "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)" and "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#configuring-your-watch-settings-for-an-individual-repository)." {% endif %} diff --git a/translations/ja-JP/content/codespaces/guides.md b/translations/ja-JP/content/codespaces/guides.md index e7c97d219a..5607e64f4d 100644 --- a/translations/ja-JP/content/codespaces/guides.md +++ b/translations/ja-JP/content/codespaces/guides.md @@ -1,6 +1,6 @@ --- -title: Codespaces のガイド -shortTitle: ガイド +title: Codespaces guides +shortTitle: Guides product: '{% data reusables.gated-features.codespaces %}' intro: Learn how to make the most of GitHub allowTitleToDifferFromFilename: true @@ -41,3 +41,4 @@ includeGuides: - /codespaces/codespaces-reference/disaster-recovery-for-codespaces - /codespaces/codespaces-reference/security-in-codespaces --- + diff --git a/translations/ja-JP/content/developers/apps/building-github-apps/creating-a-github-app-using-url-parameters.md b/translations/ja-JP/content/developers/apps/building-github-apps/creating-a-github-app-using-url-parameters.md index 5d3b70e9d9..9a34f94af7 100644 --- a/translations/ja-JP/content/developers/apps/building-github-apps/creating-a-github-app-using-url-parameters.md +++ b/translations/ja-JP/content/developers/apps/building-github-apps/creating-a-github-app-using-url-parameters.md @@ -60,8 +60,8 @@ The complete list of available query parameters, permissions, and events is list `webhook_active` | `boolean` | Set to `false` to disable webhook. Webhook is enabled by default. `webhook_url` | `string` | The full URL that you would like to send webhook event payloads to. {% ifversion ghes < 3.2 or ghae %}`webhook_secret` | `string` | You can specify a secret to secure your webhooks. See "[Securing your webhooks](/webhooks/securing/)" for more details. -{% endif %}`events` | `array of strings` | Webhook events. Some webhook events require `read` or `write` permissions for a resource before you can select the event when registering a new {% data variables.product.prodname_github_app %}. See the "[{% data variables.product.prodname_github_app %} webhook events](#github-app-webhook-events)" section for available events and their required permissions. You can select multiple events in a query string. For example, `events[]=public&events[]=label`. -`domain` | `string` | The URL of a content reference. +{% endif %}`events` | `array of strings` | Webhook events. Some webhook events require `read` or `write` permissions for a resource before you can select the event when registering a new {% data variables.product.prodname_github_app %}. See the "[{% data variables.product.prodname_github_app %} webhook events](#github-app-webhook-events)" section for available events and their required permissions. You can select multiple events in a query string. For example, `events[]=public&events[]=label`.{% ifversion ghes < 3.4 %} +`domain` | `string` | The URL of a content reference.{% endif %} `single_file_name` | `string` | This is a narrowly-scoped permission that allows the app to access a single file in any repository. When you set the `single_file` permission to `read` or `write`, this field provides the path to the single file your {% data variables.product.prodname_github_app %} will manage. {% ifversion fpt or ghes or ghec %} If you need to manage multiple files, see `single_file_paths` below. {% endif %}{% ifversion fpt or ghes or ghec %} `single_file_paths` | `array of strings` | This allows the app to access up ten specified files in a repository. When you set the `single_file` permission to `read` or `write`, this array can store the paths for up to ten files that your {% data variables.product.prodname_github_app %} will manage. These files all receive the same permission set by `single_file`, and do not have separate individual permissions. When two or more files are configured, the API returns `multiple_single_files=true`, otherwise it returns `multiple_single_files=false`.{% endif %} @@ -73,8 +73,8 @@ Permission | Description ---------- | ----------- [`administration`](/rest/reference/permissions-required-for-github-apps/#permission-on-administration) | Grants access to various endpoints for organization and repository administration. Can be one of: `none`, `read`, or `write`.{% ifversion fpt or ghec %} [`blocking`](/rest/reference/permissions-required-for-github-apps/#permission-on-blocking) | Grants access to the [Blocking Users API](/rest/reference/users#blocking). Can be one of: `none`, `read`, or `write`.{% endif %} -[`checks`](/rest/reference/permissions-required-for-github-apps/#permission-on-checks) | Grants access to the [Checks API](/rest/reference/checks). Can be one of: `none`, `read`, or `write`. -`content_references` | Grants access to the "[Create a content attachment](/rest/reference/apps#create-a-content-attachment)" endpoint. Can be one of: `none`, `read`, or `write`. +[`checks`](/rest/reference/permissions-required-for-github-apps/#permission-on-checks) | Grants access to the [Checks API](/rest/reference/checks). Can be one of: `none`, `read`, or `write`.{% ifversion ghes < 3.4 %} +`content_references` | Grants access to the "[Create a content attachment](/rest/reference/apps#create-a-content-attachment)" endpoint. Can be one of: `none`, `read`, or `write`.{% endif %} [`contents`](/rest/reference/permissions-required-for-github-apps/#permission-on-contents) | Grants access to various endpoints that allow you to modify repository contents. Can be one of: `none`, `read`, or `write`. [`deployments`](/rest/reference/permissions-required-for-github-apps/#permission-on-deployments) | Grants access to the [Deployments API](/rest/reference/repos#deployments). Can be one of: `none`, `read`, or `write`.{% ifversion fpt or ghes or ghec %} [`emails`](/rest/reference/permissions-required-for-github-apps/#permission-on-emails) | Grants access to the [Emails API](/rest/reference/users#emails). Can be one of: `none`, `read`, or `write`.{% endif %} @@ -109,8 +109,8 @@ Webhook event name | Required permission | Description ------------------ | ------------------- | ----------- [`check_run`](/webhooks/event-payloads/#check_run) |`checks` | {% data reusables.webhooks.check_run_short_desc %} [`check_suite`](/webhooks/event-payloads/#check_suite) |`checks` | {% data reusables.webhooks.check_suite_short_desc %} -[`commit_comment`](/webhooks/event-payloads/#commit_comment) | `contents` | {% data reusables.webhooks.commit_comment_short_desc %} -[`content_reference`](/webhooks/event-payloads/#content_reference) |`content_references` | {% data reusables.webhooks.content_reference_short_desc %} +[`commit_comment`](/webhooks/event-payloads/#commit_comment) | `contents` | {% data reusables.webhooks.commit_comment_short_desc %}{% ifversion ghes < 3.4 %} +[`content_reference`](/webhooks/event-payloads/#content_reference) |`content_references` | {% data reusables.webhooks.content_reference_short_desc %}{% endif %} [`create`](/webhooks/event-payloads/#create) | `contents` | {% data reusables.webhooks.create_short_desc %} [`delete`](/webhooks/event-payloads/#delete) | `contents` | {% data reusables.webhooks.delete_short_desc %} [`deployment`](/webhooks/event-payloads/#deployment) | `deployments` | {% data reusables.webhooks.deployment_short_desc %} diff --git a/translations/ja-JP/content/developers/apps/guides/using-content-attachments.md b/translations/ja-JP/content/developers/apps/guides/using-content-attachments.md index b4bfd735db..8b8ddf5c68 100644 --- a/translations/ja-JP/content/developers/apps/guides/using-content-attachments.md +++ b/translations/ja-JP/content/developers/apps/guides/using-content-attachments.md @@ -1,46 +1,42 @@ --- -title: 添付コンテンツを使用する -intro: 添付コンテンツを使うと、GitHub Appは登録されたドメインにリンクするURLに対し、GitHub内でより多くの情報を提供できます。 GitHubは、アプリケーションから提供された情報を、IssueやPull Requestのボディやコメント内のURLの下に表示します。 +title: Using content attachments +intro: Content attachments allow a GitHub App to provide more information in GitHub for URLs that link to registered domains. GitHub renders the information provided by the app under the URL in the body or comment of an issue or pull request. redirect_from: - /apps/using-content-attachments - /developers/apps/using-content-attachments versions: - fpt: '*' - ghes: '*' - ghae: '*' - ghec: '*' + ghes: '<3.4' topics: - GitHub Apps --- - {% data reusables.pre-release-program.content-attachments-public-beta %} -## 添付コンテンツについて +## About content attachments -GitHub Appは、`content_reference`イベントをトリガーするドメインを登録できます。 Issueまたはプルリクエストの、ボディまたはコメントに、登録されたドメインにリンクするURLが含まれている場合、アプリケーションは[`content_reference` webhook](/webhooks/event-payloads/#content_reference)を受け取ります。 添付コンテンツを使用して、Issueまたはプルリクエストに追加したURLについてのコンテキストやデータを視覚的に追加できます。 URLは、`http://`または`https://`から始まる、完全修飾URLである必要があります。 Markdownリンクの一部であるURLは無視され、`content_reference`イベントをトリガーしません。 +A GitHub App can register domains that will trigger `content_reference` events. When someone includes a URL that links to a registered domain in the body or comment of an issue or pull request, the app receives the [`content_reference` webhook](/webhooks/event-payloads/#content_reference). You can use content attachments to visually provide more context or data for the URL added to an issue or pull request. The URL must be a fully-qualified URL, starting with either `http://` or `https://`. URLs that are part of a markdown link are ignored and don't trigger the `content_reference` event. -{% data variables.product.prodname_unfurls %} APIを使用する前に、以下を行ってGitHub Appのコンテンツ参照を設定する必要があります。 -* アプリケーションに、[Content references] に対する`Read & write`権限を付与します。 -* [Content references] 権限を設定する際に、一般にアクセス可能なドメインを5つまで登録します。 コンテンツ参照ドメインを設定する際は、IPアドレスは使用しないでください。 ドメイン名 (example.com) またはサブドメイン (subdomain.example.com) を登録できます。 -* アプリケーションを [Content reference] イベントにサブスクライブします。 +Before you can use the {% data variables.product.prodname_unfurls %} API, you'll need to configure content references for your GitHub App: +* Give your app `Read & write` permissions for "Content references." +* Register up to 5 valid, publicly accessible domains when configuring the "Content references" permission. Do not use IP addresses when configuring content reference domains. You can register a domain name (example.com) or a subdomain (subdomain.example.com). +* Subscribe your app to the "Content reference" event. -アプリケーションがリポジトリにインストールされると、登録されたドメインへのURLが含まれるIssueまたはプルリクエストのコメントでは、コンテンツ参照イベントが生成されます。 アプリケーションは、コンテンツ参照URLがポストされてから6時間以内に添付コンテンツを作成しなければなりません。 +Once your app is installed on a repository, issue or pull request comments in the repository that contain URLs for your registered domains will generate a content reference event. The app must create a content attachment within six hours of the content reference URL being posted. -添付コンテンツが、URLを遡って更新することはありません。 上記でまとめた要件に従ってアプリケーションを設定した後に、ユーザがリポジトリにアプリケーションをインストールしてから、Issueまたはプルリクエストに追加したURLに対してのみ機能します。 +Content attachments will not retroactively update URLs. It only works for URLs added to issues or pull requests after you configure the app using the requirements outlined above and then someone installs the app on their repository. -GitHub App の権限やイベントのサブスクリプションを設定するために必要なステップに関する詳しい情報については、「<[GitHub App を作成する](/apps/building-github-apps/creating-a-github-app/)」または「[GitHub App の権限を編集する](/apps/managing-github-apps/editing-a-github-app-s-permissions/)」を参照してください。 +See "[Creating a GitHub App](/apps/building-github-apps/creating-a-github-app/)" or "[Editing a GitHub App's permissions](/apps/managing-github-apps/editing-a-github-app-s-permissions/)" for the steps needed to configure GitHub App permissions and event subscriptions. -## 添付コンテンツフローを実装する +## Implementing the content attachment flow -添付コンテンツのフローは、IssueもしくはPull Request中のURL、`content_reference` webhookイベント、追加情報でIssueもしくはPull Requestを更新するために呼ぶ必要があるREST APIエンドポイント間の関係を示します。 +The content attachment flow shows you the relationship between the URL in the issue or pull request, the `content_reference` webhook event, and the REST API endpoint you need to call to update the issue or pull request with additional information: -**ステップ 1.** [添付コンテンツについて](#about-content-attachments)に記載されているガイドラインに従ってアプリケーションを設定します。 添付コンテンツを使い始めるには、[Probotアプリケーションのサンプル](#example-using-probot-and-github-app-manifests)を使うこともできます。 +**Step 1.** Set up your app using the guidelines outlined in [About content attachments](#about-content-attachments). You can also use the [Probot App example](#example-using-probot-and-github-app-manifests) to get started with content attachments. -**ステップ2。**IssueもしくはPull Requestに登録したドメインのURLを追加します。 `http://`もしくは`https://`で始まる完全修飾URLを使わなければなりません。 +**Step 2.** Add the URL for the domain you registered to an issue or pull request. You must use a fully qualified URL that starts with `http://` or `https://`. -![Issueに追加されたURL](/assets/images/github-apps/github_apps_content_reference.png) +![URL added to an issue](/assets/images/github-apps/github_apps_content_reference.png) -**ステップ3。**アプリケーションは`created`アクション付きで[`content_reference` webhook](/webhooks/event-payloads/#content_reference)を受信します。 +**Step 3.** Your app will receive the [`content_reference` webhook](/webhooks/event-payloads/#content_reference) with the action `created`. ``` json { @@ -61,12 +57,12 @@ GitHub App の権限やイベントのサブスクリプションを設定する } ``` -**ステップ4。**アプリケーションはREST APIを使って[添付コンテンツを作成する](/rest/reference/apps#create-a-content-attachment)ために`content_reference` `id`と`repository` `full_name`フィールドを使います。 [GitHub Appのインストール](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)として認証を受けるために、`installation` `id`も必要になります。 +**Step 4.** The app uses the `content_reference` `id` and `repository` `full_name` fields to [Create a content attachment](/rest/reference/apps#create-a-content-attachment) using the REST API. You'll also need the `installation` `id` to authenticate as a [GitHub App installation](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation). {% data reusables.pre-release-program.corsair-preview %} {% data reusables.pre-release-program.api-preview-warning %} -`body`パラメータにはMarkdownが含まれていることがあります。 +The `body` parameter can contain markdown: ```shell curl -X POST \ @@ -74,24 +70,24 @@ curl -X POST \ -H 'Accept: application/vnd.github.corsair-preview+json' \ -H 'Authorization: Bearer $INSTALLATION_TOKEN' \ -d '{ - "title": "[A-1234] Error found in core/models.py file", - "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()" + "title": "[A-1234] Error found in core/models.py file", + "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()" }' ``` -インストールトークンの作成に関する詳しい情報については「[GitHub Appとして認証する](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)」を参照してください。 +For more information about creating an installation token, see "[Authenticating as a GitHub App](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)." -**ステップ5。** Pull RequestもしくはIssueコメント内のリンクの下に、新しい添付コンテンツが表示されます。 +**Step 5.** You'll see the new content attachment appear under the link in a pull request or issue comment: -![Issueのリファレンスに添付されたコンテンツ](/assets/images/github-apps/content_reference_attachment.png) +![Content attached to a reference in an issue](/assets/images/github-apps/content_reference_attachment.png) -## GraphQLでの添付コンテンツの利用 -[`content_reference` webhook](/webhooks/event-payloads/#content_reference)イベント中で`node_id`を提供しているので、GraphQL APIの`createContentAttachment`ミューテーションを参照できます。 +## Using content attachments in GraphQL +We provide the `node_id` in the [`content_reference` webhook](/webhooks/event-payloads/#content_reference) event so you can refer to the `createContentAttachment` mutation in the GraphQL API. {% data reusables.pre-release-program.corsair-preview %} {% data reusables.pre-release-program.api-preview-warning %} -例: +For example: ``` graphql mutation { @@ -110,7 +106,7 @@ mutation { } } ``` -cURLの例: +Example cURL: ```shell curl -X "POST" "{% data variables.product.api_url_code %}/graphql" \ @@ -122,24 +118,24 @@ curl -X "POST" "{% data variables.product.api_url_code %}/graphql" \ }' ``` -`node_id`の詳しい情報については「[グローバルノードIDの利用]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-global-node-ids)」を参照してください。 +For more information on `node_id`, see "[Using Global Node IDs]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-global-node-ids)." -## ProbotとGitHub Appマニフェストの利用例 +## Example using Probot and GitHub App Manifests -{% data variables.product.prodname_unfurls %} APIを使用できるGitHub Appを手早くセットアップするには、[Probot](https://probot.github.io/)が利用できます。 ProbotがどのようにGitHub Appのマニフェストを使用するかを学ぶには、「[マニフェストからのGitHub Appの作成](/apps/building-github-apps/creating-github-apps-from-a-manifest/)」を参照してください。 +To quickly setup a GitHub App that can use the {% data variables.product.prodname_unfurls %} API, you can use [Probot](https://probot.github.io/). See "[Creating GitHub Apps from a manifest](/apps/building-github-apps/creating-github-apps-from-a-manifest/)" to learn how Probot uses GitHub App Manifests. -Probotアプリケーションを作成するには、以下のステップに従ってください。 +To create a Probot App, follow these steps: -1. [新しい GitHub App を作成](https://probot.github.io/docs/development/#generating-a-new-app)します。 -2. 作成したプロジェクトを開き、 `app.yml` ファイルの設定をカスタマイズします。 `content_reference`イベントをサブスクライブし、`content_references`の書き込み権限を有効化してください。 +1. [Generate a new GitHub App](https://probot.github.io/docs/development/#generating-a-new-app). +2. Open the project you created, and customize the settings in the `app.yml` file. Subscribe to the `content_reference` event and enable `content_references` write permissions: ``` yml default_events: - content_reference - # GitHub Appが必要とする権限セット。 このオブジェクトのフォーマットは、 - # キーの権限名(たとえばissues)と値のためのアクセスの - # 種類(たとえばwrite)を使います。 - # 取り得る値は `read`、`write`、`none` + # The set of permissions needed by the GitHub App. The format of the object uses + # the permission name for the key (for example, issues) and the access type for + # the value (for example, write). + # Valid values are `read`, `write`, and `none` default_permissions: content_references: write @@ -150,11 +146,11 @@ Probotアプリケーションを作成するには、以下のステップに value: example.org ``` -3. このコードを`index.js` ファイルに追加して、`content_reference`を処理してREST APIを呼ぶようにします。 +3. Add this code to the `index.js` file to handle `content_reference` events and call the REST API: ``` javascript module.exports = app => { - // ここにコードを書く + // Your code here app.log('Yay, the app was loaded!') app.on('content_reference.created', async context => { console.log('Content reference created!', context.payload) @@ -171,13 +167,13 @@ Probotアプリケーションを作成するには、以下のステップに } ``` -4. [GitHub Appをローカルで動作させます](https://probot.github.io/docs/development/#running-the-app-locally)。 `http://localhost:3000`にアクセスして、**Register GitHub App**ボタンをクリックしてください。 +4. [Run the GitHub App locally](https://probot.github.io/docs/development/#running-the-app-locally). Navigate to `http://localhost:3000`, and click the **Register GitHub App** button: - ![Probot GitHub App の登録](/assets/images/github-apps/github_apps_probot-registration.png) + ![Register a Probot GitHub App](/assets/images/github-apps/github_apps_probot-registration.png) -5. テストリポジトリにアプリケーションをインストールしてください。 -6. テストリポジトリでIssueを作成してください。 -7. オープンしたIssueに`app.yml`ファイルで設定したURLを含むコメントを追加してください。 -8. Issueのコメントを見ると、以下のように更新されています。 +5. Install the app on a test repository. +6. Create an issue in your test repository. +7. Add a comment to the issue you opened that includes the URL you configured in the `app.yml` file. +8. Take a look at the issue comment and you'll see an update that looks like this: - ![Issueのリファレンスに添付されたコンテンツ](/assets/images/github-apps/content_reference_attachment.png) + ![Content attached to a reference in an issue](/assets/images/github-apps/content_reference_attachment.png) diff --git a/translations/ja-JP/content/developers/webhooks-and-events/webhooks/webhook-events-and-payloads.md b/translations/ja-JP/content/developers/webhooks-and-events/webhooks/webhook-events-and-payloads.md index 1091c79eb5..94ac6cf87b 100644 --- a/translations/ja-JP/content/developers/webhooks-and-events/webhooks/webhook-events-and-payloads.md +++ b/translations/ja-JP/content/developers/webhooks-and-events/webhooks/webhook-events-and-payloads.md @@ -1,6 +1,6 @@ --- -title: webhook イベントとペイロード -intro: webhook イベントごとに、イベントの発生日時、ペイロードの例、およびペイロードオブジェクトパラメータに関する説明を確認できます。 +title: Webhook events and payloads +intro: 'For each webhook event, you can review when the event occurs, an example payload, and descriptions about the payload object parameters.' product: '{% data reusables.gated-features.enterprise_account_webhooks %}' redirect_from: - /early-access/integrations/webhooks/ @@ -14,53 +14,52 @@ versions: ghec: '*' topics: - Webhooks -shortTitle: webhookイベントとペイロード +shortTitle: Webhook events & payloads --- - {% ifversion fpt or ghec %} {% endif %} {% data reusables.webhooks.webhooks_intro %} -このページに表示されているイベントをサブスクライブする webhook を作成できます。 各 webhook イベントには、webhook プロパティの説明とペイロードの例が含まれています。 詳しい情報については「[webhook を作成する](/webhooks/creating/)」を参照してください。 +You can create webhooks that subscribe to the events listed on this page. Each webhook event includes a description of the webhook properties and an example payload. For more information, see "[Creating webhooks](/webhooks/creating/)." -## webhook ペイロードオブジェクトの共通プロパティ +## Webhook payload object common properties -各 webhook イベントペイロードには、イベント固有のプロパティも含まれています。 固有のプロパティは、個々のイベントタイプのセクションにあります。 +Each webhook event payload also contains properties unique to the event. You can find the unique properties in the individual event type sections. -| キー | 種類 | 説明 | -| -------- | -------- | ---------------------------------------------------------------------- | -| `action` | `string` | ほとんどの webhook ペイロードには、イベントをトリガーした特定のアクティビティを含む `action` プロパティが含まれています。 | -{% data reusables.webhooks.sender_desc %} このプロパティは、すべての webhook ペイロードに含まれています。 -{% data reusables.webhooks.repo_desc %} イベントがリポジトリ内のアクティビティから発生した場合、webhook ペイロードには `repository` プロパティが含まれます。 +Key | Type | Description +----|------|------------- +`action` | `string` | Most webhook payloads contain an `action` property that contains the specific activity that triggered the event. +{% data reusables.webhooks.sender_desc %} This property is included in every webhook payload. +{% data reusables.webhooks.repo_desc %} Webhook payloads contain the `repository` property when the event occurs from activity in a repository. {% data reusables.webhooks.org_desc %} -{% data reusables.webhooks.app_desc %} 詳しい情報については、「[{% data variables.product.prodname_github_app %} を構築する](/apps/building-github-apps/)」を参照してください。 +{% data reusables.webhooks.app_desc %} For more information, see "[Building {% data variables.product.prodname_github_app %}](/apps/building-github-apps/)." -webhook イベントの一意のプロパティは、[イベント API](/rest/reference/activity#events) を使用するときに `payload` プロパティにあるプロパティと同じです。 例外の 1 つは、[`push` イベント](#push) です。 `push` イベント webhook ペイロードの一意のプロパティとイベント API の`payload` プロパティは異なります。 webhook ペイロードには、より詳細な情報が含まれています。 +The unique properties for a webhook event are the same properties you'll find in the `payload` property when using the [Events API](/rest/reference/activity#events). One exception is the [`push` event](#push). The unique properties of the `push` event webhook payload and the `payload` property in the Events API differ. The webhook payload contains more detailed information. {% tip %} -**注釈:** ペイロードの上限は 25 MB です。 イベントにより大きなペイロードが生成された場合、webhook は起動しません。 これは、たとえば多数のブランチまたはタグが一度にプッシュされた場合の `create` イベントで発生する可能性があります。 確実にデリバリが行われるよう、ペイロードサイズを監視することをお勧めします。 +**Note:** Payloads are capped at 25 MB. If your event generates a larger payload, a webhook will not be fired. This may happen, for example, on a `create` event if many branches or tags are pushed at once. We suggest monitoring your payload size to ensure delivery. {% endtip %} -### デリバリヘッダ +### Delivery headers -webhook によって設定されている URL エンドポイントに配信される HTTP POST ペイロードには、いくつかの特別なヘッダが含まれています。 +HTTP POST payloads that are delivered to your webhook's configured URL endpoint will contain several special headers: -| ヘッダ | 説明 | -| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `X-GitHub-Event` | デリバリをトリガーしたイベントの名前。 | -| `X-GitHub-Delivery` | デリバリを識別するための [GUID](http://en.wikipedia.org/wiki/Globally_unique_identifier)。{% ifversion ghes or ghae %} -| `X-GitHub-Enterprise-Version` | HTTP POST ペイロードを送信した {% data variables.product.prodname_ghe_server %} インスタンスのバージョン。 | -| `X-GitHub-Enterprise-Host` | HTTP POST ペイロードを送信した {% data variables.product.prodname_ghe_server %} インスタンスのホスト名。{% endif %}{% ifversion not ghae %} -| `X-Hub-Signature` | このヘッダは、webhook が [`secret`](/rest/reference/repos#create-hook-config-params) で設定されている場合に送信されます。 This is the HMAC hex digest of the request body, and is generated using the SHA-1 hash function and the `secret` as the HMAC `key`.{% ifversion fpt or ghes or ghec %} `X-Hub-Signature` is provided for compatibility with existing integrations, and we recommend that you use the more secure `X-Hub-Signature-256` instead.{% endif %}{% endif %} -| `X-Hub-Signature-256` | このヘッダは、webhook が [`secret`](/rest/reference/repos#create-hook-config-params) で設定されている場合に送信されます。 これはリクエスト本文の HMAC hex digest であり、SHA-256 ハッシュ関数と HMAC `key` としての `secret` を使用して生成されます。 | +Header | Description +-------|-------------| +`X-GitHub-Event`| Name of the event that triggered the delivery. +`X-GitHub-Delivery`| A [GUID](http://en.wikipedia.org/wiki/Globally_unique_identifier) to identify the delivery.{% ifversion ghes or ghae %} +`X-GitHub-Enterprise-Version` | The version of the {% data variables.product.prodname_ghe_server %} instance that sent the HTTP POST payload. +`X-GitHub-Enterprise-Host` | The hostname of the {% data variables.product.prodname_ghe_server %} instance that sent the HTTP POST payload.{% endif %}{% ifversion not ghae %} +`X-Hub-Signature`| This header is sent if the webhook is configured with a [`secret`](/rest/reference/repos#create-hook-config-params). This is the HMAC hex digest of the request body, and is generated using the SHA-1 hash function and the `secret` as the HMAC `key`.{% ifversion fpt or ghes or ghec %} `X-Hub-Signature` is provided for compatibility with existing integrations, and we recommend that you use the more secure `X-Hub-Signature-256` instead.{% endif %}{% endif %} +`X-Hub-Signature-256`| This header is sent if the webhook is configured with a [`secret`](/rest/reference/repos#create-hook-config-params). This is the HMAC hex digest of the request body, and is generated using the SHA-256 hash function and the `secret` as the HMAC `key`. -また、リクエストの `User-Agent` には、プレフィックスに `GitHub-Hookshot/` が付けられます。 +Also, the `User-Agent` for the requests will have the prefix `GitHub-Hookshot/`. -### デリバリの例 +### Example delivery ```shell > POST /payload HTTP/2 @@ -104,26 +103,26 @@ webhook によって設定されている URL エンドポイントに配信さ {% ifversion fpt or ghes > 3.2 or ghae-next or ghec %} ## branch_protection_rule -ブランチ保護ルールに関するアクティビティです。 詳しい情報については「[ブランチ保護ルールについて](/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-rules)」を参照してください。 +Activity related to a branch protection rule. For more information, see "[About branch protection rules](/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-rules)." -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- リポジトリ管理者に少なくとも `read-only` アクセス権限がある{% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with at least `read-only` access on repositories administration -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| --------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `action` | `string` | 実行されたアクション。 `created`、`edited`、`deleted` のいずれかを指定可。 | -| `rule` | `オブジェクト` | ブランチ保護ルール。 `name`と、この名前に一致するブランチに適用される全ての[ブランチ保護設定](/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings)が含まれる。 バイナリ設定はブール値です。 マルチレベル設定は`off`、`non_admins`、`everyone`のいずれか。 アクターとビルドのリストは文字列の配列。 | -| `changes` | `オブジェクト` | アクションが編集 (`edited`) された場合、ルールが変更される。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action performed. Can be `created`, `edited`, or `deleted`. +`rule` | `object` | The branch protection rule. Includes a `name` and all the [branch protection settings](/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. +`changes` | `object` | If the action was `edited`, the changes to the rule. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.branch_protection_rule.edited }} {% endif %} @@ -133,13 +132,13 @@ webhook によって設定されている URL エンドポイントに配信さ {% data reusables.apps.undetected-pushes-to-a-forked-repository-for-check-suites %} -### 利用の可否 +### Availability -- リポジトリ webhook は、リポジトリ内の `created` および `completed` イベントタイプのペイロードのみを受信します -- Organization webhook は、リポジトリで `created` および `completed` イベントタイプのペイロードのみを受信します -- `checks:read` 権限のある {% data variables.product.prodname_github_apps %} は、アプリがインストールされているリポジトリで発生する `created` および `completed` イベントのペイロードを受信します。 `rerequested` および `requested_action` イベントタイプを受信するには、アプリケーションに `checks:write` 権限が必要です。 `rerequested` および `requested_action` イベントタイプのペイロードは、リクエストされている {% data variables.product.prodname_github_app %} にのみ送信されます。 `checks:write` のある {% data variables.product.prodname_github_apps %} は、この webhook イベントに自動的にサブスクライブされます。 +- Repository webhooks only receive payloads for the `created` and `completed` event types in a repository +- Organization webhooks only receive payloads for the `created` and `completed` event types in repositories +- {% data variables.product.prodname_github_apps %} with the `checks:read` permission receive payloads for the `created` and `completed` events that occur in the repository where the app is installed. The app must have the `checks:write` permission to receive the `rerequested` and `requested_action` event types. The `rerequested` and `requested_action` event type payloads are only sent to the {% data variables.product.prodname_github_app %} being requested. {% data variables.product.prodname_github_apps %} with the `checks:write` are automatically subscribed to this webhook event. -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.check_run_properties %} {% data reusables.webhooks.repo_desc %} @@ -147,7 +146,7 @@ webhook によって設定されている URL エンドポイントに配信さ {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.check_run.created }} @@ -157,13 +156,13 @@ webhook によって設定されている URL エンドポイントに配信さ {% data reusables.apps.undetected-pushes-to-a-forked-repository-for-check-suites %} -### 利用の可否 +### Availability -- リポジトリ webhook は、リポジトリ内の `completed` イベントタイプのペイロードのみを受信します -- Organization webhook は、リポジトリで `completed` イベントタイプのペイロードのみを受信します -- `checks:read` 権限のある {% data variables.product.prodname_github_apps %} は、アプリがインストールされているリポジトリで発生する `created` および `completed` イベントのペイロードを受信します。 `requested` および `rerequested` イベントタイプを受信するには、アプリケーションに `checks:write` 権限が必要です。 `requested` および `rerequested` イベントタイプのペイロードは、リクエストされている {% data variables.product.prodname_github_app %} にのみ送信されます。 `checks:write` のある {% data variables.product.prodname_github_apps %} は、この webhook イベントに自動的にサブスクライブされます。 +- Repository webhooks only receive payloads for the `completed` event types in a repository +- Organization webhooks only receive payloads for the `completed` event types in repositories +- {% data variables.product.prodname_github_apps %} with the `checks:read` permission receive payloads for the `created` and `completed` events that occur in the repository where the app is installed. The app must have the `checks:write` permission to receive the `requested` and `rerequested` event types. The `requested` and `rerequested` event type payloads are only sent to the {% data variables.product.prodname_github_app %} being requested. {% data variables.product.prodname_github_apps %} with the `checks:write` are automatically subscribed to this webhook event. -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.check_suite_properties %} {% data reusables.webhooks.repo_desc %} @@ -171,7 +170,7 @@ webhook によって設定されている URL エンドポイントに配信さ {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.check_suite.completed }} @@ -179,21 +178,21 @@ webhook によって設定されている URL エンドポイントに配信さ {% data reusables.webhooks.code_scanning_alert_event_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `security_events :read` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `security_events :read` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.code_scanning_alert_event_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} -`sender` | `object` | `action` が `reopened_by_user` または `closed_by_user` の場合、`sender` オブジェクトは、イベントをトリガーしたユーザになります。 `sender`オブジェクトは、他の全てのアクションに対して{% ifversion fpt or ghec %}`github`{% elsif ghes > 3.0 or ghae-next %}`github-enterprise`{% else %}empty{% endif %}です。 +`sender` | `object` | If the `action` is `reopened_by_user` or `closed_by_user`, the `sender` object will be the user that triggered the event. The `sender` object is {% ifversion fpt or ghec %}`github`{% elsif ghes > 3.0 or ghae-next %}`github-enterprise`{% else %}empty{% endif %} for all other actions. -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.code_scanning_alert.reopened }} @@ -201,13 +200,13 @@ webhook によって設定されている URL エンドポイントに配信さ {% data reusables.webhooks.commit_comment_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `contents` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `contents` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.commit_comment_properties %} {% data reusables.webhooks.repo_desc %} @@ -215,41 +214,43 @@ webhook によって設定されている URL エンドポイントに配信さ {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.commit_comment.created }} +{% ifversion ghes < 3.4 %} ## content_reference {% data reusables.webhooks.content_reference_short_desc %} -webhook イベントは、登録したドメインの特異性に基づいてトリガーされます。 たとえば、サブドメイン (`https://subdomain.example.com`) を登録すると、サブドメインの URL のみがこのイベントをトリガーします。 ドメイン (`https://example.com`) を登録すると、ドメインとすべてのサブドメインの URL がこのイベントをトリガーします。 新しいコンテンツ添付ファイルを作成するには、「[コンテンツ添付ファイルの作成](/rest/reference/apps#create-a-content-attachment)」を参照してください。 +Webhook events are triggered based on the specificity of the domain you register. For example, if you register a subdomain (`https://subdomain.example.com`) then only URLs for the subdomain trigger this event. If you register a domain (`https://example.com`) then URLs for domain and all subdomains trigger this event. See "[Create a content attachment](/rest/reference/apps#create-a-content-attachment)" to create a new content attachment. -### 利用の可否 +### Availability -- `content_references:write` 権限のある {% data variables.product.prodname_github_apps %} +- {% data variables.product.prodname_github_apps %} with the `content_references:write` permission -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.content_reference.created }} +{% endif %} ## create {% data reusables.webhooks.create_short_desc %} {% note %} -**注釈:** 一度に 3 つ以上のタグをプッシュすると、このイベントの webhook を受信しません。 +**Note:** You will not receive a webhook for this event when you push more than three tags at once. {% endnote %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `contents` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `contents` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.create_properties %} {% data reusables.webhooks.pusher_type_desc %} @@ -258,7 +259,7 @@ webhook イベントは、登録したドメインの特異性に基づいてト {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.create }} @@ -268,17 +269,17 @@ webhook イベントは、登録したドメインの特異性に基づいてト {% note %} -**注釈:** 一度に 3 つ以上のタグを削除すると、このイベントの webhook を受信しません。 +**Note:** You will not receive a webhook for this event when you delete more than three tags at once. {% endnote %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `contents` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `contents` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.delete_properties %} {% data reusables.webhooks.pusher_type_desc %} @@ -287,7 +288,7 @@ webhook イベントは、登録したドメインの特異性に基づいてト {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.delete }} @@ -295,19 +296,19 @@ webhook イベントは、登録したドメインの特異性に基づいてト {% data reusables.webhooks.deploy_key_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook +- Repository webhooks +- Organization webhooks -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.deploy_key_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.deploy_key.created }} @@ -315,24 +316,24 @@ webhook イベントは、登録したドメインの特異性に基づいてト {% data reusables.webhooks.deployment_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `deployments` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `deployments` permission -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| ------------ | ------------------------------------------- | -------------------------------------------------- |{% ifversion fpt or ghes or ghae or ghec %} -| `action` | `string` | 実行されたアクション。 `created` を指定可。{% endif %} -| `deployment` | `オブジェクト` | [デプロイメント](/rest/reference/repos#list-deployments)。 | +Key | Type | Description +----|------|-------------{% ifversion fpt or ghes or ghae or ghec %} +`action` |`string` | The action performed. Can be `created`.{% endif %} +`deployment` |`object` | The [deployment](/rest/reference/repos#list-deployments). {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.deployment }} @@ -340,54 +341,54 @@ webhook イベントは、登録したドメインの特異性に基づいてト {% data reusables.webhooks.deployment_status_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `deployments` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `deployments` permission -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| ---------------------------------- | ------------------------------------------- | -------------------------------------------------------------------- |{% ifversion fpt or ghes or ghae or ghec %} -| `action` | `string` | 実行されたアクション。 `created` を指定可。{% endif %} -| `deployment_status` | `オブジェクト` | [デプロイメントステータス](/rest/reference/repos#list-deployment-statuses)。 | -| `deployment_status["state"]` | `string` | 新しい状態。 `pending`、`success`、`failure`、`error` のいずれかを指定可。 | -| `deployment_status["target_url"]` | `string` | ステータスに追加されたオプションのリンク。 | -| `deployment_status["description"]` | `string` | オプションの人間可読の説明がステータスに追加。 | -| `deployment` | `オブジェクト` | このステータスが関連付けられている [デプロイメント](/rest/reference/repos#list-deployments)。 | +Key | Type | Description +----|------|-------------{% ifversion fpt or ghes or ghae or ghec %} +`action` |`string` | The action performed. Can be `created`.{% endif %} +`deployment_status` |`object` | The [deployment status](/rest/reference/repos#list-deployment-statuses). +`deployment_status["state"]` |`string` | The new state. Can be `pending`, `success`, `failure`, or `error`. +`deployment_status["target_url"]` |`string` | The optional link added to the status. +`deployment_status["description"]`|`string` | The optional human-readable description added to the status. +`deployment` |`object` | The [deployment](/rest/reference/repos#list-deployments) that this status is associated with. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.deployment_status }} {% ifversion fpt or ghec %} -## ディスカッション +## discussion {% data reusables.webhooks.discussions-webhooks-beta %} -ディスカッションに関連するアクティビティ。 詳しい情報については、「[ディスカッションでのGraphQL APIの利用]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-the-graphql-api-for-discussions)」を参照してください。 -### 利用の可否 +Activity related to a discussion. For more information, see the "[Using the GraphQL API for discussions]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-the-graphql-api-for-discussions)." +### Availability -- リポジトリ webhook -- Organization webhook -- `discussions` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `discussions` permission -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| -------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | -| `action` | `string` | 実行されたアクション。 `created`、`edited`、`deleted`、`pinned`、`unpinned`、`locked`、`unlocked`、`transferred`、`category_changed`、`answered`、`unanswered`のいずれか。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action performed. Can be `created`, `edited`, `deleted`, `pinned`, `unpinned`, `locked`, `unlocked`, `transferred`, `category_changed`, `answered`, or `unanswered`. {% data reusables.webhooks.discussion_desc %} {% data reusables.webhooks.repo_desc_graphql %} {% data reusables.webhooks.org_desc_graphql %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.discussion.created }} @@ -395,63 +396,63 @@ webhook イベントは、登録したドメインの特異性に基づいてト {% data reusables.webhooks.discussions-webhooks-beta %} -ディスカッションのコメントに関連するアクティビティ。 詳しい情報については、「[ディスカッションでのGraphQL APIの利用]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-the-graphql-api-for-discussions)」を参照してください。 +Activity related to a comment in a discussion. For more information, see "[Using the GraphQL API for discussions]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-the-graphql-api-for-discussions)." -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `discussions` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `discussions` permission -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `action` | `string` | 実行されたアクション。 `created`、`edited`、`deleted` のいずれかを指定可。 | -| `コメント` | `オブジェクト` | [`discussion comment`]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-the-graphql-api-for-discussions#discussioncomment) のリソース。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action performed. Can be `created`, `edited`, or `deleted`. +`comment` | `object` | The [`discussion comment`]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-the-graphql-api-for-discussions#discussioncomment) resource. {% data reusables.webhooks.discussion_desc %} {% data reusables.webhooks.repo_desc_graphql %} {% data reusables.webhooks.org_desc_graphql %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.discussion_comment.created }} {% endif %} {% ifversion ghes or ghae %} -## Enterprise +## enterprise {% data reusables.webhooks.enterprise_short_desc %} -### 利用の可否 +### Availability -- GitHub Enterprise webhook。 詳しい情報については「[グローバル webhook](/rest/reference/enterprise-admin#global-webhooks/)」を参照してください。 +- GitHub Enterprise webhooks. For more information, "[Global webhooks](/rest/reference/enterprise-admin#global-webhooks/)." -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| -------- | -------- | ----------------------------------------------------------------------------- | -| `action` | `string` | 実行されたアクション。 `anonymous_access_enabled`、`anonymous_access_disabled` のいずれかを指定可。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action performed. Can be `anonymous_access_enabled` or `anonymous_access_disabled`. -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.enterprise.anonymous_access_enabled }} {% endif %} -## フォーク +## fork {% data reusables.webhooks.fork_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `contents` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `contents` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.fork_properties %} {% data reusables.webhooks.repo_desc %} @@ -459,28 +460,28 @@ webhook イベントは、登録したドメインの特異性に基づいてト {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.fork }} ## github_app_authorization -{% data variables.product.prodname_github_app %} の承認を取り消すと、このイベントが発生します。 {% data variables.product.prodname_github_app %} は、デフォルトでこの webhook を受信し、このイベントをサブスクライブ解除できません。 +When someone revokes their authorization of a {% data variables.product.prodname_github_app %}, this event occurs. A {% data variables.product.prodname_github_app %} receives this webhook by default and cannot unsubscribe from this event. -{% data reusables.webhooks.authorization_event %}{% data variables.product.prodname_github_app %} 認証を必要とするユーザからサーバーへのリクエストの詳細については、「[{% data variables.product.prodname_github_apps %} のユーザーの識別と認証](/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)」を参照してください。 +{% data reusables.webhooks.authorization_event %} For details about user-to-server requests, which require {% data variables.product.prodname_github_app %} authorization, see "[Identifying and authorizing users for {% data variables.product.prodname_github_apps %}](/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)." -### 利用の可否 +### Availability - {% data variables.product.prodname_github_apps %} -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| -------- | -------- | --------------------------- | -| `action` | `string` | 実行されたアクション。 `revoked` を指定可。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action performed. Can be `revoked`. {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.github_app_authorization.revoked }} @@ -488,13 +489,13 @@ webhook イベントは、登録したドメインの特異性に基づいてト {% data reusables.webhooks.gollum_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `contents` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `contents` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.gollum_properties %} {% data reusables.webhooks.repo_desc %} @@ -502,25 +503,25 @@ webhook イベントは、登録したドメインの特異性に基づいてト {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.gollum }} -## インストール +## installation {% data reusables.webhooks.installation_short_desc %} -### 利用の可否 +### Availability - {% data variables.product.prodname_github_apps %} -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.installation_properties %} {% data reusables.webhooks.app_always_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.installation.deleted }} @@ -528,17 +529,17 @@ webhook イベントは、登録したドメインの特異性に基づいてト {% data reusables.webhooks.installation_repositories_short_desc %} -### 利用の可否 +### Availability - {% data variables.product.prodname_github_apps %} -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.installation_repositories_properties %} {% data reusables.webhooks.app_always_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.installation_repositories.added }} @@ -546,13 +547,13 @@ webhook イベントは、登録したドメインの特異性に基づいてト {% data reusables.webhooks.issue_comment_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `issues` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `issues` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.issue_comment_webhook_properties %} {% data reusables.webhooks.issue_comment_properties %} @@ -561,7 +562,7 @@ webhook イベントは、登録したドメインの特異性に基づいてト {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.issue_comment.created }} @@ -569,13 +570,13 @@ webhook イベントは、登録したドメインの特異性に基づいてト {% data reusables.webhooks.issues_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `issues` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `issues` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.issue_webhook_properties %} {% data reusables.webhooks.issue_properties %} @@ -584,72 +585,72 @@ webhook イベントは、登録したドメインの特異性に基づいてト {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Issue 編集時の webhook ペイロードの例 +### Webhook payload example when someone edits an issue {{ webhookPayloadsForCurrentVersion.issues.edited }} -## ラベル +## label {% data reusables.webhooks.label_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `metadata` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `metadata` permission -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| ---------------------- | -------- | --------------------------------------------------- | -| `action` | `string` | 実行されたアクション. `created`、`edited`、`deleted` のいずれかを指定可。 | -| `ラベル` | `オブジェクト` | ラベルが追加された。 | -| `changes` | `オブジェクト` | アクションが `edited` の場合のラベルへの変更。 | -| `changes[name][from]` | `string` | アクションが`edited`だった場合、以前のバージョンの名前。 | -| `changes[color][from]` | `string` | アクションが `edited` の場合の以前のバージョンの色。 | +Key | Type | Description +----|------|------------- +`action`|`string` | The action that was performed. Can be `created`, `edited`, or `deleted`. +`label`|`object` | The label that was added. +`changes`|`object`| The changes to the label if the action was `edited`. +`changes[name][from]`|`string` | The previous version of the name if the action was `edited`. +`changes[color][from]`|`string` | The previous version of the color if the action was `edited`. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.label.deleted }} {% ifversion fpt or ghec %} ## marketplace_purchase -GitHub Marketplace の購入に関連するアクティビティ。 {% data reusables.webhooks.action_type_desc %} 詳しい情報については、「[GitHub Marketplace](/marketplace/)」を参照してください。 +Activity related to a GitHub Marketplace purchase. {% data reusables.webhooks.action_type_desc %} For more information, see the "[GitHub Marketplace](/marketplace/)." -### 利用の可否 +### Availability - {% data variables.product.prodname_github_apps %} -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| -------- | -------- | ------------------------------------------------------------------------------------------------------------- | -| `action` | `string` | [GitHub Marketplace](https://github.com/marketplace) プランに対して実行されたアクション。 次のいずれかになります。 | +Key | Type | Description +----|------|------------- +`action` | `string` | The action performed for a [GitHub Marketplace](https://github.com/marketplace) plan. Can be one of: -このペイロードと各タイプの `action` のペイロードの詳細については、「[{% data variables.product.prodname_marketplace %} webhook イベント](/marketplace/integrating-with-the-github-marketplace-api/github-marketplace-webhook-events/)」を参照してください。 +For a detailed description of this payload and the payload for each type of `action`, see [{% data variables.product.prodname_marketplace %} webhook events](/marketplace/integrating-with-the-github-marketplace-api/github-marketplace-webhook-events/). -### プラン購入時の webhook ペイロードの例 +### Webhook payload example when someone purchases the plan {{ webhookPayloadsForCurrentVersion.marketplace_purchase.purchased }} {% endif %} -## メンバー +## member {% data reusables.webhooks.member_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `members` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `members` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.member_webhook_properties %} {% data reusables.webhooks.member_properties %} @@ -658,7 +659,7 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.member.added }} @@ -666,57 +667,57 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.membership_short_desc %} -### 利用の可否 +### Availability -- Organization webhook -- `members` 権限のある {% data variables.product.prodname_github_apps %} +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `members` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.membership_properties %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.membership.removed }} -## メタ情報 +## meta -このイベントが設定されている webhook が削除されました。 このイベントは、イベントがインストールされている特定のフックへの変更のみをリッスンします。 したがって、メタイベントを受信するフックごとに選択する必要があります。 +The webhook this event is configured on was deleted. This event will only listen for changes to the particular hook the event is installed on. Therefore, it must be selected for each hook that you'd like to receive meta events for. -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook +- Repository webhooks +- Organization webhooks -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| --------- | --------- | ------------------------------------------------------------------------------------------------------------ | -| `action` | `string` | 実行されたアクション。 `deleted` を指定可。 | -| `hook_id` | `integer` | 変更された webhook の ID。 | -| `フック` | `オブジェクト` | 変更された webhook。 これには、webhook のタイプ (リポジトリ、Organization、ビジネス、アプリケーション、または GitHub Marketplace) に基づいて異なるキーが含まれます。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action performed. Can be `deleted`. +`hook_id` |`integer` | The id of the modified webhook. +`hook` |`object` | The modified webhook. This will contain different keys based on the type of webhook it is: repository, organization, business, app, or GitHub Marketplace. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.meta.deleted }} -## マイルストーン +## milestone {% data reusables.webhooks.milestone_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `pull_requests` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `pull_requests` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.milestone_properties %} {% data reusables.webhooks.repo_desc %} @@ -724,33 +725,33 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.milestone.created }} -## Organization +## organization {% data reusables.webhooks.organization_short_desc %} -### 利用の可否 +### Availability {% ifversion ghes or ghae %} -- GitHub Enterprise webhook は、`created` および `deleted` イベントのみを受信します。 詳しい情報については「[グローバル webhook](/rest/reference/enterprise-admin#global-webhooks/)」を参照してください。{% endif %} -- Organization webhook は、`deleted`、`added`、`removed`、`renamed`、`invited` イベントのみを受信します -- `members` 権限のある {% data variables.product.prodname_github_apps %} +- GitHub Enterprise webhooks only receive `created` and `deleted` events. For more information, "[Global webhooks](/rest/reference/enterprise-admin#global-webhooks/).{% endif %} +- Organization webhooks only receive the `deleted`, `added`, `removed`, `renamed`, and `invited` events +- {% data variables.product.prodname_github_apps %} with the `members` permission -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| ------------ | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| `action` | `string` | 実行されたアクション. {% ifversion ghes or ghae %} `created`、{% endif %} `deleted`、`renamed`、`member_added`、`member_removed`、`member_invited` のいずれかを指定可。 | -| `招待` | `オブジェクト` | アクションが `member_invited` の場合、ユーザへの招待またはメール。 | -| `membership` | `オブジェクト` | ユーザと Organization 間のメンバーシップ。 アクションが `member_invited` の場合は存在しません。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action that was performed. Can be one of:{% ifversion ghes or ghae %} `created`,{% endif %} `deleted`, `renamed`, `member_added`, `member_removed`, or `member_invited`. +`invitation` |`object` | The invitation for the user or email if the action is `member_invited`. +`membership` |`object` | The membership between the user and the organization. Not present when the action is `member_invited`. {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.organization.member_added }} @@ -760,22 +761,22 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.org_block_short_desc %} -### 利用の可否 +### Availability -- Organization webhook -- `organization_administration` 権限のある {% data variables.product.prodname_github_apps %} +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `organization_administration` permission -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| -------------- | -------- | -------------------------------------------- | -| `action` | `string` | 実行されたアクション。 `blocked`、`unblocked` のいずれかを指定可。 | -| `blocked_user` | `オブジェクト` | ブロックまたはブロック解除されたユーザに関する情報。 | +Key | Type | Description +----|------|------------ +`action` | `string` | The action performed. Can be `blocked` or `unblocked`. +`blocked_user` | `object` | Information about the user that was blocked or unblocked. {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.org_block.blocked }} @@ -785,21 +786,21 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus ## package -{% data variables.product.prodname_registry %} に関連するアクティビティ。 {% data reusables.webhooks.action_type_desc %} {% data variables.product.prodname_registry %} の詳細については、「[{% data variables.product.prodname_registry %} を使用してパッケージを管理する](/github/managing-packages-with-github-packages)」を参照してください。 +Activity related to {% data variables.product.prodname_registry %}. {% data reusables.webhooks.action_type_desc %} For more information, see "[Managing packages with {% data variables.product.prodname_registry %}](/github/managing-packages-with-github-packages)" to learn more about {% data variables.product.prodname_registry %}. -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook +- Repository webhooks +- Organization webhooks -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.package_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.package.published }} {% endif %} @@ -808,24 +809,24 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.page_build_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `pages` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `pages` permission -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| ----- | --------- | -------------------------------------------------------------------------- | -| `id` | `integer` | ページビルドの一意の識別子。 | -| `ビルド` | `オブジェクト` | [GitHub Pages ビルドのリスト](/rest/reference/repos#list-github-pages-builds) 自体。 | +Key | Type | Description +----|------|------------ +`id` | `integer` | The unique identifier of the page build. +`build` | `object` | The [List GitHub Pages builds](/rest/reference/repos#list-github-pages-builds) itself. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.page_build }} @@ -833,25 +834,25 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.ping_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- {% data variables.product.prodname_github_apps %} は、アプリの登録に使用される `app_id` を使用して ping イベントを受信します +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} receive a ping event with an `app_id` used to register the app -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| -------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `zen` | `string` | GitHub zen のランダムな文字列。 | -| `hook_id` | `integer` | ping をトリガーした webhook の ID。 | -| `フック` | `オブジェクト` | [webhook 設定](/rest/reference/repos#get-a-repository-webhook)。 | -| `hook[app_id]` | `integer` | 新しい {% data variables.product.prodname_github_app %} を登録すると、{% data variables.product.product_name %} は登録時に指定した **webhook URL** に ping イベントを送信します。 イベントには、アプリケーションの[認証](/apps/building-integrations/setting-up-and-registering-github-apps/about-authentication-options-for-github-apps/)に必要な `app_id` が含まれています。 | +Key | Type | Description +----|------|------------ +`zen` | `string` | Random string of GitHub zen. +`hook_id` | `integer` | The ID of the webhook that triggered the ping. +`hook` | `object` | The [webhook configuration](/rest/reference/repos#get-a-repository-webhook). +`hook[app_id]` | `integer` | When you register a new {% data variables.product.prodname_github_app %}, {% data variables.product.product_name %} sends a ping event to the **webhook URL** you specified during registration. The event contains the `app_id`, which is required for [authenticating](/apps/building-integrations/setting-up-and-registering-github-apps/about-authentication-options-for-github-apps/) an app. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.ping }} @@ -859,13 +860,13 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.project_card_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `repository_projects` または `organization_projects` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `repository_projects` or `organization_projects` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.project_card_properties %} {% data reusables.webhooks.repo_desc %} @@ -873,7 +874,7 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.project_card.created }} @@ -881,13 +882,13 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.project_column_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `repository_projects` または `organization_projects` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `repository_projects` or `organization_projects` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.project_column_properties %} {% data reusables.webhooks.repo_desc %} @@ -895,7 +896,7 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.project_column.created }} @@ -903,13 +904,13 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.project_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `repository_projects` または `organization_projects` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `repository_projects` or `organization_projects` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.project_properties %} {% data reusables.webhooks.repo_desc %} @@ -917,7 +918,7 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.project.created }} @@ -925,23 +926,22 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus ## public {% data reusables.webhooks.public_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `metadata` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `metadata` permission -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| -- | -- | -- | -| | | | +Key | Type | Description +----|------|------------- {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.public }} {% endif %} @@ -949,13 +949,13 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.pull_request_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `pull_requests` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `pull_requests` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.pull_request_webhook_properties %} {% data reusables.webhooks.pull_request_properties %} @@ -964,9 +964,9 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example -`review_requested` イベントと `review_request_removed` イベントのデリバリには、`requested_reviewer` という追加のフィールドがあります。 +Deliveries for `review_requested` and `review_request_removed` events will have an additional field called `requested_reviewer`. {{ webhookPayloadsForCurrentVersion.pull_request.opened }} @@ -974,13 +974,13 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.pull_request_review_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `pull_requests` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `pull_requests` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.pull_request_review_properties %} {% data reusables.webhooks.repo_desc %} @@ -988,7 +988,7 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.pull_request_review.submitted }} @@ -996,13 +996,13 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.pull_request_review_comment_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `pull_requests` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `pull_requests` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.pull_request_review_comment_webhook_properties %} {% data reusables.webhooks.pull_request_review_comment_properties %} @@ -1011,71 +1011,71 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.pull_request_review_comment.created }} -## プッシュ +## push {% data reusables.webhooks.push_short_desc %} {% note %} -**注釈:** 一度に 3 つ以上のタグをプッシュすると、このイベントの webhook を受信しません。 +**Note:** You will not receive a webhook for this event when you push more than three tags at once. {% endnote %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `contents` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `contents` permission -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| -------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `ref` | `string` | プッシュされた完全な[`git ref`](/rest/reference/git#refs)。 例: `refs/heads/main`または`refs/tags/v3.14.1`。 | -| `before` | `string` | プッシュ前の`ref` 上の最新のコミットのSHA。 | -| `after` | `string` | プッシュ後の`ref`上の最新のコミットのSHA。 | -| `created` | `boolean` | プッシュが`ref`を作成したかどうか。 | -| `deleted` | `boolean` | プッシュが`ref`を削除したかどうか。 | -| `forced` | `boolean` | プッシュが `ref`のフォースプッシュであったかどうか。 | -| `head_commit` | `オブジェクト` | `after`がコミットオブジェクトであるか、コミットオブジェクトを指している場合、そのコミットの拡張表現。 `after`がアノテーションされたタグオブジェクトを指すプッシュの場合、そのアノテーションされたタグが指すコミットの拡張表現。 | -| `compare` | `string` | `before`コミットから`after`コミットまで、この`ref`更新にある変更を示すURL。 デフォルトブランチに直接基づいて新規作成された`ref`の場合、デフォルトブランチのheadと`after`コミットとの比較。 それ以外の場合は、`after`コミットまでのすべてのコミットを示す。 | -| `commits` | `array` | プッシュされたコミットを示すコミットオブジェクトの配列。 (プッシュされたコミットは、`before`コミットと`after`コミットの間で`compare`されたものに含まれる全てのコミット。) 配列には最大で20のコミットが含まれる。 必要な場合は、追加のコミットを[Commits API](/rest/reference/repos#commits)を使ってフェッチできる。 この制限はタイムラインイベントにのみ適用され、webhookの配信には適用されない。 | -| `commits[][id]` | `string` | コミットのSHA。 | -| `commits[][timestamp]` | `string` | コミットの ISO 8601 タイムスタンプ。 | -| `commits[][message]` | `string` | コミットメッセージ。 | -| `commits[][author]` | `オブジェクト` | コミットのGit作者。 | -| `commits[][author][name]` | `string` | Git作者の名前。 | -| `commits[][author][email]` | `string` | Git作者のメールアドレス。 | -| `commits[][url]` | `url` | コミットAPIのリソースを指すURL。 | -| `commits[][distinct]` | `boolean` | このコミットが以前にプッシュされたいずれとも異なっているか。 | -| `commits[][added]` | `array` | コミットに追加されたファイルの配列。 | -| `commits[][modified]` | `array` | コミットによって変更されたファイルの配列。 | -| `commits[][removed]` | `array` | コミットから削除されたファイルの配列。 | -| `pusher` | `オブジェクト` | コミットをプッシュしたユーザ。 | +Key | Type | Description +----|------|------------- +`ref`|`string` | The full [`git ref`](/rest/reference/git#refs) that was pushed. Example: `refs/heads/main` or `refs/tags/v3.14.1`. +`before`|`string` | The SHA of the most recent commit on `ref` before the push. +`after`|`string` | The SHA of the most recent commit on `ref` after the push. +`created`|`boolean` | Whether this push created the `ref`. +`deleted`|`boolean` | Whether this push deleted the `ref`. +`forced`|`boolean` | Whether this push was a force push of the `ref`. +`head_commit`|`object` | For pushes where `after` is or points to a commit object, an expanded representation of that commit. For pushes where `after` refers to an annotated tag object, an expanded representation of the commit pointed to by the annotated tag. +`compare`|`string` | URL that shows the changes in this `ref` update, from the `before` commit to the `after` commit. For a newly created `ref` that is directly based on the default branch, this is the comparison between the head of the default branch and the `after` commit. Otherwise, this shows all commits until the `after` commit. +`commits`|`array` | An array of commit objects describing the pushed commits. (Pushed commits are all commits that are included in the `compare` between the `before` commit and the `after` commit.) The array includes a maximum of 20 commits. If necessary, you can use the [Commits API](/rest/reference/repos#commits) to fetch additional commits. This limit is applied to timeline events only and isn't applied to webhook deliveries. +`commits[][id]`|`string` | The SHA of the commit. +`commits[][timestamp]`|`string` | The ISO 8601 timestamp of the commit. +`commits[][message]`|`string` | The commit message. +`commits[][author]`|`object` | The git author of the commit. +`commits[][author][name]`|`string` | The git author's name. +`commits[][author][email]`|`string` | The git author's email address. +`commits[][url]`|`url` | URL that points to the commit API resource. +`commits[][distinct]`|`boolean` | Whether this commit is distinct from any that have been pushed before. +`commits[][added]`|`array` | An array of files added in the commit. +`commits[][modified]`|`array` | An array of files modified by the commit. +`commits[][removed]`|`array` | An array of files removed in the commit. +`pusher` | `object` | The user who pushed the commits. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.push }} -## リリース +## release {% data reusables.webhooks.release_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `contents` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `contents` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.release_webhook_properties %} {% data reusables.webhooks.release_properties %} @@ -1084,66 +1084,66 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.release.published }} {% ifversion fpt or ghes or ghae or ghec %} ## repository_dispatch -このイベントは、{% data variables.product.prodname_github_app %} が「[リポジトリディスパッチイベントの作成](/rest/reference/repos#create-a-repository-dispatch-event)」エンドポイントに `POST` リクエストを送信したときに発生します。 +This event occurs when a {% data variables.product.prodname_github_app %} sends a `POST` request to the "[Create a repository dispatch event](/rest/reference/repos#create-a-repository-dispatch-event)" endpoint. -### 利用の可否 +### Availability -- この webhook を受信するには、{% data variables.product.prodname_github_apps %} に `contents` 権限が必要です。 +- {% data variables.product.prodname_github_apps %} must have the `contents` permission to receive this webhook. -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.repository_dispatch }} {% endif %} -## リポジトリ +## repository {% data reusables.webhooks.repository_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook は、`deleted` を除くすべてのイベントタイプを受け取ります -- Organization webhook -- `metadata` 権限のある {% data variables.product.prodname_github_apps %} は、`deleted` を除くすべてのイベントタイプを受信します +- Repository webhooks receive all event types except `deleted` +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `metadata` permission receive all event types except `deleted` -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| -------- | -------- | ---------------------------------------------------- | -| `action` | `string` | 実行されたアクション. これは次のいずれかになります。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action that was performed. This can be one of: {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.repository.publicized }} {% ifversion fpt or ghec %} ## repository_import -{% data reusables.webhooks.repository_import_short_desc %} 個人リポジトリでこのイベントを受信するには、インポートする前に空のリポジトリを作成する必要があります。 このイベントは、[GitHub Importer](/articles/importing-a-repository-with-github-importer/) または[Source imports API](/rest/reference/migrations#source-imports) のいずれかを使用してトリガーできます。 +{% data reusables.webhooks.repository_import_short_desc %} To receive this event for a personal repository, you must create an empty repository prior to the import. This event can be triggered using either the [GitHub Importer](/articles/importing-a-repository-with-github-importer/) or the [Source imports API](/rest/reference/migrations#source-imports). -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook +- Repository webhooks +- Organization webhooks -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.repository_import_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.repository_import }} @@ -1151,19 +1151,19 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.repository_vulnerability_alert_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook +- Repository webhooks +- Organization webhooks -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.repository_vulnerability_alert_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.repository_vulnerability_alert.create }} @@ -1175,21 +1175,21 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.secret_scanning_alert_event_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `secret_scanning_alerts:read` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `secret_scanning_alerts:read` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.secret_scanning_alert_event_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} -`sender` | `object` | `action` が `resolved` または `reopened` の場合、`sender` オブジェクトは、イベントをトリガーしたユーザになります。 `sender` オブジェクトは、他のすべてのアクションでは空になっています。 +`sender` | `object` | If the `action` is `resolved` or `reopened`, the `sender` object will be the user that triggered the event. The `sender` object is empty for all other actions. -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.secret_scanning_alert.reopened }} {% endif %} @@ -1197,127 +1197,127 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% ifversion fpt or ghes or ghec %} ## security_advisory -セキュリティアドバイザリに関連するアクティビティ。 セキュリティアドバイザリは、GitHub 上のソフトウェアのセキュリティ関連の脆弱性に関する情報を提供します。 The security advisory dataset also powers the GitHub security alerts, see "[About alerts for vulnerable dependencies](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies/)." +Activity related to a security advisory. A security advisory provides information about security-related vulnerabilities in software on GitHub. The security advisory dataset also powers the GitHub security alerts, see "[About alerts for vulnerable dependencies](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies/)." {% endif %} -### 利用の可否 +### Availability -- `security_events` 権限のある {% data variables.product.prodname_github_apps %} +- {% data variables.product.prodname_github_apps %} with the `security_events` permission -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| ------------------- | -------- | ----------------------------------------------------------------------------------------- | -| `action` | `string` | 実行されたアクション. アクションは、すべての新しいイベントに対して`published`、`updated`、`performed`、`withdrawn`のいずれかを指定可。 | -| `security_advisory` | `オブジェクト` | 概要、説明、重要度などの、セキュリティアドバイザリの詳細。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action that was performed. The action can be one of `published`, `updated`, `performed`, or `withdrawn` for all new events. +`security_advisory` |`object` | The details of the security advisory, including summary, description, and severity. -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.security_advisory.published }} {% ifversion fpt or ghec %} -## スポンサーシップ +## sponsorship {% data reusables.webhooks.sponsorship_short_desc %} -スポンサーシップ webhook は、{% data variables.product.prodname_dotcom %} でのみ作成できます。 詳しい情報については、「[スポンサー付きアカウントのイベントの webhook を設定する](/sponsors/integrating-with-github-sponsors/configuring-webhooks-for-events-in-your-sponsored-account)」を参照してください。 +You can only create a sponsorship webhook on {% data variables.product.prodname_dotcom %}. For more information, see "[Configuring webhooks for events in your sponsored account](/sponsors/integrating-with-github-sponsors/configuring-webhooks-for-events-in-your-sponsored-account)". -### 利用の可否 +### Availability -- スポンサー付きアカウント +- Sponsored accounts -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.sponsorship_webhook_properties %} {% data reusables.webhooks.sponsorship_properties %} {% data reusables.webhooks.sender_desc %} -### スポンサーシップ作成時の webhook ペイロードの例 +### Webhook payload example when someone creates a sponsorship {{ webhookPayloadsForCurrentVersion.sponsorship.created }} -### スポンサーシップのダウングレード時の webhook ペイロードの例 +### Webhook payload example when someone downgrades a sponsorship {{ webhookPayloadsForCurrentVersion.sponsorship.downgraded }} {% endif %} -## Star +## star {% data reusables.webhooks.star_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook +- Repository webhooks +- Organization webhooks -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.star_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.star.created }} -## ステータス +## status {% data reusables.webhooks.status_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `statuses` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `statuses` permission -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| ------------ | --------- | ------------------------------------------------------------------------------------------------------------- | -| `id` | `integer` | ステータスの一意の識別子。 | -| `sha` | `string` | コミット SHA。 | -| `state` | `string` | 新しい状態。 `pending`、`success`、`failure`、`error` のいずれかを指定可。 | -| `説明` | `string` | オプションの人間可読の説明がステータスに追加。 | -| `target_url` | `string` | ステータスに追加されたオプションのリンク。 | -| `ブランチ` | `array` | ステータスの SHA を含むブランチオブジェクトの配列。 各ブランチには特定の SHA が含まれていますが、SHA がブランチの先頭である場合とそうでない場合があります。 配列には最大 10 個のブランチが含まれます。 | +Key | Type | Description +----|------|------------- +`id` | `integer` | The unique identifier of the status. +`sha`|`string` | The Commit SHA. +`state`|`string` | The new state. Can be `pending`, `success`, `failure`, or `error`. +`description`|`string` | The optional human-readable description added to the status. +`target_url`|`string` | The optional link added to the status. +`branches`|`array` | An array of branch objects containing the status' SHA. Each branch contains the given SHA, but the SHA may or may not be the head of the branch. The array includes a maximum of 10 branches. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.status }} -## Team +## team {% data reusables.webhooks.team_short_desc %} -### 利用の可否 +### Availability -- Organization webhook -- `members` 権限のある {% data variables.product.prodname_github_apps %} +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `members` permission -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| ----------------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `action` | `string` | 実行されたアクション. `created`、 `deleted`、`edited`、`added_to_repository`、`removed_from_repository` のいずれかを指定可。 | -| `Team` | `オブジェクト` | Team 自体。 | -| `changes` | `オブジェクト` | アクションが `edited` の場合の Team への変更。 | -| `changes[description][from]` | `string` | アクションが `edited` の場合、以前のバージョンの説明。 | -| `changes[name][from]` | `string` | アクションが`edited`だった場合、以前のバージョンの名前。 | -| `changes[privacy][from]` | `string` | アクションが `edited` の場合の以前のバージョンのTeam プライバシー。 | -| `changes[repository][permissions][from][admin]` | `boolean` | アクションが `edited` の場合の、リポジトリに対する以前のバージョンの Team メンバーの `admin` 権限。 | -| `changes[repository][permissions][from][pull]` | `boolean` | アクションが `edited` の場合の、リポジトリに対する以前のバージョンの Team メンバーの `pull` 権限。 | -| `changes[repository][permissions][from][push]` | `boolean` | アクションが `edited` の場合の、リポジトリに対する以前のバージョンの Team メンバーの `push` 権限。 | -| `リポジトリ` | `オブジェクト` | アクションが `added_to_repository`、`removeed_from_repository`、`edited` の場合の、Team の範囲に追加または削除されたリポジトリ。 `edited` アクションの場合、`repository` には、リポジトリに対する Team の新しい権限レベルも含まれます。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action that was performed. Can be one of `created`, `deleted`, `edited`, `added_to_repository`, or `removed_from_repository`. +`team` |`object` | The team itself. +`changes`|`object` | The changes to the team if the action was `edited`. +`changes[description][from]` |`string` | The previous version of the description if the action was `edited`. +`changes[name][from]` |`string` | The previous version of the name if the action was `edited`. +`changes[privacy][from]` |`string` | The previous version of the team's privacy if the action was `edited`. +`changes[repository][permissions][from][admin]` | `boolean` | The previous version of the team member's `admin` permission on a repository, if the action was `edited`. +`changes[repository][permissions][from][pull]` | `boolean` | The previous version of the team member's `pull` permission on a repository, if the action was `edited`. +`changes[repository][permissions][from][push]` | `boolean` | The previous version of the team member's `push` permission on a repository, if the action was `edited`. +`repository`|`object` | The repository that was added or removed from to the team's purview if the action was `added_to_repository`, `removed_from_repository`, or `edited`. For `edited` actions, `repository` also contains the team's new permission levels for the repository. {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.team.added_to_repository }} @@ -1325,54 +1325,54 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.team_add_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `members` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `members` permission -### webhook ペイロードオブジェクト +### Webhook payload object -| キー | 種類 | 説明 | -| ------ | -------- | --------------------------------------------------------------------------- | -| `Team` | `オブジェクト` | 変更された [Team](/rest/reference/teams)。 **注釈:** 古いイベントではペイロードに含まていれない場合があります。 | +Key | Type | Description +----|------|------------- +`team`|`object` | The [team](/rest/reference/teams) that was modified. **Note:** Older events may not include this in the payload. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.team_add }} {% ifversion ghes or ghae %} -## ユーザ +## user -ユーザが `created` または `deleted` を指定した場合。 +When a user is `created` or `deleted`. -### 利用の可否 -- GitHub Enterprise webhook。 詳しい情報については「[グローバル webhook](/rest/reference/enterprise-admin#global-webhooks/)」を参照してください。 +### Availability +- GitHub Enterprise webhooks. For more information, "[Global webhooks](/rest/reference/enterprise-admin#global-webhooks/)." -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.user.created }} {% endif %} -## Watch +## watch {% data reusables.webhooks.watch_short_desc %} -イベントのアクターは、リポジトリに Star を付けた[ユーザ](/rest/reference/users)であり、イベントのリポジトリは、Star を付けた[リポジトリ](/rest/reference/repos)です。 +The event’s actor is the [user](/rest/reference/users) who starred a repository, and the event’s repository is the [repository](/rest/reference/repos) that was starred. -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- `metadata` 権限のある {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `metadata` permission -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.watch_properties %} {% data reusables.webhooks.repo_desc %} @@ -1380,20 +1380,20 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.watch.started }} {% ifversion fpt or ghes or ghec %} ## workflow_dispatch -このイベントは、 ユーザが GitHub でワークフローの実行をトリガーするか、「[ワークフローディスパッチイベントの作成](/rest/reference/actions/#create-a-workflow-dispatch-event)」エンドポイントに `POST` リクエストを送信したときに発生します。 詳しい情報については、「[ワークフローをトリガーするイベント](/actions/reference/events-that-trigger-workflows#workflow_dispatch)」を参照してください。 +This event occurs when someone triggers a workflow run on GitHub or sends a `POST` request to the "[Create a workflow dispatch event](/rest/reference/actions/#create-a-workflow-dispatch-event)" endpoint. For more information, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." -### 利用の可否 +### Availability -- この webhook を受信するには、{% data variables.product.prodname_github_apps %} に `contents` 権限が必要です。 +- {% data variables.product.prodname_github_apps %} must have the `contents` permission to receive this webhook. -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.workflow_dispatch }} {% endif %} @@ -1404,20 +1404,20 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.workflow_job_short_desc %} -### 利用の可否 +### Availability -- リポジトリ webhook -- Organization webhook -- Enterprise webhook +- Repository webhooks +- Organization webhooks +- Enterprise webhooks -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.workflow_job_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.workflow_job }} @@ -1425,13 +1425,13 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% ifversion fpt or ghes or ghec %} ## workflow_run -{% data variables.product.prodname_actions %} ワークフロー実行がリクエスト済または完了したとき。 詳しい情報については、「[ワークフローをトリガーするイベント](/actions/reference/events-that-trigger-workflows#workflow_run)」を参照してください。 +When a {% data variables.product.prodname_actions %} workflow run is requested or completed. For more information, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_run)." -### 利用の可否 +### Availability -- `actions` または `contents` 権限のある {% data variables.product.prodname_github_apps %}。 +- {% data variables.product.prodname_github_apps %} with the `actions` or `contents` permissions. -### webhook ペイロードオブジェクト +### Webhook payload object {% data reusables.webhooks.workflow_run_properties %} {% data reusables.webhooks.workflow_desc %} @@ -1439,7 +1439,7 @@ GitHub Marketplace の購入に関連するアクティビティ。 {% data reus {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.sender_desc %} -### webhook ペイロードの例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.workflow_run }} {% endif %} diff --git a/translations/ja-JP/content/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md b/translations/ja-JP/content/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md index a11f87792f..f1b441fcdc 100644 --- a/translations/ja-JP/content/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md +++ b/translations/ja-JP/content/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md @@ -242,6 +242,7 @@ For more information, see "[Autolinked references and URLs](/articles/autolinked {% data reusables.repositories.autolink-references %} +{% ifversion ghes < 3.4 %} ## Content attachments Some {% data variables.product.prodname_github_apps %} provide information in {% data variables.product.product_name %} for URLs that link to their registered domains. {% data variables.product.product_name %} renders the information provided by the app under the URL in the body or comment of an issue or pull request. @@ -252,7 +253,7 @@ To see content attachments, you must have a {% data variables.product.prodname_g Content attachments will not be displayed for URLs that are part of a markdown link. -For more information about building a {% data variables.product.prodname_github_app %} that uses content attachments, see "[Using Content Attachments](/apps/using-content-attachments)." +For more information about building a {% data variables.product.prodname_github_app %} that uses content attachments, see "[Using Content Attachments](/apps/using-content-attachments)."{% endif %} ## Uploading assets diff --git a/translations/ja-JP/content/issues/guides.md b/translations/ja-JP/content/issues/guides.md index 0aad0b4699..1653a48f87 100644 --- a/translations/ja-JP/content/issues/guides.md +++ b/translations/ja-JP/content/issues/guides.md @@ -1,7 +1,7 @@ --- title: Issues guides -shortTitle: ガイド -intro: '作業を計画し、追跡するために{% data variables.product.prodname_github_issues %}を使う方法を学んでください。' +shortTitle: Guides +intro: 'Learn how you can use {% data variables.product.prodname_github_issues %} to plan and track your work.' allowTitleToDifferFromFilename: true layout: product-guides versions: diff --git a/translations/ja-JP/content/rest/overview/api-previews.md b/translations/ja-JP/content/rest/overview/api-previews.md index 54bb112651..36d03bec29 100644 --- a/translations/ja-JP/content/rest/overview/api-previews.md +++ b/translations/ja-JP/content/rest/overview/api-previews.md @@ -183,6 +183,7 @@ You can now configure whether organization members can create repositories and w {% endif %} +{% ifversion ghes < 3.4 %} ## Content attachments You can now provide more information in GitHub for URLs that link to registered domains by using the {% data variables.product.prodname_unfurls %} API. See "[Using content attachments](/apps/using-content-attachments/)" for more details. @@ -190,6 +191,7 @@ You can now provide more information in GitHub for URLs that link to registered **Custom media types:** `corsair-preview` **Announced:** [2018-12-10](https://developer.github.com/changes/2018-12-10-content-attachments-api/) +{% endif %} {% ifversion ghae or ghes < 3.3 %} ## Enable and disable Pages diff --git a/translations/ja-JP/content/rest/reference/permissions-required-for-github-apps.md b/translations/ja-JP/content/rest/reference/permissions-required-for-github-apps.md index a8142804dc..388c85781c 100644 --- a/translations/ja-JP/content/rest/reference/permissions-required-for-github-apps.md +++ b/translations/ja-JP/content/rest/reference/permissions-required-for-github-apps.md @@ -878,6 +878,7 @@ _Teams_ - [`GET /repos/:owner/:repo/secret-scanning/alerts`](/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository) (:read) - [`GET /repos/:owner/:repo/secret-scanning/alerts/:alert_number`](/rest/reference/secret-scanning#get-a-secret-scanning-alert) (:read) - [`PATCH /repos/:owner/:repo/secret-scanning/alerts/:alert_number`](/rest/reference/secret-scanning#update-a-secret-scanning-alert) (:write) +- [`GET /repos/:owner/:repo/secret-scanning/alerts/:alert_number/locations`](/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert) (:read) {% endif %} ### Permission on "security events" diff --git a/translations/ja-JP/content/sponsors/guides.md b/translations/ja-JP/content/sponsors/guides.md index e4e8e880e1..3754acf94b 100644 --- a/translations/ja-JP/content/sponsors/guides.md +++ b/translations/ja-JP/content/sponsors/guides.md @@ -1,7 +1,7 @@ --- -title: GitHub Sponsors ガイド -shortTitle: ガイド -intro: '{% data variables.product.prodname_sponsors %} を最大限に活用する方法を学びましょう。' +title: GitHub Sponsors guides +shortTitle: Guides +intro: 'Learn how to make the most of {% data variables.product.prodname_sponsors %}.' allowTitleToDifferFromFilename: true layout: product-guides versions: @@ -16,3 +16,4 @@ includeGuides: - /sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization - /sponsors/integrating-with-github-sponsors/configuring-webhooks-for-events-in-your-sponsored-account --- + diff --git a/translations/ja-JP/data/learning-tracks/README.md b/translations/ja-JP/data/learning-tracks/README.md index 62f1fa93f7..849f4615d0 100644 --- a/translations/ja-JP/data/learning-tracks/README.md +++ b/translations/ja-JP/data/learning-tracks/README.md @@ -6,7 +6,7 @@ 製品の学習トラックのデータは2カ所で定義されています: -1. 学習トラック名のシンプルな配列は、製品のサブランディングの索引ページの前付けで定義されています。 +1. A simple array of learning track names is defined in the product guides index page frontmatter. たとえば`content/actions/guides/index.md`では以下のようになっています: ``` @@ -23,13 +23,13 @@ たとえば`data/learning-tracks/actions.yml`では、コンテンツファイルの`learningTracks`配列の各アイテムは、`title`や`description`、`guides`リンクの配列といった追加データとともに表現されています。 - **バージョンごとに**このYAML中の1つの学習トラックを、`featured_track: true`を通じて「注目の」学習トラックとして指定する必要があります。これは、製品のサブランディングページの上部に表示されるように設定されます。 このプロパティがないと、テストは失敗します。 + One learning track in this YAML **per version** must be designated as a "featured" learning track via `featured_track: true`, which will set it to appear at the top of the product guides page. このプロパティがないと、テストは失敗します。 `featured_track`プロパティは、シンプルな論理値(すなわち`featured_track: true`)もしくは、バージョン付けの宣言を含む文字列( たとえば`featured_track: '{% ifversion fpt %}true{% else %}false{% endif %}'`)とすることができます。 バージョン付けを使用するなら、YMLファイルごとに複数の`featured_track`を持つことになりますが、必ず現在サポートされている各バージョンごとに1つだけがレンダリングされるようにしてください。 各バージョンに対して注目のリンクが1つより多くても少なくてもテストは失敗します。 ## バージョン管理 -学習トラックのバージョン付けは、ページのレンダリングの時点で処理されます。 コードは[`lib/learning-tracks.js`](lib/learning-tracks.js)にあり、これは`page.render()`によって呼ばれます。 そして処理された学習トラックは、`components/sublanding`によってレンダリングされます。 +学習トラックのバージョン付けは、ページのレンダリングの時点で処理されます。 コードは[`lib/learning-tracks.js`](lib/learning-tracks.js)にあり、これは`page.render()`によって呼ばれます。 The processed learning tracks are then rendered by `components/guides`. ガイドのためのYAMLファイルのバージョン付けでLiquid条件文を使う必要は**ありません**。 現在のバージョンに適用される学習トラックのガイドだけが自動的にレンダリングされます。 現在のバージョンに属するガイドを持つトラックがない場合、その学習トラックのセクションはまったくレンダリングされません。 diff --git a/translations/ja-JP/data/reusables/enterprise/ghec-cta-button.md b/translations/ja-JP/data/reusables/enterprise/ghec-cta-button.md index c5b6b1a7cd..c290f59900 100644 --- a/translations/ja-JP/data/reusables/enterprise/ghec-cta-button.md +++ b/translations/ja-JP/data/reusables/enterprise/ghec-cta-button.md @@ -1 +1 @@ -Try risk-free for 14 days +Try {% data variables.product.prodname_ghe_cloud %} for free diff --git a/translations/ja-JP/data/reusables/gated-features/environments.md b/translations/ja-JP/data/reusables/gated-features/environments.md index a44f59487f..a74a249da7 100644 --- a/translations/ja-JP/data/reusables/gated-features/environments.md +++ b/translations/ja-JP/data/reusables/gated-features/environments.md @@ -1 +1 @@ -Environments, environment protection rules, and environment secrets are available in **public** repositories for all products. For access to environments in **private** repositories, you must use {% data variables.product.prodname_enterprise %}.{% ifversion fpt or ghec %} {% data reusables.gated-features.more-info %}{% endif %} +Environments, environment protection rules, and environment secrets are available in **public** repositories for all products. For access to environments in **private** repositories, you must use {% data variables.product.prodname_enterprise %}. {% data reusables.gated-features.more-info %} diff --git a/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-groups-navigate-to-repo-org-enterprise.md b/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-groups-navigate-to-repo-org-enterprise.md index 2e4883beb4..e2fba7717f 100644 --- a/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-groups-navigate-to-repo-org-enterprise.md +++ b/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-groups-navigate-to-repo-org-enterprise.md @@ -1,10 +1,17 @@ +{% ifversion fpt %} +1. Navigate to the main page of the repository or organization where your self-hosted runner groups are located. +2. Click {% octicon "gear" aria-label="The Settings gear" %} **Settings**. +3. サイドバーで**Actions(アクション)**をクリックしてください。 +4. Click **Runner groups**. +{% elsif ghec or ghes or ghae %} 1. Navigate to where your self-hosted runner groups are located: - * **In an organization**: navigate to the main page and click {% octicon "gear" aria-label="The Settings gear" %} **Settings**. - * {% ifversion fpt or ghec %}**Enterpriseアカウントを使っている場合**: `https://github.com/enterprises/ENTERPRISE-NAME`にアクセスして、Enterpriseアカウントに移動してください。`ENTERPRISE-NAME`は自分のEnterpriseアカウント名に置き換えてください。{% elsif ghes or ghae %}**Enterpriseレベルランナーを使っている場合**: - + * **In an organization**: navigate to the main page and click {% octicon "gear" aria-label="The Settings gear" %} **Settings**.{% ifversion ghec %} + * **If using an enterprise account**: navigate to your enterprise account by visiting `https://github.com/enterprises/ENTERPRISE-NAME`, replacing `ENTERPRISE-NAME` with your enterprise account's name.{% elsif ghes or ghae %} + * **Enterpriseレベルのランナーを使っている場合**: 1. 任意のページの右上で {% octicon "rocket" aria-label="The rocket ship" %} をクリックします。 - 1. 左のサイドバーで**Enterprise overview(Enterpriseの概要)**をクリックしてください。 - 1. {% endif %}Enterpriseサイドバー内で{% octicon "law" aria-label="The law icon" %}**Policies(ポリシー)**をクリックしてください。 -1. Navigate to the "Runner groups" settings: - * **In an organization**: Click **Actions** in the left sidebar{% ifversion fpt or ghec %}, then click **Runner groups** below it{% endif %}. - * {% ifversion fpt or ghec %}**If using an enterprise account**:{% elsif ghes or ghae %}**If using an enterprise-level runner**:{% endif %} Click **Actions** under "{% octicon "law" aria-label="The law icon" %} Policies"{% ifversion fpt or ghec %}, then click the **Runners groups** tab{% endif %}. + 2. 左のサイドバーで**Enterprise overview(Enterpriseの概要)**をクリックしてください。 + 3. In the enterprise sidebar, click {% octicon "law" aria-label="The law icon" %} **Policies**.{% endif %} +2. Navigate to the "Runner groups" settings: + * **In an organization**: Click **Actions** in the left sidebar{% ifversion fpt or ghec %}, then click **Runner groups** below it{% endif %}.{% ifversion ghec or ghes or ghae %} + * {% ifversion ghec %}**If using an enterprise account**:{% elsif ghes or ghae %}**If using an enterprise-level runner**:{% endif %} Click **Actions** under "{% octicon "law" aria-label="The law icon" %} Policies"{% ifversion ghec %}, then click the **Runners groups** tab{% endif %}.{% endif %} +{% endif %} diff --git a/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-labels-runs-on.md b/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-labels-runs-on.md index 2221d625d9..18ac0bd3c8 100644 --- a/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-labels-runs-on.md +++ b/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-labels-runs-on.md @@ -1,3 +1,5 @@ ジョブでセルフホストランナーを指定するには、ワークフローファイル中でセルフホストランナーのラベルで`runs-on`を設定してください。 -All self-hosted runners have the `self-hosted` label. Using only this label will select any self-hosted runner. To select runners that meet certain criteria, such as operating system or architecture, provide an array of labels that begins with `self-hosted` (this must be listed first) and then includes additional labels as needed. +All self-hosted runners have the `self-hosted` label. Using only this label will select any self-hosted runner. To select runners that meet certain criteria, such as operating system or architecture, we recommend providing an array of labels that begins with `self-hosted` (this must be listed first) and then includes additional labels as needed. When you specify an array of labels, jobs will be queued on runners that have all the labels that you specify. + +Although the `self-hosted` label is not required, we strongly recommend specifying it when using self-hosted runners to ensure that your job does not unintentionally specify any current or future {% data variables.product.prodname_dotcom %}-hosted runners. diff --git a/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-management-permissions-required.md b/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-management-permissions-required.md index 3db65e6579..4f7a733354 100644 --- a/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-management-permissions-required.md +++ b/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-management-permissions-required.md @@ -2,7 +2,7 @@ - **ユーザリポジトリ**: リポジトリのオーナーでなければなりません。 - **Organization**: Organizationのオーナーでなければなりません。 - **Organizationのリポジトリ**: Organizationのオーナーであるか、リポジトリへの管理アクセス権を持っていなければなりません。 -{% ifversion fpt or ghec %} +{% ifversion ghec %} - **Enterpriseアカウント**: Enterpriseのオーナーでなければなりません。 {% elsif ghes or ghae %} - **Enterprise**: {% data variables.product.prodname_enterprise %}サイト管理者でなければなりません。 diff --git a/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-navigate-to-org-enterprise.md b/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-navigate-to-org-enterprise.md index d44e3129fc..32277c1ac1 100644 --- a/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-navigate-to-org-enterprise.md +++ b/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-navigate-to-org-enterprise.md @@ -1,10 +1,17 @@ +{% ifversion fpt %} +1. Navigate to the main page of the organization where your self-hosted runner group is registered. +2. Click {% octicon "gear" aria-label="The Settings gear" %} **Settings**. +3. サイドバーで**Actions(アクション)**をクリックしてください。 +4. Click **Runners**. +{% elsif ghec or ghes or ghae %} 1. セルフホストランナーが登録されているところへアクセスしてください: * **In an organization**: navigate to the main page and click {% octicon "gear" aria-label="The Settings gear" %} **Settings**. - * {% ifversion fpt %}**Enterpriseアカウントを使っている場合**: `https://github.com/enterprises/ENTERPRISE-NAME`にアクセスして、Enterpriseアカウントに移動してください。`ENTERPRISE-NAME`は自分のEnterpriseアカウント名に置き換えてください。{% elsif ghes or ghae %}**Enterpriseレベルランナーを使っている場合**: + * {% ifversion ghec %}**Enterpriseアカウントを使っている場合**: `https://github.com/enterprises/ENTERPRISE-NAME`にアクセスして、Enterpriseアカウントに移動してください。`ENTERPRISE-NAME`は自分のEnterpriseアカウント名に置き換えてください。{% elsif ghes or ghae %}**Enterpriseレベルランナーを使っている場合**: 1. 任意のページの右上で {% octicon "rocket" aria-label="The rocket ship" %} をクリックします。 1. 左のサイドバーで**Enterprise overview(Enterpriseの概要)**をクリックしてください。 - 1. {% endif %}Enterpriseサイドバー内で{% octicon "law" aria-label="The law icon" %}**Policies(ポリシー)**をクリックしてください。 + 1. In the enterprise sidebar, {% octicon "law" aria-label="The law icon" %} **Policies**.{% endif %} 1. {% data variables.product.prodname_actions %}設定にアクセスしてください: - * **In an organization**: Click **Actions** in the left sidebar{% ifversion fpt or ghes > 3.1 or ghae-next %}, then click **Runners**{% endif %}. - * {% ifversion fpt %}**Enterpriseアカウントを使っている場合**:{% elsif ghes or ghae %}**Enterpriseレベルのランナーを使っている場合**:{% endif %} "{% octicon "law" aria-label="The law icon" %} Policies(ポリシー)”の下の**Actions**をクリック{% ifversion fpt or ghes > 3.1 or ghae-next %}し、続いて**Runners(ランナー)**タブをクリック{% endif %}してください。 + * **In an organization**: Click **Actions** in the left sidebar{% ifversion fpt or ghec or ghes > 3.1 or ghae-next %}, then click **Runners**{% endif %}. + * {% ifversion ghec %}**Enterpriseアカウントを使っている場合**:{% elsif ghes or ghae %}**Enterpriseレベルのランナーを使っている場合**:{% endif %} "{% octicon "law" aria-label="The law icon" %} Policies(ポリシー)”の下の**Actions**をクリック{% ifversion fpt or ghec or ghes > 3.1 or ghae-next %}し、続いて**Runners(ランナー)**タブをクリック{% endif %}してください。 +{% endif %} diff --git a/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-navigate-to-repo-org-enterprise.md b/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-navigate-to-repo-org-enterprise.md index 85a7296dcc..5b148a552d 100644 --- a/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-navigate-to-repo-org-enterprise.md +++ b/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-navigate-to-repo-org-enterprise.md @@ -1,10 +1,17 @@ +{% ifversion fpt %} +1. Navigate to the main page of the organization or repository where your self-hosted runner group is registered. +2. Click {% octicon "gear" aria-label="The Settings gear" %} **Settings**. +3. サイドバーで**Actions(アクション)**をクリックしてください。 +4. Click **Runners**. +{% elsif ghec or ghes or ghae %} 1. セルフホストランナーが登録されているところへアクセスしてください: - * **Organizationもしくはリポジトリ内**: メインページにアクセスして{% octicon "gear" aria-label="The Settings gear" %}** Settings(設定)**をクリックしてください。 - * {% ifversion fpt or ghec %}**Enterpriseアカウントを使っている場合**: `https://github.com/enterprises/ENTERPRISE-NAME`にアクセスして、Enterpriseアカウントに移動してください。`ENTERPRISE-NAME`は自分のEnterpriseアカウント名に置き換えてください。{% elsif ghes or ghae %}**Enterpriseレベルランナーを使っている場合**: - + * **Organizationもしくはリポジトリ内**: メインページにアクセスして{% octicon "gear" aria-label="The Settings gear" %}** Settings(設定)**をクリックしてください。 {% ifversion ghec %} + * **If using an enterprise account**: navigate to your enterprise account by visiting `https://github.com/enterprises/ENTERPRISE-NAME`, replacing `ENTERPRISE-NAME` with your enterprise account's name.{% elsif ghes or ghae %} + * **Enterpriseレベルのランナーを使っている場合**: 1. 任意のページの右上で {% octicon "rocket" aria-label="The rocket ship" %} をクリックします。 - 1. 左のサイドバーで**Enterprise overview(Enterpriseの概要)**をクリックしてください。 - 1. {% endif %}Enterpriseサイドバー内で{% octicon "law" aria-label="The law icon" %}**Policies(ポリシー)**をクリックしてください。 -1. {% data variables.product.prodname_actions %}設定にアクセスしてください: - * **Organizationもしくはリポジトリ内**: 左のサイドバーで**Actions**をクリック{% ifversion fpt or ghes > 3.1 or ghae-next or ghec %}し、続いて**Runners(ランナー)**をクリック{% endif %}してください。 - * {% ifversion fpt or ghec %}**Enterpriseアカウントを使っている場合**:{% elsif ghes or ghae %}**Enterpriseレベルのランナーを使っている場合**:{% endif %} "{% octicon "law" aria-label="The law icon" %} Policies(ポリシー)”の下の**Actions**をクリック{% ifversion fpt or ghes > 3.1 or ghae-next or ghec %}し、続いて**Runners(ランナー)**タブをクリック{% endif %}してください。 + 2. 左のサイドバーで**Enterprise overview(Enterpriseの概要)**をクリックしてください。 + 3. In the enterprise sidebar, click {% octicon "law" aria-label="The law icon" %} **Policies**.{% endif %} +2. {% data variables.product.prodname_actions %}設定にアクセスしてください: + * **In an organization or repository**: Click **Actions** in the left sidebar{% ifversion fpt or ghes > 3.1 or ghae-next or ghec %}, then click **Runners**{% endif %}.{% ifversion ghec or ghae or ghes %} + * {% ifversion ghec %}**If using an enterprise account**:{% elsif ghes or ghae %}**If using an enterprise-level runner**:{% endif %} Click **Actions** under "{% octicon "law" aria-label="The law icon" %} Policies"{% ifversion ghes > 3.1 or ghae-next or ghec %}, then click the **Runners** tab{% endif %}.{% endif %} +{% endif %} diff --git a/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-reusing.md b/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-reusing.md index 8a2b06fc8d..30303cfc86 100644 --- a/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-reusing.md +++ b/translations/ja-JP/data/reusables/github-actions/self-hosted-runner-reusing.md @@ -1 +1 @@ -あるいは、{% data variables.product.product_name %}上のリポジトリ、Organization、Enterpriseへのランナーの削除のアクセス権がないものの、ランナーマシンを再利用したいのであれば、セルフホストランナーアプリケーションディレクトリ内の`.runner`ファイルを削除できます。 そうすれば、セルフホストランナーアプリケーションをダウンロードし直さなくても、ランナーを再登録できるようになります。 +Alternatively, if you don't have access to the repository{% ifversion fpt %} or organization{% elsif ghes or ghec or ghae %}, organization, or enterprise{% endif %} on {% data variables.product.product_name %} to remove a runner, but you would like to re-use the runner machine, then you can delete the `.runner` file inside the self-hosted runner application directory. そうすれば、セルフホストランナーアプリケーションをダウンロードし直さなくても、ランナーを再登録できるようになります。 diff --git a/translations/ja-JP/data/ui.yml b/translations/ja-JP/data/ui.yml index 26f7213514..346deb976e 100644 --- a/translations/ja-JP/data/ui.yml +++ b/translations/ja-JP/data/ui.yml @@ -150,7 +150,7 @@ product_landing: upgrade_from: アップグレード元 browse_all_docs: すべてのドキュメントの参照 explore_release_notes: リリースノートを調べる -product_sublanding: +product_guides: start: 開始 start_path: 開始パス learning_paths: '{{ productMap[currentProduct].name }}の学習パス' diff --git a/translations/log/cn-resets.csv b/translations/log/cn-resets.csv index 887339255a..cd8769fcef 100644 --- a/translations/log/cn-resets.csv +++ b/translations/log/cn-resets.csv @@ -16,6 +16,7 @@ translations/zh-CN/content/actions/automating-builds-and-tests/building-and-test translations/zh-CN/content/actions/automating-builds-and-tests/building-and-testing-python.md,rendering error translations/zh-CN/content/actions/creating-actions/creating-a-javascript-action.md,rendering error translations/zh-CN/content/actions/creating-actions/metadata-syntax-for-github-actions.md,rendering error +translations/zh-CN/content/actions/creating-actions/releasing-and-maintaining-actions.md,rendering error translations/zh-CN/content/actions/deployment/about-deployments/index.md,rendering error translations/zh-CN/content/actions/deployment/deploying-to-your-cloud-provider/index.md,rendering error translations/zh-CN/content/actions/deployment/managing-your-deployments/index.md,rendering error @@ -24,10 +25,12 @@ translations/zh-CN/content/actions/deployment/security-hardening-your-deployment translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-google-cloud-platform.md,rendering error translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/index.md,rendering error translations/zh-CN/content/actions/deployment/security-hardening-your-deployments/using-openid-connect-with-reusable-workflows.md,rendering error +translations/zh-CN/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md,rendering error translations/zh-CN/content/actions/guides.md,rendering error translations/zh-CN/content/actions/hosting-your-own-runners/about-self-hosted-runners.md,rendering error translations/zh-CN/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md,Listed in localization-support#489 translations/zh-CN/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md,rendering error +translations/zh-CN/content/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups.md,rendering error translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md,Listed in localization-support#489 translations/zh-CN/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md,rendering error translations/zh-CN/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md,rendering error @@ -152,9 +155,11 @@ translations/zh-CN/content/code-security/code-scanning/using-codeql-code-scannin 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,rendering error translations/zh-CN/content/code-security/getting-started/github-security-features.md,rendering error translations/zh-CN/content/code-security/getting-started/securing-your-organization.md,rendering error +translations/zh-CN/content/code-security/guides.md,rendering error translations/zh-CN/content/code-security/secret-scanning/about-secret-scanning.md,rendering error translations/zh-CN/content/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories.md,rendering error translations/zh-CN/content/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning.md,rendering error +translations/zh-CN/content/code-security/secret-scanning/managing-alerts-from-secret-scanning.md,rendering error translations/zh-CN/content/code-security/security-overview/about-the-security-overview.md,rendering error translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions.md,rendering error translations/zh-CN/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot.md,rendering error @@ -185,6 +190,7 @@ translations/zh-CN/content/codespaces/developing-in-codespaces/developing-in-a-c translations/zh-CN/content/codespaces/developing-in-codespaces/index.md,rendering error translations/zh-CN/content/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code.md,rendering error translations/zh-CN/content/codespaces/developing-in-codespaces/using-source-control-in-your-codespace.md,rendering error +translations/zh-CN/content/codespaces/guides.md,rendering error translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization.md,rendering error translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization.md,rendering error translations/zh-CN/content/codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces.md,rendering error @@ -212,12 +218,14 @@ translations/zh-CN/content/developers/apps/building-oauth-apps/scopes-for-oauth- translations/zh-CN/content/developers/apps/getting-started-with-apps/about-apps.md,rendering error translations/zh-CN/content/developers/apps/getting-started-with-apps/activating-optional-features-for-apps.md,rendering error translations/zh-CN/content/developers/apps/getting-started-with-apps/migrating-oauth-apps-to-github-apps.md,rendering error +translations/zh-CN/content/developers/apps/guides/using-content-attachments.md,rendering error translations/zh-CN/content/developers/github-marketplace/github-marketplace-overview/about-github-marketplace.md,rendering error translations/zh-CN/content/developers/github-marketplace/github-marketplace-overview/index.md,rendering error translations/zh-CN/content/developers/github-marketplace/using-the-github-marketplace-api-in-your-app/handling-new-purchases-and-free-trials.md,rendering error translations/zh-CN/content/developers/overview/managing-deploy-keys.md,rendering error translations/zh-CN/content/developers/overview/secret-scanning-partner-program.md,rendering error translations/zh-CN/content/developers/webhooks-and-events/webhooks/about-webhooks.md,rendering error +translations/zh-CN/content/developers/webhooks-and-events/webhooks/webhook-events-and-payloads.md,rendering error translations/zh-CN/content/discussions/collaborating-with-your-community-using-discussions/about-discussions.md,rendering error translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-campus-advisors.md,rendering error translations/zh-CN/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-github-campus-program.md,rendering error @@ -250,6 +258,7 @@ translations/zh-CN/content/github/writing-on-github/working-with-advanced-format translations/zh-CN/content/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections.md,rendering error translations/zh-CN/content/graphql/guides/index.md,rendering error translations/zh-CN/content/graphql/guides/migrating-graphql-global-node-ids.md,rendering error +translations/zh-CN/content/issues/guides.md,rendering error translations/zh-CN/content/issues/trying-out-the-new-projects-experience/customizing-your-project-views.md,rendering error translations/zh-CN/content/issues/trying-out-the-new-projects-experience/managing-access-to-projects.md,rendering error translations/zh-CN/content/issues/using-labels-and-milestones-to-track-work/managing-labels.md,rendering error @@ -331,6 +340,7 @@ translations/zh-CN/content/search-github/searching-on-github/searching-discussio translations/zh-CN/content/search-github/searching-on-github/searching-for-repositories.md,rendering error translations/zh-CN/content/search-github/searching-on-github/searching-issues-and-pull-requests.md,rendering error translations/zh-CN/content/sponsors/getting-started-with-github-sponsors/about-github-sponsors.md,rendering error +translations/zh-CN/content/sponsors/guides.md,rendering error translations/zh-CN/content/sponsors/receiving-sponsorships-through-github-sponsors/about-github-sponsors-for-open-source-contributors.md,rendering error translations/zh-CN/data/release-notes/enterprise-server/2-20/15.yml,Listed in localization-support#489 translations/zh-CN/data/release-notes/enterprise-server/2-21/6.yml,Listed in localization-support#489 diff --git a/translations/log/ja-resets.csv b/translations/log/ja-resets.csv index 118f06bc16..faa44fbd80 100644 --- a/translations/log/ja-resets.csv +++ b/translations/log/ja-resets.csv @@ -20,12 +20,16 @@ translations/ja-JP/content/actions/creating-actions/about-custom-actions.md,rend translations/ja-JP/content/actions/creating-actions/creating-a-javascript-action.md,rendering error translations/ja-JP/content/actions/creating-actions/metadata-syntax-for-github-actions.md,rendering error translations/ja-JP/content/actions/creating-actions/publishing-actions-in-github-marketplace.md,rendering error +translations/ja-JP/content/actions/creating-actions/releasing-and-maintaining-actions.md,rendering error translations/ja-JP/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services.md,rendering error translations/ja-JP/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-azure.md,rendering error translations/ja-JP/content/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-google-cloud-platform.md,rendering error translations/ja-JP/content/actions/deployment/security-hardening-your-deployments/using-openid-connect-with-reusable-workflows.md,rendering error +translations/ja-JP/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md,rendering error translations/ja-JP/content/actions/guides.md,rendering error translations/ja-JP/content/actions/hosting-your-own-runners/about-self-hosted-runners.md,rendering error +translations/ja-JP/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md,rendering error +translations/ja-JP/content/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups.md,rendering error translations/ja-JP/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md,Listed in localization-support#489 translations/ja-JP/content/actions/hosting-your-own-runners/monitoring-and-troubleshooting-self-hosted-runners.md,rendering error translations/ja-JP/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md,rendering error @@ -165,10 +169,12 @@ translations/ja-JP/content/code-security/code-scanning/using-codeql-code-scannin translations/ja-JP/content/code-security/getting-started/github-security-features.md,rendering error translations/ja-JP/content/code-security/getting-started/securing-your-organization.md,rendering error translations/ja-JP/content/code-security/getting-started/securing-your-repository.md,rendering error +translations/ja-JP/content/code-security/guides.md,rendering error translations/ja-JP/content/code-security/index.md,rendering error translations/ja-JP/content/code-security/secret-scanning/about-secret-scanning.md,rendering error translations/ja-JP/content/code-security/secret-scanning/configuring-secret-scanning-for-your-repositories.md,rendering error translations/ja-JP/content/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning.md,rendering error +translations/ja-JP/content/code-security/secret-scanning/managing-alerts-from-secret-scanning.md,rendering error translations/ja-JP/content/code-security/security-overview/about-the-security-overview.md,rendering error translations/ja-JP/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions.md,rendering error translations/ja-JP/content/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot.md,rendering error @@ -197,6 +203,7 @@ translations/ja-JP/content/codespaces/developing-in-codespaces/developing-in-a-c translations/ja-JP/content/codespaces/developing-in-codespaces/index.md,rendering error translations/ja-JP/content/codespaces/developing-in-codespaces/using-codespaces-in-visual-studio-code.md,rendering error translations/ja-JP/content/codespaces/developing-in-codespaces/using-source-control-in-your-codespace.md,rendering error +translations/ja-JP/content/codespaces/guides.md,rendering error translations/ja-JP/content/codespaces/managing-codespaces-for-your-organization/enabling-codespaces-for-your-organization.md,rendering error translations/ja-JP/content/codespaces/managing-codespaces-for-your-organization/managing-billing-for-codespaces-in-your-organization.md,rendering error translations/ja-JP/content/codespaces/managing-codespaces-for-your-organization/managing-repository-access-for-your-organizations-codespaces.md,rendering error @@ -230,6 +237,7 @@ translations/ja-JP/content/developers/apps/building-oauth-apps/scopes-for-oauth- translations/ja-JP/content/developers/apps/getting-started-with-apps/about-apps.md,rendering error translations/ja-JP/content/developers/apps/getting-started-with-apps/activating-optional-features-for-apps.md,rendering error translations/ja-JP/content/developers/apps/getting-started-with-apps/migrating-oauth-apps-to-github-apps.md,rendering error +translations/ja-JP/content/developers/apps/guides/using-content-attachments.md,rendering error translations/ja-JP/content/developers/github-marketplace/github-marketplace-overview/about-github-marketplace.md,rendering error translations/ja-JP/content/developers/github-marketplace/github-marketplace-overview/index.md,rendering error translations/ja-JP/content/developers/github-marketplace/selling-your-app-on-github-marketplace/pricing-plans-for-github-marketplace-apps.md,rendering error @@ -237,6 +245,7 @@ translations/ja-JP/content/developers/github-marketplace/using-the-github-market translations/ja-JP/content/developers/overview/managing-deploy-keys.md,rendering error translations/ja-JP/content/developers/overview/secret-scanning-partner-program.md,rendering error translations/ja-JP/content/developers/webhooks-and-events/webhooks/about-webhooks.md,rendering error +translations/ja-JP/content/developers/webhooks-and-events/webhooks/webhook-events-and-payloads.md,rendering error translations/ja-JP/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/about-github-campus-program.md,rendering error translations/ja-JP/content/education/explore-the-benefits-of-teaching-and-learning-with-github-education/use-github-at-your-educational-institution/index.md,rendering error translations/ja-JP/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,rendering error @@ -268,6 +277,7 @@ translations/ja-JP/content/github/writing-on-github/working-with-advanced-format translations/ja-JP/content/github/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections.md,rendering error translations/ja-JP/content/graphql/guides/index.md,rendering error translations/ja-JP/content/graphql/guides/migrating-graphql-global-node-ids.md,rendering error +translations/ja-JP/content/issues/guides.md,rendering error translations/ja-JP/content/issues/tracking-your-work-with-issues/planning-and-tracking-work-for-your-team-or-project.md,rendering error translations/ja-JP/content/issues/trying-out-the-new-projects-experience/customizing-your-project-views.md,rendering error translations/ja-JP/content/issues/trying-out-the-new-projects-experience/managing-access-to-projects.md,rendering error @@ -341,6 +351,7 @@ translations/ja-JP/content/search-github/searching-on-github/searching-discussio translations/ja-JP/content/search-github/searching-on-github/searching-for-repositories.md,rendering error translations/ja-JP/content/search-github/searching-on-github/searching-issues-and-pull-requests.md,rendering error translations/ja-JP/content/sponsors/getting-started-with-github-sponsors/about-github-sponsors.md,rendering error +translations/ja-JP/content/sponsors/guides.md,rendering error translations/ja-JP/content/sponsors/receiving-sponsorships-through-github-sponsors/about-github-sponsors-for-open-source-contributors.md,rendering error translations/ja-JP/data/release-notes/enterprise-server/2-20/15.yml,Listed in localization-support#489 translations/ja-JP/data/release-notes/enterprise-server/2-21/6.yml,Listed in localization-support#489 diff --git a/translations/zh-CN/content/actions/creating-actions/releasing-and-maintaining-actions.md b/translations/zh-CN/content/actions/creating-actions/releasing-and-maintaining-actions.md index d02b15cf62..a75f639e0f 100644 --- a/translations/zh-CN/content/actions/creating-actions/releasing-and-maintaining-actions.md +++ b/translations/zh-CN/content/actions/creating-actions/releasing-and-maintaining-actions.md @@ -9,6 +9,7 @@ topics: - Community versions: fpt: '*' + ghec: '*' ghes: '*' ghae: '*' --- @@ -16,7 +17,7 @@ versions: {% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %} -## 简介 +## Introduction After you create an action, you'll want to continue releasing new features while working with community contributions. This tutorial describes an example process you can follow to release and maintain actions in open source. The example: @@ -37,7 +38,7 @@ JavaScript actions are Node.js repositories with metadata. However, JavaScript a * Dependent packages are committed alongside the code, typically in a compiled and minified form. This means that automated builds and secure community contributions are important. -{% ifversion fpt %} +{% ifversion fpt or ghec %} * Tagged releases can be published directly to {% data variables.product.prodname_marketplace %} and consumed by workflows across {% data variables.product.prodname_dotcom %}. @@ -54,7 +55,7 @@ To support the developer process in the next section, add two {% data variables. ### Example developer process -Here is an example process that you can follow to automatically run tests, create a release{% ifversion fpt%} and publish to {% data variables.product.prodname_marketplace %}{% endif %}, and publish your action. +Here is an example process that you can follow to automatically run tests, create a release{% ifversion fpt or ghec%} and publish to {% data variables.product.prodname_marketplace %}{% endif %}, and publish your action. 1. Do feature work in branches per GitHub flow. For more information, see "[GitHub flow](/get-started/quickstart/github-flow)." * Whenever a commit is pushed to the feature branch, your testing workflow will automatically run the tests. @@ -65,13 +66,13 @@ Here is an example process that you can follow to automatically run tests, creat * **Note:** for security reasons, workflows triggered by `pull_request` from forks have restricted `GITHUB_TOKEN` permissions and do not have access to secrets. If your tests or other workflows triggered upon pull request require access to secrets, consider using a different event like a [manual trigger](/actions/reference/events-that-trigger-workflows#manual-events) or a [`pull_request_target`](/actions/reference/events-that-trigger-workflows#pull_request_target). Read more [here](/actions/reference/events-that-trigger-workflows#pull-request-events-for-forked-repositories). -3. Create a semantically tagged release. {% ifversion fpt %} You may also publish to {% data variables.product.prodname_marketplace %} with a simple checkbox. {% endif %} For more information, see "[Managing releases in a repository](/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release)"{% ifversion fpt %} and "[Publishing actions in {% data variables.product.prodname_marketplace %}](/actions/creating-actions/publishing-actions-in-github-marketplace#publishing-an-action)"{% endif %}. +3. Create a semantically tagged release. {% ifversion fpt or ghec %} You may also publish to {% data variables.product.prodname_marketplace %} with a simple checkbox. {% endif %} For more information, see "[Managing releases in a repository](/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release)"{% ifversion fpt or ghec %} and "[Publishing actions in {% data variables.product.prodname_marketplace %}](/actions/creating-actions/publishing-actions-in-github-marketplace#publishing-an-action)"{% endif %}. * When a release is published or edited, your release workflow will automatically take care of compilation and adjusting tags. * We recommend creating releases using semantically versioned tags – for example, `v1.1.3` – and keeping major (`v1`) and minor (`v1.1`) tags current to the latest appropriate commit. For more information, see "[About custom actions](/actions/creating-actions/about-custom-actions#using-release-management-for-actions)" and "[About semantic versioning](https://docs.npmjs.com/about-semantic-versioning). -### 结果 +### Results Unlike some other automated release management strategies, this process intentionally does not commit dependencies to the `main` branch, only to the tagged release commits. By doing so, you encourage users of your action to reference named tags or `sha`s, and you help ensure the security of third party pull requests by doing the build yourself during a release. @@ -81,12 +82,12 @@ Using semantic releases means that the users of your actions can pin their workf {% data variables.product.product_name %} provides tools and guides to help you work with the open source community. Here are a few tools we recommend setting up for healthy bidirectional communication. By providing the following signals to the community, you encourage others to use, modify, and contribute to your action: -* Maintain a `README` with plenty of usage examples and guidance. 更多信息请参阅“[关于自述文件](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes)”。 -* Include a workflow status badge in your `README` file. 更多信息请参阅“[添加工作流程状态徽章](/actions/managing-workflow-runs/adding-a-workflow-status-badge)”。 Also visit [shields.io](https://shields.io/) to learn about other badges that you can add.{% ifversion fpt %} +* Maintain a `README` with plenty of usage examples and guidance. For more information, see "[About READMEs](/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-readmes)." +* Include a workflow status badge in your `README` file. For more information, see "[Adding a workflow status badge](/actions/managing-workflow-runs/adding-a-workflow-status-badge)." Also visit [shields.io](https://shields.io/) to learn about other badges that you can add.{% ifversion fpt or ghec %} * Add community health files like `CODE_OF_CONDUCT`, `CONTRIBUTING`, and `SECURITY`. For more information, see "[Creating a default community health file](/github/building-a-strong-community/creating-a-default-community-health-file#supported-file-types)."{% endif %} * Keep issues current by utilizing actions like [actions/stale](https://github.com/actions/stale). -## 延伸阅读 +## Further reading Examples where similar patterns are employed include: diff --git a/translations/zh-CN/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md b/translations/zh-CN/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md index c0e15c7f98..6713a9da75 100644 --- a/translations/zh-CN/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md +++ b/translations/zh-CN/content/actions/deployment/targeting-different-environments/using-environments-for-deployment.md @@ -1,7 +1,7 @@ --- title: Using environments for deployment shortTitle: Use environments for deployment -intro: 您可以使用保护规则和机密配置环境。 A workflow job that references an environment must follow any protection rules for the environment before running or accessing the environment's secrets. +intro: You can configure environments with protection rules and secrets. A workflow job that references an environment must follow any protection rules for the environment before running or accessing the environment's secrets. product: '{% data reusables.gated-features.environments %}' miniTocMaxHeadingLevel: 3 redirect_from: @@ -17,56 +17,58 @@ versions: {% data reusables.actions.ae-beta %} -## 关于环境 +## About environments Environments are used to describe a general deployment target like `production`, `staging`, or `development`. When a {% data variables.product.prodname_actions %} workflow deploys to an environment, the environment is displayed on the main page of the repository. For more information about viewing deployments to environments, see "[Viewing deployment history](/developers/overview/viewing-deployment-history)." -您可以使用保护规则和机密配置环境。 当工作流程引用环境时,作业在环境的所有保护规则通过之前不会开始。 在所有环境保护规则通过之前,作业也不能访问在环境中定义的机密。 +You can configure environments with protection rules and secrets. When a workflow job references an environment, the job won't start until all of the environment's protection rules pass. A job also cannot access secrets that are defined in an environment until all the environment protection rules pass. {% ifversion fpt %} {% note %} -**Note:** If you don't use {% data variables.product.prodname_ghe_cloud %} and convert a repository from public to private, any configured protection rules or environment secrets will be ignored, and you will not be able to configure any environments. 如果将仓库转换回公共,您将有权访问以前配置的任何保护规则和环境机密。 {% data reusables.enterprise.link-to-ghec-trial %} +**Note:** You can only configure environments for public repositories. If you convert a repository from public to private, any configured protection rules or environment secrets will be ignored, and you will not be able to configure any environments. If you convert your repository back to public, you will have access to any previously configured protection rules and environment secrets. + +Organizations that use {% data variables.product.prodname_ghe_cloud %} can configure environments for private repositories. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/deployment/targeting-different-environments/using-environments-for-deployment). {% data reusables.enterprise.link-to-ghec-trial %} {% endnote %} {% endif %} -## 环境保护规则 +## Environment protection rules -环境保护规则要求通过特定的条件,然后引用环境的作业才能继续。 {% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}您可以使用环境保护规则来要求手动批准、延迟作业或者将环境限于某些分支。{% else %}您可以使用环境保护规则要求手动批准或延迟作业。{% endif %} +Environment protection rules require specific conditions to pass before a job referencing the environment can proceed. {% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}You can use environment protection rules to require a manual approval, delay a job, or restrict the environment to certain branches.{% else %}You can use environment protection rules to require a manual approval or delay a job.{% endif %} -### 需要的审查者 +### Required reviewers -使用所需的审查者要求特定人员或团队批准引用环境的工作流程作业。 您最多可以列出六个用户或团队作为审查者。 审查者必须至少具有对仓库的读取访问权限。 只有一个必需的审查者需要批准该作业才能继续。 +Use required reviewers to require a specific person or team to approve workflow jobs that reference the environment. You can list up to six users or teams as reviewers. The reviewers must have at least read access to the repository. Only one of the required reviewers needs to approve the job for it to proceed. -有关与必需审查者一起审查引用环境的作业的详细信息,请参阅“[审查部署](/actions/managing-workflow-runs/reviewing-deployments)”。 +For more information on reviewing jobs that reference an environment with required reviewers, see "[Reviewing deployments](/actions/managing-workflow-runs/reviewing-deployments)." -### 等待计时器 +### Wait timer -在最初触发作业后,使用等待计时器将作业延迟特定时间。 时间(分钟)必须是 0 至 43,200(30天)之间的整数。 +Use a wait timer to delay a job for a specific amount of time after the job is initially triggered. The time (in minutes) must be an integer between 0 and 43,200 (30 days). {% ifversion fpt or ghae-next or ghes > 3.1 or ghec %} -### 部署分支 +### Deployment branches -使用部署分支来限制哪些分支可以部署到环境中。 以下是环境部署分支的选项: +Use deployment branches to restrict which branches can deploy to the environment. Below are the options for deployment branches for an environment: -* **All branches(所有分支)**:仓库中的所有分支都可以部署到环境。 -* **Protected branches(受保护的分支)**:只有启用分支保护规则的分支才能部署到环境。 如果没有为仓库中的任何分支定义分支保护规则,那么所有分支都可以部署。 有关分支保护规则的更多信息,请参阅“[关于受保护分支](/github/administering-a-repository/about-protected-branches)”。 -* **Selected branches(所选分支)**:只有与指定的名称模式匹配的分支才能部署到环境。 +* **All branches**: All branches in the repository can deploy to the environment. +* **Protected branches**: Only branches with branch protection rules enabled can deploy to the environment. If no branch protection rules are defined for any branch in the repository, then all branches can deploy. For more information about branch protection rules, see "[About protected branches](/github/administering-a-repository/about-protected-branches)." +* **Selected branches**: Only branches that match your specified name patterns can deploy to the environment. - 例如,如果您指定 `releases/*` 为部署分支规则,则只有其名称开头为 `releases/` 的分支才能部署到环境。 (通配符字符将不匹配 `/`。 要匹配以 `release/` 开头并且包含额外单一斜杠的分支,请使用 `release/*/*`)。 如果您添加 `main` 作为部署分支规则,则名为 `main` 的分支也可以部署到环境。 有关部署分支的语法选项的更多信息,请参阅 [Ruby File.fnmatch 文档](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch)。 + For example, if you specify `releases/*` as a deployment branch rule, only branches whose name begins with `releases/` can deploy to the environment. (Wildcard characters will not match `/`. To match branches that begin with `release/` and contain an additional single slash, use `release/*/*`.) If you add `main` as a deployment branch rule, a branch named `main` can also deploy to the environment. For more information about syntax options for deployment branches, see the [Ruby File.fnmatch documentation](https://ruby-doc.org/core-2.5.1/File.html#method-c-fnmatch). {% endif %} -## 环境机密 +## Environment secrets -存储在环境中的机密仅可用于引用环境的工作流程作业。 如果环境需要批准,作业在所需的审查者批准之前不能访问环境机密。 有关机密的更多信息,请参阅“[加密密码](/actions/reference/encrypted-secrets)”。 +Secrets stored in an environment are only available to workflow jobs that reference the environment. If the environment requires approval, a job cannot access environment secrets until one of the required reviewers approves it. For more information about secrets, see "[Encrypted secrets](/actions/reference/encrypted-secrets)." {% note %} -**注意:** 在自托管运行器上运行的工作流程不会在一个孤立的容器中运行,即使它们使用环境。 Environment secrets should be treated with the same level of security as repository and organization secrets. 更多信息请参阅“[GitHub Actions 的安全性增强](/actions/learn-github-actions/security-hardening-for-github-actions#hardening-for-self-hosted-runners)”。 +**Note:** Workflows that run on self-hosted runners are not run in an isolated container, even if they use environments. Environment secrets should be treated with the same level of security as repository and organization secrets. For more information, see "[Security hardening for GitHub Actions](/actions/learn-github-actions/security-hardening-for-github-actions#hardening-for-self-hosted-runners)." {% endnote %} -## 创建环境 +## Creating an environment {% data reusables.github-actions.permissions-statement-environment %} @@ -77,7 +79,7 @@ Environments are used to describe a general deployment target like `production`, {% data reusables.github-actions.name-environment %} 1. Optionally, specify people or teams that must approve workflow jobs that use this environment. 1. Select **Required reviewers**. - 1. Enter up to 6 people or teams. 只有一个必需的审查者需要批准该作业才能继续。 + 1. Enter up to 6 people or teams. Only one of the required reviewers needs to approve the job for it to proceed. 1. Click **Save protection rules**. 2. Optionally, specify the amount of time to wait before allowing workflow jobs that use this environment to proceed. 1. Select **Wait timer**. @@ -86,37 +88,37 @@ Environments are used to describe a general deployment target like `production`, 3. Optionally, specify what branches can deploy to this environment. For more information about the possible values, see "[Deployment branches](#deployment-branches)." 1. Select the desired option in the **Deployment branches** dropdown. 1. If you chose **Selected branches**, enter the branch name patterns that you want to allow. -4. Optionally, add environment secrets. These secrets are only available to workflow jobs that use the environment. Additionally, workflow jobs that use this environment can only access these secrets after any configured rules (for example, required reviewers) pass. 有关机密的更多信息,请参阅“[加密密码](/actions/reference/encrypted-secrets)”。 +4. Optionally, add environment secrets. These secrets are only available to workflow jobs that use the environment. Additionally, workflow jobs that use this environment can only access these secrets after any configured rules (for example, required reviewers) pass. For more information about secrets, see "[Encrypted secrets](/actions/reference/encrypted-secrets)." 1. Under **Environment secrets**, click **Add Secret**. 1. Enter the secret name. 1. Enter the secret value. - 1. 单击 **Add secret(添加密码)**。 + 1. Click **Add secret**. -{% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}您也可以通过 REST API 创建和配置环境。 更多信息请参阅“[环境](/rest/reference/repos#environments)”和“[密码](/rest/reference/actions#secrets)”。{% endif %} +{% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}You can also create and configure environments through the REST API. For more information, see "[Environments](/rest/reference/repos#environments)" and "[Secrets](/rest/reference/actions#secrets)."{% endif %} -运行引用不存在的环境的工作流程将使用引用的名称创建环境。 新创建的环境将不配置任何保护规则或机密。 可在仓库中编辑工作流程的任何人都可以通过工作流程文件创建环境,但只有仓库管理员才能配置环境。 +Running a workflow that references an environment that does not exist will create an environment with the referenced name. The newly created environment will not have any protection rules or secrets configured. Anyone that can edit workflows in the repository can create environments via a workflow file, but only repository admins can configure the environment. ## Using an environment -工作流程中的每个作业都可以引用单个环境。 在将引用环境的作业发送到运行器之前,必须通过为环境配置的任何保护规则。 The job can access the environment's secrets only after the job is sent to a runner. +Each job in a workflow can reference a single environment. Any protection rules configured for the environment must pass before a job referencing the environment is sent to a runner. The job can access the environment's secrets only after the job is sent to a runner. -当工作流程引用环境时,环境将显示在仓库的部署中。 有关查看当前和以前的部署的详细信息,请参阅“[查看部署历史记录](/developers/overview/viewing-deployment-history)”。 +When a workflow references an environment, the environment will appear in the repository's deployments. For more information about viewing current and previous deployments, see "[Viewing deployment history](/developers/overview/viewing-deployment-history)." {% data reusables.actions.environment-example %} -## 删除环境 +## Deleting an environment {% data reusables.github-actions.permissions-statement-environment %} -删除环境将删除与环境关联的所有机密和保护规则。 由于已删除环境的保护规则而正在等待的任何作业将自动失败。 +Deleting an environment will delete all secrets and protection rules associated with the environment. Any jobs currently waiting because of protection rules from the deleted environment will automatically fail. {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-settings %} {% data reusables.github-actions.sidebar-environment %} -1. 在要删除的环境旁边,单击 {% octicon "trash" aria-label="The trash icon" %}。 -2. 单击 **I understand, delete this environment(我了解,删除此环境)**。 +1. Next to the environment that you want to delete, click {% octicon "trash" aria-label="The trash icon" %}. +2. Click **I understand, delete this environment**. -{% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}您也可以通过 REST API 删除环境。 更多信息请参阅“[环境](/rest/reference/repos#environments)”。{% endif %} +{% ifversion fpt or ghae-next or ghes > 3.1 or ghec %}You can also delete environments through the REST API. For more information, see "[Environments](/rest/reference/repos#environments)."{% endif %} ## How environments relate to deployments @@ -124,6 +126,6 @@ Environments are used to describe a general deployment target like `production`, You can access these objects through the REST API or GraphQL API. You can also subscribe to these webhook events. For more information, see "[Repositories](/rest/reference/repos#deployments)" (REST API), "[Objects]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/reference/objects#deployment)" (GraphQL API), or "[Webhook events and payloads](/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment)." -## 后续步骤 +## Next steps {% data variables.product.prodname_actions %} provides several features for managing your deployments. For more information, see "[Deploying with GitHub Actions](/actions/deployment/deploying-with-github-actions)." diff --git a/translations/zh-CN/content/actions/guides.md b/translations/zh-CN/content/actions/guides.md index 9d997caff4..2c15577f19 100644 --- a/translations/zh-CN/content/actions/guides.md +++ b/translations/zh-CN/content/actions/guides.md @@ -65,3 +65,4 @@ includeGuides: - /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/automating-dependabot-with-github-actions - /code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot --- + diff --git a/translations/zh-CN/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md b/translations/zh-CN/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md index e53e41204e..ebfb2eed08 100644 --- a/translations/zh-CN/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md +++ b/translations/zh-CN/content/actions/hosting-your-own-runners/adding-self-hosted-runners.md @@ -81,11 +81,13 @@ You can add self-hosted runners at the organization level, where they can be use ## Adding a self-hosted runner to an enterprise -You can add self-hosted runners to an enterprise, where they can be assigned to multiple organizations. The organization admins are then able to control which repositories can use it. +{% ifversion fpt %}If you use {% data variables.product.prodname_ghe_cloud %}, you{% elsif ghec or ghes or ghae %}You{% endif %} can add self-hosted runners to an enterprise, where they can be assigned to multiple organizations. The organization admins are then able to control which repositories can use it. {% ifversion fpt %}For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/hosting-your-own-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-an-enterprise).{% endif %} + +{% ifversion ghec or ghes or ghae %} New runners are assigned to the default group. You can modify the runner's group after you've registered the runner. For more information, see "[Managing access to self-hosted runners](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#moving-a-self-hosted-runner-to-a-group)." -{% ifversion fpt or ghec %} +{% ifversion ghec %} To add a self-hosted runner to an enterprise account, you must be an enterprise owner. For information about how to add a self-hosted runner with the REST API, see the [Enterprise Administration GitHub Actions APIs](/rest/reference/enterprise-admin#github-actions). {% data reusables.enterprise-accounts.access-enterprise %} @@ -104,9 +106,11 @@ To add a self-hosted runner at the enterprise level of {% data variables.product 1. Click **Add new**, then click **New runner**. {% data reusables.github-actions.self-hosted-runner-configure %} {% endif %} +{% ifversion ghec or ghae or ghes %} {% data reusables.github-actions.self-hosted-runner-check-installation-success %} {% data reusables.github-actions.self-hosted-runner-public-repo-access %} +{% endif %} ### Making enterprise runners available to repositories @@ -115,3 +119,4 @@ By default, runners in an enterprise's "Default" self-hosted runner group are av To make an enterprise-level self-hosted runner group available to an organization repository, you might need to change the organization's inherited settings for the runner group to make the runner available to repositories in the organization. For more information on changing runner group access settings, see "[Managing access to self-hosted runners using groups](/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups#changing-the-access-policy-of-a-self-hosted-runner-group)." +{% endif %} diff --git a/translations/zh-CN/content/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups.md b/translations/zh-CN/content/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups.md index 251fe05629..4f0148b6c3 100644 --- a/translations/zh-CN/content/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups.md +++ b/translations/zh-CN/content/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups.md @@ -1,6 +1,6 @@ --- -title: 使用组管理自托管运行器的访问权限 -intro: 您可以使用策略来限制对已添加到组织或企业的自托管运行器的访问。 +title: Managing access to self-hosted runners using groups +intro: You can use policies to limit access to self-hosted runners that have been added to an organization or enterprise. redirect_from: - /actions/hosting-your-own-runners/managing-access-to-self-hosted-runners versions: @@ -9,7 +9,7 @@ versions: ghae: '*' ghec: '*' type: tutorial -shortTitle: 管理运行器组 +shortTitle: Manage runner groups --- {% data reusables.actions.ae-self-hosted-runners-notice %} @@ -17,42 +17,47 @@ shortTitle: 管理运行器组 {% data reusables.actions.enterprise-github-hosted-runners %} {% data reusables.actions.ae-beta %} -## 关于自托管运行器组 +## About self-hosted runner groups -{% ifversion fpt or ghec %} +{% ifversion fpt %} {% note %} -**注:**所有组织都有一个默认的自托管运行器组。 只有企业帐户和企业帐户拥有的组织才能创建和管理其他自托管的运行器组。 +**Note:** All organizations have a single default self-hosted runner group. Only enterprise accounts and organizations owned by enterprise accounts can create and manage additional self-hosted runner groups. {% endnote %} + +Self-hosted runner groups are used to control access to self-hosted runners. Organization admins can configure access policies that control which repositories in an organization have access to the runner group. + +If you use {% data variables.product.prodname_ghe_cloud %}, you can create additional runner groups; enterprise admins can configure access policies that control which organizations in an enterprise have access to the runner group; and organization admins can assign additional granular repository access policies to the enterprise runner group. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/hosting-your-own-runners/managing-access-to-self-hosted-runners-using-groups). {% endif %} -自托管运行器组用于控制对组织和企业级自托管运行器的访问。 企业管理员可以配置访问策略,用以控制企业中的哪些组织可以访问运行器组。 组织管理员可以配置访问策略,用以控制组织中的哪些组织可以访问运行器组。 +{% ifversion ghec or ghes or ghae %} +Self-hosted runner groups are used to control access to self-hosted runners at the organization and enterprise level. Enterprise admins can configure access policies that control which organizations in an enterprise have access to the runner group. Organization admins can configure access policies that control which repositories in an organization have access to the runner group. -当企业管理员授予组织对运行器组的访问权限时,组织管理员可以看到组织的自托管运行器设置中列出的运行器组。 然后,组织管理员可以为企业运行器组分配其他细致的仓库访问策略。 +When an enterprise admin grants an organization access to a runner group, organization admins can see the runner group listed in the organization's self-hosted runner settings. The organizations admins can then assign additional granular repository access policies to the enterprise runner group. -新运行器在创建时,将自动分配给默认组。 运行器每次只能在一个组中。 您可以将运行器从默认组移到另一组。 更多信息请参阅“[将自托管运行器移动到组](#moving-a-self-hosted-runner-to-a-group)”。 +When new runners are created, they are automatically assigned to the default group. Runners can only be in one group at a time. You can move runners from the default group to another group. For more information, see "[Moving a self-hosted runner to a group](#moving-a-self-hosted-runner-to-a-group)." -## 为组织创建自托管的运行器组 +## Creating a self-hosted runner group for an organization -所有组织都有一个默认的自托管运行器组。 企业帐户中的组织可以创建其他自托管组。 组织管理员可以允许单个仓库访问运行器组。 有关如何使用 REST API 创建自托管运行器组的信息,请参阅“[自托管运行器组](/rest/reference/actions#self-hosted-runner-groups)”。 +All organizations have a single default self-hosted runner group. Organizations within an enterprise account can create additional self-hosted groups. Organization admins can allow individual repositories access to a runner group. For information about how to create a self-hosted runner group with the REST API, see "[Self-hosted runner groups](/rest/reference/actions#self-hosted-runner-groups)." -自托管运行器在创建时会自动分配给默认组,并且每次只能成为一个组的成员。 您可以将运行器从默认组移到您创建的任何组。 +Self-hosted runners are automatically assigned to the default group when created, and can only be members of one group at a time. You can move a runner from the default group to any group you create. -创建组时,必须选择用于定义哪些仓库有权访问运行器组的策略。 +When creating a group, you must choose a policy that defines which repositories have access to the runner group. -{% ifversion fpt or ghec %} +{% ifversion ghec %} {% data reusables.organizations.navigate-to-org %} {% data reusables.organizations.org_settings %} {% data reusables.github-actions.settings-sidebar-actions-runner-groups %} -1. 在“Runner groups(运行器组)”部分,单击 **New runner group(新运行器组)**。 +1. In the "Runner groups" section, click **New runner group**. {% data reusables.github-actions.runner-group-assign-policy-repo %} {% warning %} - **警告:** {% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %} + **Warning**: {% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %} - 更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)”。 + For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)." {% endwarning %} {% data reusables.github-actions.self-hosted-runner-create-group %} @@ -61,50 +66,50 @@ shortTitle: 管理运行器组 {% data reusables.organizations.navigate-to-org %} {% data reusables.organizations.org_settings %} {% data reusables.github-actions.settings-sidebar-actions-runners %} -1. 在“Self-hosted runners(自托管运行器)”部分,单击 **Add new(新增)**,然后单击 **New group(新组)**。 +1. In the "Self-hosted runners" section, click **Add new**, and then **New group**. - ![添加运行器组](/assets/images/help/settings/actions-org-add-runner-group.png) -1. 输入运行程序组的名称,并分配仓库访问策略。 + ![Add runner group](/assets/images/help/settings/actions-org-add-runner-group.png) +1. Enter a name for your runner group, and assign a policy for repository access. - {% ifversion ghes or ghae %} 您可以配置一个运行器组可供一组特定的仓库或组织中所有仓库访问。 默认情况下,只有私有仓库可以访问运行器组中的运行器,但您可以覆盖此设置。 This setting can't be overridden if configuring an organization's runner group that was shared by an enterprise.{% endif %} + {% ifversion ghes or ghae %} You can configure a runner group to be accessible to a specific list of repositories, or to all repositories in the organization. By default, only private repositories can access runners in a runner group, but you can override this. This setting can't be overridden if configuring an organization's runner group that was shared by an enterprise.{% endif %} {% warning %} - **警告** + **Warning** {% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %} - 更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)”。 + For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)." {% endwarning %} - ![添加运行器组选项](/assets/images/help/settings/actions-org-add-runner-group-options.png) -1. 单击 **Save group(保存组)**创建组并应用策略。 + ![Add runner group options](/assets/images/help/settings/actions-org-add-runner-group-options.png) +1. Click **Save group** to create the group and apply the policy. {% endif %} -## 为企业创建自托管运行器组 +## Creating a self-hosted runner group for an enterprise -企业可以将其自托管的运行器添加到组以进行访问管理。 企业可以创建供企业帐户中特定组织访问的自托管运行器组。 然后,组织管理员可以为企业运行器组分配其他细致的仓库访问策略。 有关如何使用 REST API 创建自托管运行器组的信息,请参阅[企业管理 GitHub Actions API](/rest/reference/enterprise-admin#github-actions)。 +Enterprises can add their self-hosted runners to groups for access management. Enterprises can create groups of self-hosted runners that are accessible to specific organizations in the enterprise account. Organization admins can then assign additional granular repository access policies to the enterprise runner groups. For information about how to create a self-hosted runner group with the REST API, see the [Enterprise Administration GitHub Actions APIs](/rest/reference/enterprise-admin#github-actions). -自托管运行器在创建时会自动分配给默认组,并且每次只能成为一个组的成员。 您可以在注册过程中将运行器分配给特定组,也可以稍后将运行器从默认组移到自定义组。 +Self-hosted runners are automatically assigned to the default group when created, and can only be members of one group at a time. You can assign the runner to a specific group during the registration process, or you can later move the runner from the default group to a custom group. -创建组时,必须选择用于定义哪些组织有权访问运行器组的策略。 +When creating a group, you must choose a policy that defines which organizations have access to the runner group. -{% ifversion fpt or ghec %} +{% ifversion ghec %} {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} {% data reusables.enterprise-accounts.actions-runner-groups-tab %} -1. 单击 **New runner group(新运行器组)**。 +1. Click **New runner group**. {% data reusables.github-actions.runner-group-assign-policy-org %} {% warning %} - **警告** + **Warning** {% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %} - 更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)”。 + For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)." {% endwarning %} {% data reusables.github-actions.self-hosted-runner-create-group %} @@ -114,88 +119,99 @@ shortTitle: 管理运行器组 {% data reusables.enterprise-accounts.policies-tab %} {% data reusables.enterprise-accounts.actions-tab %} {% data reusables.enterprise-accounts.actions-runners-tab %} -1. 单击 **Add new(新增)**,然后单击 **New group(新组)**。 +1. Click **Add new**, and then **New group**. - ![添加运行器组](/assets/images/help/settings/actions-enterprise-account-add-runner-group.png) -1. 输入运行程序组的名称,并分配组织访问策略。 + ![Add runner group](/assets/images/help/settings/actions-enterprise-account-add-runner-group.png) +1. Enter a name for your runner group, and assign a policy for organization access. - 您可以配置运行器组供特定的组织列表或企业中所有组织访问。 默认情况下,只有私有仓库可以访问运行器组中的运行器,但您可以覆盖此设置。 This setting can't be overridden if configuring an organization's runner group that was shared by an enterprise. + You can configure a runner group to be accessible to a specific list of organizations, or all organizations in the enterprise. By default, only private repositories can access runners in a runner group, but you can override this. This setting can't be overridden if configuring an organization's runner group that was shared by an enterprise. {% warning %} - **警告** + **Warning** {% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %} - 更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)”。 + For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)." {% endwarning %} - ![添加运行器组选项](/assets/images/help/settings/actions-enterprise-account-add-runner-group-options.png) -1. 单击 **Save group(保存组)**创建组并应用策略。 + ![Add runner group options](/assets/images/help/settings/actions-enterprise-account-add-runner-group-options.png) +1. Click **Save group** to create the group and apply the policy. +{% endif %} {% endif %} -## 更改自托管运行器组的访问策略 +## Changing the access policy of a self-hosted runner group -您可以更新运行器组的访问策略,或重命名运行器组。 +You can update the access policy of a runner group, or rename a runner group. {% ifversion fpt or ghec %} {% data reusables.github-actions.self-hosted-runner-groups-navigate-to-repo-org-enterprise %} {% data reusables.github-actions.settings-sidebar-actions-runner-groups-selection %} -1. 修改访问选项或更改运行器组名称。 +1. Modify the access options, or change the runner group name. {% warning %} - **警告** + **Warning** {% indented_data_reference reusables.github-actions.self-hosted-runner-security spaces=3 %} - 更多信息请参阅“[关于自托管运行器](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)”。 + For more information, see "[About self-hosted runners](/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories)." {% endwarning %} {% endif %} {% ifversion ghae or ghes %} {% data reusables.github-actions.self-hosted-runner-configure-runner-group-access %} {% endif %} -## 自动向组添加自托管运行器 -您可以使用配置脚本自动向组添加新的自托管运行器。 例如, 此命令将注册一个新的自托管运行器,并使用 `--runnergroup` 参数将其添加到名为 `rg-runnergroup` 的组。 +{% ifversion ghec or ghes or ghae %} +## Automatically adding a self-hosted runner to a group + +You can use the configuration script to automatically add a new self-hosted runner to a group. For example, this command registers a new self-hosted runner and uses the `--runnergroup` parameter to add it to a group named `rg-runnergroup`. ```sh ./config.sh --url $org_or_enterprise_url --token $token --runnergroup rg-runnergroup ``` -如果运行器组不存在,命令将失败: +The command will fail if the runner group doesn't exist: ``` -找不到名为 "rg-runnergroup" 的任何自托管运行器组。 +Could not find any self-hosted runner group named "rg-runnergroup". ``` -## 将自托管的运行器移动到组 +## Moving a self-hosted runner to a group -如果您在注册过程中没有指定运行器组,新的自托管运行器将自动分配到默认组,然后可以移到另一个组。 -{% ifversion fpt or ghec or ghes > 3.1 or ghae-next %} +If you don't specify a runner group during the registration process, your new self-hosted runners are automatically assigned to the default group, and can then be moved to another group. +{% ifversion ghec or ghes > 3.1 or ghae-next %} {% data reusables.github-actions.self-hosted-runner-navigate-to-org-enterprise %} -1. 在“Runners(运行器)”列表中,单击您要配置的运行器。 -1. 选择运行器组下拉菜单。 -1. 在“Move runner to group(将运行器移动到组)”中,选择运行器的目的地组。 -{% else %} -1. 在设置页面的“Self-hosted runners(自托管运行器):部分,找到要移动的运行器的当前组,并展开组成员列表。 ![查看运行器组成员](/assets/images/help/settings/actions-org-runner-group-members.png) -1. 选中自托管运行器旁边的复选框,然后单击 **Move to group(移动到组)**以查看可用的目的地。 ![运行器组成员移动](/assets/images/help/settings/actions-org-runner-group-member-move.png) -1. 要移动运行器,请单击目标组。 ![运行器组成员移动](/assets/images/help/settings/actions-org-runner-group-member-move-destination.png) +1. In the "Runners" list, click the runner that you want to configure. +2. Select the Runner group dropdown menu. +3. In "Move runner to group", choose a destination group for the runner. {% endif %} -## 删除自托管运行器组 +{% ifversion ghes < 3.2 or ghae %} +1. In the "Self-hosted runners" section of the settings page, locate the current group of the runner you want to move and expand the list of group members. + ![View runner group members](/assets/images/help/settings/actions-org-runner-group-members.png) +2. Select the checkbox next to the self-hosted runner, and then click **Move to group** to see the available destinations. + ![Runner group member move](/assets/images/help/settings/actions-org-runner-group-member-move.png) +3. To move the runner, click on the destination group. + ![Runner group member move](/assets/images/help/settings/actions-org-runner-group-member-move-destination.png) +{% endif %} +## Removing a self-hosted runner group -自托管运行器在其组被删除时将自动返回到默认组。 +Self-hosted runners are automatically returned to the default group when their group is removed. -{% ifversion fpt or ghes > 3.1 or ghae-next or ghec %} +{% ifversion ghes > 3.1 or ghae-next or ghec %} {% data reusables.github-actions.self-hosted-runner-groups-navigate-to-repo-org-enterprise %} -1. 在组列表中,在要删除的组右侧,单击 {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}。 -1. 要删除组,请单击 **Remove group(删除组)**。 -1. 查看确认提示,然后单击 **Remove this runner group(删除此运行器组)**。 -{% else %} -1. 在设置页面的“Self-hosted runners(自托管运行器)”部分,找到要删除的组,然后单击 {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} 按钮。 ![查看运行器组设置](/assets/images/help/settings/actions-org-runner-group-kebab.png) - -1. 要删除组,请单击 **Remove group(删除组)**。 ![查看运行器组设置](/assets/images/help/settings/actions-org-runner-group-remove.png) - -1. 查看确认提示,然后单击 **Remove this runner group(删除此运行器组)**。 +1. In the list of groups, to the right of the group you want to delete, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %}. +2. To remove the group, click **Remove group**. +3. Review the confirmation prompts, and click **Remove this runner group**. +{% endif %} +{% ifversion ghes < 3.2 or ghae %} +1. In the "Self-hosted runners" section of the settings page, locate the group you want to delete, and click the {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} button. + ![View runner group settings](/assets/images/help/settings/actions-org-runner-group-kebab.png) + +1. To remove the group, click **Remove group**. + ![View runner group settings](/assets/images/help/settings/actions-org-runner-group-remove.png) + +1. Review the confirmation prompts, and click **Remove this runner group**. +{% endif %} {% endif %} diff --git a/translations/zh-CN/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md b/translations/zh-CN/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md index b492e034f7..31a9273648 100644 --- a/translations/zh-CN/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md +++ b/translations/zh-CN/content/actions/hosting-your-own-runners/removing-self-hosted-runners.md @@ -1,6 +1,6 @@ --- title: Removing self-hosted runners -intro: 'You can permanently remove a self-hosted runner from a repository, an organization, or an enterprise.' +intro: 'You can permanently remove a self-hosted runner from a repository{% ifversion fpt %} or organization{% elsif ghec or ghes or gahe %}, an organization, or an enterprise{% endif %}.' redirect_from: - /github/automating-your-workflow-with-github-actions/removing-self-hosted-runners - /actions/automating-your-workflow-with-github-actions/removing-self-hosted-runners @@ -73,6 +73,10 @@ To remove a self-hosted runner from an organization, you must be an organization {% endif %} ## Removing a runner from an enterprise +{% ifversion fpt %} +If you use {% data variables.product.prodname_ghe_cloud %}, you can also remove runners from an enterprise. For more information, see the [{% data variables.product.prodname_ghe_cloud %} documentation](/enterprise-cloud@latest/actions/hosting-your-own-runners/removing-self-hosted-runners#removing-a-runner-from-an-enterprise). +{% endif %} +{% ifversion ghec or ghes or ghae %} {% note %} **Note:** {% data reusables.github-actions.self-hosted-runner-removal-impact %} @@ -80,9 +84,10 @@ To remove a self-hosted runner from an organization, you must be an organization {% data reusables.github-actions.self-hosted-runner-auto-removal %} {% endnote %} + {% data reusables.github-actions.self-hosted-runner-reusing %} -{% ifversion fpt or ghec %} +{% ifversion ghec %} To remove a self-hosted runner from an enterprise account, you must be an enterprise owner. We recommend that you also have access to the self-hosted runner machine. For information about how to add a self-hosted runner with the REST API, see the [Enterprise Administration GitHub Actions APIs](/rest/reference/enterprise-admin#github-actions). {% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.policies-tab %} @@ -98,3 +103,4 @@ To remove a self-hosted runner at the enterprise level of {% data variables.prod {% data reusables.enterprise-accounts.actions-runners-tab %} {% data reusables.github-actions.self-hosted-runner-removing-a-runner %} {% endif %} +{% endif %} diff --git a/translations/zh-CN/content/actions/learn-github-actions/workflow-syntax-for-github-actions.md b/translations/zh-CN/content/actions/learn-github-actions/workflow-syntax-for-github-actions.md index 1e65fc3ac3..0f7c9d3e51 100644 --- a/translations/zh-CN/content/actions/learn-github-actions/workflow-syntax-for-github-actions.md +++ b/translations/zh-CN/content/actions/learn-github-actions/workflow-syntax-for-github-actions.md @@ -465,7 +465,7 @@ In this example, `job3` uses the `always()` conditional expression so that it al ## `jobs..runs-on` -**Required**. The type of machine to run the job on. The machine can be either a {% data variables.product.prodname_dotcom %}-hosted runner or a self-hosted runner. +**Required**. The type of machine to run the job on. The machine can be either a {% data variables.product.prodname_dotcom %}-hosted runner or a self-hosted runner. You can provide `runs-on` as a single string or as an array of strings. {% ifversion ghae %} ### {% data variables.actions.hosted_runner %}s diff --git a/translations/zh-CN/content/admin/guides.md b/translations/zh-CN/content/admin/guides.md index 88b78e03dc..f6ce6a071c 100644 --- a/translations/zh-CN/content/admin/guides.md +++ b/translations/zh-CN/content/admin/guides.md @@ -137,3 +137,4 @@ includeGuides: - /admin/user-management/suspending-and-unsuspending-users - /admin/overview/creating-an-enterprise-account --- + diff --git a/translations/zh-CN/content/code-security/guides.md b/translations/zh-CN/content/code-security/guides.md index 7f8ff2fc68..d232a22a1f 100644 --- a/translations/zh-CN/content/code-security/guides.md +++ b/translations/zh-CN/content/code-security/guides.md @@ -1,6 +1,6 @@ --- -title: 代码安全指南 -intro: '了解 {% data variables.product.product_name %} 可以帮助您提高代码安全性的不同方式。' +title: Guides for code security +intro: 'Learn about the different ways that {% data variables.product.product_name %} can help you improve your code''s security.' allowTitleToDifferFromFilename: true layout: product-guides versions: @@ -78,3 +78,4 @@ includeGuides: - /code-security/supply-chain-security/understanding-your-software-supply-chain/about-the-dependency-graph - /code-security/supply-chain-security/understanding-your-software-supply-chain/exploring-the-dependencies-of-a-repository --- + diff --git a/translations/zh-CN/content/code-security/secret-scanning/managing-alerts-from-secret-scanning.md b/translations/zh-CN/content/code-security/secret-scanning/managing-alerts-from-secret-scanning.md index acbd4e6cff..f1d15dceea 100644 --- a/translations/zh-CN/content/code-security/secret-scanning/managing-alerts-from-secret-scanning.md +++ b/translations/zh-CN/content/code-security/secret-scanning/managing-alerts-from-secret-scanning.md @@ -1,6 +1,6 @@ --- -title: 管理来自密码扫描的警报 -intro: 您可以查看并关闭已检入仓库的密码的警报。 +title: Managing alerts from secret scanning +intro: You can view and close alerts for secrets checked in to your repository. product: '{% data reusables.gated-features.secret-scanning %}' redirect_from: - /github/administering-a-repository/managing-alerts-from-secret-scanning @@ -16,51 +16,55 @@ topics: - Advanced Security - Alerts - Repositories -shortTitle: 管理秘密警报 +shortTitle: Manage secret alerts --- {% data reusables.secret-scanning.beta %} -## 管理 {% data variables.product.prodname_secret_scanning %} 警报 +## Managing {% data variables.product.prodname_secret_scanning %} alerts {% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} -3. 在左侧边栏中,单击 **Secret scanning alerts(机密扫描警报)**。 +3. In the left sidebar, click **Secret scanning alerts**. {% ifversion fpt or ghes or ghec %} - !["Secret scanning alerts(机密扫描警报)" 选项卡](/assets/images/help/repository/sidebar-secrets.png) + !["Secret scanning alerts" tab](/assets/images/help/repository/sidebar-secrets.png) {% endif %} {% ifversion ghae %} - !["Secret scanning alerts(机密扫描警报)" 选项卡](/assets/images/enterprise/github-ae/repository/sidebar-secrets-ghae.png) + !["Secret scanning alerts" tab](/assets/images/enterprise/github-ae/repository/sidebar-secrets-ghae.png) {% endif %} -4. 在“Secret scanning(密码扫描)”下,单击要查看的警报。 +4. Under "Secret scanning" click the alert you want to view. {% ifversion fpt or ghec %} - ![来自密码扫描的警报](/assets/images/help/repository/secret-scanning-click-alert.png) + ![List of alerts from secret scanning](/assets/images/help/repository/secret-scanning-click-alert.png) {% endif %} {% ifversion ghes %} - ![来自密码扫描的警报](/assets/images/help/repository/secret-scanning-click-alert-ghe.png) + ![List of alerts from secret scanning](/assets/images/help/repository/secret-scanning-click-alert-ghe.png) {% endif %} {% ifversion ghae %} - ![来自密码扫描的警报](/assets/images/enterprise/github-ae/repository/secret-scanning-click-alert-ghae.png) + ![List of alerts from secret scanning](/assets/images/enterprise/github-ae/repository/secret-scanning-click-alert-ghae.png) + {% endif %} +5. {% ifversion fpt or ghec %} + Optionally, use the "Close as" drop-down menu and click a reason for resolving an alert. + {%- elsif ghes or ghae %} + Optionally, use the "Mark as" drop-down menu and click a reason for resolving an alert. {% endif %} -5. (可选)使用“Mark as(标记为)”下拉菜单,单击原因以解决警报。 {% ifversion fpt or ghec %} - ![用于解决来自密码扫描的警报的下拉菜单](/assets/images/help/repository/secret-scanning-resolve-alert.png) + ![Drop-down menu for resolving an alert from secret scanning](/assets/images/help/repository/secret-scanning-resolve-alert.png) {% endif %} {% ifversion ghes or ghae %} - ![用于解决来自密码扫描的警报的下拉菜单](/assets/images/help/repository/secret-scanning-resolve-alert-ghe.png) + ![Drop-down menu for resolving an alert from secret scanning](/assets/images/help/repository/secret-scanning-resolve-alert-ghe.png) {% endif %} -## 保护受到威胁的密码 +## Securing compromised secrets -只要密码被提交到仓库,便应视为受到威胁。 {% data variables.product.prodname_dotcom %} 建议对受到威胁的密码执行以下操作: +Once a secret has been committed to a repository, you should consider the secret compromised. {% data variables.product.prodname_dotcom %} recommends the following actions for compromised secrets: -- 对于受到威胁的 {% data variables.product.prodname_dotcom %} 个人访问令牌,请删除该令牌,创建新令牌,然后更新使用旧令牌的任何服务。 更多信息请参阅“[创建用于命令行的个人访问令牌](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)。” -- 对于所有其他密码,请先确认提交到 {% data variables.product.product_name %} 的密码是有效的。 如果有效,请创建新密码,更新使用旧密码的任何服务,然后删除旧密码。 +- For a compromised {% data variables.product.prodname_dotcom %} personal access token, delete the compromised token, create a new token, and update any services that use the old token. For more information, see "[Creating a personal access token for the command line](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)." +- For all other secrets, first verify that the secret committed to {% data variables.product.product_name %} is valid. If so, create a new secret, update any services that use the old secret, and then delete the old secret. {% ifversion fpt or ghes > 3.1 or ghae-issue-4910 or ghec %} -## 配置 {% data variables.product.prodname_secret_scanning %} 警报的通知 +## Configuring notifications for {% data variables.product.prodname_secret_scanning %} alerts -当检测到新的机密时,{% data variables.product.product_name %} 会根据用户的通知首选项通知对仓库安全警报具有访问权限的所有用户。 You will receive alerts if you are watching the repository, have enabled notifications for security alerts or for all the activity on the repository, are the author of the commit that contains the secret and are not ignoring the repository. +When a new secret is detected, {% data variables.product.product_name %} notifies all users with access to security alerts for the repository according to their notification preferences. You will receive alerts if you are watching the repository, have enabled notifications for security alerts or for all the activity on the repository, are the author of the commit that contains the secret and are not ignoring the repository. -更多信息请参阅“[管理仓库的安全和分析设置](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)”和“[配置通知](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#configuring-your-watch-settings-for-an-individual-repository)”。 +For more information, see "[Managing security and analysis settings for your repository](/github/administering-a-repository/managing-security-and-analysis-settings-for-your-repository#granting-access-to-security-alerts)" and "[Configuring notifications](/github/managing-subscriptions-and-notifications-on-github/configuring-notifications#configuring-your-watch-settings-for-an-individual-repository)." {% endif %} diff --git a/translations/zh-CN/content/codespaces/guides.md b/translations/zh-CN/content/codespaces/guides.md index 87695990e1..5607e64f4d 100644 --- a/translations/zh-CN/content/codespaces/guides.md +++ b/translations/zh-CN/content/codespaces/guides.md @@ -1,8 +1,8 @@ --- -title: 代码空间指南 -shortTitle: 指南 +title: Codespaces guides +shortTitle: Guides product: '{% data reusables.gated-features.codespaces %}' -intro: 了解如何充分利用 GitHub +intro: Learn how to make the most of GitHub allowTitleToDifferFromFilename: true layout: product-guides versions: @@ -41,3 +41,4 @@ includeGuides: - /codespaces/codespaces-reference/disaster-recovery-for-codespaces - /codespaces/codespaces-reference/security-in-codespaces --- + 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 5d3b70e9d9..9a34f94af7 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 @@ -60,8 +60,8 @@ The complete list of available query parameters, permissions, and events is list `webhook_active` | `boolean` | Set to `false` to disable webhook. Webhook is enabled by default. `webhook_url` | `string` | The full URL that you would like to send webhook event payloads to. {% ifversion ghes < 3.2 or ghae %}`webhook_secret` | `string` | You can specify a secret to secure your webhooks. See "[Securing your webhooks](/webhooks/securing/)" for more details. -{% endif %}`events` | `array of strings` | Webhook events. Some webhook events require `read` or `write` permissions for a resource before you can select the event when registering a new {% data variables.product.prodname_github_app %}. See the "[{% data variables.product.prodname_github_app %} webhook events](#github-app-webhook-events)" section for available events and their required permissions. You can select multiple events in a query string. For example, `events[]=public&events[]=label`. -`domain` | `string` | The URL of a content reference. +{% endif %}`events` | `array of strings` | Webhook events. Some webhook events require `read` or `write` permissions for a resource before you can select the event when registering a new {% data variables.product.prodname_github_app %}. See the "[{% data variables.product.prodname_github_app %} webhook events](#github-app-webhook-events)" section for available events and their required permissions. You can select multiple events in a query string. For example, `events[]=public&events[]=label`.{% ifversion ghes < 3.4 %} +`domain` | `string` | The URL of a content reference.{% endif %} `single_file_name` | `string` | This is a narrowly-scoped permission that allows the app to access a single file in any repository. When you set the `single_file` permission to `read` or `write`, this field provides the path to the single file your {% data variables.product.prodname_github_app %} will manage. {% ifversion fpt or ghes or ghec %} If you need to manage multiple files, see `single_file_paths` below. {% endif %}{% ifversion fpt or ghes or ghec %} `single_file_paths` | `array of strings` | This allows the app to access up ten specified files in a repository. When you set the `single_file` permission to `read` or `write`, this array can store the paths for up to ten files that your {% data variables.product.prodname_github_app %} will manage. These files all receive the same permission set by `single_file`, and do not have separate individual permissions. When two or more files are configured, the API returns `multiple_single_files=true`, otherwise it returns `multiple_single_files=false`.{% endif %} @@ -73,8 +73,8 @@ Permission | Description ---------- | ----------- [`administration`](/rest/reference/permissions-required-for-github-apps/#permission-on-administration) | Grants access to various endpoints for organization and repository administration. Can be one of: `none`, `read`, or `write`.{% ifversion fpt or ghec %} [`blocking`](/rest/reference/permissions-required-for-github-apps/#permission-on-blocking) | Grants access to the [Blocking Users API](/rest/reference/users#blocking). Can be one of: `none`, `read`, or `write`.{% endif %} -[`checks`](/rest/reference/permissions-required-for-github-apps/#permission-on-checks) | Grants access to the [Checks API](/rest/reference/checks). Can be one of: `none`, `read`, or `write`. -`content_references` | Grants access to the "[Create a content attachment](/rest/reference/apps#create-a-content-attachment)" endpoint. Can be one of: `none`, `read`, or `write`. +[`checks`](/rest/reference/permissions-required-for-github-apps/#permission-on-checks) | Grants access to the [Checks API](/rest/reference/checks). Can be one of: `none`, `read`, or `write`.{% ifversion ghes < 3.4 %} +`content_references` | Grants access to the "[Create a content attachment](/rest/reference/apps#create-a-content-attachment)" endpoint. Can be one of: `none`, `read`, or `write`.{% endif %} [`contents`](/rest/reference/permissions-required-for-github-apps/#permission-on-contents) | Grants access to various endpoints that allow you to modify repository contents. Can be one of: `none`, `read`, or `write`. [`deployments`](/rest/reference/permissions-required-for-github-apps/#permission-on-deployments) | Grants access to the [Deployments API](/rest/reference/repos#deployments). Can be one of: `none`, `read`, or `write`.{% ifversion fpt or ghes or ghec %} [`emails`](/rest/reference/permissions-required-for-github-apps/#permission-on-emails) | Grants access to the [Emails API](/rest/reference/users#emails). Can be one of: `none`, `read`, or `write`.{% endif %} @@ -109,8 +109,8 @@ Webhook event name | Required permission | Description ------------------ | ------------------- | ----------- [`check_run`](/webhooks/event-payloads/#check_run) |`checks` | {% data reusables.webhooks.check_run_short_desc %} [`check_suite`](/webhooks/event-payloads/#check_suite) |`checks` | {% data reusables.webhooks.check_suite_short_desc %} -[`commit_comment`](/webhooks/event-payloads/#commit_comment) | `contents` | {% data reusables.webhooks.commit_comment_short_desc %} -[`content_reference`](/webhooks/event-payloads/#content_reference) |`content_references` | {% data reusables.webhooks.content_reference_short_desc %} +[`commit_comment`](/webhooks/event-payloads/#commit_comment) | `contents` | {% data reusables.webhooks.commit_comment_short_desc %}{% ifversion ghes < 3.4 %} +[`content_reference`](/webhooks/event-payloads/#content_reference) |`content_references` | {% data reusables.webhooks.content_reference_short_desc %}{% endif %} [`create`](/webhooks/event-payloads/#create) | `contents` | {% data reusables.webhooks.create_short_desc %} [`delete`](/webhooks/event-payloads/#delete) | `contents` | {% data reusables.webhooks.delete_short_desc %} [`deployment`](/webhooks/event-payloads/#deployment) | `deployments` | {% data reusables.webhooks.deployment_short_desc %} diff --git a/translations/zh-CN/content/developers/apps/guides/using-content-attachments.md b/translations/zh-CN/content/developers/apps/guides/using-content-attachments.md index 24d94a82b5..8b8ddf5c68 100644 --- a/translations/zh-CN/content/developers/apps/guides/using-content-attachments.md +++ b/translations/zh-CN/content/developers/apps/guides/using-content-attachments.md @@ -1,46 +1,42 @@ --- -title: 使用内容附件 -intro: 内容附件允许 GitHub 应用程序在 GitHub 中为链接到注册域的 URL 提供更多信息。 GitHub 可渲染应用程序在正文或者议题或拉取请求注释中的 URL 下提供的信息。 +title: Using content attachments +intro: Content attachments allow a GitHub App to provide more information in GitHub for URLs that link to registered domains. GitHub renders the information provided by the app under the URL in the body or comment of an issue or pull request. redirect_from: - /apps/using-content-attachments - /developers/apps/using-content-attachments versions: - fpt: '*' - ghes: '*' - ghae: '*' - ghec: '*' + ghes: '<3.4' topics: - GitHub Apps --- - {% data reusables.pre-release-program.content-attachments-public-beta %} -## 关于内容附件 +## About content attachments -GitHub 应用程序可以注册将触发 `content_reference` 事件的域。 当有人在正文或者议题或拉取请求的注释中包含链接到注册域的 URL 时,应用程序会收到 [`content_reference` web 挂钩](/webhooks/event-payloads/#content_reference)。 您可以使用内容附件直观地为添加到议题或拉取请求的 URL 提供更多的上下文或数据。 URL 必须是完全合格的 URL,以 `http://` 或 `https://` 开头。 作为 Markdown 链接一部分的 URL 将被忽略,不会触发 `content_reference` 事件。 +A GitHub App can register domains that will trigger `content_reference` events. When someone includes a URL that links to a registered domain in the body or comment of an issue or pull request, the app receives the [`content_reference` webhook](/webhooks/event-payloads/#content_reference). You can use content attachments to visually provide more context or data for the URL added to an issue or pull request. The URL must be a fully-qualified URL, starting with either `http://` or `https://`. URLs that are part of a markdown link are ignored and don't trigger the `content_reference` event. -在使用 {% data variables.product.prodname_unfurls %} API 之前,您需要为 GitHub 应用程序配置内容引用: -* 为应用程序提供对“内容引用”的 `Read & write` 权限。 -* 配置“内容引用”权限时,注册最多 5 个有效且可公开访问的域。 配置内容引用域时不要使用 IP 地址。 您可以注册域名 (example.com) 或子域 (subdomain.example.com)。 -* 让应用程序订阅“内容引用”事件。 +Before you can use the {% data variables.product.prodname_unfurls %} API, you'll need to configure content references for your GitHub App: +* Give your app `Read & write` permissions for "Content references." +* Register up to 5 valid, publicly accessible domains when configuring the "Content references" permission. Do not use IP addresses when configuring content reference domains. You can register a domain name (example.com) or a subdomain (subdomain.example.com). +* Subscribe your app to the "Content reference" event. -将应用程序安装到仓库中后,仓库中包含注册域 URL 的议题或拉取请求注释将生成内容引用事件。 应用程序必须在发布内容引用 URL 后六小时内创建内容附件。 +Once your app is installed on a repository, issue or pull request comments in the repository that contain URLs for your registered domains will generate a content reference event. The app must create a content attachment within six hours of the content reference URL being posted. -内容附件不会追溯更新 URL。 只有在您根据上述要求配置了应用程序,并且有人在其仓库中安装应用程序之后,它才会更新添加到议题或拉取请求中的 URL。 +Content attachments will not retroactively update URLs. It only works for URLs added to issues or pull requests after you configure the app using the requirements outlined above and then someone installs the app on their repository. -有关配置 GitHub 应用程序权限和事件订阅所需的步骤,请参阅“[创建 GitHub 应用程序](/apps/building-github-apps/creating-a-github-app/)”或“[编辑 GitHub 应用程序的权限](/apps/managing-github-apps/editing-a-github-app-s-permissions/)”。 +See "[Creating a GitHub App](/apps/building-github-apps/creating-a-github-app/)" or "[Editing a GitHub App's permissions](/apps/managing-github-apps/editing-a-github-app-s-permissions/)" for the steps needed to configure GitHub App permissions and event subscriptions. -## 实现内容附件流程 +## Implementing the content attachment flow -内容附件流程向您显示议题或拉取请求中的 URL、`content_reference` web 挂钩事件以及使用额外信息更新议题或拉取请求所需调用的 REST API 端点之间的关系。 +The content attachment flow shows you the relationship between the URL in the issue or pull request, the `content_reference` webhook event, and the REST API endpoint you need to call to update the issue or pull request with additional information: -**步骤 1.** 使用[关于内容附件](#about-content-attachments)中的指南设置应用程序。 您也可以根据 [Probot 应用程序示例](#example-using-probot-and-github-app-manifests)开始使用内容附件。 +**Step 1.** Set up your app using the guidelines outlined in [About content attachments](#about-content-attachments). You can also use the [Probot App example](#example-using-probot-and-github-app-manifests) to get started with content attachments. -**步骤 2.** 将注册域的 URL 添加到议题或拉取请求。 必须使用以 `http://` 或 `https://` 开头的完全合格 URL。 +**Step 2.** Add the URL for the domain you registered to an issue or pull request. You must use a fully qualified URL that starts with `http://` or `https://`. -![添加到议题的 URL](/assets/images/github-apps/github_apps_content_reference.png) +![URL added to an issue](/assets/images/github-apps/github_apps_content_reference.png) -**步骤 3.**应用程序将收到带有操作 `created` 的 [`content_reference` web 挂钩](/webhooks/event-payloads/#content_reference)。 +**Step 3.** Your app will receive the [`content_reference` webhook](/webhooks/event-payloads/#content_reference) with the action `created`. ``` json { @@ -61,12 +57,12 @@ GitHub 应用程序可以注册将触发 `content_reference` 事件的域。 当 } ``` -**步骤 4.** 应用程序使用 `content_reference` `id` 和 `repository` `full_name` 字段以使用 REST API [创建内容附件](/rest/reference/apps#create-a-content-attachment)。 您还需要 `installation` `id` 以验证为 [GitHub 应用程序安装设施](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)。 +**Step 4.** The app uses the `content_reference` `id` and `repository` `full_name` fields to [Create a content attachment](/rest/reference/apps#create-a-content-attachment) using the REST API. You'll also need the `installation` `id` to authenticate as a [GitHub App installation](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation). {% data reusables.pre-release-program.corsair-preview %} {% data reusables.pre-release-program.api-preview-warning %} -`body` 参数可包含 Markdown: +The `body` parameter can contain markdown: ```shell curl -X POST \ @@ -74,24 +70,24 @@ curl -X POST \ -H 'Accept: application/vnd.github.corsair-preview+json' \ -H 'Authorization: Bearer $INSTALLATION_TOKEN' \ -d '{ - "title": "[A-1234] Error found in core/models.py file", - "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()" + "title": "[A-1234] Error found in core/models.py file", + "body": "You have used an email that already exists for the user_email_uniq field.\n ## DETAILS:\n\nThe (email)=(Octocat@github.com) already exists.\n\n The error was found in core/models.py in get_or_create_user at line 62.\n\n self.save()" }' ``` -有关创建和安装令牌的更多信息,请参阅“[验证为 GitHub 应用程序](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)”。 +For more information about creating an installation token, see "[Authenticating as a GitHub App](/apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-an-installation)." -**步骤 5.** 在拉取请求或议题注释中,您将看到新的内容附件显示在链接下: +**Step 5.** You'll see the new content attachment appear under the link in a pull request or issue comment: -![附加到议题引用的内容](/assets/images/github-apps/content_reference_attachment.png) +![Content attached to a reference in an issue](/assets/images/github-apps/content_reference_attachment.png) -## 在 GraphQL 中使用内容附件 -我们在 [`content_reference` web 挂钩](/webhooks/event-payloads/#content_reference)中提供 `node_id`,以便您可以在 GraphQL API 中引用 `createContentAttachment` 突变。 +## Using content attachments in GraphQL +We provide the `node_id` in the [`content_reference` webhook](/webhooks/event-payloads/#content_reference) event so you can refer to the `createContentAttachment` mutation in the GraphQL API. {% data reusables.pre-release-program.corsair-preview %} {% data reusables.pre-release-program.api-preview-warning %} -例如: +For example: ``` graphql mutation { @@ -110,7 +106,7 @@ mutation { } } ``` -示例 cURL: +Example cURL: ```shell curl -X "POST" "{% data variables.product.api_url_code %}/graphql" \ @@ -122,16 +118,16 @@ curl -X "POST" "{% data variables.product.api_url_code %}/graphql" \ }' ``` -有关 `node_id` 的更多信息,请参阅“[使用全局节点 ID]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-global-node-ids)”。 +For more information on `node_id`, see "[Using Global Node IDs]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-global-node-ids)." -## 使用 Probot 和 GitHub 应用程序清单的示例 +## Example using Probot and GitHub App Manifests -要快速设置可使用 {% data variables.product.prodname_unfurls %} API 的 GitHub 应用程序,您可以使用 [Probot](https://probot.github.io/)。 要了解 Probot 如何使用 GitHub 应用程序清单,请参阅“[从清单创建 GitHub 应用程序](/apps/building-github-apps/creating-github-apps-from-a-manifest/)”。 +To quickly setup a GitHub App that can use the {% data variables.product.prodname_unfurls %} API, you can use [Probot](https://probot.github.io/). See "[Creating GitHub Apps from a manifest](/apps/building-github-apps/creating-github-apps-from-a-manifest/)" to learn how Probot uses GitHub App Manifests. -要创建 Probot 应用程序,请按照以下步骤操作: +To create a Probot App, follow these steps: -1. [生成新的 GitHub 应用程序](https://probot.github.io/docs/development/#generating-a-new-app)。 -2. 打开您创建的项目,自定义 `app.yml` 文件中的设置。 订阅 `content_reference` 事件并启用 `content_references` 写入权限: +1. [Generate a new GitHub App](https://probot.github.io/docs/development/#generating-a-new-app). +2. Open the project you created, and customize the settings in the `app.yml` file. Subscribe to the `content_reference` event and enable `content_references` write permissions: ``` yml default_events: @@ -150,7 +146,7 @@ curl -X "POST" "{% data variables.product.api_url_code %}/graphql" \ value: example.org ``` -3. 将此代码添加到 `index.js` 文件以处理 `content_reference` 事件并调用 REST API: +3. Add this code to the `index.js` file to handle `content_reference` events and call the REST API: ``` javascript module.exports = app => { @@ -171,13 +167,13 @@ curl -X "POST" "{% data variables.product.api_url_code %}/graphql" \ } ``` -4. [在本地运行 GitHub 应用程序](https://probot.github.io/docs/development/#running-the-app-locally)。 导航到 `http://localhost:3000`, 然后单击 **Register GitHub App(注册 GitHub 应用程序)**按钮: +4. [Run the GitHub App locally](https://probot.github.io/docs/development/#running-the-app-locally). Navigate to `http://localhost:3000`, and click the **Register GitHub App** button: - ![注册 Probot GitHub 应用程序](/assets/images/github-apps/github_apps_probot-registration.png) + ![Register a Probot GitHub App](/assets/images/github-apps/github_apps_probot-registration.png) -5. 在测试仓库中安装应用程序。 -6. 在测试仓库中创建议题。 -7. 将注释添加到您打开的议题,包括您在 `app.yml` 文件中配置的 URL。 -8. 查看议题注释,您将看到如下所示的更新: +5. Install the app on a test repository. +6. Create an issue in your test repository. +7. Add a comment to the issue you opened that includes the URL you configured in the `app.yml` file. +8. Take a look at the issue comment and you'll see an update that looks like this: - ![附加到议题引用的内容](/assets/images/github-apps/content_reference_attachment.png) + ![Content attached to a reference in an issue](/assets/images/github-apps/content_reference_attachment.png) diff --git a/translations/zh-CN/content/developers/webhooks-and-events/webhooks/webhook-events-and-payloads.md b/translations/zh-CN/content/developers/webhooks-and-events/webhooks/webhook-events-and-payloads.md index 8f9335f1f5..94ac6cf87b 100644 --- a/translations/zh-CN/content/developers/webhooks-and-events/webhooks/webhook-events-and-payloads.md +++ b/translations/zh-CN/content/developers/webhooks-and-events/webhooks/webhook-events-and-payloads.md @@ -1,6 +1,6 @@ --- -title: Web 挂钩事件和有效负载 -intro: 对于每个 web 挂钩事件,您可以查看事件发生的时间、示例有效负载以及有关有效负载对象参数的说明。 +title: Webhook events and payloads +intro: 'For each webhook event, you can review when the event occurs, an example payload, and descriptions about the payload object parameters.' product: '{% data reusables.gated-features.enterprise_account_webhooks %}' redirect_from: - /early-access/integrations/webhooks/ @@ -14,53 +14,52 @@ versions: ghec: '*' topics: - Webhooks -shortTitle: Web 挂钩事件和有效负载 +shortTitle: Webhook events & payloads --- - {% ifversion fpt or ghec %} {% endif %} {% data reusables.webhooks.webhooks_intro %} -您可以创建订阅此页所列事件的 web 挂钩。 每个 web 挂钩事件都包括 web 挂钩属性的说明和示例有效负载。 更多信息请参阅“[创建 web 挂钩](/webhooks/creating/)”。 +You can create webhooks that subscribe to the events listed on this page. Each webhook event includes a description of the webhook properties and an example payload. For more information, see "[Creating webhooks](/webhooks/creating/)." -## Web 挂钩有效负载对象共有属性 +## Webhook payload object common properties -每个 web 挂钩事件有效负载还包含特定于事件的属性。 您可以在各个事件类型部分中找到这些独特属性。 +Each webhook event payload also contains properties unique to the event. You can find the unique properties in the individual event type sections. -| 键 | 类型 | 描述 | -| -------- | ----- | -------------------------------------------- | -| `action` | `字符串` | 大多数 web 挂钩有效负载都包括 `action` 属性,其中包含触发事件的特定活动。 | -{% data reusables.webhooks.sender_desc %} 此属性包含在每个 web 挂钩有效负载中。 -{% data reusables.webhooks.repo_desc %} 当事件发生源于仓库中的活动时,web 挂钩有效负载包含 `repository` 属性。 +Key | Type | Description +----|------|------------- +`action` | `string` | Most webhook payloads contain an `action` property that contains the specific activity that triggered the event. +{% data reusables.webhooks.sender_desc %} This property is included in every webhook payload. +{% data reusables.webhooks.repo_desc %} Webhook payloads contain the `repository` property when the event occurs from activity in a repository. {% data reusables.webhooks.org_desc %} -{% data reusables.webhooks.app_desc %} 更多信息请参阅“[构建 {% data variables.product.prodname_github_app %}](/apps/building-github-apps/)”。 +{% data reusables.webhooks.app_desc %} For more information, see "[Building {% data variables.product.prodname_github_app %}](/apps/building-github-apps/)." -Web 挂钩事件的独特属性与您使用[事件 API](/rest/reference/activity#events) 时在 `payload` 属性中发现的属性相同。 唯一的例外是 [`push` 事件](#push)。 `push` 事件 web 挂钩有效负载的独特属性与 Events API 中的 `payload` 属性不同。 Web 挂钩有效负载包含更详细的信息。 +The unique properties for a webhook event are the same properties you'll find in the `payload` property when using the [Events API](/rest/reference/activity#events). One exception is the [`push` event](#push). The unique properties of the `push` event webhook payload and the `payload` property in the Events API differ. The webhook payload contains more detailed information. {% tip %} -**注:**有效负载的上限为 25 MB。 如果事件生成了更大的有效负载,web 挂钩将不会触发。 例如,如果同时推送多个分支或标记,这种情况可能会发生在 `create` 事件中。 我们建议监控有效负载的大小以确保成功递送。 +**Note:** Payloads are capped at 25 MB. If your event generates a larger payload, a webhook will not be fired. This may happen, for example, on a `create` event if many branches or tags are pushed at once. We suggest monitoring your payload size to ensure delivery. {% endtip %} -### 递送标头 +### Delivery headers -递送到 web 挂钩已配置 URL 端点的 HTTP POST 有效负载将包含几个特殊标头: +HTTP POST payloads that are delivered to your webhook's configured URL endpoint will contain several special headers: -| 标头 | 描述 | -| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `X-GitHub-Event` | 触发递送的事件名称。 | -| `X-GitHub-Delivery` | 用于标识递送的 [GUID](http://en.wikipedia.org/wiki/Globally_unique_identifier)。{% ifversion ghes or ghae %} -| `X-GitHub-Enterprise-Version` | 发送 HTTP POST 有效负载的 {% data variables.product.prodname_ghe_server %} 实例的版本。 | -| `X-GitHub-Enterprise-Host` | 发送 HTTP POST 有效负载的 {% data variables.product.prodname_ghe_server %} 实例的主机名。{% endif %}{% ifversion not ghae %} -| `X-Hub-Signature` | 如果使用 [`secret`](/rest/reference/repos#create-hook-config-params) 配置了 web 挂钩,则发送此标头。 This is the HMAC hex digest of the request body, and is generated using the SHA-1 hash function and the `secret` as the HMAC `key`.{% ifversion fpt or ghes or ghec %} `X-Hub-Signature` is provided for compatibility with existing integrations, and we recommend that you use the more secure `X-Hub-Signature-256` instead.{% endif %}{% endif %} -| `X-Hub-Signature-256` | 如果使用 [`secret`](/rest/reference/repos#create-hook-config-params) 配置了 web 挂钩,则发送此标头。 这是请求正文的 HMAC 十六进制摘要,它是使用 SHA-256 哈希函数和作为 HMAC `key` 的 `secret` 生成的。 | +Header | Description +-------|-------------| +`X-GitHub-Event`| Name of the event that triggered the delivery. +`X-GitHub-Delivery`| A [GUID](http://en.wikipedia.org/wiki/Globally_unique_identifier) to identify the delivery.{% ifversion ghes or ghae %} +`X-GitHub-Enterprise-Version` | The version of the {% data variables.product.prodname_ghe_server %} instance that sent the HTTP POST payload. +`X-GitHub-Enterprise-Host` | The hostname of the {% data variables.product.prodname_ghe_server %} instance that sent the HTTP POST payload.{% endif %}{% ifversion not ghae %} +`X-Hub-Signature`| This header is sent if the webhook is configured with a [`secret`](/rest/reference/repos#create-hook-config-params). This is the HMAC hex digest of the request body, and is generated using the SHA-1 hash function and the `secret` as the HMAC `key`.{% ifversion fpt or ghes or ghec %} `X-Hub-Signature` is provided for compatibility with existing integrations, and we recommend that you use the more secure `X-Hub-Signature-256` instead.{% endif %}{% endif %} +`X-Hub-Signature-256`| This header is sent if the webhook is configured with a [`secret`](/rest/reference/repos#create-hook-config-params). This is the HMAC hex digest of the request body, and is generated using the SHA-256 hash function and the `secret` as the HMAC `key`. -此外,请求的 `User-Agent` 将含有前缀 `GitHub-Hookshot/`。 +Also, the `User-Agent` for the requests will have the prefix `GitHub-Hookshot/`. -### 递送示例 +### Example delivery ```shell > POST /payload HTTP/2 @@ -104,26 +103,26 @@ Web 挂钩事件的独特属性与您使用[事件 API](/rest/reference/activity {% ifversion fpt or ghes > 3.2 or ghae-next or ghec %} ## branch_protection_rule -与分支保护规则相关的活动。 更多信息请参阅“[关于分支保护规则](/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-rules)”。 +Activity related to a branch protection rule. For more information, see "[About branch protection rules](/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-rules)." -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 对仓库管理至少拥有 `read-only` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with at least `read-only` access on repositories administration -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| --------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `action` | `字符串` | 执行的操作。 可以是 `created`、`edited` 或 `deleted`。 | -| `rule` | `对象` | 分支保护规则。 包括 `name` 以及适用于与名称匹配的分支的所有 [分支保护设置](/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings)。 二进制设置是布尔值。 多级配置是 `off`、`non_admins` 或 `everyone` 之一。 执行者和构建列表是字符串数组。 | -| `changes` | `对象` | 如果操作是 `edited`,则为规则的更改。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action performed. Can be `created`, `edited`, or `deleted`. +`rule` | `object` | The branch protection rule. Includes a `name` and all the [branch protection settings](/github/administering-a-repository/defining-the-mergeability-of-pull-requests/about-protected-branches#about-branch-protection-settings) applied to branches that match the name. Binary settings are boolean. Multi-level configurations are one of `off`, `non_admins`, or `everyone`. Actor and build lists are arrays of strings. +`changes` | `object` | If the action was `edited`, the changes to the rule. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.branch_protection_rule.edited }} {% endif %} @@ -133,13 +132,13 @@ Web 挂钩事件的独特属性与您使用[事件 API](/rest/reference/activity {% data reusables.apps.undetected-pushes-to-a-forked-repository-for-check-suites %} -### 可用性 +### Availability -- 仓库 web 挂钩只接收仓库中 `created` 和 `completed` 事件类型的有效负载 -- 组织 web 挂钩只接收仓库中 `created` 和 `completed` 事件类型的有效负载 -- 具有 `checks:read` 权限的 {% data variables.product.prodname_github_apps %} 接收应用程序所在仓库中发生的 `created` 和 `completed` 事件的有效负载。 应用程序必须具有 `checks:write` 权限才能接收 `rerequested` 和 `requested_action` 事件类型。 `rerequested` 和 `requested_action` 事件类型有效负载仅发送到被请求的 {% data variables.product.prodname_github_app %}。 具有 `checks:write` 权限的 {% data variables.product.prodname_github_apps %} 会自动订阅此 web 挂钩事件。 +- Repository webhooks only receive payloads for the `created` and `completed` event types in a repository +- Organization webhooks only receive payloads for the `created` and `completed` event types in repositories +- {% data variables.product.prodname_github_apps %} with the `checks:read` permission receive payloads for the `created` and `completed` events that occur in the repository where the app is installed. The app must have the `checks:write` permission to receive the `rerequested` and `requested_action` event types. The `rerequested` and `requested_action` event type payloads are only sent to the {% data variables.product.prodname_github_app %} being requested. {% data variables.product.prodname_github_apps %} with the `checks:write` are automatically subscribed to this webhook event. -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.check_run_properties %} {% data reusables.webhooks.repo_desc %} @@ -147,7 +146,7 @@ Web 挂钩事件的独特属性与您使用[事件 API](/rest/reference/activity {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.check_run.created }} @@ -157,13 +156,13 @@ Web 挂钩事件的独特属性与您使用[事件 API](/rest/reference/activity {% data reusables.apps.undetected-pushes-to-a-forked-repository-for-check-suites %} -### 可用性 +### Availability -- 仓库 web 挂钩只接收仓库中 `completed` 事件类型的有效负载 -- 组织 web 挂钩只接收仓库中 `completed` 事件类型的有效负载 -- 具有 `checks:read` 权限的 {% data variables.product.prodname_github_apps %} 接收应用程序所在仓库中发生的 `created` 和 `completed` 事件的有效负载。 应用程序必须具有 `checks:write` 权限才能接收 `requested` 和 `rerequested` 事件类型。 `requested` 和 `rerequested` 事件类型有效负载仅发送到被请求的 {% data variables.product.prodname_github_app %}。 具有 `checks:write` 权限的 {% data variables.product.prodname_github_apps %} 会自动订阅此 web 挂钩事件。 +- Repository webhooks only receive payloads for the `completed` event types in a repository +- Organization webhooks only receive payloads for the `completed` event types in repositories +- {% data variables.product.prodname_github_apps %} with the `checks:read` permission receive payloads for the `created` and `completed` events that occur in the repository where the app is installed. The app must have the `checks:write` permission to receive the `requested` and `rerequested` event types. The `requested` and `rerequested` event type payloads are only sent to the {% data variables.product.prodname_github_app %} being requested. {% data variables.product.prodname_github_apps %} with the `checks:write` are automatically subscribed to this webhook event. -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.check_suite_properties %} {% data reusables.webhooks.repo_desc %} @@ -171,7 +170,7 @@ Web 挂钩事件的独特属性与您使用[事件 API](/rest/reference/activity {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.check_suite.completed }} @@ -179,21 +178,21 @@ Web 挂钩事件的独特属性与您使用[事件 API](/rest/reference/activity {% data reusables.webhooks.code_scanning_alert_event_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `contents` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `security_events :read` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.code_scanning_alert_event_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} -`sender` | `object` | 如果 `action` 是 `reopened_by_user` 或 `closed_by_user`,则 `sender` 对象将是触发事件的用户。 `sender` 对象对所有其他操作是 {% ifversion fpt or ghec %}`github` {% elsif ghes > 3.0 or ghae-next %}`github-enterprise` {% else %}空 {% endif %}。 +`sender` | `object` | If the `action` is `reopened_by_user` or `closed_by_user`, the `sender` object will be the user that triggered the event. The `sender` object is {% ifversion fpt or ghec %}`github`{% elsif ghes > 3.0 or ghae-next %}`github-enterprise`{% else %}empty{% endif %} for all other actions. -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.code_scanning_alert.reopened }} @@ -201,13 +200,13 @@ Web 挂钩事件的独特属性与您使用[事件 API](/rest/reference/activity {% data reusables.webhooks.commit_comment_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `contents` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `contents` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.commit_comment_properties %} {% data reusables.webhooks.repo_desc %} @@ -215,41 +214,43 @@ Web 挂钩事件的独特属性与您使用[事件 API](/rest/reference/activity {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.commit_comment.created }} +{% ifversion ghes < 3.4 %} ## content_reference {% data reusables.webhooks.content_reference_short_desc %} -Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如果您注册了一个子域 (`https://subdomain.example.com`),则只有该子域的 URL 才会触发此事件。 如果您注册了一个域 (`https://example.com`),则该域及所有子域的 URL 都会触发此事件。 请参阅“[创建内容附件](/rest/reference/apps#create-a-content-attachment)”以创建新的内容附件。 +Webhook events are triggered based on the specificity of the domain you register. For example, if you register a subdomain (`https://subdomain.example.com`) then only URLs for the subdomain trigger this event. If you register a domain (`https://example.com`) then URLs for domain and all subdomains trigger this event. See "[Create a content attachment](/rest/reference/apps#create-a-content-attachment)" to create a new content attachment. -### 可用性 +### Availability -- 具有 `content_references:write` 权限的 {% data variables.product.prodname_github_apps %} +- {% data variables.product.prodname_github_apps %} with the `content_references:write` permission -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.content_reference.created }} +{% endif %} ## create {% data reusables.webhooks.create_short_desc %} {% note %} -**注:**同时推送三个以上的标记时不会收到此事件的 web 挂钩。 +**Note:** You will not receive a webhook for this event when you push more than three tags at once. {% endnote %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `contents` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `contents` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.create_properties %} {% data reusables.webhooks.pusher_type_desc %} @@ -258,7 +259,7 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.create }} @@ -268,17 +269,17 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% note %} -**注:**同时删除三个以上的标记时不会收到此事件的 web 挂钩。 +**Note:** You will not receive a webhook for this event when you delete more than three tags at once. {% endnote %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `contents` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `contents` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.delete_properties %} {% data reusables.webhooks.pusher_type_desc %} @@ -287,7 +288,7 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.delete }} @@ -295,19 +296,19 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.deploy_key_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 +- Repository webhooks +- Organization webhooks -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.deploy_key_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.deploy_key.created }} @@ -315,24 +316,24 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.deployment_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `deployments` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `deployments` permission -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| ------------ | ------------------------------------------- | --------------------------------------------- |{% ifversion fpt or ghes or ghae or ghec %} -| `action` | `字符串` | 执行的操作。 可以是 `created`。{% endif %} -| `deployment` | `对象` | [部署](/rest/reference/repos#list-deployments)。 | +Key | Type | Description +----|------|-------------{% ifversion fpt or ghes or ghae or ghec %} +`action` |`string` | The action performed. Can be `created`.{% endif %} +`deployment` |`object` | The [deployment](/rest/reference/repos#list-deployments). {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.deployment }} @@ -340,54 +341,54 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.deployment_status_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `deployments` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `deployments` permission -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| ---------------------------------- | ------------------------------------------- | ------------------------------------------------------- |{% ifversion fpt or ghes or ghae or ghec %} -| `action` | `字符串` | 执行的操作。 可以是 `created`。{% endif %} -| `deployment_status` | `对象` | [部署状态](/rest/reference/repos#list-deployment-statuses)。 | -| `deployment_status["state"]` | `字符串` | 新状态。 可以是 `pending`、`success`、`failure` 或 `error`。 | -| `deployment_status["target_url"]` | `字符串` | 添加到状态的可选链接。 | -| `deployment_status["description"]` | `字符串` | 添加到状态的可选人类可读说明。 | -| `deployment` | `对象` | 此状态关联的[部署](/rest/reference/repos#list-deployments)。 | +Key | Type | Description +----|------|-------------{% ifversion fpt or ghes or ghae or ghec %} +`action` |`string` | The action performed. Can be `created`.{% endif %} +`deployment_status` |`object` | The [deployment status](/rest/reference/repos#list-deployment-statuses). +`deployment_status["state"]` |`string` | The new state. Can be `pending`, `success`, `failure`, or `error`. +`deployment_status["target_url"]` |`string` | The optional link added to the status. +`deployment_status["description"]`|`string` | The optional human-readable description added to the status. +`deployment` |`object` | The [deployment](/rest/reference/repos#list-deployments) that this status is associated with. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.deployment_status }} {% ifversion fpt or ghec %} -## 讨论 +## discussion {% data reusables.webhooks.discussions-webhooks-beta %} -与讨论有关的活动。 更多信息请参阅“[使用 GraphQL API 进行讨论]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-the-graphql-api-for-discussions)”。 -### 可用性 +Activity related to a discussion. For more information, see the "[Using the GraphQL API for discussions]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-the-graphql-api-for-discussions)." +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `discussions` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `discussions` permission -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| -------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------- | -| `action` | `字符串` | 执行的操作。 可以是 `created`、`edited`、`deleted`、`pinned`、`unpinned`、`locked`、`unlocked`、`transferred`、`category_changed`、`answered` 或 `unanswered`。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action performed. Can be `created`, `edited`, `deleted`, `pinned`, `unpinned`, `locked`, `unlocked`, `transferred`, `category_changed`, `answered`, or `unanswered`. {% data reusables.webhooks.discussion_desc %} {% data reusables.webhooks.repo_desc_graphql %} {% data reusables.webhooks.org_desc_graphql %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.discussion.created }} @@ -395,63 +396,63 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.discussions-webhooks-beta %} -与讨论中的评论相关的活动。 更多信息请参阅“[使用 GraphQL API 进行讨论]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-the-graphql-api-for-discussions)”。 +Activity related to a comment in a discussion. For more information, see "[Using the GraphQL API for discussions]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-the-graphql-api-for-discussions)." -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `discussions` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `discussions` permission -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| -------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `action` | `字符串` | 执行的操作。 可以是 `created`、`edited` 或 `deleted`。 | -| `注释,评论` | `对象` | [`discussion comment`]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-the-graphql-api-for-discussions#discussioncomment) 资源。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action performed. Can be `created`, `edited`, or `deleted`. +`comment` | `object` | The [`discussion comment`]({% ifversion ghec %}/free-pro-team@latest{% endif %}/graphql/guides/using-the-graphql-api-for-discussions#discussioncomment) resource. {% data reusables.webhooks.discussion_desc %} {% data reusables.webhooks.repo_desc_graphql %} {% data reusables.webhooks.org_desc_graphql %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.discussion_comment.created }} {% endif %} {% ifversion ghes or ghae %} -## 企业 +## enterprise {% data reusables.webhooks.enterprise_short_desc %} -### 可用性 +### Availability -- GitHub Enterprise web 挂钩。 更多信息请参阅“[全局 web 挂钩](/rest/reference/enterprise-admin#global-webhooks/)”。 +- GitHub Enterprise webhooks. For more information, "[Global webhooks](/rest/reference/enterprise-admin#global-webhooks/)." -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| -------- | ----- | -------------------------------------------------------------------- | -| `action` | `字符串` | 执行的操作。 可以是 `anonymous_access_enabled` 或 `anonymous_access_disabled`。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action performed. Can be `anonymous_access_enabled` or `anonymous_access_disabled`. -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.enterprise.anonymous_access_enabled }} {% endif %} -## 复刻 +## fork {% data reusables.webhooks.fork_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `contents` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `contents` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.fork_properties %} {% data reusables.webhooks.repo_desc %} @@ -459,28 +460,28 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.fork }} ## github_app_authorization -当有人撤销对 {% data variables.product.prodname_github_app %} 的授权时,将发生此事件。 {% data variables.product.prodname_github_app %} 默认情况下会接收此 web 挂钩,并且无法取消订阅此事件。 +When someone revokes their authorization of a {% data variables.product.prodname_github_app %}, this event occurs. A {% data variables.product.prodname_github_app %} receives this webhook by default and cannot unsubscribe from this event. -{% data reusables.webhooks.authorization_event %} 有关 user-to-server 请求(需要 {% data variables.product.prodname_github_app %} 授权)的详细信息,请参阅“[识别和授权 {% data variables.product.prodname_github_apps %} 用户](/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)”。 +{% data reusables.webhooks.authorization_event %} For details about user-to-server requests, which require {% data variables.product.prodname_github_app %} authorization, see "[Identifying and authorizing users for {% data variables.product.prodname_github_apps %}](/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps/)." -### 可用性 +### Availability - {% data variables.product.prodname_github_apps %} -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| -------- | ----- | --------------------- | -| `action` | `字符串` | 执行的操作。 可以是 `revoked`。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action performed. Can be `revoked`. {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.github_app_authorization.revoked }} @@ -488,13 +489,13 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.gollum_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `contents` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `contents` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.gollum_properties %} {% data reusables.webhooks.repo_desc %} @@ -502,25 +503,25 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.gollum }} -## 安装 +## installation {% data reusables.webhooks.installation_short_desc %} -### 可用性 +### Availability - {% data variables.product.prodname_github_apps %} -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.installation_properties %} {% data reusables.webhooks.app_always_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.installation.deleted }} @@ -528,17 +529,17 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.installation_repositories_short_desc %} -### 可用性 +### Availability - {% data variables.product.prodname_github_apps %} -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.installation_repositories_properties %} {% data reusables.webhooks.app_always_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.installation_repositories.added }} @@ -546,13 +547,13 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.issue_comment_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `issues` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `issues` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.issue_comment_webhook_properties %} {% data reusables.webhooks.issue_comment_properties %} @@ -561,21 +562,21 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.issue_comment.created }} -## 议题 +## issues {% data reusables.webhooks.issues_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `issues` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `issues` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.issue_webhook_properties %} {% data reusables.webhooks.issue_properties %} @@ -584,72 +585,72 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### 有人编辑议题时的 web 挂钩示例 +### Webhook payload example when someone edits an issue {{ webhookPayloadsForCurrentVersion.issues.edited }} -## 标签 +## label {% data reusables.webhooks.label_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `metadata` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `metadata` permission -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| ---------------------- | ----- | -------------------------------------------- | -| `action` | `字符串` | 执行的操作内容. 可以是 `created`、`edited` 或 `deleted`。 | -| `标签` | `对象` | 添加的标签。 | -| `changes` | `对象` | 对标签的更改(如果操作为 `edited`)。 | -| `changes[name][from]` | `字符串` | 名称的先前版本(如果操作为 `edited`)。 | -| `changes[color][from]` | `字符串` | 颜色的先前版本(如果操作为 `edited`)。 | +Key | Type | Description +----|------|------------- +`action`|`string` | The action that was performed. Can be `created`, `edited`, or `deleted`. +`label`|`object` | The label that was added. +`changes`|`object`| The changes to the label if the action was `edited`. +`changes[name][from]`|`string` | The previous version of the name if the action was `edited`. +`changes[color][from]`|`string` | The previous version of the color if the action was `edited`. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.label.deleted }} {% ifversion fpt or ghec %} ## marketplace_purchase -与 GitHub Marketplace 购买相关的活动。 {% data reusables.webhooks.action_type_desc %} 更多信息请参阅“[GitHub Marketplace](/marketplace/)”。 +Activity related to a GitHub Marketplace purchase. {% data reusables.webhooks.action_type_desc %} For more information, see the "[GitHub Marketplace](/marketplace/)." -### 可用性 +### Availability - {% data variables.product.prodname_github_apps %} -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| -------- | ----- | --------------------------------------------------------------------------------------------------- | -| `action` | `字符串` | 为 [GitHub Marketplace](https://github.com/marketplace) 计划执行的操作。 可以是以下选项之一: | +Key | Type | Description +----|------|------------- +`action` | `string` | The action performed for a [GitHub Marketplace](https://github.com/marketplace) plan. Can be one of: -有关此有效负载和每种 `action` 类型的有效负载的详细说明,请参阅 [{% data variables.product.prodname_marketplace %} web 挂钩事件](/marketplace/integrating-with-the-github-marketplace-api/github-marketplace-webhook-events/)。 +For a detailed description of this payload and the payload for each type of `action`, see [{% data variables.product.prodname_marketplace %} webhook events](/marketplace/integrating-with-the-github-marketplace-api/github-marketplace-webhook-events/). -### 有人购买计划时的 web 挂钩示例 +### Webhook payload example when someone purchases the plan {{ webhookPayloadsForCurrentVersion.marketplace_purchase.purchased }} {% endif %} -## 成员 +## member {% data reusables.webhooks.member_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `members` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `members` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.member_webhook_properties %} {% data reusables.webhooks.member_properties %} @@ -658,7 +659,7 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.member.added }} @@ -666,57 +667,57 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.membership_short_desc %} -### 可用性 +### Availability -- 组织 web 挂钩 -- 具有 `members` 权限的 {% data variables.product.prodname_github_apps %} +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `members` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.membership_properties %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.membership.removed }} ## meta -配置此事件的 web 挂钩已被删除。 此事件将仅监听对安装此事件的特定挂钩的更改。 因此,必须为要接收元事件的每个挂钩选择它。 +The webhook this event is configured on was deleted. This event will only listen for changes to the particular hook the event is installed on. Therefore, it must be selected for each hook that you'd like to receive meta events for. -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 +- Repository webhooks +- Organization webhooks -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| --------- | ----- | ------------------------------------------------------------------------------------------- | -| `action` | `字符串` | 执行的操作。 可以是 `deleted`。 | -| `hook_id` | `整数` | 修改后的 web 挂钩的 ID。 | -| `挂钩` | `对象` | 修改后的 web 挂钩。 它将包含基于 web 挂钩类型的不同键:repository、organization、business、app 或 GitHub Marketplace。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action performed. Can be `deleted`. +`hook_id` |`integer` | The id of the modified webhook. +`hook` |`object` | The modified webhook. This will contain different keys based on the type of webhook it is: repository, organization, business, app, or GitHub Marketplace. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.meta.deleted }} -## 里程碑 +## milestone {% data reusables.webhooks.milestone_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `pull_requests` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `pull_requests` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.milestone_properties %} {% data reusables.webhooks.repo_desc %} @@ -724,33 +725,33 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.milestone.created }} -## 组织 +## organization {% data reusables.webhooks.organization_short_desc %} -### 可用性 +### Availability {% ifversion ghes or ghae %} -- GitHub Enterprise web 挂钩只接收 `created` 和 `deleted` 事件。 更多信息请参阅“[全局 web 挂钩](/rest/reference/enterprise-admin#global-webhooks/)”。{% endif %} -- 组织 web 挂钩只接收 `deleted`、`added`、`removed`、`renamed` 和 `invited` 事件 -- 具有 `members` 权限的 {% data variables.product.prodname_github_apps %} +- GitHub Enterprise webhooks only receive `created` and `deleted` events. For more information, "[Global webhooks](/rest/reference/enterprise-admin#global-webhooks/).{% endif %} +- Organization webhooks only receive the `deleted`, `added`, `removed`, `renamed`, and `invited` events +- {% data variables.product.prodname_github_apps %} with the `members` permission -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| ------------ | ----- | ------------------------------------------------------------------------------------------------------------------------------------------- | -| `action` | `字符串` | 执行的操作内容. 可以是以下选项之一:{% ifversion ghes or ghae %}`created`、{% endif %}`deleted`、`renamed`、`member_added`、`member_removed` 或 `member_invited`。 | -| `邀请` | `对象` | 对用户的邀请或电子邮件邀请(如果操作为 `member_invited`)。 | -| `membership` | `对象` | 用户和组织之间的成员资格。 当操作为 `member_invited` 时不存在。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action that was performed. Can be one of:{% ifversion ghes or ghae %} `created`,{% endif %} `deleted`, `renamed`, `member_added`, `member_removed`, or `member_invited`. +`invitation` |`object` | The invitation for the user or email if the action is `member_invited`. +`membership` |`object` | The membership between the user and the organization. Not present when the action is `member_invited`. {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.organization.member_added }} @@ -760,22 +761,22 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.org_block_short_desc %} -### 可用性 +### Availability -- 组织 web 挂钩 -- 具有 `organization_administration` 权限的 {% data variables.product.prodname_github_apps %} +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `organization_administration` permission -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| -------------- | ----- | ----------------------------------- | -| `action` | `字符串` | 执行的操作。 可以是 `blocked` 或 `unblocked`。 | -| `blocked_user` | `对象` | 有关被阻止或取消阻止的用户的信息。 | +Key | Type | Description +----|------|------------ +`action` | `string` | The action performed. Can be `blocked` or `unblocked`. +`blocked_user` | `object` | Information about the user that was blocked or unblocked. {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.org_block.blocked }} @@ -785,21 +786,21 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 ## package -与 {% data variables.product.prodname_registry %} 有关的活动。 {% data reusables.webhooks.action_type_desc %}更多信息请参阅“[使用 {% data variables.product.prodname_registry %} 管理包](/github/managing-packages-with-github-packages)”以详细了解 {% data variables.product.prodname_registry %}。 +Activity related to {% data variables.product.prodname_registry %}. {% data reusables.webhooks.action_type_desc %} For more information, see "[Managing packages with {% data variables.product.prodname_registry %}](/github/managing-packages-with-github-packages)" to learn more about {% data variables.product.prodname_registry %}. -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 +- Repository webhooks +- Organization webhooks -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.package_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.package.published }} {% endif %} @@ -808,24 +809,24 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.page_build_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `pages` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `pages` permission -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| ---- | ---- | ----------------------------------------------------------------------- | -| `id` | `整数` | 页面构建的唯一标识符。 | -| `构建` | `对象` | [列表 GitHub Pages 构建](/rest/reference/repos#list-github-pages-builds)本身。 | +Key | Type | Description +----|------|------------ +`id` | `integer` | The unique identifier of the page build. +`build` | `object` | The [List GitHub Pages builds](/rest/reference/repos#list-github-pages-builds) itself. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.page_build }} @@ -833,25 +834,25 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.ping_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- {% data variables.product.prodname_github_apps %} 接收带有用于注册应用程序的 `app_id` 的 ping 事件。 +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} receive a ping event with an `app_id` used to register the app -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| -------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `zen` | `字符串` | GitHub zen 的随机字符串。 | -| `hook_id` | `整数` | 触发 ping 的 web 挂钩的 ID。 | -| `挂钩` | `对象` | [web 挂钩配置](/rest/reference/repos#get-a-repository-webhook)。 | -| `hook[app_id]` | `整数` | 注册新的 {% data variables.product.prodname_github_app %} 时,{% data variables.product.product_name %} 将 ping 事件发送到您在注册过程中指定的 **web 挂钩 URL**。 该事件包含 `app_id`,这是[验证](/apps/building-integrations/setting-up-and-registering-github-apps/about-authentication-options-for-github-apps/)应用程序的必需项。 | +Key | Type | Description +----|------|------------ +`zen` | `string` | Random string of GitHub zen. +`hook_id` | `integer` | The ID of the webhook that triggered the ping. +`hook` | `object` | The [webhook configuration](/rest/reference/repos#get-a-repository-webhook). +`hook[app_id]` | `integer` | When you register a new {% data variables.product.prodname_github_app %}, {% data variables.product.product_name %} sends a ping event to the **webhook URL** you specified during registration. The event contains the `app_id`, which is required for [authenticating](/apps/building-integrations/setting-up-and-registering-github-apps/about-authentication-options-for-github-apps/) an app. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.ping }} @@ -859,13 +860,13 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.project_card_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `repository_projects` 或 `organization_projects` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `repository_projects` or `organization_projects` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.project_card_properties %} {% data reusables.webhooks.repo_desc %} @@ -873,7 +874,7 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.project_card.created }} @@ -881,13 +882,13 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.project_column_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `repository_projects` 或 `organization_projects` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `repository_projects` or `organization_projects` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.project_column_properties %} {% data reusables.webhooks.repo_desc %} @@ -895,7 +896,7 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.project_column.created }} @@ -903,13 +904,13 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.project_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `repository_projects` 或 `organization_projects` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `repository_projects` or `organization_projects` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.project_properties %} {% data reusables.webhooks.repo_desc %} @@ -917,7 +918,7 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.project.created }} @@ -925,23 +926,22 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 ## public {% data reusables.webhooks.public_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `metadata` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `metadata` permission -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| - | -- | -- | -| | | | +Key | Type | Description +----|------|------------- {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.public }} {% endif %} @@ -949,13 +949,13 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.pull_request_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `pull_requests` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `pull_requests` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.pull_request_webhook_properties %} {% data reusables.webhooks.pull_request_properties %} @@ -964,9 +964,9 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example -`review_requested` 和 `review_request_removed` 事件的递送将含有一个额外的字段,称为 `requested_reviewer`。 +Deliveries for `review_requested` and `review_request_removed` events will have an additional field called `requested_reviewer`. {{ webhookPayloadsForCurrentVersion.pull_request.opened }} @@ -974,13 +974,13 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.pull_request_review_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `pull_requests` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `pull_requests` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.pull_request_review_properties %} {% data reusables.webhooks.repo_desc %} @@ -988,7 +988,7 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.pull_request_review.submitted }} @@ -996,13 +996,13 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.pull_request_review_comment_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `pull_requests` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `pull_requests` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.pull_request_review_comment_webhook_properties %} {% data reusables.webhooks.pull_request_review_comment_properties %} @@ -1011,71 +1011,71 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.pull_request_review_comment.created }} -## 推送 +## push {% data reusables.webhooks.push_short_desc %} {% note %} -**注:**同时推送三个以上的标记时不会收到此事件的 web 挂钩。 +**Note:** You will not receive a webhook for this event when you push more than three tags at once. {% endnote %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `contents` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `contents` permission -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| -------------------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `ref` | `字符串` | 被推送的完整 [`git ref`](/rest/reference/git#refs)。 例如: `refs/heads/main` 或 `refs/tags/v3.14.1`。 | -| `before` | `字符串` | 推送之前在 `ref` 上最近提交的 SHA。 | -| `after` | `字符串` | 推送之后在 `ref` 上最近提交的 SHA。 | -| `created` | `布尔值` | 此推送是否创建 `ref`。 | -| `deleted` | `布尔值` | 此推送是否删除 `ref`。 | -| `forced` | `布尔值` | 此推送是否为 `ref` 的强制推送。 | -| `head_commit` | `对象` | 对于 `after` 是提交对象或指向提交对象的推送,为该提交的扩展表示。 对于 `after` 指示注释标记对象的推送,注释标记指向的提交的扩展表示。 | -| `compare` | `字符串` | 显示此 `ref` 更新中更改的 URL,从 `before` 提交到 `after` 提交。 对于新创建的直接基于默认分支的 `ref`,这是默认分支的头部与 `after` 提交之间的比较。 否则,这将显示 `after` 提交之前的所有提交。 | -| `commits` | `数组` | 描述所推送提交的提交对象数组。 (推送的提交是指包含在 `compare` 中 `before` 提交与 `after` 提交之间的所有提交) 该数组最多包含 20 个提交。 如有必要,可使用[提交 API](/rest/reference/repos#commits) 获取更多提交。 此限制仅适用于时间表事件,而不适用于 web 挂钩递送。 | -| `commits[][id]` | `字符串` | 提交的 SHA。 | -| `commits[][timestamp]` | `字符串` | 提交的 ISO 8601 时间戳。 | -| `commits[][message]` | `字符串` | 提交消息. | -| `commits[][author]` | `对象` | 提交的 Git 作者。 | -| `commits[][author][name]` | `字符串` | Git 作者的名称。 | -| `commits[][author][email]` | `字符串` | Git 作者的电子邮件地址。 | -| `commits[][url]` | `url` | 指向提交 API 资源的 URL。 | -| `commits[][distinct]` | `布尔值` | 此提交是否与之前推送的任何提交不同。 | -| `commits[][added]` | `数组` | 在提交中添加的文件数组。 | -| `commits[][modified]` | `数组` | 由提交修改的文件数组。 | -| `commits[][removed]` | `数组` | 在提交中删除的文件数组。 | -| `pusher` | `对象` | 推送提交的用户。 | +Key | Type | Description +----|------|------------- +`ref`|`string` | The full [`git ref`](/rest/reference/git#refs) that was pushed. Example: `refs/heads/main` or `refs/tags/v3.14.1`. +`before`|`string` | The SHA of the most recent commit on `ref` before the push. +`after`|`string` | The SHA of the most recent commit on `ref` after the push. +`created`|`boolean` | Whether this push created the `ref`. +`deleted`|`boolean` | Whether this push deleted the `ref`. +`forced`|`boolean` | Whether this push was a force push of the `ref`. +`head_commit`|`object` | For pushes where `after` is or points to a commit object, an expanded representation of that commit. For pushes where `after` refers to an annotated tag object, an expanded representation of the commit pointed to by the annotated tag. +`compare`|`string` | URL that shows the changes in this `ref` update, from the `before` commit to the `after` commit. For a newly created `ref` that is directly based on the default branch, this is the comparison between the head of the default branch and the `after` commit. Otherwise, this shows all commits until the `after` commit. +`commits`|`array` | An array of commit objects describing the pushed commits. (Pushed commits are all commits that are included in the `compare` between the `before` commit and the `after` commit.) The array includes a maximum of 20 commits. If necessary, you can use the [Commits API](/rest/reference/repos#commits) to fetch additional commits. This limit is applied to timeline events only and isn't applied to webhook deliveries. +`commits[][id]`|`string` | The SHA of the commit. +`commits[][timestamp]`|`string` | The ISO 8601 timestamp of the commit. +`commits[][message]`|`string` | The commit message. +`commits[][author]`|`object` | The git author of the commit. +`commits[][author][name]`|`string` | The git author's name. +`commits[][author][email]`|`string` | The git author's email address. +`commits[][url]`|`url` | URL that points to the commit API resource. +`commits[][distinct]`|`boolean` | Whether this commit is distinct from any that have been pushed before. +`commits[][added]`|`array` | An array of files added in the commit. +`commits[][modified]`|`array` | An array of files modified by the commit. +`commits[][removed]`|`array` | An array of files removed in the commit. +`pusher` | `object` | The user who pushed the commits. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.push }} -## 发行版 +## release {% data reusables.webhooks.release_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `contents` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `contents` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.release_webhook_properties %} {% data reusables.webhooks.release_properties %} @@ -1084,66 +1084,66 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.release.published }} {% ifversion fpt or ghes or ghae or ghec %} ## repository_dispatch -当 {% data variables.product.prodname_github_app %} 将 `POST` 请求发送到“[创建仓库分发事件](/rest/reference/repos#create-a-repository-dispatch-event)”端点时,此事件发生。 +This event occurs when a {% data variables.product.prodname_github_app %} sends a `POST` request to the "[Create a repository dispatch event](/rest/reference/repos#create-a-repository-dispatch-event)" endpoint. -### 可用性 +### Availability -- {% data variables.product.prodname_github_apps %} 必须具有 `contents` 权限才能接收此 web 挂钩。 +- {% data variables.product.prodname_github_apps %} must have the `contents` permission to receive this webhook. -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.repository_dispatch }} {% endif %} -## 仓库 +## repository {% data reusables.webhooks.repository_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩接收除 `deleted` 之外的所有事件类型 -- 组织 web 挂钩 -- 具有 `metadata` 权限的 {% data variables.product.prodname_github_apps %} 接收除 `deleted` 之外的所有事件类型 +- Repository webhooks receive all event types except `deleted` +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `metadata` permission receive all event types except `deleted` -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| -------- | ----- | -------------------------------------------- | -| `action` | `字符串` | 执行的操作内容. 可以是以下选项之一: | +Key | Type | Description +----|------|------------- +`action` |`string` | The action that was performed. This can be one of: {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.repository.publicized }} {% ifversion fpt or ghec %} ## repository_import -{% data reusables.webhooks.repository_import_short_desc %} 要在个人仓库中接收此事件,必须在导入之前创建一个空仓库。 此事件可使用 [GitHub 导入工具](/articles/importing-a-repository-with-github-importer/)或[来源导入 API](/rest/reference/migrations#source-imports) 触发。 +{% data reusables.webhooks.repository_import_short_desc %} To receive this event for a personal repository, you must create an empty repository prior to the import. This event can be triggered using either the [GitHub Importer](/articles/importing-a-repository-with-github-importer/) or the [Source imports API](/rest/reference/migrations#source-imports). -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 +- Repository webhooks +- Organization webhooks -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.repository_import_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.repository_import }} @@ -1151,19 +1151,19 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.repository_vulnerability_alert_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 +- Repository webhooks +- Organization webhooks -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.repository_vulnerability_alert_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.repository_vulnerability_alert.create }} @@ -1175,21 +1175,21 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.secret_scanning_alert_event_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `secret_scanning_alerts:read` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `secret_scanning_alerts:read` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.secret_scanning_alert_event_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} -`sender` | `object` | 如果 `action` 是 `resolved` 或 `reopened`,则 `sender` 对象将是触发事件的用户。 对于所有其他操作,`sender` 对象都为空。 +`sender` | `object` | If the `action` is `resolved` or `reopened`, the `sender` object will be the user that triggered the event. The `sender` object is empty for all other actions. -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.secret_scanning_alert.reopened }} {% endif %} @@ -1197,21 +1197,21 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% ifversion fpt or ghes or ghec %} ## security_advisory -与安全通告相关的活动。 安全通告提供有关 GitHub 软件中安全漏洞的信息。 安全通告数据集还支持 GitHub 安全警报,请参阅“[关于漏洞依赖项的警报](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies/)”。 +Activity related to a security advisory. A security advisory provides information about security-related vulnerabilities in software on GitHub. The security advisory dataset also powers the GitHub security alerts, see "[About alerts for vulnerable dependencies](/github/managing-security-vulnerabilities/about-alerts-for-vulnerable-dependencies/)." {% endif %} -### 可用性 +### Availability -- 具有 `security_events` 权限的 {% data variables.product.prodname_github_apps %} +- {% data variables.product.prodname_github_apps %} with the `security_events` permission -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| ------------------- | ----- | --------------------------------------------------------------------------- | -| `action` | `字符串` | 执行的操作内容. 对于所有新事件,该操作可以是 `published`、`updated`、`performed` 或 `withdrawn` 之一。 | -| `security_advisory` | `对象` | 安全通告的详细信息,包括摘要、说明和严重程度。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action that was performed. The action can be one of `published`, `updated`, `performed`, or `withdrawn` for all new events. +`security_advisory` |`object` | The details of the security advisory, including summary, description, and severity. -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.security_advisory.published }} @@ -1220,104 +1220,104 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.sponsorship_short_desc %} -您只能在 {% data variables.product.prodname_dotcom %} 上创建赞助 web 挂钩。 更多信息请参阅“[为赞助帐户中的事件配置 web 挂钩](/sponsors/integrating-with-github-sponsors/configuring-webhooks-for-events-in-your-sponsored-account)”。 +You can only create a sponsorship webhook on {% data variables.product.prodname_dotcom %}. For more information, see "[Configuring webhooks for events in your sponsored account](/sponsors/integrating-with-github-sponsors/configuring-webhooks-for-events-in-your-sponsored-account)". -### 可用性 +### Availability -- 赞助帐户 +- Sponsored accounts -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.sponsorship_webhook_properties %} {% data reusables.webhooks.sponsorship_properties %} {% data reusables.webhooks.sender_desc %} -### 有人创建赞助时的 web 挂钩示例 +### Webhook payload example when someone creates a sponsorship {{ webhookPayloadsForCurrentVersion.sponsorship.created }} -### 有人降级赞助时的 web 挂钩示例 +### Webhook payload example when someone downgrades a sponsorship {{ webhookPayloadsForCurrentVersion.sponsorship.downgraded }} {% endif %} -## 星标 +## star {% data reusables.webhooks.star_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 +- Repository webhooks +- Organization webhooks -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.star_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.star.created }} -## 状态 +## status {% data reusables.webhooks.status_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `statuses` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `statuses` permission -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| ------------ | ----- | ------------------------------------------------------------------- | -| `id` | `整数` | 状态的唯一标识符。 | -| `sha` | `字符串` | 提交 SHA。 | -| `state` | `字符串` | 新状态。 可以是 `pending`、`success`、`failure` 或 `error`。 | -| `说明` | `字符串` | 添加到状态的可选人类可读说明。 | -| `target_url` | `字符串` | 添加到状态的可选链接。 | -| `分支` | `数组` | 包含状态的 SHA 的分支对象数组。 每个分支都包含给定的 SHA,但 SHA 不一定是该分支的头部。 该数组最多包含 10 个分支。 | +Key | Type | Description +----|------|------------- +`id` | `integer` | The unique identifier of the status. +`sha`|`string` | The Commit SHA. +`state`|`string` | The new state. Can be `pending`, `success`, `failure`, or `error`. +`description`|`string` | The optional human-readable description added to the status. +`target_url`|`string` | The optional link added to the status. +`branches`|`array` | An array of branch objects containing the status' SHA. Each branch contains the given SHA, but the SHA may or may not be the head of the branch. The array includes a maximum of 10 branches. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.status }} -## 团队 +## team {% data reusables.webhooks.team_short_desc %} -### 可用性 +### Availability -- 组织 web 挂钩 -- 具有 `members` 权限的 {% data variables.product.prodname_github_apps %} +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `members` permission -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| ----------------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------- | -| `action` | `字符串` | 执行的操作内容. 可以是 `created`、`deleted`、`edited`、`added_to_repository` 或 `removed_from_repository` 之一。 | -| `团队` | `对象` | 团队本身。 | -| `changes` | `对象` | 对团队的更改(如果操作为 `edited`)。 | -| `changes[description][from]` | `字符串` | 说明的先前版本(如果操作为 `edited`)。 | -| `changes[name][from]` | `字符串` | 名称的先前版本(如果操作为 `edited`)。 | -| `changes[privacy][from]` | `字符串` | 团队隐私的先前版本(如果操作为 `edited`)。 | -| `changes[repository][permissions][from][admin]` | `布尔值` | 团队成员对仓库 `admin` 权限的先前版本(如果操作为 `edited`)。 | -| `changes[repository][permissions][from][pull]` | `布尔值` | 团队成员对仓库 `pull` 权限的先前版本(如果操作为 `edited`)。 | -| `changes[repository][permissions][from][push]` | `布尔值` | 团队成员对仓库 `push` 权限的先前版本(如果操作为 `edited`)。 | -| `仓库` | `对象` | 在团队权限范围中添加或删除的仓库(如果操作为 `added_to_repository`、`removed_from_repository` 或 `edited`)。 对于 `edited` 操作,`repository` 还包含团队对仓库的新权限级别。 | +Key | Type | Description +----|------|------------- +`action` |`string` | The action that was performed. Can be one of `created`, `deleted`, `edited`, `added_to_repository`, or `removed_from_repository`. +`team` |`object` | The team itself. +`changes`|`object` | The changes to the team if the action was `edited`. +`changes[description][from]` |`string` | The previous version of the description if the action was `edited`. +`changes[name][from]` |`string` | The previous version of the name if the action was `edited`. +`changes[privacy][from]` |`string` | The previous version of the team's privacy if the action was `edited`. +`changes[repository][permissions][from][admin]` | `boolean` | The previous version of the team member's `admin` permission on a repository, if the action was `edited`. +`changes[repository][permissions][from][pull]` | `boolean` | The previous version of the team member's `pull` permission on a repository, if the action was `edited`. +`changes[repository][permissions][from][push]` | `boolean` | The previous version of the team member's `push` permission on a repository, if the action was `edited`. +`repository`|`object` | The repository that was added or removed from to the team's purview if the action was `added_to_repository`, `removed_from_repository`, or `edited`. For `edited` actions, `repository` also contains the team's new permission levels for the repository. {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.team.added_to_repository }} @@ -1325,54 +1325,54 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.team_add_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `members` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `members` permission -### Web 挂钩有效负载对象 +### Webhook payload object -| 键 | 类型 | 描述 | -| ---- | ---- | ------------------------------------------------------------ | -| `团队` | `对象` | 被修改的[团队](/rest/reference/teams)。 **注:**较旧的事件可能不会在有效负载中包括此值。 | +Key | Type | Description +----|------|------------- +`team`|`object` | The [team](/rest/reference/teams) that was modified. **Note:** Older events may not include this in the payload. {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.team_add }} {% ifversion ghes or ghae %} -## 用户 +## user -当用户被 `created` 或 `deleted` 时。 +When a user is `created` or `deleted`. -### 可用性 -- GitHub Enterprise web 挂钩。 更多信息请参阅“[全局 web 挂钩](/rest/reference/enterprise-admin#global-webhooks/)”。 +### Availability +- GitHub Enterprise webhooks. For more information, "[Global webhooks](/rest/reference/enterprise-admin#global-webhooks/)." -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.user.created }} {% endif %} -## 查看 +## watch {% data reusables.webhooks.watch_short_desc %} -事件的执行者是标星仓库的[用户](/rest/reference/users),并且事件的仓库是被标星的[仓库](/rest/reference/repos)。 +The event’s actor is the [user](/rest/reference/users) who starred a repository, and the event’s repository is the [repository](/rest/reference/repos) that was starred. -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 具有 `metadata` 权限的 {% data variables.product.prodname_github_apps %} +- Repository webhooks +- Organization webhooks +- {% data variables.product.prodname_github_apps %} with the `metadata` permission -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.watch_properties %} {% data reusables.webhooks.repo_desc %} @@ -1380,20 +1380,20 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.app_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.watch.started }} {% ifversion fpt or ghes or ghec %} ## workflow_dispatch -当有人触发 GitHub 上的工作流程运行或将 `POST` 请求发送到“[创建工作流程分发事件](/rest/reference/actions/#create-a-workflow-dispatch-event)”端点时,此事件发生。 更多信息请参阅“[触发工作流程的事件](/actions/reference/events-that-trigger-workflows#workflow_dispatch)”。 +This event occurs when someone triggers a workflow run on GitHub or sends a `POST` request to the "[Create a workflow dispatch event](/rest/reference/actions/#create-a-workflow-dispatch-event)" endpoint. For more information, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_dispatch)." -### 可用性 +### Availability -- {% data variables.product.prodname_github_apps %} 必须具有 `contents` 权限才能接收此 web 挂钩。 +- {% data variables.product.prodname_github_apps %} must have the `contents` permission to receive this webhook. -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.workflow_dispatch }} {% endif %} @@ -1404,20 +1404,20 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.workflow_job_short_desc %} -### 可用性 +### Availability -- 仓库 web 挂钩 -- 组织 web 挂钩 -- 企业 web 挂钩 +- Repository webhooks +- Organization webhooks +- Enterprise webhooks -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.workflow_job_properties %} {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.org_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.workflow_job }} @@ -1425,13 +1425,13 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% ifversion fpt or ghes or ghec %} ## workflow_run -当 {% data variables.product.prodname_actions %} 工作流程运行被请求或完成时。 更多信息请参阅“[触发工作流程的事件](/actions/reference/events-that-trigger-workflows#workflow_run)”。 +When a {% data variables.product.prodname_actions %} workflow run is requested or completed. For more information, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#workflow_run)." -### 可用性 +### Availability -- 具有 `actions` 或 `contents` 权限的 {% data variables.product.prodname_github_apps %}。 +- {% data variables.product.prodname_github_apps %} with the `actions` or `contents` permissions. -### Web 挂钩有效负载对象 +### Webhook payload object {% data reusables.webhooks.workflow_run_properties %} {% data reusables.webhooks.workflow_desc %} @@ -1439,7 +1439,7 @@ Web 挂钩事件是基于您注册的域的特异性而触发的。 例如,如 {% data reusables.webhooks.repo_desc %} {% data reusables.webhooks.sender_desc %} -### Web 挂钩有效负载示例 +### Webhook payload example {{ webhookPayloadsForCurrentVersion.workflow_run }} {% endif %} diff --git a/translations/zh-CN/content/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md b/translations/zh-CN/content/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md index a11f87792f..f1b441fcdc 100644 --- a/translations/zh-CN/content/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md +++ b/translations/zh-CN/content/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax.md @@ -242,6 +242,7 @@ For more information, see "[Autolinked references and URLs](/articles/autolinked {% data reusables.repositories.autolink-references %} +{% ifversion ghes < 3.4 %} ## Content attachments Some {% data variables.product.prodname_github_apps %} provide information in {% data variables.product.product_name %} for URLs that link to their registered domains. {% data variables.product.product_name %} renders the information provided by the app under the URL in the body or comment of an issue or pull request. @@ -252,7 +253,7 @@ To see content attachments, you must have a {% data variables.product.prodname_g Content attachments will not be displayed for URLs that are part of a markdown link. -For more information about building a {% data variables.product.prodname_github_app %} that uses content attachments, see "[Using Content Attachments](/apps/using-content-attachments)." +For more information about building a {% data variables.product.prodname_github_app %} that uses content attachments, see "[Using Content Attachments](/apps/using-content-attachments)."{% endif %} ## Uploading assets diff --git a/translations/zh-CN/content/issues/guides.md b/translations/zh-CN/content/issues/guides.md index 2dc6c4ce74..1653a48f87 100644 --- a/translations/zh-CN/content/issues/guides.md +++ b/translations/zh-CN/content/issues/guides.md @@ -1,7 +1,7 @@ --- title: Issues guides -shortTitle: 指南 -intro: '了解如何使用 {% data variables.product.prodname_github_issues %} 来规划和跟踪您的工作。' +shortTitle: Guides +intro: 'Learn how you can use {% data variables.product.prodname_github_issues %} to plan and track your work.' allowTitleToDifferFromFilename: true layout: product-guides versions: diff --git a/translations/zh-CN/content/rest/overview/api-previews.md b/translations/zh-CN/content/rest/overview/api-previews.md index 54bb112651..36d03bec29 100644 --- a/translations/zh-CN/content/rest/overview/api-previews.md +++ b/translations/zh-CN/content/rest/overview/api-previews.md @@ -183,6 +183,7 @@ You can now configure whether organization members can create repositories and w {% endif %} +{% ifversion ghes < 3.4 %} ## Content attachments You can now provide more information in GitHub for URLs that link to registered domains by using the {% data variables.product.prodname_unfurls %} API. See "[Using content attachments](/apps/using-content-attachments/)" for more details. @@ -190,6 +191,7 @@ You can now provide more information in GitHub for URLs that link to registered **Custom media types:** `corsair-preview` **Announced:** [2018-12-10](https://developer.github.com/changes/2018-12-10-content-attachments-api/) +{% endif %} {% ifversion ghae or ghes < 3.3 %} ## Enable and disable Pages 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 a8142804dc..388c85781c 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 @@ -878,6 +878,7 @@ _Teams_ - [`GET /repos/:owner/:repo/secret-scanning/alerts`](/rest/reference/secret-scanning#list-secret-scanning-alerts-for-a-repository) (:read) - [`GET /repos/:owner/:repo/secret-scanning/alerts/:alert_number`](/rest/reference/secret-scanning#get-a-secret-scanning-alert) (:read) - [`PATCH /repos/:owner/:repo/secret-scanning/alerts/:alert_number`](/rest/reference/secret-scanning#update-a-secret-scanning-alert) (:write) +- [`GET /repos/:owner/:repo/secret-scanning/alerts/:alert_number/locations`](/rest/reference/secret-scanning#list-locations-for-a-secret-scanning-alert) (:read) {% endif %} ### Permission on "security events" diff --git a/translations/zh-CN/content/sponsors/guides.md b/translations/zh-CN/content/sponsors/guides.md index 52fa023452..3754acf94b 100644 --- a/translations/zh-CN/content/sponsors/guides.md +++ b/translations/zh-CN/content/sponsors/guides.md @@ -1,7 +1,7 @@ --- -title: GitHub Sponsors 指南 -shortTitle: 指南 -intro: '学习如何充分利用 {% data variables.product.prodname_sponsors %}。' +title: GitHub Sponsors guides +shortTitle: Guides +intro: 'Learn how to make the most of {% data variables.product.prodname_sponsors %}.' allowTitleToDifferFromFilename: true layout: product-guides versions: @@ -16,3 +16,4 @@ includeGuides: - /sponsors/receiving-sponsorships-through-github-sponsors/setting-up-github-sponsors-for-your-organization - /sponsors/integrating-with-github-sponsors/configuring-webhooks-for-events-in-your-sponsored-account --- + diff --git a/translations/zh-CN/data/learning-tracks/README.md b/translations/zh-CN/data/learning-tracks/README.md index e79a9f8130..40a459672c 100644 --- a/translations/zh-CN/data/learning-tracks/README.md +++ b/translations/zh-CN/data/learning-tracks/README.md @@ -6,7 +6,7 @@ 产品的学习轨迹数据在两个地方定义: -1. 简单的学习轨迹名称数组在产品分类索引页面前缀中定义。 +1. A simple array of learning track names is defined in the product guides index page frontmatter. 例如,在 `content/actions/guides/index.md` 中: ``` @@ -23,13 +23,13 @@ 例如,在 `data/learning-tracks/actions.yml` 中,内容文件的 `learningTracks` 数组中每个项都用 `title`、`description` 和 `guides` 链接数组等额外数据来表示。 - 在此 YAML **每个版本**中,必须通过 `featured_track: true` 指定一个学习轨迹为“特色”学习轨迹,这将设置它出现在产品分类页面的顶部。 如果缺少此属性,测试将失败。 + One learning track in this YAML **per version** must be designated as a "featured" learning track via `featured_track: true`, which will set it to appear at the top of the product guides page. 如果缺少此属性,测试将失败。 `featured_track` 属性可以是简单的布尔值(例如 `featured_track: true`),也可以是包含版本控制语句的字符串(例如 `featured_track: '{% ifversion fpt %}true{% else %}false{% endif %}'`)。 如果您使用版本控制,每个 YML 文件将有多个 `featured_track`,但请确保每个当前支持的版本中只有一个版本会呈现。 如果每个版本的特色链接多于或少于一个,测试将失败。 ## 版本 -学习轨迹的版本控制在页面渲染时进行处理。 代码位于 [`lib/learning-tracks.js`](lib/learning-tracks.js) 中,通过 `page.render()` 调用。 The processed learning tracks are then rendered by `components/sublanding`. +学习轨迹的版本控制在页面渲染时进行处理。 代码位于 [`lib/learning-tracks.js`](lib/learning-tracks.js) 中,通过 `page.render()` 调用。 The processed learning tracks are then rendered by `components/guides`. Liquid 条件**不**需要用用于指南的 YAML 文件中的版本控制。 只有适用于当前版本的学习跟踪指南才会自动呈现。 如果没有任何属于当前版本的指南的跟踪,学习跟踪部分将不会呈现。 diff --git a/translations/zh-CN/data/reusables/enterprise/ghec-cta-button.md b/translations/zh-CN/data/reusables/enterprise/ghec-cta-button.md index c5b6b1a7cd..c290f59900 100644 --- a/translations/zh-CN/data/reusables/enterprise/ghec-cta-button.md +++ b/translations/zh-CN/data/reusables/enterprise/ghec-cta-button.md @@ -1 +1 @@ -Try risk-free for 14 days +Try {% data variables.product.prodname_ghe_cloud %} for free diff --git a/translations/zh-CN/data/reusables/gated-features/environments.md b/translations/zh-CN/data/reusables/gated-features/environments.md index 3a1b973ff4..9f69ca0664 100644 --- a/translations/zh-CN/data/reusables/gated-features/environments.md +++ b/translations/zh-CN/data/reusables/gated-features/environments.md @@ -1 +1 @@ -所有产品的**公共**仓库提供环境、环境保护规则和环境机密。 要访问**私人**仓库的环境,您必须使用 {% data variables.product.prodname_enterprise %}。{% ifversion fpt or ghec %} {% data reusables.gated-features.more-info %}{% endif %} +所有产品的**公共**仓库提供环境、环境保护规则和环境机密。 For access to environments in **private** repositories, you must use {% data variables.product.prodname_enterprise %}. {% data reusables.gated-features.more-info %} diff --git a/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-groups-navigate-to-repo-org-enterprise.md b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-groups-navigate-to-repo-org-enterprise.md index 7f68848a20..1f1e976f70 100644 --- a/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-groups-navigate-to-repo-org-enterprise.md +++ b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-groups-navigate-to-repo-org-enterprise.md @@ -1,10 +1,17 @@ +{% ifversion fpt %} +1. Navigate to the main page of the repository or organization where your self-hosted runner groups are located. +2. Click {% octicon "gear" aria-label="The Settings gear" %} **Settings**. +3. 在左侧边栏中,单击 **Actions(操作)**。 +4. Click **Runner groups**. +{% elsif ghec or ghes or ghae %} 1. Navigate to where your self-hosted runner groups are located: - * **In an organization**: navigate to the main page and click {% octicon "gear" aria-label="The Settings gear" %} **Settings**. - * {% ifversion fpt or ghec %}**如果使用企业帐户**:通过访问 `https://github.com/enterprises/ENTERPRISE-NAME`(将 `ENTERPRISE-NAME` 替换为您的企业帐户名称)导航到您的企业帐户。{% elsif ghes or ghae %}**如果使用企业级运行器**: - + * **In an organization**: navigate to the main page and click {% octicon "gear" aria-label="The Settings gear" %} **Settings**.{% ifversion ghec %} + * **If using an enterprise account**: navigate to your enterprise account by visiting `https://github.com/enterprises/ENTERPRISE-NAME`, replacing `ENTERPRISE-NAME` with your enterprise account's name.{% elsif ghes or ghae %} + * **如果使用企业级运行器**: 1. 在任何页面的右上角,单击 {% octicon "rocket" aria-label="The rocket ship" %}。 - 1. 在左边栏中,单击 **Enterprise overview(企业概览)**。 - 1. {% endif %} 在企业边栏中,单击 {% octicon "law" aria-label="The law icon" %} **Policies(政策)**。 -1. Navigate to the "Runner groups" settings: - * **In an organization**: Click **Actions** in the left sidebar{% ifversion fpt or ghec %}, then click **Runner groups** below it{% endif %}. - * {% ifversion fpt or ghec %}**If using an enterprise account**:{% elsif ghes or ghae %}**If using an enterprise-level runner**:{% endif %} Click **Actions** under "{% octicon "law" aria-label="The law icon" %} Policies"{% ifversion fpt or ghec %}, then click the **Runners groups** tab{% endif %}. + 2. 在左边栏中,单击 **Enterprise overview(企业概览)**。 + 3. In the enterprise sidebar, click {% octicon "law" aria-label="The law icon" %} **Policies**.{% endif %} +2. Navigate to the "Runner groups" settings: + * **In an organization**: Click **Actions** in the left sidebar{% ifversion fpt or ghec %}, then click **Runner groups** below it{% endif %}.{% ifversion ghec or ghes or ghae %} + * {% ifversion ghec %}**If using an enterprise account**:{% elsif ghes or ghae %}**If using an enterprise-level runner**:{% endif %} Click **Actions** under "{% octicon "law" aria-label="The law icon" %} Policies"{% ifversion ghec %}, then click the **Runners groups** tab{% endif %}.{% endif %} +{% endif %} diff --git a/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-labels-runs-on.md b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-labels-runs-on.md index 0ad3695fa0..222079ffd3 100644 --- a/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-labels-runs-on.md +++ b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-labels-runs-on.md @@ -1,3 +1,5 @@ 要为工作指定自托管的运行器,请在工作流程文件中使用自托管运行器标签配置 `runs-on`。 -所有自托管运行器都有 `self-hosted` 标签。 仅使用此标签将选择任何自托管运行器。 To select runners that meet certain criteria, such as operating system or architecture, provide an array of labels that begins with `self-hosted` (this must be listed first) and then includes additional labels as needed. +所有自托管运行器都有 `self-hosted` 标签。 仅使用此标签将选择任何自托管运行器。 To select runners that meet certain criteria, such as operating system or architecture, we recommend providing an array of labels that begins with `self-hosted` (this must be listed first) and then includes additional labels as needed. When you specify an array of labels, jobs will be queued on runners that have all the labels that you specify. + +Although the `self-hosted` label is not required, we strongly recommend specifying it when using self-hosted runners to ensure that your job does not unintentionally specify any current or future {% data variables.product.prodname_dotcom %}-hosted runners. diff --git a/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-management-permissions-required.md b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-management-permissions-required.md index 0560fea049..681e6cf0f6 100644 --- a/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-management-permissions-required.md +++ b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-management-permissions-required.md @@ -2,7 +2,7 @@ - **用户仓库**:您必须是仓库所有者。 - **组织**:您必须是组织所有者。 - **组织仓库**:您必须是组织所有者或者拥有该仓库的管理员权限。 -{% ifversion fpt or ghec %} +{% ifversion ghec %} - **企业账户**:您必须是企业所有者。 {% elsif ghes or ghae %} - **企业**:您必须是 {% data variables.product.prodname_enterprise %} 站点管理员。 diff --git a/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-navigate-to-org-enterprise.md b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-navigate-to-org-enterprise.md index e4635c71ba..1e6231f8dc 100644 --- a/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-navigate-to-org-enterprise.md +++ b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-navigate-to-org-enterprise.md @@ -1,10 +1,17 @@ +{% ifversion fpt %} +1. Navigate to the main page of the organization where your self-hosted runner group is registered. +2. Click {% octicon "gear" aria-label="The Settings gear" %} **Settings**. +3. 在左侧边栏中,单击 **Actions(操作)**。 +4. Click **Runners**. +{% elsif ghec or ghes or ghae %} 1. 导航到自托管运行器注册的位置: * **In an organization**: navigate to the main page and click {% octicon "gear" aria-label="The Settings gear" %} **Settings**. - * {% ifversion fpt %}**如果使用企业帐户**:通过访问 `https://github.com/enterprises/ENTERPRISE-NAME`(将 `ENTERPRISE-NAME` 替换为您的企业帐户名称)导航到您的企业帐户。{% elsif ghes or ghae %}**如果使用企业级运行器**: + * {% ifversion ghec %}**如果使用企业帐户**:通过访问 `https://github.com/enterprises/ENTERPRISE-NAME`(将 `ENTERPRISE-NAME` 替换为您的企业帐户名称)导航到您的企业帐户。{% elsif ghes or ghae %}**如果使用企业级运行器**: 1. 在任何页面的右上角,单击 {% octicon "rocket" aria-label="The rocket ship" %}。 1. 在左边栏中,单击 **Enterprise overview(企业概览)**。 - 1. {% endif %} 在企业边栏中,单击 {% octicon "law" aria-label="The law icon" %} **Policies(政策)**。 + 1. In the enterprise sidebar, {% octicon "law" aria-label="The law icon" %} **Policies**.{% endif %} 1. 导航到 {% data variables.product.prodname_actions %} 设置: - * **In an organization**: Click **Actions** in the left sidebar{% ifversion fpt or ghes > 3.1 or ghae-next %}, then click **Runners**{% endif %}. - * {% ifversion fpt %}**如果使用企业帐户**{% elsif ghes or ghae %}**如果使用企业级运行器**{% endif %}:在“{% octicon "law" aria-label="The law icon" %} Policies(政策)”下单击 **Actions(操作)**{% ifversion fpt or ghes > 3.1 or ghae-next %},然后单击 **Runners(运行器)**选项卡{% endif %}。 + * **In an organization**: Click **Actions** in the left sidebar{% ifversion fpt or ghec or ghes > 3.1 or ghae-next %}, then click **Runners**{% endif %}. + * {% ifversion ghec %}**如果使用企业帐户**{% elsif ghes or ghae %}**如果使用企业级运行器**{% endif %}:在“{% octicon "law" aria-label="The law icon" %} Policies(政策)”下单击 **Actions(操作)**{% ifversion fpt or ghec or ghes > 3.1 or ghae-next %},然后单击 **Runners(运行器)**选项卡{% endif %}。 +{% endif %} diff --git a/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-navigate-to-repo-org-enterprise.md b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-navigate-to-repo-org-enterprise.md index 4240366d00..fe072d57d9 100644 --- a/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-navigate-to-repo-org-enterprise.md +++ b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-navigate-to-repo-org-enterprise.md @@ -1,10 +1,17 @@ +{% ifversion fpt %} +1. Navigate to the main page of the organization or repository where your self-hosted runner group is registered. +2. Click {% octicon "gear" aria-label="The Settings gear" %} **Settings**. +3. 在左侧边栏中,单击 **Actions(操作)**。 +4. Click **Runners**. +{% elsif ghec or ghes or ghae %} 1. 导航到自托管运行器注册的位置: - * **在组织或仓库中**,导航到主页并单击 {% octicon "gear" aria-label="The Settings gear" %} **Settings(设置)**。 - * {% ifversion fpt or ghec %}**如果使用企业帐户**:通过访问 `https://github.com/enterprises/ENTERPRISE-NAME`(将 `ENTERPRISE-NAME` 替换为您的企业帐户名称)导航到您的企业帐户。{% elsif ghes or ghae %}**如果使用企业级运行器**: - + * **在组织或仓库中**,导航到主页并单击 {% octicon "gear" aria-label="The Settings gear" %} **Settings(设置)**。 {% ifversion ghec %} + * **If using an enterprise account**: navigate to your enterprise account by visiting `https://github.com/enterprises/ENTERPRISE-NAME`, replacing `ENTERPRISE-NAME` with your enterprise account's name.{% elsif ghes or ghae %} + * **如果使用企业级运行器**: 1. 在任何页面的右上角,单击 {% octicon "rocket" aria-label="The rocket ship" %}。 - 1. 在左边栏中,单击 **Enterprise overview(企业概览)**。 - 1. {% endif %} 在企业边栏中,单击 {% octicon "law" aria-label="The law icon" %} **Policies(政策)**。 -1. 导航到 {% data variables.product.prodname_actions %} 设置: - * **在组织或仓库中**:点击左侧栏中的 **Actions**{% ifversion fpt or ghes > 3.1 or ghae-next or ghec %},然后点击 **Runners(运行器)**{% endif %}。 - * {% ifversion fpt or ghec %}**如果使用企业帐户**{% elsif ghes or ghae %}**如果使用企业级运行器**{% endif %}:在“{% octicon "law" aria-label="The law icon" %} Policies(政策)”下单击 **Actions(操作)**{% ifversion fpt or ghes > 3.1 or ghae-next or ghec %},然后单击 **Runners(运行器)**选项卡{% endif %}。 + 2. 在左边栏中,单击 **Enterprise overview(企业概览)**。 + 3. In the enterprise sidebar, click {% octicon "law" aria-label="The law icon" %} **Policies**.{% endif %} +2. 导航到 {% data variables.product.prodname_actions %} 设置: + * **In an organization or repository**: Click **Actions** in the left sidebar{% ifversion fpt or ghes > 3.1 or ghae-next or ghec %}, then click **Runners**{% endif %}.{% ifversion ghec or ghae or ghes %} + * {% ifversion ghec %}**If using an enterprise account**:{% elsif ghes or ghae %}**If using an enterprise-level runner**:{% endif %} Click **Actions** under "{% octicon "law" aria-label="The law icon" %} Policies"{% ifversion ghes > 3.1 or ghae-next or ghec %}, then click the **Runners** tab{% endif %}.{% endif %} +{% endif %} diff --git a/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-reusing.md b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-reusing.md index ee0dbfec95..961d3220b6 100644 --- a/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-reusing.md +++ b/translations/zh-CN/data/reusables/github-actions/self-hosted-runner-reusing.md @@ -1 +1 @@ -或者,如果您无法访问 {% data variables.product.product_name %} 上的仓库、组织或企业来删除运行器,但您想重新使用该运行器机器,则可删除自托管运行器应用程序目录中的 `.runner` 文件。 这允许将运行器注册,而无需重新下载自托管的运行器应用程序。 +Alternatively, if you don't have access to the repository{% ifversion fpt %} or organization{% elsif ghes or ghec or ghae %}, organization, or enterprise{% endif %} on {% data variables.product.product_name %} to remove a runner, but you would like to re-use the runner machine, then you can delete the `.runner` file inside the self-hosted runner application directory. 这允许将运行器注册,而无需重新下载自托管的运行器应用程序。 diff --git a/translations/zh-CN/data/ui.yml b/translations/zh-CN/data/ui.yml index 8da4156941..d7dc51ba72 100644 --- a/translations/zh-CN/data/ui.yml +++ b/translations/zh-CN/data/ui.yml @@ -150,7 +150,7 @@ product_landing: upgrade_from: 升级自 browse_all_docs: 浏览所有文档 explore_release_notes: 浏览发行说明 -product_sublanding: +product_guides: start: 开始 start_path: 开始路径 learning_paths: '{{ productMap[currentProduct].name }} 学习路径'