@@ -1,6 +1,7 @@
|
||||
---
|
||||
title: Issue にラベルを追加する
|
||||
intro: '{% data variables.product.prodname_actions %} を使用して、Issue に自動的にラベルを付けることができます。'
|
||||
title: Adding labels to issues
|
||||
shortTitle: Add labels to issues
|
||||
intro: 'You can use {% data variables.product.prodname_actions %} to automatically label issues.'
|
||||
redirect_from:
|
||||
- /actions/guides/adding-labels-to-issues
|
||||
versions:
|
||||
@@ -12,32 +13,26 @@ type: tutorial
|
||||
topics:
|
||||
- Workflows
|
||||
- Project management
|
||||
ms.openlocfilehash: 8e80990a1a533ed303f47cbad8dafb95c890893d
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147884310'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
## はじめに
|
||||
{% data reusables.actions.enterprise-beta %}
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
このチュートリアルでは、ワークフローで [`andymckay/labeler` アクション](https://github.com/marketplace/actions/simple-issue-labeler)を使用して、新しくオープンまたは再オープンした Issue にラベルを付ける方法を示します。 たとえば、Issue をオープンまたは再オープンするたびに `triage` ラベルを追加できます。 次に、`triage` ラベルで Issue をフィルター処理して、トリアージする必要のあるすべての Issue を確認できます。
|
||||
## Introduction
|
||||
|
||||
チュートリアルでは、[`andymckay/labeler` アクション](https://github.com/marketplace/actions/simple-issue-labeler)を使用するワークフロー ファイルをまず作成します。 次に、ニーズに合わせてワークフローをカスタマイズします。
|
||||
This tutorial demonstrates how to use the [`actions/github-script` action](https://github.com/marketplace/actions/github-script) in a workflow to label newly opened or reopened issues. For example, you can add the `triage` label every time an issue is opened or reopened. Then, you can see all issues that need to be triaged by filtering for issues with the `triage` label.
|
||||
|
||||
## ワークフローの作成
|
||||
The `actions/github-script` action allows you to easily use the {% data variables.product.prodname_dotcom %} API in a workflow.
|
||||
|
||||
In the tutorial, you will first make a workflow file that uses the [`actions/github-script` action](https://github.com/marketplace/actions/github-script). Then, you will customize the workflow to suit your needs.
|
||||
|
||||
## Creating the workflow
|
||||
|
||||
1. {% data reusables.actions.choose-repo %}
|
||||
2. {% data reusables.actions.make-workflow-file %}
|
||||
3. 次の YAML コンテンツをワークフローファイルにコピーします。
|
||||
|
||||
3. Copy the following YAML contents into your workflow file.
|
||||
|
||||
```yaml{:copy}
|
||||
{% indented_data_reference reusables.actions.actions-not-certified-by-github-comment spaces=4 %}
|
||||
|
||||
{% indented_data_reference reusables.actions.actions-use-sha-pinning-comment spaces=4 %}
|
||||
|
||||
name: Label issues
|
||||
on:
|
||||
issues:
|
||||
@@ -50,29 +45,34 @@ ms.locfileid: '147884310'
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Label issues
|
||||
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
|
||||
- uses: {% data reusables.actions.action-github-script %}
|
||||
with:
|
||||
add-labels: "triage"
|
||||
repo-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ["triage"]
|
||||
})
|
||||
```
|
||||
|
||||
4. ワークフローファイルのパラメータをカスタマイズします。
|
||||
- `add-labels` の値を、Issue に追加するラベルのリストに変更します。 複数のラベルはコンマで区切ります。 たとえば、「 `"help wanted, good first issue"` 」のように入力します。 ラベルの詳細については、「[ラベルを管理する](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)」を参照してください。
|
||||
4. Customize the `script` parameter in your workflow file:
|
||||
- The `issue_number`, `owner`, and `repo` values are automatically set using the `context` object. You do not need to change these.
|
||||
- Change the value for `labels` to the list of labels that you want to add to the issue. Separate multiple labels with commas. For example, `["help wanted", "good first issue"]`. For more information about labels, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)."
|
||||
5. {% data reusables.actions.commit-workflow %}
|
||||
|
||||
## ワークフローのテスト
|
||||
## Testing the workflow
|
||||
|
||||
リポジトリ内の Issue をオープンするか再オープンするたびに、このワークフローは指定したラベルを Issue に追加します。
|
||||
Every time an issue in your repository is opened or reopened, this workflow will add the labels that you specified to the issue.
|
||||
|
||||
リポジトリに Issue を作成して、ワークフローをテストします。
|
||||
Test out your workflow by creating an issue in your repository.
|
||||
|
||||
1. リポジトリで Issue を作成します。 詳細については、「[Issue の作成](/github/managing-your-work-on-github/creating-an-issue)」を参照してください。
|
||||
2. Issue の作成によってトリガーされたワークフローの実行を確認するには、ワークフローの実行履歴を表示します。 詳細については、「[ワークフロー実行の履歴を表示する](/actions/managing-workflow-runs/viewing-workflow-run-history)」を参照してください。
|
||||
3. ワークフローが完了すると、作成した Issue に指定されたラベルが追加されます。
|
||||
1. Create an issue in your repository. For more information, see "[Creating an issue](/github/managing-your-work-on-github/creating-an-issue)."
|
||||
2. To see the workflow run that was triggered by creating the issue, view the history of your workflow runs. For more information, see "[Viewing workflow run history](/actions/managing-workflow-runs/viewing-workflow-run-history)."
|
||||
3. When the workflow completes, the issue that you created should have the specified labels added.
|
||||
|
||||
## 次の手順
|
||||
## Next steps
|
||||
|
||||
- ラベルの削除や、Issue が割り当てられているか特定のラベルがある場合にこのアクションをスキップするなど、`andymckay/labeler` アクションで実行できる追加の機能の詳細については、[`andymckay/labeler` アクションのドキュメント](https://github.com/marketplace/actions/simple-issue-labeler)を参照してください。
|
||||
- ワークフローをトリガーできるさまざまなイベントの詳細については、「[ワークフローをトリガーするイベント](/actions/reference/events-that-trigger-workflows#issues)」を参照してください。 `andymckay/labeler` アクションは、`issues`、`pull_request`、`project_card` のいずれかのイベントでのみ機能します。
|
||||
- このアクションを使用するワークフローの例については [GitHub を検索](https://github.com/search?q=%22uses:+andymckay/labeler%22&type=code)してください。
|
||||
- To learn more about additional things you can do with the `actions/github-script` action, see the [`actions/github-script` action documentation](https://github.com/marketplace/actions/github-script).
|
||||
- To learn more about different events that can trigger your workflow, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#issues)."
|
||||
- [Search GitHub](https://github.com/search?q=%22uses:+actions/github-script%22&type=code) for examples of workflows using this action.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: カードがプロジェクトボードの列に追加されたときにラベルを削除する
|
||||
intro: '{% data variables.product.prodname_actions %} を使用すると、プロジェクトボードの特定の列に Issue またはプルリクエストが追加されたときに、ラベルを自動的に削除できます。'
|
||||
title: Removing a label when a card is added to a project board column
|
||||
intro: 'You can use {% data variables.product.prodname_actions %} to automatically remove a label when an issue or pull request is added to a specific column on a {% data variables.projects.projects_v1_board %}.'
|
||||
redirect_from:
|
||||
- /actions/guides/removing-a-label-when-a-card-is-added-to-a-project-board-column
|
||||
versions:
|
||||
@@ -13,74 +13,73 @@ topics:
|
||||
- Workflows
|
||||
- Project management
|
||||
shortTitle: Remove label when adding card
|
||||
ms.openlocfilehash: c23edb495719c7059c9c5d8dab1c29acb0e78cb6
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147410108'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
## はじめに
|
||||
{% data reusables.actions.enterprise-beta %}
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
このチュートリアルでは、[`andymckay/labeler` アクション](https://github.com/marketplace/actions/simple-issue-labeler)と条件を利用し、プロジェクト ボードで特定の列に追加された Issue と pull request からラベルを削除する方法について説明します。 たとえば、プロジェクト カードが `Done` に移動されるとき、`needs review` ラベルを削除できます。
|
||||
## Introduction
|
||||
|
||||
チュートリアルでは、[`andymckay/labeler` アクション](https://github.com/marketplace/actions/simple-issue-labeler)を使用するワークフロー ファイルをまず作成します。 次に、ニーズに合わせてワークフローをカスタマイズします。
|
||||
This tutorial demonstrates how to use the [`actions/github-script` action](https://github.com/marketplace/actions/github-script) along with a conditional to remove a label from issues and pull requests that are added to a specific column on a {% data variables.projects.projects_v1_board %}. For example, you can remove the `needs review` label when project cards are moved into the `Done` column.
|
||||
|
||||
## ワークフローの作成
|
||||
In the tutorial, you will first make a workflow file that uses the [`actions/github-script` action](https://github.com/marketplace/actions/github-script). Then, you will customize the workflow to suit your needs.
|
||||
|
||||
## Creating the workflow
|
||||
|
||||
1. {% data reusables.actions.choose-repo %}
|
||||
2. リポジトリに属するプロジェクトを選択します。 このワークフローは、ユーザまたは Organization に属するプロジェクトでは使用できません。 既存のプロジェクトを使用することも、新しいプロジェクトを作成することもできます。 プロジェクトの作成に関する詳細については、[プロジェクト ボードの作成](/github/managing-your-work-on-github/creating-a-project-board)に関するページを参照してください。
|
||||
2. Choose a {% data variables.projects.projects_v1_board %} that belongs to the repository. This workflow cannot be used with projects that belong to users or organizations. You can use an existing {% data variables.projects.projects_v1_board %}, or you can create a new {% data variables.projects.projects_v1_board %}. For more information about creating a project, see "[Creating a {% data variables.product.prodname_project_v1 %}](/github/managing-your-work-on-github/creating-a-project-board)."
|
||||
3. {% data reusables.actions.make-workflow-file %}
|
||||
4. 次の YAML コンテンツをワークフローファイルにコピーします。
|
||||
4. Copy the following YAML contents into your workflow file.
|
||||
|
||||
```yaml{:copy}
|
||||
{% indented_data_reference reusables.actions.actions-not-certified-by-github-comment spaces=4 %}
|
||||
|
||||
{% indented_data_reference reusables.actions.actions-use-sha-pinning-comment spaces=4 %}
|
||||
|
||||
name: Remove labels
|
||||
name: Remove a label
|
||||
on:
|
||||
project_card:
|
||||
types:
|
||||
- moved
|
||||
jobs:
|
||||
remove_labels:
|
||||
remove_label:
|
||||
if: github.event.project_card.column_id == '12345678'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: remove labels
|
||||
uses: andymckay/labeler@5c59dabdfd4dd5bd9c6e6d255b01b9d764af4414
|
||||
- uses: {% data reusables.actions.action-github-script %}
|
||||
with:
|
||||
remove-labels: "needs review"
|
||||
repo-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
|
||||
script: |
|
||||
// this gets the number at the end of the content URL, which should be the issue/PR number
|
||||
const issue_num = context.payload.project_card.content_url.split('/').pop()
|
||||
github.rest.issues.removeLabel({
|
||||
issue_number: issue_num,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
name: ["needs review"]
|
||||
})
|
||||
```
|
||||
|
||||
5. ワークフローファイルのパラメータをカスタマイズします。
|
||||
- `github.event.project_card.column_id == '12345678'` で、`12345678` を、そこに移動された Issue と pull request のラベルを削除する列の ID に変更します。
|
||||
5. Customize the parameters in your workflow file:
|
||||
- In `github.event.project_card.column_id == '12345678'`, replace `12345678` with the ID of the column where you want to un-label issues and pull requests that are moved there.
|
||||
|
||||
列 ID を見つけるには、プロジェクトボードに移動します。 列のタイトルの横にある {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} をクリックし、 **[列リンクのコピー]** リンクをクリックします。 列 ID は、コピーされたリンクの末尾にある番号です。 たとえば、`24687531` は `https://github.com/octocat/octo-repo/projects/1#column-24687531` の列 ID です。
|
||||
To find the column ID, navigate to your {% data variables.projects.projects_v1_board %}. Next to the title of the column, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} then click **Copy column link**. The column ID is the number at the end of the copied link. For example, `24687531` is the column ID for `https://github.com/octocat/octo-repo/projects/1#column-24687531`.
|
||||
|
||||
複数の列を操作する場合、条件を `||` で区切ります。 たとえば、プロジェクト カードが列 `12345678` または列 `87654321` に追加されるたびに `if github.event.project_card.column_id == '12345678' || github.event.project_card.column_id == '87654321'` が動作します。 列は異なるプロジェクトボード上にある可能性があります。
|
||||
- `remove-labels` の値を、指定された列に移動された Issue または pull request から削除するラベルのリストに変更します。 複数のラベルはコンマで区切ります。 たとえば、「 `"help wanted, good first issue"` 」のように入力します。 ラベルの詳細については、「[ラベルの管理](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)」を参照してください。
|
||||
If you want to act on more than one column, separate the conditions with `||`. For example, `if github.event.project_card.column_id == '12345678' || github.event.project_card.column_id == '87654321'` will act whenever a project card is added to column `12345678` or column `87654321`. The columns may be on different project boards.
|
||||
- Change the value for `name` in the `github.rest.issues.removeLabel()` function to the name of the label that you want to remove from issues or pull requests that are moved to the specified column(s). For more information on labels, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)."
|
||||
6. {% data reusables.actions.commit-workflow %}
|
||||
|
||||
## ワークフローのテスト
|
||||
## Testing the workflow
|
||||
|
||||
リポジトリ内のプロジェクトのプロジェクトカードが移動するたびに、このワークフローが実行されます。 カードが Issue またはプルリクエストであり、指定した列に移動された場合、ワークフローは、指定されたラベルを Issue またはプルリクエストから削除します。 注釈のカードは影響を受けません。
|
||||
Every time a project card on a {% data variables.projects.projects_v1_board %} in your repository moves, this workflow will run. If the card is an issue or a pull request and is moved into the column that you specified, then the workflow will remove the specified label from the issue or a pull request. Cards that are notes will not be affected.
|
||||
|
||||
プロジェクトの Issue をターゲット列に移動して、ワークフローをテストします。
|
||||
Test your workflow out by moving an issue on your {% data variables.projects.projects_v1_board %} into the target column.
|
||||
|
||||
1. リポジトリで Issue をオープンします。 詳細については、「[Issue の作成](/github/managing-your-work-on-github/creating-an-issue)」を参照してください。
|
||||
2. ワークフローで削除するラベルを使用して Issue にラベルを付けます。 詳細については、[ラベルの管理](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)に関する記事を参照してください。
|
||||
3. ワークフローファイルで指定したプロジェクト列に Issue を追加します。 詳細については、「[プロジェクトボードへの Issue および pull request の追加](/github/managing-your-work-on-github/adding-issues-and-pull-requests-to-a-project-board)」を参照してください。
|
||||
4. プロジェクトに Issue を追加することでトリガーされたワークフローの実行を確認するには、ワークフローの実行履歴を表示します。 詳細については、「[ワークフロー実行の履歴を表示する](/actions/managing-workflow-runs/viewing-workflow-run-history)」を参照してください。
|
||||
5. ワークフローが完了すると、プロジェクト列に追加した Issue で、指定したラベルが削除されます。
|
||||
1. Open an issue in your repository. For more information, see "[Creating an issue](/github/managing-your-work-on-github/creating-an-issue)."
|
||||
2. Label the issue with the label that you want the workflow to remove. For more information, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)."
|
||||
3. Add the issue to the {% data variables.projects.projects_v1_board %} column that you specified in your workflow file. For more information, see "[Adding issues and pull requests to a {% data variables.product.prodname_project_v1 %}](/github/managing-your-work-on-github/adding-issues-and-pull-requests-to-a-project-board)."
|
||||
4. To see the workflow run that was triggered by adding the issue to the project, view the history of your workflow runs. For more information, see "[Viewing workflow run history](/actions/managing-workflow-runs/viewing-workflow-run-history)."
|
||||
5. When the workflow completes, the issue that you added to the project column should have the specified label removed.
|
||||
|
||||
## 次のステップ
|
||||
## Next steps
|
||||
|
||||
- ラベルを追加する、Issue が割り当てられているか、Issue に特定のラベルが貼られている場合にこのアクションをスキップするなど、`andymckay/labeler` アクションでできる他のことについては、[`andymckay/labeler` アクション ドキュメント](https://github.com/marketplace/actions/simple-issue-labeler)をご覧ください。
|
||||
- このアクションを使用するワークフローの例については [GitHub を検索](https://github.com/search?q=%22uses:+andymckay/labeler%22&type=code)してください。
|
||||
- To learn more about additional things you can do with the `actions/github-script` action, see the [`actions/github-script` action documentation](https://github.com/marketplace/actions/github-script).
|
||||
- [Search GitHub](https://github.com/search?q=%22uses:+actions/github-script%22&type=code) for examples of workflows using this action.
|
||||
|
||||
@@ -236,6 +236,7 @@ Appliances configured for high-availability and geo-replication use replica inst
|
||||
|
||||
- If you have upgraded each node to {% data variables.product.product_name %} 3.6.0 or later and started replication, but `git replication is behind the primary` continues to appear after 45 minutes, contact {% data variables.contact.enterprise_support %}. For more information, see "[Receiving help from {% data variables.contact.github_support %}](/admin/enterprise-support/receiving-help-from-github-support)."
|
||||
{%- endif %}
|
||||
|
||||
- {% ifversion ghes = 3.4 or ghes = 3.5 or ghes = 3.6 %}Otherwise, if{% else %}If{% endif %} `ghe-repl-status` did not return `OK`, contact {% data variables.contact.enterprise_support %}. For more information, see "[Receiving help from {% data variables.contact.github_support %}](/admin/enterprise-support/receiving-help-from-github-support)."
|
||||
6. When you have completed upgrading the last replica, and the resync is complete, disable maintenance mode so users can use {% data variables.location.product_location %}.
|
||||
|
||||
|
||||
@@ -50,51 +50,55 @@ You can disable the {% data variables.product.prodname_server_statistics %} feat
|
||||
|
||||
After you enable {% data variables.product.prodname_server_statistics %}, metrics are collected through a daily job that runs on {% data variables.location.product_location %}. The aggregate metrics are stored on your organization or enterprise account on {% data variables.product.prodname_ghe_cloud %} and are not stored on {% data variables.location.product_location %}.
|
||||
|
||||
The following aggregate metrics will be collected and transmitted on a daily basis and represent the total counts for the day:
|
||||
- `active_hooks`
|
||||
- `admin_users`
|
||||
- `closed_issues`
|
||||
- `closed_milestones`
|
||||
- `collection_date`
|
||||
- `disabled_orgs`
|
||||
- `dormancy_threshold`
|
||||
- `fork_repos`
|
||||
- `ghes_version`
|
||||
- `github_connect_features_enabled`
|
||||
- `inactive_hooks`
|
||||
- `mergeable_pulls`
|
||||
- `merged_pulls`
|
||||
- `open_issues`
|
||||
- `open_milestones`
|
||||
- `org_repos`
|
||||
- `private_gists`
|
||||
- `public_gists`
|
||||
- `root_repos`
|
||||
- `schema_version`
|
||||
- `server_id`
|
||||
- `suspended_users`
|
||||
- `total_commit_comments`
|
||||
- `total_dormant_users`
|
||||
- `total_gist_comments`
|
||||
- `total_gists`
|
||||
- `total_hooks`
|
||||
- `total_issues`
|
||||
- `total_issue_comments`
|
||||
- `total_milestones`
|
||||
- `total_repos`
|
||||
- `total_orgs`
|
||||
- `total_pages`
|
||||
- `total_pull_request_comments`
|
||||
- `total_pulls`
|
||||
- `total_pushes`
|
||||
- `total_team_members`
|
||||
- `total_teams`
|
||||
- `total_users`
|
||||
- `total_wikis`
|
||||
- `unmergeable_pulls`
|
||||
The following aggregate metrics will be collected and transmitted on a daily basis and represent the total counts for the day.
|
||||
|
||||
## {% data variables.product.prodname_server_statistics %} payload example
|
||||
CSV column | Name | Description |
|
||||
---------- | ---- | ----------- |
|
||||
A | `github_connect.features_enabled` | Array of {% data variables.product.prodname_github_connect %} features that are enabled for your instance (see "[About {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect#github-connect-features)" ) |
|
||||
B | `host_name` | The hostname for your instance |
|
||||
C | `dormant_users.dormancy_threshold` | The length of time a user must be inactive to be considered dormant |
|
||||
D | `dormant_users.total_dormant_users` | Number of dormant user accounts |
|
||||
E | `ghes_version` | The version of {% data variables.product.product_name %} that your instance is running |
|
||||
F | `server_id` | The UUID generated for your instance
|
||||
G | `collection_date` | The date the metrics were collected |
|
||||
H | `schema_version` | The version of the database schema used to store this data |
|
||||
I | `ghe_stats.comments.total_commit_comments` | Number of comments on commits |
|
||||
J | `ghe_stats.comments.total_gist_comments` | Number of comments on gists |
|
||||
K | `ghe_stats.comments.total_issue_comments` | Number of comments on issues |
|
||||
L | `ghe_stats.comments.total_pull_request_comments` | Number of comments on pull requests |
|
||||
M | `ghe_stats.gists.total_gists` | Number of gists (both secret and public) |
|
||||
N | `ghe_stats.gists.private_gists` | Number of secret gists |
|
||||
O | `ghe_stats.gists.public_gists` | Number of public gists |
|
||||
P | `ghe_stats.hooks.total_hooks` | Number of pre-receive hooks (both active and inactive) |
|
||||
Q | `ghe_stats.hooks.active_hooks` | Number of active pre-receive hooks |
|
||||
R | `ghe_stats.hooks.inactive_hooks` | Number of inactive pre-receive hooks |
|
||||
S | `ghe_stats.issues.total_issues` | Number of issues (both open and closed) |
|
||||
T | `ghe_stats.issues.open_issues` | Number of open issues |
|
||||
U | `ghe_stats.issues.closed_issues` | Number of closed issues |
|
||||
V | `ghe_stats.milestones.total_milestones` | Number of milestones (both open and closed) |
|
||||
W | `ghe_stats.milestones.open_milestones` | Number of open milestones |
|
||||
X | `ghe_stats.milestones.closed_milestones` | Number of closed milestones |
|
||||
Y | `ghe_stats.orgs.total_orgs` | Number of organizations (both enabled and disabled) |
|
||||
Z | `ghe_stats.orgs.disabled_orgs` | Number of disabled organizations |
|
||||
AA | `ghe_stats.orgs.total_teams` | Number of teams |
|
||||
AB | `ghe_stats.orgs.total_team_members` | Number of team members |
|
||||
AC | `ghe_stats.pages.total_pages` | Number of {% data variables.product.prodname_pages %} sites |
|
||||
AD | `ghe_stats.pulls.total_pulls` | Number of pull requests |
|
||||
AE | `ghe_stats.pulls.merged_pulls` | Number of merged pull requests |
|
||||
AF | `ghe_stats.pulls.mergeable_pulls` | Number of pull requests that are currently mergeable |
|
||||
AG | `ghe_stats.pulls.unmergeable_pulls` | Number of pull requests that are currently unmergeable |
|
||||
AH | `ghe_stats.repos.total_repos` | Number of repositories (both upstream repositories and forks) |
|
||||
AI | `ghe_stats.repos.root_repos` | Number of upstream repositories |
|
||||
AJ | `ghe_stats.repos.fork_repos` | Number of forks |
|
||||
AK | `ghe_stats.repos.org_repos` | Number of repositories owned by organizations |
|
||||
AL | `ghe_stats.repos.total_pushes` | Number of pushes to repositories |
|
||||
AM | `ghe_stats.repos.total_wikis` | Number of wikis |
|
||||
AN | `ghe_stats.users.total_users` | Number of user accounts |
|
||||
AO | `ghe_stats.users.admin_users` | Number of user accounts that are site administrators |
|
||||
AP | `ghe_stats.users.suspended_users` | Number of user accounts that are suspended |
|
||||
|
||||
To see an example of the response payload for the {% data variables.product.prodname_server_statistics %} API, see "[Requesting {% data variables.product.prodname_server_statistics %} using the REST API](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/requesting-server-statistics-using-the-rest-api)."
|
||||
## {% data variables.product.prodname_server_statistics %} data examples
|
||||
|
||||
To see a list of the data collected, see "[{% data variables.product.prodname_server_statistics %} data collected](#server-statistics-data-collected)."
|
||||
To see an example of the headings included in the CSV export for {% data variables.product.prodname_server_statistics %}, download the [{% data variables.product.prodname_server_statistics %} CSV example](/assets/server-statistics-csv-example.csv).
|
||||
|
||||
To see an example of the response payload for the {% data variables.product.prodname_server_statistics %} API, see "[Requesting {% data variables.product.prodname_server_statistics %} using the REST API](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/requesting-server-statistics-using-the-rest-api)."
|
||||
@@ -7,19 +7,13 @@ topics:
|
||||
- Enterprise
|
||||
shortTitle: Export membership information
|
||||
permissions: Enterprise owners can export membership information for an enterprise.
|
||||
ms.openlocfilehash: ba7519aae1b38cd629a46baeacd5edc9d138efdc
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.openlocfilehash: 8da0e7b91e8bff85cb27fb7df3f06e62bdb290f2
|
||||
ms.sourcegitcommit: 7e2b5213fd15d91222725ecab5ee28cef378d3ad
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148106422'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185544'
|
||||
---
|
||||
{% note %}
|
||||
|
||||
**注:** Enterpirise のメンバーシップ情報のエクスポートは現在ベータ版であり、変更される可能性があります。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
Enterpirise のリソースにアクセスできるユーザーの監査を行うには、Enterpirise のメンバーシップ情報の CSV レポートをダウンロードできます。
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.people-tab %}
|
||||
|
||||
@@ -230,3 +230,13 @@ You can view all open alerts, and you can reopen alerts that have been previousl
|
||||

|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
## Reviewing the audit logs for {% data variables.product.prodname_dependabot_alerts %}
|
||||
|
||||
When a member of your organization {% ifversion not fpt %}or enterprise {% endif %}performs an action related to {% data variables.product.prodname_dependabot_alerts %}, you can review the actions in the audit log. For more information about accessing the log, see "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#accessing-the-audit-log){% ifversion not fpt %}" and "[Accessing the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise)."{% else %}."{% endif %}
|
||||
{% ifversion dependabot-alerts-audit-log %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
Events in your audit log for {% data variables.product.prodname_dependabot_alerts %} include details such as who performed the action, what the action was, and when the action was performed. {% ifversion dependabot-alerts-audit-log %}The event also includes a link to the alert itself. When a member of your organization dismisses an alert, the event displays the dismissal reason and comment.{% endif %} For information on the {% data variables.product.prodname_dependabot_alerts %} actions, see the `repository_vulnerability_alert` category in "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#repository_vulnerability_alert-category-actions){% ifversion not fpt %}" and "[Audit log events for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise#repository_vulnerability_alert-category-actions)."{% else %}."{% endif %}
|
||||
|
||||
@@ -478,8 +478,28 @@ By default, {% data variables.product.prodname_dependabot %} automatically rebas
|
||||
|
||||
Available rebase strategies
|
||||
|
||||
- `disabled` to disable automatic rebasing.
|
||||
- `auto` to use the default behavior and rebase open pull requests when changes are detected.
|
||||
- `disabled` to disable automatic rebasing.
|
||||
|
||||
When `rebase-strategy` is set to `auto`, {% data variables.product.prodname_dependabot %} attempts to rebase pull requests in the following cases.
|
||||
- When you use {% data variables.product.prodname_dependabot_version_updates %}, for any open {% data variables.product.prodname_dependabot %} pull request when your schedule runs.
|
||||
- When you reopen a closed {% data variables.product.prodname_dependabot %} pull request.
|
||||
- When you change the value of `target-branch` in the {% data variables.product.prodname_dependabot %} configuration file. For more information about this field, see "[`target-branch`](#target-branch)."
|
||||
- When {% data variables.product.prodname_dependabot %} detects that a {% data variables.product.prodname_dependabot %} pull request is in conflict after a recent push to the target branch.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data variables.product.prodname_dependabot %} will keep rebasing a pull request indefinitely until the pull request is closed, merged or you disable {% data variables.product.prodname_dependabot_updates %}.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
When `rebase-strategy` is set to `disabled`, {% data variables.product.prodname_dependabot %} stops rebasing pull requests.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** This behavior only applies to pull requests that go into conflict with the target branch. {% data variables.product.prodname_dependabot %} will keep rebasing pull requests opened prior to the `rebase-strategy` setting being changed, and pull requests that are part of a scheduled run.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.dependabot.option-affects-security-updates %}
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ versions:
|
||||
type: reference
|
||||
topics:
|
||||
- Codespaces
|
||||
ms.openlocfilehash: 8ffd48856a2653f3db3c871122d3acd23c246d7a
|
||||
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
|
||||
ms.openlocfilehash: 3f4ef139386e616d14ef9a9cc5b474c96983de91
|
||||
ms.sourcegitcommit: 1a77ceb9e20c002173dda983db9405bcd5be254a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 11/09/2022
|
||||
ms.locfileid: '148159936'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185178'
|
||||
---
|
||||
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
|
||||
|
||||
@@ -42,16 +42,10 @@ JetBrains クライアントのアプリケーション ウィンドウの左下
|
||||
|
||||
* **アクティブな codespace を更新する**
|
||||
|
||||

|
||||

|
||||
|
||||
{% data variables.product.prodname_github_codespaces %} ツール ウィンドウで詳細を更新します。 たとえば、{% data variables.product.prodname_cli %} を使用して表示名を変更した場合、このボタンをクリックして新しい名前を表示できます。
|
||||
|
||||
* **切断と停止**
|
||||
|
||||

|
||||
|
||||
codespace を停止し、リモート マシンでバックエンド IDE を停止し、ローカル JetBrains クライアントを閉じます。
|
||||
|
||||
* **Web から codespaces を管理する**
|
||||
|
||||

|
||||
@@ -63,10 +57,3 @@ JetBrains クライアントのアプリケーション ウィンドウの左下
|
||||

|
||||
|
||||
エディター ウィンドウで codespace 作成ログを開きます。 詳しい情報については、「[{% data variables.product.prodname_github_codespaces %} のログ](/codespaces/troubleshooting/github-codespaces-logs)」を参照してください。
|
||||
|
||||
* **dev container をリビルドする**
|
||||
|
||||

|
||||
|
||||
codespace をリビルドして、加えた変更を dev container 構成に適用します。 JetBrains クライアントが閉じられ、codespace をもう一度開く必要があります。 詳細については、「[codespace のライフサイクル](/codespaces/developing-in-codespaces/the-codespace-lifecycle#rebuilding-a-codespace)」を参照してください。
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ versions:
|
||||
fpt: '*'
|
||||
permissions: 'Organization owners who are admins for a classroom can connect learning management systems to {% data variables.product.prodname_classroom %}.'
|
||||
shortTitle: Register an LMS
|
||||
ms.openlocfilehash: e1c1abed5ce4ebf82c19b29fef9a005fbe4c7a02
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.openlocfilehash: 408126833cbf7fa8cd4a71d172f6550e82f795a2
|
||||
ms.sourcegitcommit: 1a77ceb9e20c002173dda983db9405bcd5be254a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148106854'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185170'
|
||||
---
|
||||
## クラスルームへの LMS の登録について
|
||||
|
||||
@@ -63,8 +63,8 @@ Canvas のインストールを {% data variables.product.prodname_classroom %}
|
||||
- [発行者識別子]: `https://canvas.instructure.com`
|
||||
- [ドメイン]: Canvas インスタンスのベース URL
|
||||
- [クライアント ID]: 作成した開発者キーの [詳細] にある [クライアント ID]
|
||||
- [OIDC 認可エンドポイント]: Canvas インスタンスのベース URL の末尾に `/login/oauth2/token` が追加されたもの。
|
||||
- [OAuth 2.0 トークン取得 URL]: Canvas インスタンスのベース URL の末尾に `/api/lti/authorize_redirect` が追加されたもの。
|
||||
- [OIDC 認可エンドポイント]: Canvas インスタンスのベース URL の末尾に `/api/lti/authorize_redirect` が追加されたもの。
|
||||
- [OAuth 2.0 トークン取得 URL]: Canvas インスタンスのベース URL の末尾に `/login/oauth2/token` が追加されたもの。
|
||||
- [キー セット URL]: Canvas インスタンスのベース URL の末尾に `/api/lti/security/jwks` が追加されたもの。
|
||||
|
||||

|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 自動生成リリース ノート
|
||||
intro: GitHub リリースのリリース ノートを自動的に生成できます
|
||||
title: Automatically generated release notes
|
||||
intro: You can automatically generate release notes for your GitHub releases
|
||||
permissions: Repository collaborators and people with write access to a repository can generate and customize automated release notes for a release.
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -13,61 +13,71 @@ shortTitle: Automated release notes
|
||||
communityRedirect:
|
||||
name: Provide GitHub Feedback
|
||||
href: 'https://github.com/orgs/community/discussions/categories/general'
|
||||
ms.openlocfilehash: a4adfa306873ef172950666756add7d0e67e168d
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147432017'
|
||||
---
|
||||
## 自動生成リリース ノートについて
|
||||
|
||||
自動生成リリース ノートは、{% data variables.product.prodname_dotcom %} リリースのリリース ノートを手作業で記述する代わりに、自動的に生成する機能です。 自動生成リリース ノートを使うと、リリースの内容の概要をすばやく生成できます。 自動生成されたリリース ノートには、マージされた pull request の一覧、リリースの共同作成者の一覧、完全な変更ログへのリンクが含まれます。
|
||||
## About automatically generated release notes
|
||||
|
||||
また、自動リリース ノートをカスタマイズし、ラベルを使ってカスタム カテゴリを作成して、含める pull request をまとめたり、特定のラベルとユーザーを出力に表示しないように除外したりすることもできます。
|
||||
Automatically generated release notes provide an automated alternative to manually writing release notes for your {% data variables.product.prodname_dotcom %} releases. With automatically generated release notes, you can quickly generate an overview of the contents of a release. Automatically generated release notes include a list of merged pull requests, a list of contributors to the release, and a link to a full changelog.
|
||||
|
||||
## 新しいリリースの自動生成リリース ノートを作成する
|
||||
You can also customize your automated release notes, using labels to create custom categories to organize pull requests you want to include, and exclude certain labels and users from appearing in the output.
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.releases %}
|
||||
3. **[新しいリリースの下書き]** をクリックします。
|
||||

|
||||
4. {% ifversion fpt or ghec %} **[タグの選択]** をクリックして、{% else %}{% endif %}リリースのバージョン番号を入力します。 または、既存のタグを選びます。
|
||||
{% ifversion fpt or ghec %} 
|
||||
5. 新しいタグを作成する場合は、 **[新しいタグの作成]** をクリックします。
|
||||
{% else %}{% endif %}
|
||||
6. 新しいタグを作成した場合は、ドロップダウン メニューを使ってリリース対象のプロジェクトを含むブランチを選択します。
|
||||
{% ifversion fpt or ghec %} {% else %} {% endif %} {%- data reusables.releases.previous-release-tag %}
|
||||
7. 説明テキスト ボックスの右上で、{% ifversion previous-release-tag %} **[リリース ノートの生成]** {% else %} **[リリース ノートの自動生成]** {% endif %}.{% ifversion previous-release-tag %} ![[リリース ノートの生成]](/assets/images/help/releases/generate-release-notes.png){% else %} ![[リリース ノートの自動生成]](/assets/images/enterprise/3.5/releases/auto-generate-release-notes.png){% endif %}をクリックします
|
||||
8. 生成されたノートをチェックし、含めたい情報がすべて (そしてそれだけが) 含まれることを確認します。
|
||||
9. オプションで、コンパイルされたプログラムなどのバイナリファイルをリリースに含めるには、ドラッグアンドドロップするかバイナリボックスで手動で選択します。
|
||||

|
||||
10. リリースが不安定であり、運用の準備ができていないことをユーザーに通知するには、 **[これはプレリリースです]** を選択します。
|
||||
{%- ifversion fpt or ghec %}
|
||||
11. 必要に応じて、 **[このリリースのディスカッションを作成する]** を選び、 **[カテゴリ]** ドロップダウン メニューを選んでリリース ディスカッションのカテゴリをクリックします。
|
||||
{%- endif %}
|
||||
12. リリースを公開する準備ができている場合は、 **[リリースの公開]** をクリックします。 リリースの作業を後でする場合は、 **[下書きの保存]** をクリックします。
|
||||
![[リリースの公開] と [下書きの保存] ボタン](/assets/images/help/releases/release_buttons.png)
|
||||
## Creating automatically generated release notes for a new release
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.releases %}
|
||||
3. Click **Draft a new release**.
|
||||

|
||||
4. {% ifversion fpt or ghec %}Click **Choose a tag** and type{% else %}Type{% endif %} a version number for your release. Alternatively, select an existing tag.
|
||||
{% ifversion fpt or ghec %}
|
||||

|
||||
5. If you are creating a new tag, click **Create new tag**.
|
||||

|
||||
{% else %}
|
||||

|
||||
{% endif %}
|
||||
6. If you have created a new tag, use the drop-down menu to select the branch that contains the project you want to release.
|
||||
{% ifversion fpt or ghec %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{%- data reusables.releases.previous-release-tag %}
|
||||
7. To the top right of the description text box, click {% ifversion previous-release-tag %}**Generate release notes**{% else %}**Auto-generate release notes**{% endif %}.{% ifversion previous-release-tag %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
8. Check the generated notes to ensure they include all (and only) the information you want to include.
|
||||
9. Optionally, to include binary files such as compiled programs in your release, drag and drop or manually select files in the binaries box.
|
||||

|
||||
10. To notify users that the release is not ready for production and may be unstable, select **This is a pre-release**.
|
||||

|
||||
{%- ifversion fpt or ghec %}
|
||||
11. Optionally, select **Create a discussion for this release**, then select the **Category** drop-down menu and click a category for the release discussion.
|
||||

|
||||
{%- endif %}
|
||||
12. If you're ready to publicize your release, click **Publish release**. To work on the release later, click **Save draft**.
|
||||

|
||||
|
||||
|
||||
## 自動生成リリース ノートを構成する
|
||||
## Configuring automatically generated release notes
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %} {% data reusables.files.add-file %}
|
||||
3. ファイル名フィールドに「`.github/release.yml`」と入力して、`.github` ディレクトリに `release.yml` ファイルを作成します。
|
||||
![[新しいファイルの作成]](/assets/images/help/releases/release-yml.png)
|
||||
4. このファイルでは、以下の構成オプションを使って、このリリースから除外する pull request ラベルと作成者を YAML で指定します。 新しいカテゴリを作成し、それぞれに含める pull request ラベルを列記することもできます。
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.files.add-file %}
|
||||
3. In the file name field, type `.github/release.yml` to create the `release.yml` file in the `.github` directory.
|
||||

|
||||
4. In the file, using the configuration options below, specify in YAML the pull request labels and authors you want to exclude from this release. You can also create new categories and list the pull request labels to be included in each of them.
|
||||
|
||||
### 構成オプション
|
||||
### Configuration options
|
||||
|
||||
| パラメーター | 説明 |
|
||||
| Parameter | Description |
|
||||
| :- | :- |
|
||||
| `changelog.exclude.labels` | リリース ノートに表示しない pull request のラベルの一覧。 |
|
||||
| `changelog.exclude.authors` | pull request をリリース ノートから除外するユーザーまたはボット ログイン ハンドルの一覧。 |
|
||||
| `changelog.categories[*].title` | **必須。** リリース ノートでの変更のカテゴリのタイトル。 |
|
||||
| `changelog.categories[*].labels`| **必須。** このカテゴリの pull request を修飾するラベル。 前のカテゴリのいずれにも一致しなかった pull request のキャッチオールとして `*` を使います。 |
|
||||
| `changelog.categories[*].exclude.labels` | このカテゴリに表示しない pull request のラベルの一覧。 |
|
||||
| `changelog.categories[*].exclude.authors` | pull request をこのカテゴリから除外するユーザーまたはボット ログイン ハンドルの一覧。 |
|
||||
| `changelog.exclude.labels` | A list of labels that exclude a pull request from appearing in release notes. |
|
||||
| `changelog.exclude.authors` | A list of user or bot login handles whose pull requests are to be excluded from release notes. |
|
||||
| `changelog.categories[*].title` | **Required.** The title of a category of changes in release notes. |
|
||||
| `changelog.categories[*].labels`| **Required.** Labels that qualify a pull request for this category. Use `*` as a catch-all for pull requests that didn't match any of the previous categories. |
|
||||
| `changelog.categories[*].exclude.labels` | A list of labels that exclude a pull request from appearing in this category. |
|
||||
| `changelog.categories[*].exclude.authors` | A list of user or bot login handles whose pull requests are to be excluded from this category. |
|
||||
|
||||
### 構成例
|
||||
### Example configurations
|
||||
|
||||
A configuration for a repository that labels semver releases
|
||||
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
@@ -94,6 +104,26 @@ changelog:
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
## 参考資料
|
||||
A configuration for a repository that doesn't tag pull requests but where we want to separate out {% data variables.product.prodname_dependabot %} automated pull requests in release notes (`labels: '*'` is required to display a catchall category)
|
||||
|
||||
- [ラベルを管理する](/issues/using-labels-and-milestones-to-track-work/managing-labels)
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
# .github/release.yml
|
||||
|
||||
changelog:
|
||||
categories:
|
||||
- title: 🏕 Features
|
||||
labels:
|
||||
- '*'
|
||||
exclude:
|
||||
labels:
|
||||
- dependencies
|
||||
- title: 👒 Dependencies
|
||||
labels:
|
||||
- dependencies
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Managing labels](/issues/using-labels-and-milestones-to-track-work/managing-labels)"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Getting started with the REST API
|
||||
intro: 'Learn how to use the {% data variables.product.prodname_dotcom %} REST API.'
|
||||
title: REST API を使用した作業の開始
|
||||
intro: '{% data variables.product.prodname_dotcom %} REST API の使用方法について学習します。'
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -10,33 +10,38 @@ topics:
|
||||
- API
|
||||
shortTitle: Using the API
|
||||
miniTocMaxHeadingLevel: 3
|
||||
ms.openlocfilehash: 66620b01bb488f8c74111b56255ff06702e402e8
|
||||
ms.sourcegitcommit: d2f0b59ed096b9e68ef8f6fa019cd925165762ec
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148184262'
|
||||
---
|
||||
## {% data variables.product.prodname_dotcom %} REST API について
|
||||
|
||||
## About the {% data variables.product.prodname_dotcom %} REST API
|
||||
この記事では、{% data variables.product.prodname_cli %}、JavaScript、または cURL を使う {% data variables.product.prodname_dotcom %} REST API の使用方法について説明します。 クイックスタート ガイドについては、「[GitHub REST API のクイックスタート](/rest/quickstart)」を参照してください。
|
||||
|
||||
This article describes how to use the {% data variables.product.prodname_dotcom %} REST API using {% data variables.product.prodname_cli %}, JavaScript, or cURL. For a quickstart guide, see "[Quickstart for GitHub REST API](/rest/quickstart)."
|
||||
REST API への要求を行うときは、HTTP メソッドとパスを指定します。 さらに、要求ヘッダーとパス、クエリ、または本文のパラメーターを指定することもできます。 API では、応答状態コードと応答ヘッダー、また場合によっては応答本文が返されます。
|
||||
|
||||
When you make a request to the REST API, you will specify an HTTP method and a path. Additionally, you might also specify request headers and path, query, or body parameters. The API will return the response status code, response headers, and potentially a response body.
|
||||
REST API リファレンス ドキュメントでは、すべての操作の HTTP メソッド、パス、およびパラメーターについて説明します。 また、各操作の要求と応答の例も表示されます。 詳しくは、[REST のリファレンス ドキュメント](/rest)をご覧ください。
|
||||
|
||||
The REST API reference documentation describes the HTTP method, path, and parameters for every operation. It also displays example requests and responses for each operation. For more information, see the [REST reference documentation](/rest).
|
||||
{% data variables.product.company_short %} の API について詳しくは、「[{% data variables.product.company_short %} の API について](/developers/overview/about-githubs-apis)」を参照してください。
|
||||
|
||||
For more information about {% data variables.product.company_short %}'s APIs, see "[About {% data variables.product.company_short %}'s APIs](/developers/overview/about-githubs-apis)."
|
||||
## 要求を行う
|
||||
|
||||
## Making a request
|
||||
|
||||
To make a request, first find the HTTP method and the path for the operation that you want to use. For example, the "Get Octocat" operation uses the `GET` method and the `/octocat` path. For the full reference documentation for this operation, see "[Get Octocat](/rest/meta#get-octocat)."
|
||||
要求を行うには、まず HTTP メソッドと、使用する操作のパスを見つけます。 たとえば、"Octocat の取得" 操作では、`GET` メソッドと `/octocat` パスが使用されます。 この操作の完全なリファレンス ドキュメントについては、「[Octocat の取得](/rest/meta#get-octocat)」を参照してください。
|
||||
|
||||
{% cli %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: You must install {% data variables.product.prodname_cli %} in order to use the commands in the {% data variables.product.prodname_cli %} examples. For installation instructions, see the [{% data variables.product.prodname_cli %} repository](https://github.com/cli/cli#installation).
|
||||
**注**: {% data variables.product.prodname_cli %} の例のコマンドを使用するには、{% data variables.product.prodname_cli %} をインストールする必要があります。 インストールの手順については、[{% data variables.product.prodname_cli %} リポジトリ](https://github.com/cli/cli#installation)を参照してください。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
If you are not already authenticated to {% data variables.product.prodname_cli %}, you must use the `gh auth login` subcommand to authenticate before making any requests. For more information, see "[Authenticating](#authenticating)."
|
||||
まだ {% data variables.product.prodname_cli %} に対して認証されていない場合は、要求を行う前に `gh auth login` サブコマンドを使用して認証する必要があります。 詳しくは、「[認証](#authenticating)」を参照してください。
|
||||
|
||||
To make a request using {% data variables.product.prodname_cli %}, use the `api` subcommand along with the path. Use the `--method` or `-X` flag to specify the method.
|
||||
{% data variables.product.prodname_cli %} を使用して要求を行うには、パスと共に `api` サブコマンドを使用します。 メソッドを指定するには、`--method` または `-X` フラグを使用します。
|
||||
|
||||
```shell
|
||||
gh api /octocat --method GET
|
||||
@@ -48,13 +53,13 @@ gh api /octocat --method GET
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: You must install and import `octokit` in order to use the Octokit.js library used in the JavaScript examples. For more information, see [the Octokit.js README](https://github.com/octokit/octokit.js/#readme).
|
||||
**注**: JavaScript の例で使用されている Octokit.js ライブラリを使うには、`octokit` をインストールしてインポートする必要があります。 詳しくは、[Octokit.js の README](https://github.com/octokit/octokit.js/#readme) を参照してください。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
To make a request using JavaScript, you can use Octokit.js. For more information, see [the Octokit.js README](https://github.com/octokit/octokit.js/#readme).
|
||||
JavaScript を使用して要求を行うために、Octokit.js を使用できます。 詳しくは、[Octokit.js の README](https://github.com/octokit/octokit.js/#readme) を参照してください。
|
||||
|
||||
First, create an instance of `Octokit`.{% ifversion ghes or ghae %} Set the base URL to `{% data variables.product.api_url_code %}`. Replace `[hostname]` with the name of {% data variables.location.product_location %}.{% endif %}
|
||||
まず、`Octokit` のインスタンスを作成します。{% ifversion ghes or ghae %}ベース URL を `{% data variables.product.api_url_code %}` に設定します。 `[hostname]` を {% data variables.location.product_location %}の名前に置き換えます。{% endif %}
|
||||
|
||||
```javascript
|
||||
const octokit = new Octokit({ {% ifversion ghes or ghae %}
|
||||
@@ -62,7 +67,7 @@ const octokit = new Octokit({ {% ifversion ghes or ghae %}
|
||||
{% endif %}});
|
||||
```
|
||||
|
||||
Then, use the `request` method to make requests. Pass the HTTP method and path as the first argument.
|
||||
その後、`request` メソッドを使用して要求を行います。 HTTP メソッドとパスを最初の引数として渡します。
|
||||
|
||||
```javascript
|
||||
await octokit.request("GET /octocat", {});
|
||||
@@ -72,9 +77,9 @@ await octokit.request("GET /octocat", {});
|
||||
|
||||
{% curl %}
|
||||
|
||||
Prepend the base URL for the {% data variables.product.prodname_dotcom %} REST API, `{% data variables.product.api_url_code %}`, to the path to get the full URL: `{% data variables.product.api_url_code %}/octocat`.{% ifversion ghes or ghae %} Replace `[hostname]` with the name of {% data variables.location.product_location %}.{% endif %}
|
||||
パスの前に {% data variables.product.prodname_dotcom %} REST API のベース URL `{% data variables.product.api_url_code %}` を付加し、完全な URL (`{% data variables.product.api_url_code %}/octocat`) を取得します。{% ifversion ghes or ghae %}`[hostname]` は、{% data variables.location.product_location %} の名前に置き換えます。{% endif %}
|
||||
|
||||
Use the `curl` command in your command line. Use the `--request` or `-X` flag followed by the HTTP method. Use the `--url` flag followed by the full URL.
|
||||
コマンド ラインで `curl` コマンドを使用します。 `--request` または `-X` フラグを使用し、その後に HTTP メソッドを指定します。 `--url` フラグを使用し、その後に完全な URL を指定します。
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
@@ -83,39 +88,39 @@ curl --request GET \
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: If you get a message similar to "command not found: curl", you may need to download and install cURL. For more information, see [the cURL project download page](https://curl.se/download.html).
|
||||
**注**: "コマンドが見つかりません: curl" のようなメッセージが表示される場合は、cURL をダウンロードしてインストールする必要があることがあります。 詳しくは、[cURL プロジェクトのダウンロード ページ](https://curl.se/download.html)を参照してください。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
Continue reading to learn how to authenticate, send parameters, and use the response.
|
||||
認証、パラメーターの送信、応答の使用方法について学習する場合は、引き続きお読みください。
|
||||
|
||||
## Authenticating
|
||||
## 認証
|
||||
|
||||
Many operations require authentication or return additional information if you are authenticated. Additionally, you can make more requests per hour when you are authenticated.{% cli %} Although some REST API operations are accessible without authentication, you must authenticate to {% data variables.product.prodname_cli %} in order to use the `api` subcommand.{% endcli %}
|
||||
多くの操作では、認証が必要であるか、認証されている場合は追加情報が返されます。 また、認証されると、1 時間あたりにさらに多くの要求を行うことができます。{% cli %}一部の REST API 操作には認証なしでアクセスできますが、`api` サブコマンドを使用するには、{% data variables.product.prodname_cli %} に対して認証を行う必要があります。{% endcli %}
|
||||
|
||||
### About tokens
|
||||
### トークンについて
|
||||
|
||||
You can authenticate your request by adding a token.
|
||||
トークンを追加することで、要求を認証できます。
|
||||
|
||||
If you want to use the {% data variables.product.company_short %} REST API for personal use, you can create a {% data variables.product.pat_generic %}. The REST API operations used in this article require `repo` scope for {% data variables.product.pat_v1_plural %}{% ifversion pat-v2 %} or, unless otherwise noted, read-only access to public repositories for {% data variables.product.pat_v2 %}s{% endif %}. Other operations may require different scopes{% ifversion pat-v2%} or permissions{% endif %}. For more information about creating a {% data variables.product.pat_generic %}, see "[Creating a {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)."
|
||||
個人用に {% data variables.product.company_short %} REST API を使用する場合は、{% data variables.product.pat_generic %}を作成できます。 この記事で使用する REST API 操作には、{% data variables.product.pat_v1_plural %}{% ifversion pat-v2 %} の `repo` スコープ、または特に明記されていない限り、{% data variables.product.pat_v2 %}のパブリック リポジトリへの読み取り専用アクセスが必要です{% endif %}。 その他の操作には、異なるスコープ{% ifversion pat-v2%}またはアクセス許可が必要です{% endif %}。 {% data variables.product.pat_generic %}の作成について詳しくは、「[{% data variables.product.pat_generic %}の作成](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)」をご覧ください。
|
||||
|
||||
If you want to use the API on behalf of an organization or another user, {% data variables.product.company_short %} recommends that you use a {% data variables.product.prodname_github_app %}. If an operation is available to {% data variables.product.prodname_github_apps %}, the REST reference documentation for that operation will say "Works with GitHub Apps." The REST API operations used in this article require `issues` read and write permissions for {% data variables.product.prodname_github_apps %}. Other operations may require different permissions. For more information, see "[Creating a GitHub App](/developers/apps/building-github-apps/creating-a-github-app)", "[Authenticating with GitHub Apps](/developers/apps/building-github-apps/authenticating-with-github-apps), and "[Identifying and authorizing users for GitHub Apps](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps)."
|
||||
Organization または他のユーザーの代わりに API を使用する場合、{% data variables.product.company_short %} では、{% data variables.product.prodname_github_app %} の使用が推奨されます。 操作が {% data variables.product.prodname_github_apps %} で使用できる場合、その操作の REST リファレンス ドキュメントには "GitHub Apps で動作する" と示されます。 この記事で使用される REST API 操作には、{% data variables.product.prodname_github_apps %} の `issues` の読み取りおよび書き込みアクセス許可が必要です。 その他の操作では、異なるアクセス許可が必要な場合があります。 詳しくは、「[GitHub App を作成する](/developers/apps/building-github-apps/creating-a-github-app)」、「[GitHub Apps による認証](/developers/apps/building-github-apps/authenticating-with-github-apps)」、「[GitHub アプリのユーザーを特定および認可する](/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps)」を参照してください。
|
||||
|
||||
If you want to use the API in a {% data variables.product.prodname_actions %} workflow, {% data variables.product.company_short %} recommends that you authenticate with the built-in `GITHUB_TOKEN` instead of creating a token. You can grant permissions to the `GITHUB_TOKEN` with the `permissions` key. For more information, see "[Automatic token authentication](/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)."
|
||||
{% data variables.product.prodname_actions %} ワークフローで API を使用する場合、{% data variables.product.company_short %} では、トークンを作成するのではなく、組み込み `GITHUB_TOKEN` で認証することが推奨されます。 `permissions` キーを使用して、`GITHUB_TOKEN` へのアクセス許可を付与できます。 詳しくは、「[自動トークン認証](/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)」を参照してください。
|
||||
|
||||
### Authentication example
|
||||
### 認証の例
|
||||
|
||||
{% cli %}
|
||||
|
||||
With {% data variables.product.prodname_cli %}, you don't need to create an access token in advance. Use the `auth login` subcommand to authenticate to {% data variables.product.prodname_cli %}:
|
||||
{% data variables.product.prodname_cli %} では、アクセス トークンを事前に作成する必要はありません。 `auth login` サブコマンドを使用して、{% data variables.product.prodname_cli %} に対する認証を行います。
|
||||
|
||||
```shell
|
||||
gh auth login
|
||||
```
|
||||
|
||||
You can use the `--scopes` flag to specify what scopes you want. If you want to authenticate with a token that you created, you can use the `--with-token` flag. For more information, see the [{% data variables.product.prodname_cli %} `auth login` documentation](https://cli.github.com/manual/gh_auth_login).
|
||||
`--scopes` フラグを使用して、必要なスコープを指定できます。 作成したトークンで認証する場合は、`--with-token` フラグを使用できます。 詳しくは、[{% data variables.product.prodname_cli %} `auth login` ドキュメント](https://cli.github.com/manual/gh_auth_login)を参照してください。
|
||||
|
||||
{% endcli %}
|
||||
|
||||
@@ -123,17 +128,17 @@ You can use the `--scopes` flag to specify what scopes you want. If you want to
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning**: Treat your access token like a password.
|
||||
**警告**: アクセス トークンは、パスワードと同様の扱いとしてください。
|
||||
|
||||
To keep your token secure, you can store your token as a secret and run your script through {% data variables.product.prodname_actions %}. For more information, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)."
|
||||
トークンを安全な状態に保つために、トークンをシークレットとして格納し、{% data variables.product.prodname_actions %} を使用してスクリプトを実行できます。 詳細については、「[暗号化されたシークレット](/actions/security-guides/encrypted-secrets)」を参照してください。
|
||||
|
||||
{% ifversion ghec or fpt %}You can also store your token as a {% data variables.product.prodname_codespaces %} secret and run your script in {% data variables.product.prodname_codespaces %}. For more information, see "[Managing encrypted secrets for your codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)."{% endif %}
|
||||
{% ifversion ghec or fpt %}また、トークンを {% data variables.product.prodname_codespaces %} シークレットとして格納し、{% data variables.product.prodname_codespaces %} でスクリプトを実行することもできます。 詳しくは、「[codespaces の暗号化されたシークレットを管理する](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)」を参照してください。{% endif %}
|
||||
|
||||
If these options are not possible, consider using another service such as [the 1Password CLI](https://developer.1password.com/docs/cli/secret-references/) to store your token securely.
|
||||
これらのオプションが使用できない場合は、[1Password CLI](https://developer.1password.com/docs/cli/secret-references/) などの別のサービスを使用してトークンを安全に格納することを検討してください。
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
To authenticate with the Octokit.js library, you can pass your token when you create an instance of `Octokit`. Replace `YOUR-TOKEN` with your token.{% ifversion ghes or ghae %} Replace `[hostname]` with the name of {% data variables.location.product_location %}.{% endif %}
|
||||
Octokit.js ライブラリで認証するには、`Octokit` のインスタンスの作成時にトークンを渡すことができます。 `YOUR-TOKEN` をお使いのトークンに置き換えます。{% ifversion ghes or ghae %}`[hostname]` をお使いの {% data variables.location.product_location %}の名前に置き換えます。{% endif %}
|
||||
|
||||
```javascript
|
||||
const octokit = new Octokit({ {% ifversion ghes or ghae %}
|
||||
@@ -148,17 +153,17 @@ const octokit = new Octokit({ {% ifversion ghes or ghae %}
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning**: Treat your access token like a password.
|
||||
**警告**: アクセス トークンはパスワードと同様に扱ってください。
|
||||
|
||||
To help keep your account secure, you can use {% data variables.product.prodname_cli %} instead of cURL. {% data variables.product.prodname_cli %} will take care of authentication for you. For more information, see the {% data variables.product.prodname_cli %} version of this page.
|
||||
アカウントを安全な状態に保てるように、cURL の代わりに {% data variables.product.prodname_cli %} を使用できます。 {% data variables.product.prodname_cli %} で自動的に認証が行われます。 詳しくは、このページの {% data variables.product.prodname_cli %} バージョンを参照してください。
|
||||
|
||||
{% ifversion ghec or fpt %}You can also store your token as a {% data variables.product.prodname_codespaces %} secret and use the command line through {% data variables.product.prodname_codespaces %}. For more information, see "[Managing encrypted secrets for your codespaces](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)."{% endif %}
|
||||
{% ifversion ghec or fpt %}また、トークンを {% data variables.product.prodname_codespaces %} シークレットとして格納し、{% data variables.product.prodname_codespaces %} を介してコマンド ラインを使用することもできます。 詳しくは、「[codespaces の暗号化されたシークレットを管理する](/codespaces/managing-your-codespaces/managing-encrypted-secrets-for-your-codespaces)」を参照してください。{% endif %}
|
||||
|
||||
If these options are not possible, consider using another service such as [the 1Password CLI](https://developer.1password.com/docs/cli/secret-references/) to store your token securely.
|
||||
これらのオプションが使用できない場合は、[1Password CLI](https://developer.1password.com/docs/cli/secret-references/) などの別のサービスを使用してトークンを安全に格納することを検討してください。
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
With cURL, you will send an `Authorization` header with your token. Replace `YOUR-TOKEN` with your token:
|
||||
cURL では、トークンを含む `Authorization` ヘッダーを送信します。 `YOUR-TOKEN` は実際のトークンに置き換えてください。
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
@@ -168,19 +173,19 @@ curl --request GET \
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data reusables.getting-started.bearer-vs-token %}
|
||||
**注:** {% data reusables.getting-started.bearer-vs-token %}
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
### Authentication example for {% data variables.product.prodname_actions %}
|
||||
### {% data variables.product.prodname_actions %} の認証例
|
||||
|
||||
{% cli %}
|
||||
|
||||
You can also use the `run` keyword to execute {% data variables.product.prodname_cli %} commands in your {% data variables.product.prodname_actions %} workflows. For more information, see "[Workflow syntax for GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)."
|
||||
`run` キーワードを使用して、{% data variables.product.prodname_actions %} ワークフローで {% data variables.product.prodname_cli %} コマンドを実行することもできます。 詳細については、「[GitHub Actions のワークフロー構文](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)」を参照してください。
|
||||
|
||||
Instead of using the `gh auth login` command, pass your token as an environment variable called `GH_TOKEN`. {% data variables.product.prodname_dotcom %} recommends that you authenticate with the built-in `GITHUB_TOKEN` instead of creating a token. If this is not possible, store your token as a secret and replace `GITHUB_TOKEN` in the example below with the name of your secret. For more information about `GITHUB_TOKEN`, see "[Automatic token authentication](/actions/security-guides/automatic-token-authentication)." For more information about secrets, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)."
|
||||
`gh auth login` コマンドを使用するのでなく、トークンを `GH_TOKEN` という環境変数として渡します。 {% data variables.product.prodname_dotcom %} では、トークンを作成するのではなく、組み込みの `GITHUB_TOKEN` で認証することが推奨されます。 これができない場合は、ご利用のトークンをシークレットとして格納し、次の例で `GITHUB_TOKEN` を自分のシークレットの名前に置き換えます。 `GITHUB_TOKEN` について詳しくは、「[自動トークン認証](/actions/security-guides/automatic-token-authentication)」を参照してください。 シークレットについて詳しくは、「[暗号化されたシークレット](/actions/security-guides/encrypted-secrets)」を参照してください。
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
@@ -198,18 +203,18 @@ jobs:
|
||||
|
||||
{% javascript %}
|
||||
|
||||
You can also use the `run` keyword to execute your JavaScript scripts in your {% data variables.product.prodname_actions %} workflows. For more information, see "[Workflow syntax for GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)."
|
||||
`run` キーワードを使用して、{% data variables.product.prodname_actions %} ワークフローで JavaScript スクリプトを実行することもできます。 詳細については、「[GitHub Actions のワークフロー構文](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)」を参照してください。
|
||||
|
||||
{% data variables.product.prodname_dotcom %} recommends that you authenticate with the built-in `GITHUB_TOKEN` instead of creating a token. If this is not possible, store your token as a secret and replace `GITHUB_TOKEN` in the example below with the name of your secret. For more information about `GITHUB_TOKEN`, see "[Automatic token authentication](/actions/security-guides/automatic-token-authentication)." For more information about secrets, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)."
|
||||
{% data variables.product.prodname_dotcom %} では、トークンを作成するのではなく、組み込みの `GITHUB_TOKEN` で認証することが推奨されます。 これができない場合は、ご利用のトークンをシークレットとして格納し、次の例で `GITHUB_TOKEN` を自分のシークレットの名前に置き換えます。 `GITHUB_TOKEN` について詳しくは、「[自動トークン認証](/actions/security-guides/automatic-token-authentication)」を参照してください。 シークレットについて詳しくは、「[暗号化されたシークレット](/actions/security-guides/encrypted-secrets)」を参照してください。
|
||||
|
||||
The following example workflow:
|
||||
次のワークフロー例を参照してください。
|
||||
|
||||
1. Checks out the repository content
|
||||
1. Sets up Node.js
|
||||
1. Installs `octokit`
|
||||
1. Stores the value of `GITHUB_TOKEN` as an environment variable called `TOKEN` and runs `.github/actions-scripts/use-the-api.mjs`, which can access that environment variable as `process.env.TOKEN`
|
||||
1. リポジトリのコンテンツをチェックアウトする
|
||||
1. Node.js を設定する
|
||||
1. `octokit` をインストールする
|
||||
1. `GITHUB_TOKEN` の値を、`TOKEN` と呼ばれる環境変数として格納し、`.github/actions-scripts/use-the-api.mjs` を実行する。これにより、その環境変数に `process.env.TOKEN` としてアクセスできます。
|
||||
|
||||
Example workflow:
|
||||
ワークフローの例:
|
||||
|
||||
```yaml
|
||||
on:
|
||||
@@ -238,7 +243,7 @@ jobs:
|
||||
node .github/actions-scripts/use-the-api.mjs
|
||||
```
|
||||
|
||||
Example JavaScript script, with the file path `.github/actions-scripts/use-the-api.mjs`:
|
||||
ファイル パス `.github/actions-scripts/use-the-api.mjs` を含む JavaScript スクリプトの例:
|
||||
|
||||
```javascript
|
||||
import { Octokit } from "octokit";
|
||||
@@ -251,7 +256,7 @@ const octokit = new Octokit({ {% ifversion ghes or ghae %}
|
||||
await octokit.request("GET /octocat", {});
|
||||
```
|
||||
|
||||
Instead of storing your script in a separate file and executing the script from your workflow, you can use the `actions/github-script` action to run a script. For more information, see the [actions/github-script README](https://github.com/actions/github-script).
|
||||
スクリプトを別のファイルに格納し、ワークフローからスクリプトを実行するのではなく、`actions/github-script` アクションを使用してスクリプトを実行できます。 詳しくは、[actions/github-script README](https://github.com/actions/github-script) をご覧ください。
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
@@ -270,9 +275,9 @@ jobs:
|
||||
|
||||
{% curl %}
|
||||
|
||||
You can also use the `run` keyword to execute cURL commands in your {% data variables.product.prodname_actions %} workflows. For more information, see "[Workflow syntax for GitHub Actions](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)."
|
||||
`run` キーワードを使用して、{% data variables.product.prodname_actions %} ワークフローで cURL コマンドを実行することもできます。 詳細については、「[GitHub Actions のワークフロー構文](/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun)」を参照してください。
|
||||
|
||||
{% data variables.product.prodname_dotcom %} recommends that you authenticate with the built-in `GITHUB_TOKEN` instead of creating a token. If this is not possible, store your token as a secret and replace `GITHUB_TOKEN` in the example below with the name of your secret. For more information about `GITHUB_TOKEN`, see "[Automatic token authentication](/actions/security-guides/automatic-token-authentication)." For more information about secrets, see "[Encrypted secrets](/actions/security-guides/encrypted-secrets)."
|
||||
{% data variables.product.prodname_dotcom %} では、トークンを作成するのではなく、組み込みの `GITHUB_TOKEN` で認証することが推奨されます。 これができない場合は、ご利用のトークンをシークレットとして格納し、次の例で `GITHUB_TOKEN` を自分のシークレットの名前に置き換えます。 `GITHUB_TOKEN` について詳しくは、「[自動トークン認証](/actions/security-guides/automatic-token-authentication)」を参照してください。 シークレットについて詳しくは、「[暗号化されたシークレット](/actions/security-guides/encrypted-secrets)」を参照してください。
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
@@ -290,13 +295,13 @@ jobs:
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
## Using headers
|
||||
## ヘッダーの使用
|
||||
|
||||
Most operations specify that you should pass an `Accept` header with a value of `application/vnd.github+json`. Other operations may specify that you should send a different `Accept` header or additional headers.
|
||||
ほとんどの操作では、値が `application/vnd.github+json` の `Accept` ヘッダーを渡す必要があることを指定します。 他の操作では、別の `Accept` ヘッダーまたは追加のヘッダーを送信する必要があることを指定する場合があります。
|
||||
|
||||
{% cli %}
|
||||
|
||||
To send a header with {% data variables.product.prodname_cli %}, use the `--header` or `-H` flag followed by the header in `key: value` format.
|
||||
{% data variables.product.prodname_cli %} でヘッダーを送信するには、`--header` または `-H` フラグを使用し、その後にヘッダーを `key: value` 形式で指定します。
|
||||
|
||||
```shell
|
||||
gh api --header 'Accept: application/vnd.github+json'{% ifversion api-date-versioning %} --header 'X-GitHub-Api-Version:{{ allVersions[currentVersion].latestApiVersion }}'{% endif %} --method GET /octocat
|
||||
@@ -306,7 +311,7 @@ gh api --header 'Accept: application/vnd.github+json'{% ifversion api-date-versi
|
||||
|
||||
{% javascript %}
|
||||
|
||||
The Octokit.js library automatically passes the `Accept: application/vnd.github+json` header. To pass additional headers or a different `Accept` header, add a `headers` property to the object that is passed as a second argument to the `request` method. The value of the `headers` property is an object with the header names as keys and header values as values. For example, to send a `content-type` header with a value of `text/plain`:
|
||||
Octokit.js ライブラリでは自動的に `Accept: application/vnd.github+json` ヘッダーが渡されます。 追加のヘッダーまたは別の `Accept` ヘッダーを渡すには、`headers` メソッドに 2 番目の引数として渡されるオブジェクトに `request` プロパティを追加します。 `headers` プロパティの値は、キーがヘッダー名で値がヘッダー値のオブジェクトです。 たとえば、値が `text/plain` の `content-type` ヘッダーを送信する場合は次のようになります。
|
||||
|
||||
```javascript
|
||||
await octokit.request("GET /octocat", {
|
||||
@@ -321,7 +326,7 @@ await octokit.request("GET /octocat", {
|
||||
|
||||
{% curl %}
|
||||
|
||||
To send a header with cURL, use the `--header` or `-H` flag followed by the header in `key: value` format.
|
||||
cURL でヘッダーを送信するには、`--header` または `-H` フラグを使用し、その後にヘッダーを `key: value` 形式で指定します。
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
@@ -333,21 +338,19 @@ curl --request GET \
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
## Using path parameters
|
||||
## パス パラメーターの使用
|
||||
|
||||
Path parameters modify the operation path. For example, the "List repository issues" path is `/repos/{owner}/{repo}/issues`. The curly brackets `{}` denote path parameters that you need to specify. In this case, you must specify the repository owner and name. For the reference documentation for this operation, see "[List repository issues](/rest/issues/issues#list-repository-issues)."
|
||||
パス パラメーターでは操作パスを変更します。 たとえば、"リポジトリの issue の一覧表示" パスは `/repos/{owner}/{repo}/issues` となります。 中かっこ `{}` は、指定する必要があるパス パラメーターを示します。 この場合は、リポジトリの所有者と名前を指定する必要があります。 この操作のリファレンス ドキュメントについては、「[リポジトリの issue の一覧表示](/rest/issues/issues#list-repository-issues)」を参照してください。
|
||||
|
||||
{% cli %}
|
||||
|
||||
{% ifversion ghes or ghae %}
|
||||
{% note %}
|
||||
{% ifversion ghes or ghae %} {% note %}
|
||||
|
||||
**Note:** In order for this command to work for {% data variables.location.product_location %}, replace `octocat/Spoon-Knife` with a repository owned by {% data variables.location.product_location %}. Otherwise, rerun the `gh auth login` command to authenticate to {% data variables.product.prodname_dotcom_the_website %} instead of {% data variables.location.product_location %}.
|
||||
**注:** このコマンドを {% data variables.location.product_location %}で動作させるには、`octocat/Spoon-Knife` を、{% data variables.location.product_location %}によって所有されているリポジトリに置き換えます。 それ以外の場合は、`gh auth login` コマンドを再実行して、{% data variables.location.product_location %}ではなく {% data variables.product.prodname_dotcom_the_website %} に対して認証を行います。
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
{% endnote %} {% endif %}
|
||||
|
||||
To get issues from the `octocat/Spoon-Knife` repository, replace `{owner}` with `octocat` and `{repo}` with `Spoon-Knife`.
|
||||
`octocat/Spoon-Knife` リポジトリから issue を取得するには、`{owner}` を `octocat`に、`{repo}` を `Spoon-Knife` に置き換えます。
|
||||
|
||||
```shell
|
||||
gh api --header 'Accept: application/vnd.github+json' --method GET /repos/octocat/Spoon-Knife/issues
|
||||
@@ -357,15 +360,13 @@ gh api --header 'Accept: application/vnd.github+json' --method GET /repos/octoca
|
||||
|
||||
{% javascript %}
|
||||
|
||||
{% ifversion ghes or ghae %}
|
||||
{% note %}
|
||||
{% ifversion ghes or ghae %} {% note %}
|
||||
|
||||
**Note:** In order for this example to work for {% data variables.location.product_location %}, replace `octocat/Spoon-Knife` with a repository owned by {% data variables.location.product_location %}. Otherwise, create a new `Octokit` instance and do not specify `baseURL`.
|
||||
**注:** この例を {% data variables.location.product_location %}で動作させるには、`octocat/Spoon-Knife` を、{% data variables.location.product_location %} によって所有されているリポジトリに置き換えます。 それ以外の場合は、新しい `Octokit` インスタンスを作成、`baseURL` は指定しません。
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
{% endnote %} {% endif %}
|
||||
|
||||
When you make a request with Octokit.js, all parameters, including path parameters, are passed in an object as the second argument to the `request` method. To get issues from the `octocat/Spoon-Knife` repository, specify `owner` as `octocat` and `repo` as `Spoon-Knife`.
|
||||
Octokit.js で要求を行うと、パス パラメーターを含むすべてのパラメーターが、`request` メソッドの 2 番目の引数としてオブジェクトで渡されます。 `octocat/Spoon-Knife` リポジトリから issue を取得するには、`owner` を `octocat` として、`repo` を `Spoon-Knife` として指定します。
|
||||
|
||||
```javascript
|
||||
await octokit.request("GET /repos/{owner}/{repo}/issues", {
|
||||
@@ -378,15 +379,13 @@ await octokit.request("GET /repos/{owner}/{repo}/issues", {
|
||||
|
||||
{% curl %}
|
||||
|
||||
To get issues from the `octocat/Spoon-Knife` repository, replace `{owner}` with `octocat` and `{repo}` with `Spoon-Knife`. To build the full path, prepend the base URL for the {% data variables.product.prodname_dotcom %} REST API, `https://api.github.com`: `https://api.github.com/repos/octocat/Spoon-Knife/issues`.
|
||||
`octocat/Spoon-Knife` リポジトリから issue を取得するには、`{owner}` を `octocat`に、`{repo}` を `Spoon-Knife` に置き換えます。 完全なパスを構築するには、{% data variables.product.prodname_dotcom %} REST API のベース URL `https://api.github.com` を先頭に付加します (`https://api.github.com/repos/octocat/Spoon-Knife/issues`)。
|
||||
|
||||
{% ifversion ghes or ghae %}
|
||||
{% note %}
|
||||
{% ifversion ghes or ghae %} {% note %}
|
||||
|
||||
**Note:** If you want to use {% data variables.location.product_location %} instead of {% data variables.product.prodname_dotcom_the_website %}, use `{% data variables.product.api_url_code %}` instead of `https://api.github.com` and replace `[hostname]` with the name of {% data variables.location.product_location %}. Replace `octocat/Spoon-Knife` with a repository owned by {% data variables.location.product_location %}.
|
||||
**注:** {% data variables.product.prodname_dotcom_the_website %} の代わりに {% data variables.location.product_location %} を使用する場合は、`https://api.github.com` の代わりに `{% data variables.product.api_url_code %}`に使用し、`[hostname]` を {% data variables.location.product_location %}の名前に置き換えます。 `octocat/Spoon-Knife` を、{% data variables.location.product_location %}によって所有されているリポジトリに置き換えます。
|
||||
|
||||
{% endnote %}
|
||||
{% endif %}
|
||||
{% endnote %} {% endif %}
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
@@ -397,21 +396,21 @@ curl --request GET \
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
The operation returns a list of issues and data about each issue. For more information about using the response, see the "[Using the response](#using-the-response)" section.
|
||||
この操作では、issue のリストと各 issue に関するデータが返されます。 応答の使用について詳しくは、「[応答の使用](#using-the-response)」セクションを参照してください。
|
||||
|
||||
## Using query parameters
|
||||
## クエリ パラメーターの使用
|
||||
|
||||
Query parameters allow you to control what data is returned for a request. For example, a query parameter may let you specify how many items are returned when the response is paginated.
|
||||
クエリ パラメーターを使用すると、要求に対して返されるデータを制御できます。 たとえば、クエリ パラメーターを使用すると、応答のページ分割時に返される項目の数を指定できます。
|
||||
|
||||
By default, the "List repository issues" operation returns thirty issues, sorted in descending order by the date they were created. You can use the `per_page` parameter to return two issues instead of 30. You can use the `sort` parameter to sort the issues by the date they were last updated instead of by the date they were created. You can use the `direction` parameter to sort the results in ascending order instead of descending order.
|
||||
既定では、"リポジトリの issue の一覧表示" 操作で 30 個の issue が返され、作成日の降順で並べ替えられます。 `per_page` パラメーターを使用すると、30 個ではなく 2 個の issue を返すことができます。 `sort` パラメーターを使用すると、作成日ではなく、最終更新日で issue を並べ替えることができます。 `direction` パラメーターを使用すると、降順ではなく昇順で結果を並べ替えることができます。
|
||||
|
||||
{% cli %}
|
||||
|
||||
For {% data variables.product.prodname_cli %}, use the `-F` flag to pass a parameter that is a number, Boolean, or null. Use `-f` to pass string parameters.
|
||||
{% data variables.product.prodname_cli %} の場合は、`-F` フラグを使用して、数値、ブール値、または null 値のパラメーターを渡します。 文字列パラメーターを渡すには、`-f` を使用します。
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data variables.product.prodname_cli %} does not currently accept parameters that are arrays. For more information, see [this issue](https://github.com/cli/cli/issues/1484).
|
||||
**注**: {% data variables.product.prodname_cli %} では現在、配列のパラメーターは受け入れられていません。 詳しくは、[こちらの issue](https://github.com/cli/cli/issues/1484) を参照してください。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
@@ -423,7 +422,7 @@ gh api --header 'Accept: application/vnd.github+json' --method GET /repos/octoca
|
||||
|
||||
{% javascript %}
|
||||
|
||||
When you make a request with Octokit.js, all parameters, including query parameters, are passed in an object as the second argument to the `request` method.
|
||||
Octokit.js で要求を行うと、クエリ パラメーターを含むすべてのパラメーターが、`request` メソッドの 2 番目の引数としてオブジェクトで渡されます。
|
||||
|
||||
```javascript
|
||||
await octokit.request("GET /repos/{owner}/{repo}/issues", {
|
||||
@@ -439,7 +438,7 @@ await octokit.request("GET /repos/{owner}/{repo}/issues", {
|
||||
|
||||
{% curl %}
|
||||
|
||||
For cURL, add a `?` to the end of the path, then append your query parameter name and value in the form `parameter_name=value`. Separate multiple query parameters with `&`.
|
||||
cURL の場合は、パスの末尾に `?` を追加してから、クエリ パラメーターの名前と値を `parameter_name=value` 形式で付加します。 複数のクエリ パラメーターは `&` で区切ります。
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
@@ -450,21 +449,21 @@ curl --request GET \
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
The operation returns a list of issues and data about each issue. For more information about using the response, see the "[Using the response](#using-the-response)" section.
|
||||
この操作では、issue のリストと各 issue に関するデータが返されます。 応答の使用について詳しくは、「[応答の使用](#using-the-response)」セクションを参照してください。
|
||||
|
||||
## Using body parameters
|
||||
## 本文パラメーターの使用
|
||||
|
||||
Body parameters allow you to pass additional data to the API. For example, the "Create an issue" operation requires you to specify a title for the new issue. It also lets you specify other information, such as text to put in the issue body. For the full reference documentation for this operation, see "[Create an issue](/rest/issues/issues#create-an-issue)."
|
||||
本文パラメーターを使用すると、API に追加のデータを渡すことができます。 たとえば、"issue の作成" 操作では、新しい issue のタイトルを指定する必要があります。 また、issue 本文に配置するテキストなど、他の情報を指定することもできます。 この操作の完全なリファレンス ドキュメントについては、「[issue の作成](/rest/issues/issues#create-an-issue)」を参照してください。
|
||||
|
||||
The "Create an issue" operation uses the same path as the "List repository issues" operation in the examples above, but it uses a `POST` method instead of a `GET` method.
|
||||
"issue の作成" 操作では、上記の例の "リポジトリの issue の一覧表示" 操作と同じパスが使用されますが、`GET` メソッドではなく `POST` メソッドが使用されます。
|
||||
|
||||
{% cli %}
|
||||
|
||||
For {% data variables.product.prodname_cli %}, use the `-F` flag to pass a parameter that is a number, Boolean, or null. Use `-f` to pass string parameters.
|
||||
{% data variables.product.prodname_cli %} の場合は、`-F` フラグを使用して、数値、ブール値、または null 値のパラメーターを渡します。 文字列パラメーターを渡すには、`-f` を使用します。
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data variables.product.prodname_cli %} does not currently accept parameters that are arrays. For more information, see [this issue](https://github.com/cli/cli/issues/1484).
|
||||
**注**: {% data variables.product.prodname_cli %} では現在、配列のパラメーターは受け入れられていません。 詳しくは、[こちらの issue](https://github.com/cli/cli/issues/1484) を参照してください。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
@@ -480,13 +479,13 @@ gh api --header 'Accept: application/vnd.github+json' --method POST /repos/octoc
|
||||
|
||||
{% note %}
|
||||
|
||||
If you are using a {% data variables.product.pat_v2 %}, you must replace `octocat/Spoon-Knife` with a repository that you own or that is owned by an organization that you are a member of. Your token must have access to that repository and have read and write permissions for repository issues. For more information about creating a repository, see "[Create a repo](/get-started/quickstart/create-a-repo)." For more information about granting access and permissions to a {% data variables.product.pat_v2 %}, see "[Creating a {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)."
|
||||
{% data variables.product.pat_v2 %}を使用している場合は、`octocat/Spoon-Knife` を、自分が所有している、または自分がメンバーである Organization によって所有されているリポジトリに置き換える必要があります。 お使いのトークンは、リポジトリにアクセスできる必要があり、リポジトリの issue に対する読み取りと書き込みのアクセス許可が必要です。 リポジトリの作成について詳しくは、「[リポジトリの作成](/get-started/quickstart/create-a-repo)」を参照してください。 {% data variables.product.pat_v2 %}へのアクセスとアクセス許可の付与について詳しくは、「[{% data variables.product.pat_generic %}の作成](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)」を参照してください。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
When you make a request with Octokit.js, all parameters, including body parameters, are passed in an object as the second argument to the `request` method.
|
||||
Octokit.js で要求を行うと、本文パラメーターを含むすべてのパラメーターが、`request` メソッドの 2 番目の引数としてオブジェクトで渡されます。
|
||||
|
||||
```javascript
|
||||
await octokit.request("POST /repos/{owner}/{repo}/issues", {
|
||||
@@ -505,13 +504,13 @@ await octokit.request("POST /repos/{owner}/{repo}/issues", {
|
||||
|
||||
{% note %}
|
||||
|
||||
If you are using a {% data variables.product.pat_v2 %}, you must replace `octocat/Spoon-Knife` with a repository that you own or that is owned by an organization that you are a member of. Your token must have access to that repository and have read and write permissions for repository issues. For more information about creating a repository, see "[Create a repo](/get-started/quickstart/create-a-repo)." For more information about granting access and permissions to a {% data variables.product.pat_v2 %}, see "[Creating a {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)."
|
||||
{% data variables.product.pat_v2 %}を使用している場合は、`octocat/Spoon-Knife` を、自分が所有している、または自分がメンバーである Organization によって所有されているリポジトリに置き換える必要があります。 お使いのトークンは、リポジトリにアクセスできる必要があり、リポジトリの issue に対する読み取りと書き込みのアクセス許可が必要です。 リポジトリの作成について詳しくは、「[リポジトリの作成](/get-started/quickstart/create-a-repo)」を参照してください。 {% data variables.product.pat_v2 %}へのアクセスとアクセス許可の付与について詳しくは、「[{% data variables.product.pat_generic %}の作成](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)」を参照してください。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
For cURL, use the `--data` flag to pass the body parameters in a JSON object.
|
||||
cURL の場合は、`--data` フラグを使用して JSON オブジェクトで本文パラメーターを渡します。
|
||||
|
||||
```shell
|
||||
curl --request POST \
|
||||
@@ -526,27 +525,27 @@ curl --request POST \
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
The operation creates an issue and returns data about the new issue. In the response, find the `html_url` of your issue and navigate to your issue in the browser. For more information about using the response, see the "[Using the response](#using-the-response)" section.
|
||||
この操作によって issue が作成され、新しい issue に関するデータが返されます。 応答で、issue の `html_url` を見つけ、ブラウザーでその issue に移動します。 応答の使用について詳しくは、「[応答の使用](#using-the-response)」セクションを参照してください。
|
||||
|
||||
## Using the response
|
||||
## 応答の使用
|
||||
|
||||
### About the response code and headers
|
||||
### 応答コードとヘッダーについて
|
||||
|
||||
Every request will return an HTTP status code that indicates the success of the response. For more information about response codes, see [the MDN HTTP response status code documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status).
|
||||
すべての要求で、応答の成功を示す HTTP 状態コードが返されます。 応答コードについて詳しくは、[MDN HTTP 応答状態コードに関するドキュメント](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status)を参照してください。
|
||||
|
||||
Additionally, the response will include headers that give more details about the response. Headers that start with `X-` or `x-` are custom to {% data variables.product.company_short %}. For example, the `x-ratelimit-remaining` and `x-ratelimit-reset` headers tell you how many requests you can make in a time period.
|
||||
さらに、応答には、応答の詳細を示すヘッダーが含まれます。 `X-` または `x-` で始まるものは、{% data variables.product.company_short %} のカスタム ヘッダーです。 たとえば、`x-ratelimit-remaining` と `x-ratelimit-reset` ヘッダーは、一定期間に行うことができる要求の数を示します。
|
||||
|
||||
{% cli %}
|
||||
|
||||
To view the status code and headers, use the `--include` or `--i` flag when you send your request.
|
||||
状態コードとヘッダーを表示するには、要求を送信するときに `--include` または `--i` フラグを使用します。
|
||||
|
||||
For example, this request:
|
||||
たとえば、次の要求があります。
|
||||
|
||||
```shell
|
||||
gh api --header 'Accept: application/vnd.github+json' --method GET /repos/octocat/Spoon-Knife/issues -F per_page=2 --include
|
||||
```
|
||||
|
||||
returns the response code and headers like:
|
||||
次のような応答コードとヘッダーが返されます。
|
||||
|
||||
```shell
|
||||
HTTP/2.0 200 OK
|
||||
@@ -578,15 +577,15 @@ X-Ratelimit-Used: 4
|
||||
X-Xss-Protection: 0
|
||||
```
|
||||
|
||||
In this example, the response code is `200`, which indicates a successful request.
|
||||
この例では、応答コードは `200` で、要求が成功したことを示します。
|
||||
|
||||
{% endcli %}
|
||||
|
||||
{% javascript %}
|
||||
|
||||
When you make a request with Octokit.js, the `request` method returns a promise. If the request was successful, the promise resolves to an object that includes the HTTP status code of the response (`status`) and the response headers (`headers`). If an error occurs, the promise resolves to an object that includes the HTTP status code of the response (`status`) and the response headers (`response.headers`).
|
||||
Octokit.js で要求を行うと、`request` メソッドでは promise が返されます。 要求が成功した場合、promise は、応答のHTTP 状態コード (`status`) と応答ヘッダー (`headers`) を含むオブジェクトに解決されます。 エラーが発生した場合、promise は、応答のHTTP 状態コード (`status`) と応答ヘッダー (`response.headers`) を含むオブジェクトに解決されます。
|
||||
|
||||
You can use a `try/catch` block to catch an error if it occurs. For example, if the request in the following script is successful, the script will log the status code and the value of the `x-ratelimit-remaining` header. If the request was not successful, the script will log the status code, the value of the `x-ratelimit-remaining` header, and the error message.
|
||||
`try/catch` ブロックを使用して、エラーが発生した場合にそれをキャッチできます。 たとえば、次のスクリプトの要求が成功した場合、そのスクリプトでは状態コードと `x-ratelimit-remaining` ヘッダーの値がログに記録されます。 要求が成功しなかった場合、スクリプトでは状態コード、`x-ratelimit-remaining` ヘッダーの値、およびエラー メッセージがログに記録されます。
|
||||
|
||||
```javascript
|
||||
try {
|
||||
@@ -607,9 +606,9 @@ try {
|
||||
|
||||
{% curl %}
|
||||
|
||||
To view the status code and headers, use the `--include` or `--i` flag when you send your request.
|
||||
状態コードとヘッダーを表示するには、要求を送信するときに `--include` または `--i` フラグを使用します。
|
||||
|
||||
For example, this request:
|
||||
たとえば、次の要求があります。
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
@@ -619,7 +618,7 @@ curl --request GET \
|
||||
--include
|
||||
```
|
||||
|
||||
returns the response code and headers like:
|
||||
次のような応答コードとヘッダーが返されます。
|
||||
|
||||
```shell
|
||||
HTTP/2 200
|
||||
@@ -649,13 +648,13 @@ content-length: 4936
|
||||
x-github-request-id: 14E0:4BC6:F1B8BA:208E317:62EC2715
|
||||
```
|
||||
|
||||
In this example, the response code is `200`, which indicates a successful request.
|
||||
この例では、応答コードは `200` で、要求が成功したことを示します。
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
### About the response body
|
||||
### 応答本文について
|
||||
|
||||
Many operations will return a response body. Unless otherwise specified, the response body is in JSON format. For example, this request returns a list of issues with data about each issue:
|
||||
多くの操作で応答本文が返されます。 特に指定しない限り、応答本文は JSON 形式となります。 たとえば、この要求では、各 issue に関するデータと共に issue のリストが返されます。
|
||||
|
||||
{% cli %}
|
||||
|
||||
@@ -688,23 +687,23 @@ curl --request GET \
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
Unlike the GraphQL API where you specify what information you want, the REST API typically returns more information than you need. If desired, you can parse the response to pull out specific pieces of information.
|
||||
必要な情報を指定する GraphQL API とは異なり、REST API では通常、必要以上の情報が返されます。 必要に応じて、応答を解析して特定の情報を引き出すことができます。
|
||||
|
||||
{% cli %}
|
||||
|
||||
For example, you can use `>` to redirect the response to a file:
|
||||
たとえば、`>` を使用して、応答をファイルにリダイレクトできます。
|
||||
|
||||
```shell
|
||||
gh api --header 'Accept: application/vnd.github+json' --method GET /repos/octocat/Spoon-Knife/issues -F per_page=2 > data.json
|
||||
```
|
||||
|
||||
Then you can use jq to get the title and author ID of each issue:
|
||||
その後、jq を使用して、各 issue のタイトルと作成者 ID を取得できます。
|
||||
|
||||
```shell
|
||||
jq '.[] | {title: .title, authorID: .user.id}' data.json
|
||||
```
|
||||
|
||||
The previous two commands return something like:
|
||||
前の 2 つのコマンドでは次のようなものが返されます。
|
||||
|
||||
```
|
||||
{
|
||||
@@ -717,13 +716,13 @@ The previous two commands return something like:
|
||||
}
|
||||
```
|
||||
|
||||
For more information about jq, see [the jq documentation](https://stedolan.github.io/jq/) and [jq play](https://jqplay.org/).
|
||||
jq について詳しくは、[jq のドキュメント](https://stedolan.github.io/jq/)と [jq play](https://jqplay.org/) を参照してください。
|
||||
|
||||
{% endcli %}
|
||||
|
||||
{% javascript %}
|
||||
|
||||
For example, you can get the title and author ID of each issue:
|
||||
たとえば、各 issue のタイトルと作成者 ID を取得できます。
|
||||
|
||||
```javascript
|
||||
try {
|
||||
@@ -746,7 +745,7 @@ try {
|
||||
|
||||
{% curl %}
|
||||
|
||||
For example, you can use `>` to redirect the response to a file:
|
||||
たとえば、`>` を使用して、応答をファイルにリダイレクトできます。
|
||||
|
||||
```shell
|
||||
curl --request GET \
|
||||
@@ -755,13 +754,13 @@ curl --request GET \
|
||||
--header "Authorization: Bearer YOUR-TOKEN" > data.json
|
||||
```
|
||||
|
||||
Then you can use jq to get the title and author ID of each issue:
|
||||
その後、jq を使用して、各 issue のタイトルと作成者 ID を取得できます。
|
||||
|
||||
```shell
|
||||
jq '.[] | {title: .title, authorID: .user.id}' data.json
|
||||
```
|
||||
|
||||
The previous two commands return something like:
|
||||
前の 2 つのコマンドでは次のようなものが返されます。
|
||||
|
||||
```
|
||||
{
|
||||
@@ -774,12 +773,12 @@ The previous two commands return something like:
|
||||
}
|
||||
```
|
||||
|
||||
For more information about jq, see [the jq documentation](https://stedolan.github.io/jq/) and [jq play](https://jqplay.org/).
|
||||
jq について詳しくは、[jq のドキュメント](https://stedolan.github.io/jq/)と [jq play](https://jqplay.org/) を参照してください。
|
||||
|
||||
{% endcurl %}
|
||||
|
||||
## Next steps
|
||||
## 次の手順
|
||||
|
||||
This article demonstrated how to list and create issues in a repository. For more practice, try to comment on an issue, edit the title of an issue, or close an issue. For more information about these operations, see "[Create an issue comment](/rest/issues#create-an-issue-comment)" and "[Update an issue](/rest/issues/issues#update-an-issue)."
|
||||
この記事では、リポジトリの issue を一覧表示して作成する方法について説明しました。 さらに練習する場合は、issue にコメントを付けたり、issue のタイトルを編集したり、issue を閉じてみたりしてください。 これらの操作について詳しくは、「[issue コメントの作成](/rest/issues#create-an-issue-comment)」と「[issue の更新](/rest/issues/issues#update-an-issue)」を参照してください。
|
||||
|
||||
For more information about the operations that you can use, see the [REST reference documentation](/rest).
|
||||
使用できる操作について詳しくは、[REST リファレンス ドキュメント](/rest)を参照してください。
|
||||
|
||||
@@ -5,12 +5,12 @@ versions:
|
||||
feature: pat-v2
|
||||
miniTocMaxHeadingLevel: 3
|
||||
shortTitle: '{% data variables.product.pat_v2_caps %} permissions'
|
||||
ms.openlocfilehash: 97154c54229f66f3a6b3bf852f7aabab89a0d2ee
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.openlocfilehash: 46a82b0212d4cda2b6883c0b33ba2acb2e50b9d0
|
||||
ms.sourcegitcommit: d2f0b59ed096b9e68ef8f6fa019cd925165762ec
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148107686'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148184213'
|
||||
---
|
||||
## {% data variables.product.pat_v2 %} に必要なアクセス許可について
|
||||
|
||||
@@ -65,11 +65,10 @@ ms.locfileid: '148107686'
|
||||
- [`PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`](/rest/reference/teams/#add-or-update-team-repository-permissions) (書き込み)
|
||||
- [`DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`](/rest/reference/teams/#remove-a-repository-from-a-team) (書き込み)
|
||||
- [`POST /orgs/{org}/repos`](/rest/reference/repos#create-an-organization-repository) (書き込み)
|
||||
- [`PATCH /repos/{owner}/{repo}`](/rest/reference/repos/#update-a-repository) (書き込み)
|
||||
- [`PATCH /repos/{owner}/{repo}`](/rest/repos/repos#update-a-repository) (書き込み)
|
||||
- [`DELETE /repos/{owner}/{repo}`](/rest/reference/repos#delete-a-repository) (書き込み)
|
||||
- [`POST /repos/{owner}/{repo}/forks`](/rest/reference/repos#create-a-fork) (書き込み)
|
||||
- [`GET /repos/{owner}/{repo}/teams`](/rest/reference/repos#list-repository-teams) (読み取り)
|
||||
- [`POST /repos/{owner}/{repo}/transfer`](/rest/reference/repos#transfer-a-repository) (書き込み)
|
||||
- [`POST /user/repos`](/rest/reference/repos#create-a-repository-for-the-authenticated-user) (書き込み)
|
||||
- [`GET /repos/{owner}/{repo}/actions/permissions`](/rest/reference/actions#get-github-actions-permissions-for-a-repository) (読み取り)
|
||||
- [`PUT /repos/{owner}/{repo}/actions/permissions`](/rest/reference/actions#set-github-actions-permissions-for-a-repository) (書き込み)
|
||||
@@ -130,16 +129,6 @@ ms.locfileid: '148107686'
|
||||
|
||||
## チェック
|
||||
|
||||
- [`POST /repos/{owner}/{repo}/check-runs`](/rest/reference/checks#create-a-check-run) (書き込み)
|
||||
- [`GET /repos/{owner}/{repo}/check-runs/{check_run_id}`](/rest/reference/checks#get-a-check-run) (読み取り)
|
||||
- [`PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}`](/rest/reference/checks#update-a-check-run) (書き込み)
|
||||
- [`GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations`](/rest/reference/checks#list-check-run-annotations) (読み取り)
|
||||
- [`POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest`](/rest/reference/checks#rerequest-a-check-run) (書き込み)
|
||||
- [`GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs`](/rest/reference/checks#list-check-runs-in-a-check-suite) (読み取り)
|
||||
- [`POST /repos/{owner}/{repo}/check-suites`](/rest/reference/checks#create-a-check-suite) (書き込み)
|
||||
- [`GET /repos/{owner}/{repo}/check-suites/{check_suite_id}`](/rest/reference/checks#get-a-check-suite) (読み取り)
|
||||
- [`POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest`](/rest/reference/checks#rerequest-a-check-suite) (書き込み)
|
||||
- [`PATCH /repos/{owner}/{repo}/check-suites/preferences`](/rest/reference/checks#update-repository-preferences-for-check-suites) (書き込み)
|
||||
- [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/reference/actions#review-pending-deployments-for-a-workflow-run) (読み取り)
|
||||
|
||||
## Codespaces
|
||||
@@ -196,20 +185,12 @@ ms.locfileid: '148107686'
|
||||
- [`POST /repos/{owner}/{repo}/git/refs`](/rest/reference/git#create-a-reference) (書き込み)
|
||||
- [`POST /repos/{owner}/{repo}/git/tags`](/rest/reference/git#create-a-tag-object) (書き込み)
|
||||
- [`POST /repos/{owner}/{repo}/git/trees`](/rest/reference/git#create-a-tree) (書き込み)
|
||||
- [`GET /repos/{owner}/{repo}/import`](/rest/reference/migrations#get-an-import-status) (読み取り)
|
||||
- [`PUT /repos/{owner}/{repo}/import`](/rest/reference/migrations#start-an-import) (書き込み)
|
||||
- [`PATCH /repos/{owner}/{repo}/import`](/rest/reference/migrations#update-an-import) (書き込み)
|
||||
- [`DELETE /repos/{owner}/{repo}/import`](/rest/reference/migrations#cancel-an-import) (書き込み)
|
||||
- [`GET /repos/{owner}/{repo}/import/authors`](/rest/reference/migrations#get-commit-authors) (読み取り)
|
||||
- [`PATCH /repos/{owner}/{repo}/import/authors/{author_id}`](/rest/reference/migrations#map-a-commit-author) (書き込み)
|
||||
- [`GET /repos/{owner}/{repo}/import/large_files`](/rest/reference/migrations#get-large-files) (読み取り)
|
||||
- [`PATCH /repos/{owner}/{repo}/import/lfs`](/rest/reference/migrations#update-git-lfs-preference) (書き込み)
|
||||
- [`PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge`](/rest/reference/pulls#merge-a-pull-request) (書き込み)
|
||||
- [`POST /repos/{owner}/{repo}/comments/{comment_id}/reactions`](/rest/reference/reactions#create-reaction-for-a-commit-comment) (書き込み)
|
||||
- [`DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}`](/rest/reference/reactions#delete-a-commit-comment-reaction) (書き込み)
|
||||
- [`GET /repos/{owner}/{repo}/branches`](/rest/reference/repos#list-branches) (読み取り)
|
||||
- [`POST /repos/{owner}/{repo}/merge-upstream`](/rest/reference/repos#sync-a-fork-branch-with-the-upstream-repository) (書き込み)
|
||||
- [`POST /repos/{owner}/{repo}/merges`](/rest/reference/repos#merge-a-branch) (書き込み)
|
||||
- [`GET /repos/{owner}/{repo}/branches`](/rest/branches/branches#list-branches) (読み取り)
|
||||
- [`POST /repos/{owner}/{repo}/merge-upstream`](/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository) (書き込み)
|
||||
- [`POST /repos/{owner}/{repo}/merges`](/rest/branches/branches#merge-a-branch) (書き込み)
|
||||
- [`GET /repos/{owner}/{repo}/code-scanning/codeql/databases`](/rest/reference/code-scanning#list-codeql-databases) (読み取り)
|
||||
- [`GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`](/rest/reference/code-scanning#get-codeql-database) (読み取り)
|
||||
- [`PATCH /repos/{owner}/{repo}/comments/{comment_id}`](/rest/commits/comments#update-a-commit-comment) (書き込み)
|
||||
@@ -320,7 +301,7 @@ ms.locfileid: '148107686'
|
||||
- [`GET /repos/{owner}/{repo}/issues`](/rest/reference/issues#list-repository-issues) (読み取り)
|
||||
- [`POST /repos/{owner}/{repo}/issues`](/rest/reference/issues#create-an-issue) (書き込み)
|
||||
- [`GET /repos/{owner}/{repo}/issues/{issue_number}`](/rest/reference/issues#get-an-issue) (読み取り)
|
||||
- [`PATCH /repos/{owner}/{repo}/issues/{issue_number}`](/rest/reference/issues/#update-an-issue) (書き込み)
|
||||
- [`PATCH /repos/{owner}/{repo}/issues/{issue_number}`](/rest/reference/issues#update-an-issue) (書き込み)
|
||||
- [`PUT /repos/{owner}/{repo}/issues/{issue_number}/lock`](/rest/reference/issues#lock-an-issue) (書き込み)
|
||||
- [`DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock`](/rest/reference/issues#unlock-an-issue) (書き込み)
|
||||
- [`GET /repos/{owner}/{repo}/issues/{issue_number}/labels`](/rest/reference/issues#list-labels-for-an-issue) (読み取り)
|
||||
@@ -409,7 +390,6 @@ ms.locfileid: '148107686'
|
||||
- [`POST /gists/{gist_id}/forks`](/rest/reference/gists#fork-a-gist) (読み取り)
|
||||
- [`PUT /gists/{gist_id}/star`](/rest/reference/gists#star-a-gist) (読み取り)
|
||||
- [`DELETE /gists/{gist_id}/star`](/rest/reference/gists#unstar-a-gist) (読み取り)
|
||||
- [`GET /notifications`](/rest/reference/activity#list-notifications-for-the-authenticated-user) (読み取り)
|
||||
- [`GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`](/rest/reference/teams/#check-team-permissions-for-a-repository) (読み取り)
|
||||
- [`PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`](/rest/reference/teams/#add-or-update-team-repository-permissions) (読み取り)
|
||||
- [`DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`](/rest/reference/teams/#remove-a-repository-from-a-team) (読み取り)
|
||||
@@ -439,10 +419,6 @@ ms.locfileid: '148107686'
|
||||
- [`GET /search/labels`](/rest/reference/search#search-labels) (読み取り)
|
||||
- [`GET /repos/{owner}/{repo}/topics`](/rest/reference/repos#get-all-repository-topics) (読み取り)
|
||||
|
||||
## 通知
|
||||
|
||||
- [`GET /notifications`](/rest/reference/activity#list-notifications-for-the-authenticated-user) (読み取り)
|
||||
|
||||
## 組織管理
|
||||
|
||||
{% ifversion ghec %}- [`GET /orgs/{org}/audit-log`](/rest/reference/orgs#get-audit-log) (読み取り){% endif %}
|
||||
@@ -467,7 +443,7 @@ ms.locfileid: '148107686'
|
||||
- [`GET /orgs/{org}/security-managers`](/rest/reference/orgs#list-security-manager-teams) (読み取り)
|
||||
- [`PUT /orgs/{org}/security-managers/teams/{team_slug}`](/rest/reference/orgs#add-a-security-manager-team) (書き込み)
|
||||
- [`DELETE /orgs/{org}/security-managers/teams/{team_slug}`](/rest/reference/orgs#remove-a-security-manager-team) (書き込み)
|
||||
- [`PATCH /orgs/{org}`](/rest/reference/orgs/#update-an-organization) (書き込み)
|
||||
- [`PATCH /orgs/{org}`](/rest/reference/orgs#update-an-organization) (書き込み)
|
||||
- [`GET /orgs/{org}/installations`](/rest/reference/orgs#list-app-installations-for-an-organization) (読み取り)
|
||||
|
||||
## Organization の codespace
|
||||
@@ -491,6 +467,7 @@ ms.locfileid: '148107686'
|
||||
## Organization のカスタム役割
|
||||
|
||||
- [`GET /organizations/{organization_id}/custom_roles`](/rest/reference/orgs#list-custom-repository-roles-in-an-organization) (読み取り)
|
||||
- [`GET /orgs/{org}/custom_roles/{role_id}`](/rest/reference/orgs/#get-a-custom-role) (読み取り)
|
||||
- [`PATCH /orgs/{org}/custom_roles/{role_id}`](/rest/reference/orgs#update-a-custom-role) (書き込み)
|
||||
- [`DELETE /orgs/{org}/custom_roles/{role_id}`](/rest/reference/orgs#delete-a-custom-role) (書き込み)
|
||||
- [`GET /orgs/{org}/fine_grained_permissions`](/rest/reference/orgs#list-fine-grained-permissions-for-an-organization) (読み取り)
|
||||
@@ -523,13 +500,6 @@ ms.locfileid: '148107686'
|
||||
- [`POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts`](/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook) (書き込み)
|
||||
- [`POST /orgs/{org}/hooks/{hook_id}/pings`](/rest/reference/orgs#ping-an-organization-webhook) (書き込み)
|
||||
|
||||
## Organization のプロジェクト
|
||||
|
||||
- [`PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}`](/rest/reference/teams#add-or-update-team-project-permissions) (管理者)
|
||||
- [`DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}`](/rest/reference/teams#remove-a-project-from-a-team) (管理者)
|
||||
- [`GET /orgs/{org}/projects`](/rest/reference/projects#list-organization-projects) (読み取り)
|
||||
- [`POST /orgs/{org}/projects`](/rest/reference/projects#create-an-organization-project) (書き込み)
|
||||
|
||||
## Organization のシークレット
|
||||
|
||||
- [`GET /orgs/{org}/actions/secrets`](/rest/reference/actions#list-organization-secrets) (読み取り)
|
||||
@@ -640,30 +610,6 @@ ms.locfileid: '148107686'
|
||||
- [`POST /repos/{owner}/{repo}/hooks/{hook_id}/pings`](/rest/webhooks/repos#ping-a-repository-webhook) (読み取り)
|
||||
- [`POST /repos/{owner}/{repo}/hooks/{hook_id}/tests`](/rest/webhooks/repos#test-the-push-repository-webhook) (読み取り)
|
||||
|
||||
## リポジトリ プロジェクト
|
||||
|
||||
- [`GET /projects/{project_id}/collaborators`](/rest/reference/projects#list-project-collaborators) (書き込み)
|
||||
- [`PUT /projects/{project_id}/collaborators/{username}`](/rest/reference/projects#add-project-collaborator) (書き込み)
|
||||
- [`DELETE /projects/{project_id}/collaborators/{username}`](/rest/reference/projects#remove-project-collaborator) (書き込み)
|
||||
- [`GET /projects/{project_id}/collaborators/{username}/permission`](/rest/reference/projects#get-project-permission-for-a-user) (書き込み)
|
||||
- [`GET /projects/{project_id}`](/rest/reference/projects#get-a-project) (読み取り)
|
||||
- [`PATCH /projects/{project_id}`](/rest/reference/projects#update-a-project) (書き込み)
|
||||
- [`DELETE /projects/{project_id}`](/rest/reference/projects#delete-a-project) (書き込み)
|
||||
- [`GET /projects/{project_id}/columns`](/rest/reference/projects#list-project-columns) (読み取り)
|
||||
- [`POST /projects/{project_id}/columns`](/rest/reference/projects#create-a-project-column) (書き込み)
|
||||
- [`GET /projects/columns/{column_id}`](/rest/reference/projects#get-a-project-column) (読み取り)
|
||||
- [`PATCH /projects/columns/{column_id}`](/rest/reference/projects#update-a-project-column) (書き込み)
|
||||
- [`DELETE /projects/columns/{column_id}`](/rest/reference/projects#delete-a-project-column) (書き込み)
|
||||
- [`GET /projects/columns/{column_id}/cards`](/rest/reference/projects#list-project-cards) (読み取り)
|
||||
- [`POST /projects/columns/{column_id}/cards`](/rest/reference/projects#create-a-project-card) (書き込み)
|
||||
- [`POST /projects/columns/{column_id}/moves`](/rest/reference/projects#move-a-project-column) (書き込み)
|
||||
- [`GET /projects/columns/cards/{card_id}`](/rest/reference/projects#get-a-project-card) (読み取り)
|
||||
- [`PATCH /projects/columns/cards/{card_id}`](/rest/reference/projects#update-a-project-card) (書き込み)
|
||||
- [`DELETE /projects/columns/cards/{card_id}`](/rest/reference/projects#delete-a-project-card) (書き込み)
|
||||
- [`POST /projects/columns/cards/{card_id}/moves`](/rest/reference/projects#move-a-project-card) (書き込み)
|
||||
- [`GET /repos/{owner}/{repo}/projects`](/rest/reference/projects#list-repository-projects) (読み取り)
|
||||
- [`POST /repos/{owner}/{repo}/projects`](/rest/reference/projects#create-a-repository-project) (書き込み)
|
||||
|
||||
## シークレット スキャンのアラート
|
||||
|
||||
- [`GET /orgs/{org}/secret-scanning/alerts`](/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization) (読み取り)
|
||||
@@ -727,6 +673,10 @@ ms.locfileid: '148107686'
|
||||
- [`PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}`](/rest/reference/teams#update-a-discussion-comment) (書き込み)
|
||||
- [`DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}`](/rest/reference/teams#delete-a-discussion-comment) (書き込み)
|
||||
|
||||
## 脆弱性アラート
|
||||
|
||||
- [`GET /orgs/{org}/dependabot/alerts`](/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization) (読み取り)
|
||||
|
||||
## Watch中
|
||||
|
||||
- [`GET /users/{username}/subscriptions`](/rest/reference/activity#list-repositories-watched-by-a-user) (読み取り)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Resources in the REST API
|
||||
intro: 'Learn how to navigate the resources provided by the {% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} API.'
|
||||
title: REST API のリソース
|
||||
intro: '{% ifversion fpt or ghec %}{% data variables.product.prodname_dotcom %}{% else %}{% data variables.product.product_name %}{% endif %} APIが提供するリソースにアクセスする方法を学んでください。'
|
||||
redirect_from:
|
||||
- /rest/initialize-the-repo
|
||||
versions:
|
||||
@@ -11,19 +11,23 @@ versions:
|
||||
miniTocMaxHeadingLevel: 3
|
||||
topics:
|
||||
- API
|
||||
ms.openlocfilehash: dc16916ada20275d41f23a8bc006cc79ddf51120
|
||||
ms.sourcegitcommit: d2f0b59ed096b9e68ef8f6fa019cd925165762ec
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148184270'
|
||||
---
|
||||
|
||||
{% ifversion api-date-versioning %}
|
||||
## API version
|
||||
## API バージョン
|
||||
|
||||
Available resources may vary between REST API versions. You should use the `X-GitHub-Api-Version` header to specify an API version. For more information, see "[API Versions](/rest/overview/api-versions)."
|
||||
使用可能なリソースは、REST API のバージョンによって異なる場合があります。 `X-GitHub-Api-Version` ヘッダーを使用して、API のバージョンを指定する必要があります。 詳しい情報については、「[API のバージョン](/rest/overview/api-versions)」を参照してください。
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Schema
|
||||
## スキーマ
|
||||
|
||||
{% ifversion fpt or ghec %}All API access is over HTTPS, and{% else %}The API is{% endif %} accessed from `{% data variables.product.api_url_code %}`. All data is
|
||||
sent and received as JSON.
|
||||
{% ifversion fpt or ghec %}すべての API アクセスは HTTPS 経由であり、{% else %}API は {% endif %}`{% data variables.product.api_url_code %}` からアクセスされます。 すべてのデータは JSON として送受信されます。
|
||||
|
||||
```shell
|
||||
$ curl -I {% data variables.product.api_url_pre %}/users/octocat/orgs
|
||||
@@ -44,55 +48,45 @@ $ curl -I {% data variables.product.api_url_pre %}/users/octocat/orgs
|
||||
> X-Content-Type-Options: nosniff
|
||||
```
|
||||
|
||||
Blank fields are included as `null` instead of being omitted.
|
||||
空白のフィールドは、省略されるのではなく `null` として含まれます。
|
||||
|
||||
All timestamps return in UTC time, ISO 8601 format:
|
||||
すべてのタイムスタンプは、 ISO 8601フォーマットのUTC時間で返されます。
|
||||
|
||||
YYYY-MM-DDTHH:MM:SSZ
|
||||
|
||||
For more information about timezones in timestamps, see [this section](#timezones).
|
||||
タイムスタンプのタイムゾーンの詳細については、[このセクション](#timezones)を参照してください。
|
||||
|
||||
### Summary representations
|
||||
### 要約表現
|
||||
|
||||
When you fetch a list of resources, the response includes a _subset_ of the
|
||||
attributes for that resource. This is the "summary" representation of the
|
||||
resource. (Some attributes are computationally expensive for the API to provide.
|
||||
For performance reasons, the summary representation excludes those attributes.
|
||||
To obtain those attributes, fetch the "detailed" representation.)
|
||||
リソースのリストをフェッチすると、レスポンスにはそのリソースの属性の _サブセット_ が含まれます。 これは、リソースの「要約」表現です。 (一部の属性では、API が提供する計算コストが高くなります。
|
||||
パフォーマンス上の理由から、要約表現はそれらの属性を除外します。
|
||||
これらの属性を取得するには、「詳細な」表現をフェッチします。)
|
||||
|
||||
**Example**: When you get a list of repositories, you get the summary
|
||||
representation of each repository. Here, we fetch the list of repositories owned
|
||||
by the [octokit](https://github.com/octokit) organization:
|
||||
**例**: リポジトリのリストを取得すると、各リポジトリの要約表現が表示されます。 ここで、[octokit](https://github.com/octokit) 組織が所有するリポジトリの一覧を取得します。
|
||||
|
||||
GET /orgs/octokit/repos
|
||||
|
||||
### Detailed representations
|
||||
### 詳細な表現
|
||||
|
||||
When you fetch an individual resource, the response typically includes _all_
|
||||
attributes for that resource. This is the "detailed" representation of the
|
||||
resource. (Note that authorization sometimes influences the amount of detail
|
||||
included in the representation.)
|
||||
個々のリソースをフェッチすると、通常、レスポンスにはそのリソースの _すべて_ の属性が含まれます。 これは、リソースの「詳細」表現です。 (承認によって、表現に含まれる詳細の内容に影響する場合があることにご注意ください。)
|
||||
|
||||
**Example**: When you get an individual repository, you get the detailed
|
||||
representation of the repository. Here, we fetch the
|
||||
[octokit/octokit.rb](https://github.com/octokit/octokit.rb) repository:
|
||||
**例**: 個別のリポジトリを取得すると、リポジトリの詳細表現が表示されます。 ここで、[octokit/octokit.rb](https://github.com/octokit/octokit.rb) リポジトリを取得します。
|
||||
|
||||
GET /repos/octokit/octokit.rb
|
||||
|
||||
The documentation provides an example response for each API method. The example
|
||||
response illustrates all attributes that are returned by that method.
|
||||
ドキュメントには、各 API メソッドのレスポンス例が記載されています。 レスポンス例は、そのメソッドによって返されるすべての属性を示しています。
|
||||
|
||||
## Authentication
|
||||
## 認証
|
||||
|
||||
{% ifversion ghae %} We recommend authenticating to the {% data variables.product.product_name %} REST API by creating an OAuth2 token through the [web application flow](/developers/apps/authorizing-oauth-apps#web-application-flow). {% else %} There are two ways to authenticate through {% data variables.product.product_name %} REST API.{% endif %} Requests that require authentication will return `404 Not Found`, instead of `403 Forbidden`, in some places. This is to prevent the accidental leakage of private repositories to unauthorized users.
|
||||
{% ifversion ghae %} [Web アプリケーション フロー](/developers/apps/authorizing-oauth-apps#web-application-flow)を通じて OAuth2 トークンを作成して、{% data variables.product.product_name %} REST API に対して認証することをお勧めします。 {% else %}{% data variables.product.product_name %} REST API を使用して認証する方法は 2 つあります。{% endif %} 認証を必要とするリクエストは、場所によって `403 Forbidden` ではなく `404 Not Found` を返します。 これは、許可されていないユーザにプライベートリポジトリが誤って漏洩するのを防ぐためです。
|
||||
|
||||
### Basic authentication
|
||||
### [基本認証]
|
||||
|
||||
```shell
|
||||
$ curl -u "username" {% data variables.product.api_url_pre %}
|
||||
```
|
||||
|
||||
### OAuth2 token (sent in a header)
|
||||
### OAuth2 トークン(ヘッダに送信)
|
||||
|
||||
```shell
|
||||
$ curl -H "Authorization: Bearer OAUTH-TOKEN" {% data variables.product.api_url_pre %}
|
||||
@@ -100,20 +94,20 @@ $ curl -H "Authorization: Bearer OAUTH-TOKEN" {% data variables.product.api_url_
|
||||
|
||||
{% note %}
|
||||
|
||||
Note: GitHub recommends sending OAuth tokens using the Authorization header.
|
||||
注: GitHub では、Authorization ヘッダを使用して OAuth トークンを送信することをお勧めしています。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data reusables.getting-started.bearer-vs-token %}
|
||||
**注:** {% data reusables.getting-started.bearer-vs-token %}
|
||||
|
||||
{% endnote %}
|
||||
|
||||
Read [more about OAuth2](/apps/building-oauth-apps/). Note that OAuth2 tokens can be acquired using the [web application flow](/developers/apps/authorizing-oauth-apps#web-application-flow) for production applications.
|
||||
[OAuth2 の詳細](/apps/building-oauth-apps/)を確認します。 OAuth2 トークンは、実稼働アプリケーションの [Web アプリケーション フロー](/developers/apps/authorizing-oauth-apps#web-application-flow)を使用して取得できます。
|
||||
|
||||
{% ifversion fpt or ghes or ghec %}
|
||||
### OAuth2 key/secret
|
||||
### OAuth2 キー/シークレット
|
||||
|
||||
{% data reusables.apps.deprecating_auth_with_query_parameters %}
|
||||
|
||||
@@ -121,22 +115,20 @@ Read [more about OAuth2](/apps/building-oauth-apps/). Note that OAuth2 tokens c
|
||||
curl -u my_client_id:my_client_secret '{% data variables.product.api_url_pre %}/user/repos'
|
||||
```
|
||||
|
||||
Using your `client_id` and `client_secret` does _not_ authenticate as a user, it will only identify your OAuth App to increase your rate limit. Permissions are only granted to users, not applications, and you will only get back data that an unauthenticated user would see. For this reason, you should only use the OAuth2 key/secret in server-to-server scenarios. Don't leak your OAuth App's client secret to your users.
|
||||
`client_id` と `client_secret` を使用しても、ユーザーとして認証されることは _ありません_。OAuth アプリを識別してレート制限を引き上げるだけです。 アクセス許可はユーザにのみ付与され、アプリケーションには付与されません。また、認証されていないユーザに表示されるデータのみが返されます。 このため、サーバー間のシナリオでのみ OAuth2 キー/シークレットを使用する必要があります。 OAuth アプリケーションのクライアントシークレットをユーザーに漏らさないようにしてください。
|
||||
|
||||
{% ifversion ghes %}
|
||||
You will be unable to authenticate using your OAuth2 key and secret while in private mode, and trying to authenticate will return `401 Unauthorized`. For more information, see "[Enabling private mode](/admin/configuration/configuring-your-enterprise/enabling-private-mode)".
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% ifversion ghes %} プライベート モードでは、OAuth2 キーとシークレットを使用して認証することはできません。認証しようとすると `401 Unauthorized` が返されます。 詳細については、「[プライベート モードの有効化](/admin/configuration/configuring-your-enterprise/enabling-private-mode)」を参照してください。
|
||||
{% endif %} {% endif %}
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
Read [more about unauthenticated rate limiting](#increasing-the-unauthenticated-rate-limit-for-oauth-apps).
|
||||
[認証されていないレート制限の詳細](#increasing-the-unauthenticated-rate-limit-for-oauth-apps)を確認します。
|
||||
|
||||
{% endif %}
|
||||
|
||||
### Failed login limit
|
||||
### ログイン失敗の制限
|
||||
|
||||
Authenticating with invalid credentials will return `401 Unauthorized`:
|
||||
無効な資格情報で認証すると、`401 Unauthorized` が返されます。
|
||||
|
||||
```shell
|
||||
$ curl -I {% data variables.product.api_url_pre %} -u foo:bar
|
||||
@@ -148,9 +140,7 @@ $ curl -I {% data variables.product.api_url_pre %} -u foo:bar
|
||||
> }
|
||||
```
|
||||
|
||||
After detecting several requests with invalid credentials within a short period,
|
||||
the API will temporarily reject all authentication attempts for that user
|
||||
(including ones with valid credentials) with `403 Forbidden`:
|
||||
無効な認証情報を含むリクエストを短期間に複数回検出すると、API は、`403 Forbidden` で、そのユーザに対するすべての認証試行 (有効な認証情報による試行を含む) を一時的に拒否します。
|
||||
|
||||
```shell
|
||||
$ curl -i {% data variables.product.api_url_pre %} -u {% ifversion fpt or ghae or ghec %}
|
||||
@@ -162,62 +152,55 @@ $ curl -i {% data variables.product.api_url_pre %} -u {% ifversion fpt or ghae o
|
||||
> }
|
||||
```
|
||||
|
||||
## Parameters
|
||||
## パラメーター
|
||||
|
||||
Many API methods take optional parameters. For `GET` requests, any parameters not
|
||||
specified as a segment in the path can be passed as an HTTP query string
|
||||
parameter:
|
||||
多くの API メソッドはオプションのパラメータを選択しています。 `GET` リクエストでは、パスのセグメントとして指定されていないパラメーターは、HTTP クエリ文字列型パラメータとして渡すことができます。
|
||||
|
||||
```shell
|
||||
$ curl -i "{% data variables.product.api_url_pre %}/repos/vmg/redcarpet/issues?state=closed"
|
||||
```
|
||||
|
||||
In this example, the 'vmg' and 'redcarpet' values are provided for the `:owner`
|
||||
and `:repo` parameters in the path while `:state` is passed in the query
|
||||
string.
|
||||
この例では、'vmg' の値と 'redcarpet' の値がパスの `:owner` パラメーターと `:repo` パラメーターに指定されているいっぽうで、`:state` はクエリ文字列で渡されています。
|
||||
|
||||
For `POST`, `PATCH`, `PUT`, and `DELETE` requests, parameters not included in the URL should be encoded as JSON
|
||||
with a Content-Type of 'application/json':
|
||||
`POST`、`PATCH`、`PUT`、`DELETE` の要求については、URL に含まれていないパラメーターは Content-Type が 'application/json' の JSON としてエンコードする必要があります。
|
||||
|
||||
```shell
|
||||
$ curl -i -u username -d '{"scopes":["repo_deployment"]}' {% data variables.product.api_url_pre %}/authorizations
|
||||
```
|
||||
|
||||
## Root endpoint
|
||||
## ルート エンドポイント
|
||||
|
||||
You can issue a `GET` request to the root endpoint to get all the endpoint categories that the REST API supports:
|
||||
ルート エンドポイントに `GET` 要求を発行して、REST API がサポートするすべてのエンドポイント カテゴリを取得できます。
|
||||
|
||||
```shell
|
||||
$ curl {% ifversion fpt or ghae or ghec %}
|
||||
-u USERNAME:TOKEN {% endif %}{% ifversion ghes %}-u USERNAME:PASSWORD {% endif %}{% data variables.product.api_url_pre %}
|
||||
```
|
||||
|
||||
## GraphQL global node IDs
|
||||
## GraphQL グローバルノード ID
|
||||
|
||||
See the guide on "[Using Global Node IDs](/graphql/guides/using-global-node-ids)" for detailed information about how to find `node_id`s via the REST API and use them in GraphQL operations.
|
||||
REST API を使用して `node_id` を検索し、GraphQL 演算で使用する方法の詳細については、「[グローバル ノード ID の使用](/graphql/guides/using-global-node-ids)」に関するガイドを参照してください。
|
||||
|
||||
## Client errors
|
||||
## クライアントエラー
|
||||
|
||||
There are three possible types of client errors on API calls that
|
||||
receive request bodies:
|
||||
要求の本文を受信する API 呼び出しのクライアント エラーには、次の 3 つの種類があります。
|
||||
|
||||
1. Sending invalid JSON will result in a `400 Bad Request` response.
|
||||
1. 無効な JSON を送信すると、`400 Bad Request` 応答が返されます。
|
||||
|
||||
HTTP/2 400
|
||||
Content-Length: 35
|
||||
|
||||
{"message":"Problems parsing JSON"}
|
||||
|
||||
2. Sending the wrong type of JSON values will result in a `400 Bad
|
||||
Request` response.
|
||||
2. 間違った種類の JSON 値を送信すると、`400 Bad
|
||||
Request` 応答が発生します。
|
||||
|
||||
HTTP/2 400
|
||||
Content-Length: 40
|
||||
|
||||
{"message":"Body should be a JSON object"}
|
||||
|
||||
3. Sending invalid fields will result in a `422 Unprocessable Entity`
|
||||
response.
|
||||
3. 無効なフィールドを送信すると、`422 Unprocessable Entity` 応答が発生します。
|
||||
|
||||
HTTP/2 422
|
||||
Content-Length: 149
|
||||
@@ -233,60 +216,47 @@ receive request bodies:
|
||||
]
|
||||
}
|
||||
|
||||
All error objects have resource and field properties so that your client
|
||||
can tell what the problem is. There's also an error code to let you
|
||||
know what is wrong with the field. These are the possible validation error
|
||||
codes:
|
||||
すべてのエラー オブジェクトにはリソースとフィールドのプロパティがあるため、クライアントは何が問題かを認識することができます。 また、フィールドの問題点を知らせるエラー コードもあります。 発生する可能性のある検証エラー コードは次のとおりです。
|
||||
|
||||
Error code name | Description
|
||||
エラーコード名 | 説明
|
||||
-----------|-----------|
|
||||
`missing` | A resource does not exist.
|
||||
`missing_field` | A required field on a resource has not been set.
|
||||
`invalid` | The formatting of a field is invalid. Review the documentation for more specific information.
|
||||
`already_exists` | Another resource has the same value as this field. This can happen in resources that must have some unique key (such as label names).
|
||||
`unprocessable` | The inputs provided were invalid.
|
||||
`missing` | リソースが存在しません。
|
||||
`missing_field` | リソースの必須フィールドが設定されていません。
|
||||
`invalid` | フィールドのフォーマットが無効です。 詳細については、ドキュメントを参照してください。
|
||||
`already_exists` | 別のリソースに、このフィールドと同じ値があります。 これは、一意のキー(ラベル名など)が必要なリソースで発生する可能性があります。
|
||||
`unprocessable` | 入力が無効です。
|
||||
|
||||
Resources may also send custom validation errors (where `code` is `custom`). Custom errors will always have a `message` field describing the error, and most errors will also include a `documentation_url` field pointing to some content that might help you resolve the error.
|
||||
リソースは、カスタム検証エラー (ここで`code` は `custom`) を送信する場合もあります。 カスタム エラーには常にエラーを説明する `message` フィールドがあり、ほとんどのエラーには、エラーの解決に役立つ可能性があるコンテンツを指す `documentation_url` フィールドも含まれます。
|
||||
|
||||
## HTTP redirects
|
||||
## HTTP リダイレクト
|
||||
|
||||
The {% data variables.product.product_name %} REST API uses HTTP redirection where appropriate. Clients should assume that any
|
||||
request may result in a redirection. Receiving an HTTP redirection is *not* an
|
||||
error and clients should follow that redirect. Redirect responses will have a
|
||||
`Location` header field which contains the URI of the resource to which the
|
||||
client should repeat the requests.
|
||||
{% data variables.product.product_name %} REST API では、必要に応じて HTTP リダイレクトが使用されます。 クライアントは、要求がリダイレクトされる可能性があることを想定する必要があります。 HTTP リダイレクトの受信はエラーでは *なく*、クライアントはそのリダイレクトに従う必要があります。 リダイレクトのレスポンスには、クライアントが要求を繰り返す必要があるリソースの URI を含む `Location` ヘッダー フィールドがあります。
|
||||
|
||||
Status Code | Description
|
||||
状態コード | 説明
|
||||
-----------|-----------|
|
||||
`301` | Permanent redirection. The URI you used to make the request has been superseded by the one specified in the `Location` header field. This and all future requests to this resource should be directed to the new URI.
|
||||
`302`, `307` | Temporary redirection. The request should be repeated verbatim to the URI specified in the `Location` header field but clients should continue to use the original URI for future requests.
|
||||
`301` | Permanent redirection(恒久的なリダイレクト)。 要求に使用した URI は、`Location` ヘッダー フィールドで指定されたものに置き換えられています。 このリソースに対する今後のすべてのリクエストは、新しい URI に送信する必要があります。
|
||||
`302`, `307` | Temporary redirection(一時的なリダイレクト)。 要求は、`Location` ヘッダー フィールドで指定された URI に逐語的に繰り返される必要がありますが、クライアントは今後の要求で元の URI を引き続き使用する必要があります。
|
||||
|
||||
Other redirection status codes may be used in accordance with the HTTP 1.1 spec.
|
||||
その他のリダイレクトステータスコードは、HTTP 1.1 仕様に従って使用できます。
|
||||
|
||||
## HTTP verbs
|
||||
## HTTP 動詞
|
||||
|
||||
Where possible, the {% data variables.product.product_name %} REST API strives to use appropriate HTTP verbs for each
|
||||
action. Note that HTTP verbs are case-sensitive.
|
||||
{% data variables.product.product_name %} REST API では、可能な限り、各アクションに適した HTTP 動詞を使用しようとします。 HTTP 動詞では大文字と小文字が区別されることにご注意ください。
|
||||
|
||||
Verb | Description
|
||||
動詞 | 説明
|
||||
-----|-----------
|
||||
`HEAD` | Can be issued against any resource to get just the HTTP header info.
|
||||
`GET` | Used for retrieving resources.
|
||||
`POST` | Used for creating resources.
|
||||
`PATCH` | Used for updating resources with partial JSON data. For instance, an Issue resource has `title` and `body` attributes. A `PATCH` request may accept one or more of the attributes to update the resource.
|
||||
`PUT` | Used for replacing resources or collections. For `PUT` requests with no `body` attribute, be sure to set the `Content-Length` header to zero.
|
||||
`DELETE` |Used for deleting resources.
|
||||
`HEAD` | HTTP ヘッダ情報のみを取得するために、任意のリソースに対して発行できます。
|
||||
`GET` | リソースを取得するために使用します。
|
||||
`POST` | リソースを作成するために使用します。
|
||||
`PATCH` | 部分的な JSON データでリソースを更新するために使用します。 たとえば、Issue リソースには `title` 属性と `body` 属性があります。 `PATCH` 要求は、リソースを更新するために 1 つ以上の属性を受け入れることができます。
|
||||
`PUT` | リソースまたはコレクションを置き換えるために使用します。 `body` 属性のない `PUT` 要求の場合は、必ず `Content-Length` ヘッダーを 0 に設定してください。
|
||||
`DELETE` |リソースを削除するために使用します。
|
||||
|
||||
## Hypermedia
|
||||
## ハイパーメディア
|
||||
|
||||
All resources may have one or more `*_url` properties linking to other
|
||||
resources. These are meant to provide explicit URLs so that proper API clients
|
||||
don't need to construct URLs on their own. It is highly recommended that API
|
||||
clients use these. Doing so will make future upgrades of the API easier for
|
||||
developers. All URLs are expected to be proper [RFC 6570][rfc] URI templates.
|
||||
すべてのリソースには、他のリソースにリンクしている 1 つ以上の `*_url` プロパティがある場合があります。 これらは、適切な API クライアントが自身で URL を構築する必要がないように、明示的な URL を提供することを目的としています。 API クライアントでは、これらを使用することを強くお勧めしています。 そうすることで、開発者が将来の API のアップグレードを容易に行うことができます。 すべての URL は、適切な [RFC 6570][rfc] URI テンプレートであることが想定されています。
|
||||
|
||||
You can then expand these templates using something like the [uri_template][uri]
|
||||
gem:
|
||||
その後、[uri_template][uri] gem などを使用して、これらのテンプレートを展開できます。
|
||||
|
||||
>> tmpl = URITemplate.new('/notifications{?since,all,participating}')
|
||||
>> tmpl.expand
|
||||
@@ -301,60 +271,56 @@ gem:
|
||||
[rfc]: https://datatracker.ietf.org/doc/html/rfc6570
|
||||
[uri]: https://github.com/hannesg/uri_template
|
||||
|
||||
## Pagination
|
||||
## 改ページ位置の自動修正
|
||||
|
||||
Requests that return multiple items will be paginated to 30 items by
|
||||
default. You can specify further pages with the `page` parameter. For some
|
||||
resources, you can also set a custom page size up to 100 with the `per_page` parameter.
|
||||
Note that for technical reasons not all endpoints respect the `per_page` parameter,
|
||||
see [events](/rest/reference/activity#events) for example.
|
||||
複数の項目を返す要求は、既定では 30 項目ごとにページ分けされます。 `page` パラメーターを使用すると、さらにページを指定できます。 一部のリソースでは、`per_page` パラメーターを使用してカスタム ページ サイズを最大 100 に設定することもできます。
|
||||
技術的な理由から、すべてのエンドポイントで `per_page` パラメーターが考慮されるわけではないことに注意してください。たとえば、[イベント](/rest/reference/activity#events)を参照してください。
|
||||
|
||||
```shell
|
||||
$ curl '{% data variables.product.api_url_pre %}/user/repos?page=2&per_page=100'
|
||||
```
|
||||
|
||||
Note that page numbering is 1-based and that omitting the `page`
|
||||
parameter will return the first page.
|
||||
ページ番号は 1 から始まり、`page` パラメーターを省略すると最初のページが返されることに注意してください。
|
||||
|
||||
Some endpoints use cursor-based pagination. A cursor is a string that points to a location in the result set.
|
||||
With cursor-based pagination, there is no fixed concept of "pages" in the result set, so you can't navigate to a specific page.
|
||||
Instead, you can traverse the results by using the `before` or `after` parameters.
|
||||
カーソルベースのページネーションを使用するエンドポイントもあります。 カーソルとは、結果セットで場所を示す文字列です。
|
||||
カーソルベースのページネーションでは、結果セットで「ページ」という概念がなくなるため、特定のページに移動することはできません。
|
||||
代わりに、`before` パラメーターまたは `after` パラメーターを使用して結果を走査できます。
|
||||
|
||||
For more information on pagination, check out our guide on [Traversing with Pagination][pagination-guide].
|
||||
改ページ位置の詳細については、「[改ページ位置を使用した走査][pagination-guide]」に関するガイドを参照してください。
|
||||
|
||||
### Link header
|
||||
### リンクヘッダ
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** It's important to form calls with Link header values instead of constructing your own URLs.
|
||||
**注**: 独自の URL を作成するのではなく、Link ヘッダー値を使用して呼び出しを形成することが重要です。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
The [Link header](https://datatracker.ietf.org/doc/html/rfc5988) includes pagination information. For example:
|
||||
[Link ヘッダー](https://datatracker.ietf.org/doc/html/rfc5988)には、改ページ位置の情報が含まれています。 次に例を示します。
|
||||
|
||||
Link: <{% data variables.product.api_url_code %}/user/repos?page=3&per_page=100>; rel="next",
|
||||
<{% data variables.product.api_url_code %}/user/repos?page=50&per_page=100>; rel="last"
|
||||
|
||||
_The example includes a line break for readability._
|
||||
_この例は、読みやすいように改行されています。_
|
||||
|
||||
Or, if the endpoint uses cursor-based pagination:
|
||||
エンドポイントでカーソルベースのページネーションを使用する場合:
|
||||
|
||||
Link: <{% data variables.product.api_url_code %}/orgs/ORG/audit-log?after=MTYwMTkxOTU5NjQxM3xZbGI4VE5EZ1dvZTlla09uWjhoZFpR&before=>; rel="next",
|
||||
|
||||
This `Link` response header contains one or more [Hypermedia](/rest#hypermedia) link relations, some of which may require expansion as [URI templates](https://datatracker.ietf.org/doc/html/rfc6570).
|
||||
この `Link` 応答ヘッダーには 1 つ以上の [Hypermedia](/rest#hypermedia) リンク関係が含まれており、その一部は [URI テンプレート](https://datatracker.ietf.org/doc/html/rfc6570)として展開が必要な場合があります。
|
||||
|
||||
The possible `rel` values are:
|
||||
取りうる可能性のある `rel` の値は次のようになります。
|
||||
|
||||
Name | Description
|
||||
名前 | 説明
|
||||
-----------|-----------|
|
||||
`next` |The link relation for the immediate next page of results.
|
||||
`last` |The link relation for the last page of results.
|
||||
`first` |The link relation for the first page of results.
|
||||
`prev` |The link relation for the immediate previous page of results.
|
||||
`next` |結果のすぐ次のページのリンク関係。
|
||||
`last` |結果の最後のページのリンク関係。
|
||||
`first` |結果の最初のページのリンク関係。
|
||||
`prev` |結果の直前のページのリンク関係。
|
||||
|
||||
## Timeouts
|
||||
|
||||
If {% data variables.product.prodname_dotcom %} takes more than 10 seconds to process an API request, {% data variables.product.prodname_dotcom %} will terminate the request and you will receive a timeout response like this:
|
||||
{% data variables.product.prodname_dotcom %} が API を処理するのに 10 秒以上かかると、次に示すように、{% data variables.product.prodname_dotcom %} はリクエストを終了させ、タイムアウトの応答が返されます。
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -362,23 +328,23 @@ If {% data variables.product.prodname_dotcom %} takes more than 10 seconds to pr
|
||||
}
|
||||
```
|
||||
|
||||
{% data variables.product.product_name %} reserves the right to change the timeout window to protect the speed and reliability of the API.
|
||||
{% data variables.product.product_name %} は、API の速度と信頼性を保護するためにタイムアウト ウィンドウを変更する権利を留保します。
|
||||
|
||||
## Rate limiting
|
||||
## レート制限
|
||||
|
||||
Different types of API requests to {% data variables.location.product_location %} are subject to different rate limits.
|
||||
{% data variables.location.product_location %} へのさまざまな種類の API 要求は、異なるレート制限に従います。
|
||||
|
||||
Additionally, the Search API has dedicated limits. For more information, see "[Search](/rest/reference/search#rate-limit)" in the REST API documentation.
|
||||
加えて、Search APIには専用の制限があります。 詳細については、REST API のドキュメントの「[検索](/rest/reference/search#rate-limit)」を参照してください。
|
||||
|
||||
{% data reusables.enterprise.rate_limit %}
|
||||
|
||||
{% data reusables.rest-api.always-check-your-limit %}
|
||||
|
||||
### Requests from personal accounts
|
||||
### 個人アカウントからの要求
|
||||
|
||||
Direct API requests that you authenticate with a {% data variables.product.pat_generic %} are user-to-server requests. An OAuth App or GitHub App can also make a user-to-server request on your behalf after you authorize the app. For more information, see "[Creating a {% data variables.product.pat_generic %}](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)," "[Authorizing OAuth Apps](/authentication/keeping-your-account-and-data-secure/authorizing-oauth-apps)," and "[Authorizing GitHub Apps](/authentication/keeping-your-account-and-data-secure/authorizing-github-apps)."
|
||||
{% data variables.product.pat_generic %}で認証するダイレクト API 要求は、ユーザーからサーバーへの要求です。 OAuth AppあるいはGitHub Appは、ユーザが認可した後、user-to-serverリクエストをユーザの代わりに発行することもできます。 詳しい情報については、「[{% data variables.product.pat_generic %}の作成](/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)」、「[OAuth App の承認](/authentication/keeping-your-account-and-data-secure/authorizing-oauth-apps)」、「[GitHub App の承認](/authentication/keeping-your-account-and-data-secure/authorizing-github-apps)」を参照してください。
|
||||
|
||||
{% data variables.product.product_name %} associates all user-to-server requests with the authenticated user. For OAuth Apps and GitHub Apps, this is the user who authorized the app. All user-to-server requests count toward the authenticated user's rate limit.
|
||||
{% data variables.product.product_name %}は、すべてのuser-to-serverリクエストを認証されたユーザと関連づけます。 OAuth App及びGitHubについては、これはアプリケーションを認可したユーザです。 すべてのuser-to-serverリクエストは、認証されたユーザのレート制限に対してカウントされます。
|
||||
|
||||
{% data reusables.apps.user-to-server-rate-limits %}
|
||||
|
||||
@@ -388,33 +354,33 @@ Direct API requests that you authenticate with a {% data variables.product.pat_g
|
||||
|
||||
{% ifversion fpt or ghec or ghes %}
|
||||
|
||||
For unauthenticated requests, the rate limit allows for up to 60 requests per hour. Unauthenticated requests are associated with the originating IP address, and not the person making requests.
|
||||
認証されていないリクエストでは、レート制限により 1 時間あたり最大 60 リクエストまで可能です。 認証されていないリクエストは、リクエストを発行した人ではなく、発信元の IP アドレスに関連付けられます。
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
### Requests from GitHub Apps
|
||||
### GitHub Appからのリクエスト
|
||||
|
||||
Requests from a GitHub App may be either user-to-server or server-to-server requests. For more information about rate limits for GitHub Apps, see "[Rate limits for GitHub Apps](/developers/apps/building-github-apps/rate-limits-for-github-apps)."
|
||||
GitHub Appからのリクエストは、user-to-serverあるいはserver-to-serverリクエストのいずれかになります。 GitHub アプリのレート制限の詳細については、「[GitHub アプリのレート制限](/developers/apps/building-github-apps/rate-limits-for-github-apps)」を参照してください。
|
||||
|
||||
### Requests from GitHub Actions
|
||||
### GitHub Actionsからのリクエスト
|
||||
|
||||
You can use the built-in `GITHUB_TOKEN` to authenticate requests in GitHub Actions workflows. For more information, see "[Automatic token authentication](/actions/security-guides/automatic-token-authentication)."
|
||||
GitHub Actions ワークフロー内の要求の認証には、組み込みの `GITHUB_TOKEN` を使用できます。 詳細については、「[自動トークン認証](/actions/security-guides/automatic-token-authentication)」を参照してください。
|
||||
|
||||
When using `GITHUB_TOKEN`, the rate limit is 1,000 requests per hour per repository.{% ifversion fpt or ghec %} For requests to resources that belong to an enterprise account on {% data variables.location.product_location %}, {% data variables.product.prodname_ghe_cloud %}'s rate limit applies, and the limit is 15,000 requests per hour per repository.{% endif %}
|
||||
`GITHUB_TOKEN` を使用する場合、レート制限は、リポジトリごとに 1 時間あたり 1,000 要求です。{% ifversion fpt or ghec %}{% data variables.location.product_location %} 上の Enterprise アカウントに属するリソースへのアクセスについては、{% data variables.product.prodname_ghe_cloud %} のレート制限が適用され、その制限はリポジトリごとに 1 時間あたり 15,000 要求です。{% endif %}
|
||||
|
||||
### Checking your rate limit status
|
||||
### レート制限のステータスのチェック
|
||||
|
||||
The Rate Limit API and a response's HTTP headers are authoritative sources for the current number of API calls available to you or your app at any given time.
|
||||
レート制限APIとレスポンスのHTTPヘッダは、任意の時点におけるユーザまたはユーザのアプリケーションが利用できるAPIコール数の信頼できるソースです。
|
||||
|
||||
#### Rate Limit API
|
||||
#### レート制限API
|
||||
|
||||
You can use the Rate Limit API to check your rate limit status without incurring a hit to the current limit. For more information, see "[Rate limit](/rest/reference/rate-limit)."
|
||||
レート制限APIを使って、現在の制限に達することなくレート制限のステータスをチェックできます。 詳細については、「[レート制限](/rest/reference/rate-limit)」を参照してください。
|
||||
|
||||
#### Rate limit HTTP headers
|
||||
#### レート制限HTTPヘッダ
|
||||
|
||||
The returned HTTP headers of any API request show your current rate limit status:
|
||||
API リクエストの返された HTTP ヘッダは、現在のレート制限ステータスを示しています。
|
||||
|
||||
```shell
|
||||
$ curl -I {% data variables.product.api_url_pre %}/users/octocat
|
||||
@@ -426,21 +392,21 @@ $ curl -I {% data variables.product.api_url_pre %}/users/octocat
|
||||
> x-ratelimit-reset: 1372700873
|
||||
```
|
||||
|
||||
Header Name | Description
|
||||
ヘッダー名 | [説明]
|
||||
-----------|-----------|
|
||||
`x-ratelimit-limit` | The maximum number of requests you're permitted to make per hour.
|
||||
`x-ratelimit-remaining` | The number of requests remaining in the current rate limit window.
|
||||
`x-ratelimit-used` | The number of requests you've made in the current rate limit window.
|
||||
`x-ratelimit-reset` | The time at which the current rate limit window resets in [UTC epoch seconds](http://en.wikipedia.org/wiki/Unix_time).
|
||||
`x-ratelimit-limit` | 1 時間あたりのリクエスト数の上限。
|
||||
`x-ratelimit-remaining` | 現在のレート制限ウィンドウに残っているリクエストの数。
|
||||
`x-ratelimit-used` | 現在のレート制限ウィンドウに残っているリクエストの数。
|
||||
`x-ratelimit-reset` | 現在のレート制限ウィンドウが [UTC エポック秒単位](http://en.wikipedia.org/wiki/Unix_time)でリセットされる時刻。
|
||||
|
||||
If you need the time in a different format, any modern programming language can get the job done. For example, if you open up the console on your web browser, you can easily get the reset time as a JavaScript Date object.
|
||||
時刻に別の形式を使用する必要がある場合は、最新のプログラミング言語で作業を完了できます。 たとえば、Web ブラウザでコンソールを開くと、リセット時刻を JavaScript の Date オブジェクトとして簡単に取得できます。
|
||||
|
||||
``` javascript
|
||||
new Date(1372700873 * 1000)
|
||||
// => Mon Jul 01 2013 13:47:53 GMT-0400 (EDT)
|
||||
```
|
||||
|
||||
If you exceed the rate limit, an error response returns:
|
||||
レート制限を超えると、次のようなエラーレスポンスが返されます。
|
||||
|
||||
```shell
|
||||
> HTTP/2 403
|
||||
@@ -456,9 +422,9 @@ If you exceed the rate limit, an error response returns:
|
||||
> }
|
||||
```
|
||||
|
||||
### Increasing the unauthenticated rate limit for OAuth Apps
|
||||
### OAuth Appの認証されていないレート制限の増加
|
||||
|
||||
If your OAuth App needs to make unauthenticated calls with a higher rate limit, you can pass your app's client ID and secret before the endpoint route.
|
||||
OAuth Appが認証されていない呼び出しをより高いレート制限で行う必要がある場合は、エンドポイントルートの前にアプリのクライアント ID とシークレットを渡すことができます。
|
||||
|
||||
```shell
|
||||
$ curl -u my_client_id:my_client_secret -I {% data variables.product.api_url_pre %}/user/repos
|
||||
@@ -472,21 +438,21 @@ $ curl -u my_client_id:my_client_secret -I {% data variables.product.api_url_pre
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** Never share your client secret with anyone or include it in client-side browser code. Use the method shown here only for server-to-server calls.
|
||||
**注**: クライアント シークレットを他のユーザーと共有したり、クライアント側のブラウザー コードに含めたりしないでください。 こちらに示す方法は、サーバー間の呼び出しにのみ使用してください。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### Staying within the rate limit
|
||||
### レート制限内に収める
|
||||
|
||||
If you exceed your rate limit using Basic Authentication or OAuth, you can likely fix the issue by caching API responses and using [conditional requests](#conditional-requests).
|
||||
基本認証または OAuth を使用してレート制限を超えた場合は、API 応答をキャッシュし、[条件付き要求](#conditional-requests)を使用することで問題を解決できる可能性があります。
|
||||
|
||||
### Secondary rate limits
|
||||
### セカンダリレート制限
|
||||
|
||||
In order to provide quality service on {% data variables.product.product_name %}, additional rate limits may apply to some actions when using the API. For example, using the API to rapidly create content, poll aggressively instead of using webhooks, make multiple concurrent requests, or repeatedly request data that is computationally expensive may result in secondary rate limiting.
|
||||
{% data variables.product.product_name %} で高品質のサービスを提供するにあたって、API を使用するときに、いくつかのアクションに追加のレート制限が適用される場合があります。 たとえば、API を使用してコンテンツを急速に作成する、webhook を使用する代わりに積極的にポーリングする、複数の同時リクエストを行う、計算コストが高いデータを繰り返しリクエストするなどの行為によって、セカンダリレート制限が適用される場合があります。
|
||||
|
||||
Secondary rate limits are not intended to interfere with legitimate use of the API. Your normal rate limits should be the only limit you target. To ensure you're acting as a good API citizen, check out our [Best Practices guidelines](/guides/best-practices-for-integrators/).
|
||||
セカンダリレート制限は、API の正当な使用を妨げることを意図したものではありません。 通常のレート制限が、ユーザにとって唯一の制限であるべきです。 優良な API ユーザーにふさわしい振る舞いをしているかどうかを確認するには、「[ベスト プラクティスのガイドライン](/guides/best-practices-for-integrators/)」を参照してください。
|
||||
|
||||
If your application triggers this rate limit, you'll receive an informative response:
|
||||
アプリケーションがこのレート制限をトリガーすると、次のような有益なレスポンスを受け取ります。
|
||||
|
||||
```shell
|
||||
> HTTP/2 403
|
||||
@@ -501,19 +467,17 @@ If your application triggers this rate limit, you'll receive an informative resp
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
## User agent required
|
||||
## User agent の必要性
|
||||
|
||||
All API requests MUST include a valid `User-Agent` header. Requests with no `User-Agent`
|
||||
header will be rejected. We request that you use your {% data variables.product.product_name %} username, or the name of your
|
||||
application, for the `User-Agent` header value. This allows us to contact you if there are problems.
|
||||
すべての API 要求に有効な `User-Agent` ヘッダーを含める必要があります。 `User-Agent` ヘッダーのない要求は拒否されます。 `User-Agent` ヘッダの値には、{% data variables.product.product_name %} のユーザー名またはアプリケーション名を使用してください。 そうすることで、問題がある場合にご連絡することができます。
|
||||
|
||||
Here's an example:
|
||||
次に例を示します。
|
||||
|
||||
```shell
|
||||
User-Agent: Awesome-Octocat-App
|
||||
```
|
||||
|
||||
cURL sends a valid `User-Agent` header by default. If you provide an invalid `User-Agent` header via cURL (or via an alternative client), you will receive a `403 Forbidden` response:
|
||||
cURL は、既定で有効な `User-Agent` ヘッダーを送信します。 cURL を介して (または別のクライアントを介して) 無効な `User-Agent` ヘッダーを指定すると、`403 Forbidden` 応答を受け取ります。
|
||||
|
||||
```shell
|
||||
$ curl -IH 'User-Agent: ' {% data variables.product.api_url_pre %}/meta
|
||||
@@ -528,20 +492,15 @@ $ curl -IH 'User-Agent: ' {% data variables.product.api_url_pre %}/meta
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Conditional requests
|
||||
## 条件付きリクエスト
|
||||
|
||||
Most responses return an `ETag` header. Many responses also return a `Last-Modified` header. You can use the values
|
||||
of these headers to make subsequent requests to those resources using the
|
||||
`If-None-Match` and `If-Modified-Since` headers, respectively. If the resource
|
||||
has not changed, the server will return a `304 Not Modified`.
|
||||
ほとんどの応答では `ETag` ヘッダーが返されます。 多くの応答では `Last-Modified` ヘッダーも返されます。 これらのヘッダーの値を使用して、それぞれ `If-None-Match` のヘッダーと `If-Modified-Since` のヘッダーを使用してそれらのリソースに対する後続の要求を行うことができます。 リソースが変更されていない場合、サーバーは `304 Not Modified` を返します。
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Note**: Making a conditional request and receiving a 304 response does not
|
||||
count against your [Rate Limit](#rate-limiting), so we encourage you to use it
|
||||
whenever possible.
|
||||
**注**: 条件付き要求を作成して 304 レスポンスを受け取る場合、[レート制限](#rate-limiting)にはカウントされないため、可能な限り使用することをお勧めします。
|
||||
|
||||
{% endtip %}
|
||||
|
||||
@@ -578,16 +537,12 @@ $ curl -I {% data variables.product.api_url_pre %}/user -H "If-Modified-Since: T
|
||||
> x-ratelimit-reset: 1372700873
|
||||
```
|
||||
|
||||
## Cross origin resource sharing
|
||||
## クロス オリジン リソース共有
|
||||
|
||||
The API supports Cross Origin Resource Sharing (CORS) for AJAX requests from
|
||||
any origin.
|
||||
You can read the [CORS W3C Recommendation](http://www.w3.org/TR/cors/), or
|
||||
[this intro](https://code.google.com/archive/p/html5security/wikis/CrossOriginRequestSecurity.wiki) from the
|
||||
HTML 5 Security Guide.
|
||||
API では、任意のオリジンからの AJAX 要求に対して、オリジン間リソース共有 (CORS) がサポートされています。
|
||||
「[CORS W3C の推奨事項](http://www.w3.org/TR/cors/)」、または HTML 5 セキュリティ ガイドの「[この概要](https://code.google.com/archive/p/html5security/wikis/CrossOriginRequestSecurity.wiki)」をお読みください。
|
||||
|
||||
Here's a sample request sent from a browser hitting
|
||||
`http://example.com`:
|
||||
`http://example.com` をヒットするブラウザーから送信されたサンプル要求を次に示します。
|
||||
|
||||
```shell
|
||||
$ curl -I {% data variables.product.api_url_pre %} -H "Origin: http://example.com"
|
||||
@@ -596,7 +551,7 @@ Access-Control-Allow-Origin: *
|
||||
Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
|
||||
```
|
||||
|
||||
This is what the CORS preflight request looks like:
|
||||
CORS プリフライトリクエストは次のようになります。
|
||||
|
||||
```shell
|
||||
$ curl -I {% data variables.product.api_url_pre %} -H "Origin: http://example.com" -X OPTIONS
|
||||
@@ -608,13 +563,9 @@ Access-Control-Expose-Headers: ETag, Link, X-GitHub-OTP, x-ratelimit-limit, x-ra
|
||||
Access-Control-Max-Age: 86400
|
||||
```
|
||||
|
||||
## JSON-P callbacks
|
||||
## JSON-P コールバック
|
||||
|
||||
You can send a `?callback` parameter to any GET call to have the results
|
||||
wrapped in a JSON function. This is typically used when browsers want
|
||||
to embed {% data variables.product.product_name %} content in web pages by getting around cross domain
|
||||
issues. The response includes the same data output as the regular API,
|
||||
plus the relevant HTTP Header information.
|
||||
`?callback` パラメーターを任意の GET 呼び出しに送信して、結果を JSON 関数でラップできます。 これは通常、クロス ドメインの問題を回避することにより、ブラウザーが {% data variables.product.product_name %} のコンテンツを Web ページに埋め込む場合に使用されます。 応答には、通常の API と同じデータ出力と、関連する HTTP ヘッダー情報が含まれます。
|
||||
|
||||
```shell
|
||||
$ curl {% data variables.product.api_url_pre %}?callback=foo
|
||||
@@ -635,7 +586,7 @@ $ curl {% data variables.product.api_url_pre %}?callback=foo
|
||||
> })
|
||||
```
|
||||
|
||||
You can write a JavaScript handler to process the callback. Here's a minimal example you can try out:
|
||||
JavaScript ハンドラを記述して、コールバックを処理できます。 以下は、試すことができる最も簡易な例です。
|
||||
|
||||
<html>
|
||||
<head>
|
||||
@@ -659,15 +610,13 @@ You can write a JavaScript handler to process the callback. Here's a minimal exa
|
||||
</body>
|
||||
</html>
|
||||
|
||||
All of the headers are the same String value as the HTTP Headers with one
|
||||
notable exception: Link. Link headers are pre-parsed for you and come
|
||||
through as an array of `[url, options]` tuples.
|
||||
すべてのヘッダーは HTTP ヘッダーと同じ文字列型の値ですが、例外の 1 つとして "Link" があります。 Link ヘッダーは事前に解析され、`[url, options]` タプルの配列として渡されます。
|
||||
|
||||
A link that looks like this:
|
||||
リンクは次のようになります。
|
||||
|
||||
Link: <url1>; rel="next", <url2>; rel="foo"; bar="baz"
|
||||
|
||||
... will look like this in the Callback output:
|
||||
... コールバック出力では次のようになります。
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -689,39 +638,39 @@ A link that looks like this:
|
||||
}
|
||||
```
|
||||
|
||||
## Timezones
|
||||
## タイムゾーン
|
||||
|
||||
Some requests that create new data, such as creating a new commit, allow you to provide time zone information when specifying or generating timestamps. We apply the following rules, in order of priority, to determine timezone information for such API calls.
|
||||
新しいコミットの作成など、新しいデータを作成する一部のリクエストでは、タイムスタンプを指定または生成するときにタイムゾーン情報を提供できます。 そういったAPI 呼び出しのタイムゾーン情報を決定する際に、優先順位に従って次のルールを適用します。
|
||||
|
||||
* [Explicitly providing an ISO 8601 timestamp with timezone information](#explicitly-providing-an-iso-8601-timestamp-with-timezone-information)
|
||||
* [Using the `Time-Zone` header](#using-the-time-zone-header)
|
||||
* [Using the last known timezone for the user](#using-the-last-known-timezone-for-the-user)
|
||||
* [Defaulting to UTC without other timezone information](#defaulting-to-utc-without-other-timezone-information)
|
||||
* [ISO 8601 タイムスタンプにタイムゾーン情報を明示的に提供する](#explicitly-providing-an-iso-8601-timestamp-with-timezone-information)
|
||||
* [`Time-Zone` ヘッダーの使用](#using-the-time-zone-header)
|
||||
* [ユーザーが最後に認識されたタイムゾーンを使用する](#using-the-last-known-timezone-for-the-user)
|
||||
* [他のタイムゾーン情報を含まない UTC を既定値に設定する](#defaulting-to-utc-without-other-timezone-information)
|
||||
|
||||
Note that these rules apply only to data passed to the API, not to data returned by the API. As mentioned in "[Schema](#schema)," timestamps returned by the API are in UTC time, ISO 8601 format.
|
||||
これらのルールは、APIに渡されたデータに対してのみ適用され、APIが返す日付には適用されないことに注意してください。 "[スキーマ](#schema)" にあるように、API が返すタイムスタンプは UTC 時間であり、ISO 8601 形式です。
|
||||
|
||||
### Explicitly providing an ISO 8601 timestamp with timezone information
|
||||
### ISO 8601 タイムスタンプにタイムゾーン情報を明示的に提供する
|
||||
|
||||
For API calls that allow for a timestamp to be specified, we use that exact timestamp. An example of this is the [Commits API](/rest/reference/git#commits).
|
||||
タイムスタンプを指定できる API 呼び出しの場合、その正確なタイムスタンプを使用します。 その例として、[Commits API](/rest/reference/git#commits) があります。
|
||||
|
||||
These timestamps look something like `2014-02-27T15:05:06+01:00`. Also see [this example](/rest/reference/git#example-input) for how these timestamps can be specified.
|
||||
これらのタイムスタンプは `2014-02-27T15:05:06+01:00` のようになります。 これらのタイムスタンプを指定する方法については、[この例](/rest/reference/git#example-input)も参照してください。
|
||||
|
||||
### Using the `Time-Zone` header
|
||||
### `Time-Zone` ヘッダーの使用
|
||||
|
||||
It is possible to supply a `Time-Zone` header which defines a timezone according to the [list of names from the Olson database](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
||||
[Olson データベースの名前の一覧](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)に従ってタイムゾーンを定義する `Time-Zone` ヘッダーを指定できます。
|
||||
|
||||
```shell
|
||||
$ curl -H "Time-Zone: Europe/Amsterdam" -X POST {% data variables.product.api_url_pre %}/repos/github/linguist/contents/new_file.md
|
||||
```
|
||||
|
||||
This means that we generate a timestamp for the moment your API call is made in the timezone this header defines. For example, the [Contents API](/rest/reference/repos#contents) generates a git commit for each addition or change and uses the current time as the timestamp. This header will determine the timezone used for generating that current timestamp.
|
||||
つまり、このヘッダが定義するタイムゾーンで API 呼び出しが行われた時のタイムスタンプが生成されます。 たとえば、[Contents API](/rest/reference/repos#contents) は追加または変更ごとに git コミットを生成し、タイムスタンプとして現在の時刻を使用します。 このヘッダは、現在のタイムスタンプの生成に使用されたタイムゾーンを決定します。
|
||||
|
||||
### Using the last known timezone for the user
|
||||
### ユーザが最後に認識されたタイムゾーンを使用する
|
||||
|
||||
If no `Time-Zone` header is specified and you make an authenticated call to the API, we use the last known timezone for the authenticated user. The last known timezone is updated whenever you browse the {% data variables.product.product_name %} website.
|
||||
`Time-Zone` ヘッダーが指定されておらず、API への認証された呼び出しを行う場合、認証されたユーザーが最後に認識されたタイムゾーンが使用されます。 最後に認識されたタイムゾーンは、{% data variables.product.product_name %} Web サイトを閲覧するたびに更新されます。
|
||||
|
||||
### Defaulting to UTC without other timezone information
|
||||
### 他のタイムゾーン情報を含まない UTC をデフォルトにする
|
||||
|
||||
If the steps above don't result in any information, we use UTC as the timezone to create the git commit.
|
||||
上記の手順で情報が得られない場合は、UTC をタイムゾーンとして使用して git コミットを作成します。
|
||||
|
||||
[pagination-guide]: /guides/traversing-with-pagination
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Troubleshooting
|
||||
intro: Learn how to resolve the most common problems people encounter in the REST API.
|
||||
title: トラブルシューティング
|
||||
intro: REST API で発生する最も一般的な問題の解決方法を学びます。
|
||||
redirect_from:
|
||||
- /v3/troubleshooting
|
||||
versions:
|
||||
@@ -10,71 +10,66 @@ versions:
|
||||
ghec: '*'
|
||||
topics:
|
||||
- API
|
||||
ms.openlocfilehash: ecfa3a360ef9b042d96a1f80a2f0cde49390727f
|
||||
ms.sourcegitcommit: d2f0b59ed096b9e68ef8f6fa019cd925165762ec
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ja-JP
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148184234'
|
||||
---
|
||||
|
||||
|
||||
|
||||
If you're encountering some oddities in the API, here's a list of resolutions to
|
||||
some of the problems you may be experiencing.
|
||||
API で不可解な問題が発生した場合、発生したと思われる問題の解決策をこちらの一覧から確認できます。
|
||||
|
||||
{% ifversion api-date-versioning %}
|
||||
|
||||
## `400` error for an unsupported API version
|
||||
## サポートされていない API バージョンに関する `400` エラー
|
||||
|
||||
You should use the `X-GitHub-Api-Version` header to specify an API version. For example:
|
||||
`X-GitHub-Api-Version` ヘッダーを使用して、API のバージョンを指定する必要があります。 次に例を示します。
|
||||
|
||||
```shell
|
||||
$ curl {% data reusables.rest-api.version-header %} https://api.github.com/zen
|
||||
```
|
||||
|
||||
If you specify a version that does not exist, you will receive a `400` error.
|
||||
存在しないバージョンを指定すると、`400` エラーが発生します。
|
||||
|
||||
For more information, see "[API Versions](/rest/overview/api-versions)."
|
||||
詳しい情報については、「[API のバージョン](/rest/overview/api-versions)」を参照してください。
|
||||
|
||||
{% endif %}
|
||||
|
||||
## `404` error for an existing repository
|
||||
## 既存リポジトリの `404` エラー
|
||||
|
||||
Typically, we send a `404` error when your client isn't properly authenticated.
|
||||
You might expect to see a `403 Forbidden` in these cases. However, since we don't
|
||||
want to provide _any_ information about private repositories, the API returns a
|
||||
`404` error instead.
|
||||
通常、クライアントが正しく認証されていない場合、`404` エラーが送信されます。
|
||||
このような場合には `403 Forbidden` が表示されることを想定されているかもしれません。 ただし、プライベート リポジトリに関 _する情報は_ 提供したくないので、API は代わりにエラーを `404` 返します。
|
||||
|
||||
To troubleshoot, ensure [you're authenticating correctly](/guides/getting-started/), [your OAuth access token has the required scopes](/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), [third-party application restrictions][oap-guide] are not blocking access, and that [the token has not expired or been revoked](/github/authenticating-to-github/keeping-your-account-and-data-secure/token-expiration-and-revocation).
|
||||
トラブルシューティングを行うには、[正しく認証していること](/guides/getting-started/)、[OAuth アクセス トークンに必要なスコープがあること](/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/)、[サード パーティのアプリケーション制限][oap-guide]によってアクセスがブロックされていないこと、[トークンの有効期限が切れておらず、取り消されていないこと](/github/authenticating-to-github/keeping-your-account-and-data-secure/token-expiration-and-revocation)を確認します。
|
||||
|
||||
## Not all results returned
|
||||
## 表示されない結果がある
|
||||
|
||||
Most API calls accessing a list of resources (_e.g._, users, issues, _etc._) support
|
||||
pagination. If you're making requests and receiving an incomplete set of results, you're
|
||||
probably only seeing the first page. You'll need to request the remaining pages
|
||||
in order to get more results.
|
||||
リソースの一 _覧 (ユーザー_、問題 _など_) にアクセスするほとんどの API 呼び出しでは、改ページ処理がサポートされます。 要求したがすべての結果を受け取っていない場合は、おそらく最初のページしか表示されていません。 より多くの結果を受け取るには、残りのページを要求する必要があります。
|
||||
|
||||
It's important to *not* try and guess the format of the pagination URL. Not every
|
||||
API call uses the same structure. Instead, extract the pagination information from
|
||||
[the Link Header](/rest#pagination), which is sent with every request.
|
||||
改ページ URL の形式を推測 *しないように* することが重要です。 すべての API 呼び出しで同じ構造が使用されるわけではありません。 代わりに、すべての要求で送信される [Link Header](/rest#pagination) からページネーション情報を抽出します。
|
||||
|
||||
[oap-guide]: https://developer.github.com/changes/2015-01-19-an-integrators-guide-to-organization-application-policies/
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
## Basic authentication errors
|
||||
## Basic 認証のエラー
|
||||
|
||||
On November 13, 2020 username and password authentication to the REST API and the OAuth Authorizations API were deprecated and no longer work.
|
||||
2020 年 11 月 13 日に、 REST API に対するユーザ名およびパスワードによる認証と OAuth 認証 API は非推奨となり、使用できなくなりました。
|
||||
|
||||
### Using `username`/`password` for basic authentication
|
||||
### 基本認証に `username`/`password` を使用する
|
||||
|
||||
If you're using `username` and `password` for API calls, then they are no longer able to authenticate. For example:
|
||||
API 呼び出しで `username` と `password` 使用している場合、それらでは認証できなくなります。 次に例を示します。
|
||||
|
||||
```bash
|
||||
curl -u my_user:my_password https://api.github.com/user/repos
|
||||
```
|
||||
|
||||
Instead, use a [{% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) when testing endpoints or doing local development:
|
||||
代わりに、エンドポイントをテストするとき、またはローカルで開発を行うときに、[{% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line)を使用します。
|
||||
|
||||
```bash
|
||||
curl -H 'Authorization: Bearer my_access_token' https://api.github.com/user/repos
|
||||
```
|
||||
|
||||
For OAuth Apps, you should use the [web application flow](/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to generate an OAuth token to use in the API call's header:
|
||||
OAuth App の場合は、[Web アプリケーションフロー](/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow)を使用して、API 呼び出しのヘッダーで使用する OAuth トークンを生成する必要があります。
|
||||
|
||||
```bash
|
||||
curl -H 'Authorization: Bearer my-oauth-token' https://api.github.com/user/repos
|
||||
@@ -82,6 +77,6 @@ curl -H 'Authorization: Bearer my-oauth-token' https://api.github.com/user/repos
|
||||
|
||||
## Timeouts
|
||||
|
||||
If {% data variables.product.product_name %} takes more than 10 seconds to process an API request, {% data variables.product.product_name %} will terminate the request and you will receive a timeout response.
|
||||
{% data variables.product.product_name %}がAPIを処理するのに10秒以上かかると、{% data variables.product.product_name %}はリクエストを終了させ、タイムアウトのレスポンスが返されます。
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -487,7 +487,9 @@ translations/zh-CN/content/actions/learn-github-actions/expressions.md,rendering
|
||||
translations/zh-CN/content/actions/learn-github-actions/finding-and-customizing-actions.md,broken liquid tags
|
||||
translations/zh-CN/content/actions/learn-github-actions/understanding-github-actions.md,rendering error
|
||||
translations/zh-CN/content/actions/learn-github-actions/usage-limits-billing-and-administration.md,rendering error
|
||||
translations/zh-CN/content/actions/managing-issues-and-pull-requests/adding-labels-to-issues.md,broken liquid tags
|
||||
translations/zh-CN/content/actions/managing-issues-and-pull-requests/moving-assigned-issues-on-project-boards.md,broken liquid tags
|
||||
translations/zh-CN/content/actions/managing-issues-and-pull-requests/removing-a-label-when-a-card-is-added-to-a-project-board-column.md,broken liquid tags
|
||||
translations/zh-CN/content/actions/managing-workflow-runs/disabling-and-enabling-a-workflow.md,rendering error
|
||||
translations/zh-CN/content/actions/managing-workflow-runs/manually-running-a-workflow.md,rendering error
|
||||
translations/zh-CN/content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md,rendering error
|
||||
@@ -581,7 +583,6 @@ translations/zh-CN/content/admin/identity-and-access-management/using-enterprise
|
||||
translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-oidc-for-enterprise-managed-users.md,rendering error
|
||||
translations/zh-CN/content/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/configuring-scim-provisioning-for-enterprise-managed-users.md,rendering error
|
||||
translations/zh-CN/content/admin/identity-and-access-management/using-ldap-for-enterprise-iam/index.md,rendering error
|
||||
translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/configuring-saml-single-sign-on-for-your-enterprise.md,broken liquid tags
|
||||
translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/enabling-encrypted-assertions.md,rendering error
|
||||
translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/saml-configuration-reference.md,broken liquid tags
|
||||
translations/zh-CN/content/admin/identity-and-access-management/using-saml-for-enterprise-iam/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account.md,broken liquid tags
|
||||
@@ -612,7 +613,6 @@ translations/zh-CN/content/admin/packages/getting-started-with-github-packages-f
|
||||
translations/zh-CN/content/admin/packages/migrating-your-enterprise-to-the-container-registry-from-the-docker-registry.md,rendering error
|
||||
translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/about-enterprise-policies.md,broken liquid tags
|
||||
translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise.md,rendering error
|
||||
translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise.md,broken liquid tags
|
||||
translations/zh-CN/content/admin/policies/enforcing-policies-for-your-enterprise/enforcing-repository-management-policies-in-your-enterprise.md,broken liquid tags
|
||||
translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/about-pre-receive-hooks.md,rendering error
|
||||
translations/zh-CN/content/admin/policies/enforcing-policy-with-pre-receive-hooks/creating-a-pre-receive-hook-script.md,rendering error
|
||||
@@ -636,7 +636,6 @@ translations/zh-CN/content/authentication/connecting-to-github-with-ssh/checking
|
||||
translations/zh-CN/content/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent.md,rendering error
|
||||
translations/zh-CN/content/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection.md,rendering error
|
||||
translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/about-authentication-to-github.md,rendering error
|
||||
translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/authorizing-oauth-apps.md,rendering error
|
||||
translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token.md,rendering error
|
||||
translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/creating-a-strong-password.md,rendering error
|
||||
translations/zh-CN/content/authentication/keeping-your-account-and-data-secure/preventing-unauthorized-access.md,rendering error
|
||||
@@ -855,7 +854,7 @@ translations/zh-CN/content/organizations/managing-organization-settings/managing
|
||||
translations/zh-CN/content/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators.md,rendering error
|
||||
translations/zh-CN/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization.md,rendering error
|
||||
translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta.md,rendering error
|
||||
translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/enabling-and-testing-saml-single-sign-on-for-your-organization.md,broken liquid tags
|
||||
translations/zh-CN/content/organizations/managing-saml-single-sign-on-for-your-organization/enabling-and-testing-saml-single-sign-on-for-your-organization.md,rendering error
|
||||
translations/zh-CN/content/organizations/organizing-members-into-teams/about-teams.md,broken liquid tags
|
||||
translations/zh-CN/content/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team.md,rendering error
|
||||
translations/zh-CN/content/packages/learn-github-packages/about-permissions-for-github-packages.md,rendering error
|
||||
@@ -923,6 +922,7 @@ translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-f
|
||||
translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository.md,rendering error
|
||||
translations/zh-CN/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility.md,rendering error
|
||||
translations/zh-CN/content/repositories/releasing-projects-on-github/about-releases.md,rendering error
|
||||
translations/zh-CN/content/repositories/releasing-projects-on-github/automatically-generated-release-notes.md,broken liquid tags
|
||||
translations/zh-CN/content/repositories/releasing-projects-on-github/comparing-releases.md,rendering error
|
||||
translations/zh-CN/content/repositories/releasing-projects-on-github/linking-to-releases.md,rendering error
|
||||
translations/zh-CN/content/repositories/releasing-projects-on-github/managing-releases-in-a-repository.md,rendering error
|
||||
@@ -1030,7 +1030,6 @@ translations/zh-CN/data/reusables/advanced-security/secret-scanning-add-custom-p
|
||||
translations/zh-CN/data/reusables/advanced-security/secret-scanning-create-custom-pattern.md,rendering error
|
||||
translations/zh-CN/data/reusables/advanced-security/secret-scanning-push-protection-org.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/apps/user-to-server-rate-limits.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/audit_log/audit-log-action-categories.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_org_admins.md,rendering error
|
||||
translations/zh-CN/data/reusables/audit_log/audit_log_sidebar_for_site_admins.md,rendering error
|
||||
translations/zh-CN/data/reusables/branches/new-repo-default-branch.md,rendering error
|
||||
@@ -1106,7 +1105,6 @@ translations/zh-CN/data/reusables/getting-started/enforcing-repo-management-poli
|
||||
translations/zh-CN/data/reusables/getting-started/enterprise-advanced-security.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/getting-started/managing-enterprise-members.md,rendering error
|
||||
translations/zh-CN/data/reusables/git/git-push.md,rendering error
|
||||
translations/zh-CN/data/reusables/identity-and-permissions/ip-allow-lists-enterprise.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/identity-and-permissions/vigilant-mode-beta-note.md,rendering error
|
||||
translations/zh-CN/data/reusables/large_files/storage_assets_location.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/large_files/use_lfs_tip.md,rendering error
|
||||
@@ -1118,7 +1116,6 @@ translations/zh-CN/data/reusables/organizations/github-apps-settings-sidebar.md,
|
||||
translations/zh-CN/data/reusables/organizations/member-privileges.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/navigate-to-org.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/repository-defaults.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/require-ssh-cert.md,broken liquid tags
|
||||
translations/zh-CN/data/reusables/organizations/security-and-analysis.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/security.md,rendering error
|
||||
translations/zh-CN/data/reusables/organizations/teams_sidebar.md,rendering error
|
||||
|
||||
|
@@ -509,7 +509,9 @@ translations/ja-JP/content/actions/learn-github-actions/expressions.md,rendering
|
||||
translations/ja-JP/content/actions/learn-github-actions/finding-and-customizing-actions.md,broken liquid tags
|
||||
translations/ja-JP/content/actions/learn-github-actions/understanding-github-actions.md,rendering error
|
||||
translations/ja-JP/content/actions/learn-github-actions/usage-limits-billing-and-administration.md,rendering error
|
||||
translations/ja-JP/content/actions/managing-issues-and-pull-requests/adding-labels-to-issues.md,broken liquid tags
|
||||
translations/ja-JP/content/actions/managing-issues-and-pull-requests/moving-assigned-issues-on-project-boards.md,broken liquid tags
|
||||
translations/ja-JP/content/actions/managing-issues-and-pull-requests/removing-a-label-when-a-card-is-added-to-a-project-board-column.md,broken liquid tags
|
||||
translations/ja-JP/content/actions/managing-workflow-runs/disabling-and-enabling-a-workflow.md,rendering error
|
||||
translations/ja-JP/content/actions/managing-workflow-runs/manually-running-a-workflow.md,rendering error
|
||||
translations/ja-JP/content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md,rendering error
|
||||
@@ -953,6 +955,7 @@ translations/ja-JP/content/repositories/managing-your-repositorys-settings-and-f
|
||||
translations/ja-JP/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository.md,rendering error
|
||||
translations/ja-JP/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility.md,rendering error
|
||||
translations/ja-JP/content/repositories/releasing-projects-on-github/about-releases.md,rendering error
|
||||
translations/ja-JP/content/repositories/releasing-projects-on-github/automatically-generated-release-notes.md,broken liquid tags
|
||||
translations/ja-JP/content/repositories/releasing-projects-on-github/comparing-releases.md,rendering error
|
||||
translations/ja-JP/content/repositories/releasing-projects-on-github/linking-to-releases.md,rendering error
|
||||
translations/ja-JP/content/repositories/releasing-projects-on-github/managing-releases-in-a-repository.md,rendering error
|
||||
@@ -979,15 +982,12 @@ translations/ja-JP/content/rest/enterprise-admin/pre-receive-hooks.md,broken liq
|
||||
translations/ja-JP/content/rest/enterprise-admin/repo-pre-receive-hooks.md,broken liquid tags
|
||||
translations/ja-JP/content/rest/enterprise-admin/scim.md,rendering error
|
||||
translations/ja-JP/content/rest/enterprise-admin/users.md,broken liquid tags
|
||||
translations/ja-JP/content/rest/guides/getting-started-with-the-rest-api.md,broken liquid tags
|
||||
translations/ja-JP/content/rest/guides/traversing-with-pagination.md,rendering error
|
||||
translations/ja-JP/content/rest/guides/working-with-comments.md,broken liquid tags
|
||||
translations/ja-JP/content/rest/migrations/source-imports.md,broken liquid tags
|
||||
translations/ja-JP/content/rest/overview/api-previews.md,rendering error
|
||||
translations/ja-JP/content/rest/overview/other-authentication-methods.md,rendering error
|
||||
translations/ja-JP/content/rest/overview/permissions-required-for-github-apps.md,rendering error
|
||||
translations/ja-JP/content/rest/overview/resources-in-the-rest-api.md,rendering error
|
||||
translations/ja-JP/content/rest/overview/troubleshooting.md,broken liquid tags
|
||||
translations/ja-JP/content/rest/packages.md,broken liquid tags
|
||||
translations/ja-JP/content/rest/projects/projects.md,broken liquid tags
|
||||
translations/ja-JP/content/rest/quickstart.md,broken liquid tags
|
||||
|
||||
|
@@ -492,7 +492,9 @@ translations/pt-BR/content/actions/learn-github-actions/expressions.md,rendering
|
||||
translations/pt-BR/content/actions/learn-github-actions/finding-and-customizing-actions.md,broken liquid tags
|
||||
translations/pt-BR/content/actions/learn-github-actions/understanding-github-actions.md,rendering error
|
||||
translations/pt-BR/content/actions/learn-github-actions/usage-limits-billing-and-administration.md,rendering error
|
||||
translations/pt-BR/content/actions/managing-issues-and-pull-requests/adding-labels-to-issues.md,broken liquid tags
|
||||
translations/pt-BR/content/actions/managing-issues-and-pull-requests/moving-assigned-issues-on-project-boards.md,broken liquid tags
|
||||
translations/pt-BR/content/actions/managing-issues-and-pull-requests/removing-a-label-when-a-card-is-added-to-a-project-board-column.md,broken liquid tags
|
||||
translations/pt-BR/content/actions/managing-workflow-runs/disabling-and-enabling-a-workflow.md,rendering error
|
||||
translations/pt-BR/content/actions/managing-workflow-runs/manually-running-a-workflow.md,rendering error
|
||||
translations/pt-BR/content/actions/managing-workflow-runs/re-running-workflows-and-jobs.md,rendering error
|
||||
@@ -858,7 +860,7 @@ translations/pt-BR/content/organizations/managing-organization-settings/managing
|
||||
translations/pt-BR/content/organizations/managing-organization-settings/setting-permissions-for-adding-outside-collaborators.md,rendering error
|
||||
translations/pt-BR/content/organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization.md,rendering error
|
||||
translations/pt-BR/content/organizations/managing-saml-single-sign-on-for-your-organization/configuring-saml-single-sign-on-and-scim-using-okta.md,rendering error
|
||||
translations/pt-BR/content/organizations/managing-saml-single-sign-on-for-your-organization/enabling-and-testing-saml-single-sign-on-for-your-organization.md,broken liquid tags
|
||||
translations/pt-BR/content/organizations/managing-saml-single-sign-on-for-your-organization/enabling-and-testing-saml-single-sign-on-for-your-organization.md,rendering error
|
||||
translations/pt-BR/content/organizations/organizing-members-into-teams/about-teams.md,broken liquid tags
|
||||
translations/pt-BR/content/organizations/organizing-members-into-teams/managing-code-review-settings-for-your-team.md,rendering error
|
||||
translations/pt-BR/content/packages/learn-github-packages/about-permissions-for-github-packages.md,rendering error
|
||||
@@ -926,6 +928,7 @@ translations/pt-BR/content/repositories/managing-your-repositorys-settings-and-f
|
||||
translations/pt-BR/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-teams-and-people-with-access-to-your-repository.md,rendering error
|
||||
translations/pt-BR/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility.md,rendering error
|
||||
translations/pt-BR/content/repositories/releasing-projects-on-github/about-releases.md,rendering error
|
||||
translations/pt-BR/content/repositories/releasing-projects-on-github/automatically-generated-release-notes.md,broken liquid tags
|
||||
translations/pt-BR/content/repositories/releasing-projects-on-github/comparing-releases.md,rendering error
|
||||
translations/pt-BR/content/repositories/releasing-projects-on-github/linking-to-releases.md,rendering error
|
||||
translations/pt-BR/content/repositories/releasing-projects-on-github/managing-releases-in-a-repository.md,rendering error
|
||||
@@ -952,7 +955,6 @@ translations/pt-BR/content/rest/enterprise-admin/pre-receive-hooks.md,broken liq
|
||||
translations/pt-BR/content/rest/enterprise-admin/repo-pre-receive-hooks.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/enterprise-admin/scim.md,rendering error
|
||||
translations/pt-BR/content/rest/enterprise-admin/users.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/gitignore.md,rendering error
|
||||
translations/pt-BR/content/rest/guides/getting-started-with-the-rest-api.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/guides/traversing-with-pagination.md,rendering error
|
||||
translations/pt-BR/content/rest/guides/working-with-comments.md,broken liquid tags
|
||||
@@ -961,7 +963,6 @@ translations/pt-BR/content/rest/overview/api-previews.md,rendering error
|
||||
translations/pt-BR/content/rest/overview/other-authentication-methods.md,rendering error
|
||||
translations/pt-BR/content/rest/overview/permissions-required-for-github-apps.md,rendering error
|
||||
translations/pt-BR/content/rest/overview/resources-in-the-rest-api.md,rendering error
|
||||
translations/pt-BR/content/rest/overview/troubleshooting.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/packages.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/projects/projects.md,broken liquid tags
|
||||
translations/pt-BR/content/rest/scim.md,rendering error
|
||||
|
||||
|
@@ -646,7 +646,6 @@ translations/ru-RU/content/admin/installation/setting-up-a-github-enterprise-ser
|
||||
translations/ru-RU/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-openstack-kvm.md,rendering error
|
||||
translations/ru-RU/content/admin/installation/setting-up-a-github-enterprise-server-instance/installing-github-enterprise-server-on-vmware.md,rendering error
|
||||
translations/ru-RU/content/admin/installation/setting-up-a-github-enterprise-server-instance/setting-up-a-staging-instance.md,rendering error
|
||||
translations/ru-RU/content/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/about-server-statistics.md,rendering error
|
||||
translations/ru-RU/content/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/exporting-server-statistics.md,rendering error
|
||||
translations/ru-RU/content/admin/monitoring-activity-in-your-enterprise/exploring-user-activity/managing-global-webhooks.md,rendering error
|
||||
translations/ru-RU/content/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/about-the-audit-log-for-your-enterprise.md,rendering error
|
||||
@@ -806,6 +805,7 @@ translations/ru-RU/content/code-security/secret-scanning/secret-scanning-pattern
|
||||
translations/ru-RU/content/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database.md,rendering error
|
||||
translations/ru-RU/content/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability.md,rendering error
|
||||
translations/ru-RU/content/code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository.md,rendering error
|
||||
translations/ru-RU/content/code-security/security-advisories/repository-security-advisories/creating-a-repository-security-advisory.md,rendering error
|
||||
translations/ru-RU/content/code-security/security-overview/about-the-security-overview.md,rendering error
|
||||
translations/ru-RU/content/code-security/security-overview/filtering-alerts-in-the-security-overview.md,rendering error
|
||||
translations/ru-RU/content/code-security/security-overview/index.md,rendering error
|
||||
@@ -817,20 +817,16 @@ translations/ru-RU/content/code-security/supply-chain-security/understanding-you
|
||||
translations/ru-RU/content/code-security/supply-chain-security/understanding-your-software-supply-chain/configuring-the-dependency-graph.md,rendering error
|
||||
translations/ru-RU/content/codespaces/codespaces-reference/security-in-github-codespaces.md,broken liquid tags
|
||||
translations/ru-RU/content/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository.md,rendering error
|
||||
translations/ru-RU/content/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace.md,broken liquid tags
|
||||
translations/ru-RU/content/codespaces/developing-in-codespaces/stopping-and-starting-a-codespace.md,rendering error
|
||||
translations/ru-RU/content/codespaces/managing-your-codespaces/reviewing-your-security-logs-for-github-codespaces.md,broken liquid tags
|
||||
translations/ru-RU/content/codespaces/overview.md,rendering error
|
||||
translations/ru-RU/content/codespaces/setting-up-your-project-for-codespaces/introduction-to-dev-containers.md,broken liquid tags
|
||||
translations/ru-RU/content/codespaces/the-githubdev-web-based-editor.md,broken liquid tags
|
||||
translations/ru-RU/content/codespaces/troubleshooting/troubleshooting-your-connection-to-github-codespaces.md,rendering error
|
||||
translations/ru-RU/content/communities/documenting-your-project-with-wikis/about-wikis.md,rendering error
|
||||
translations/ru-RU/content/communities/documenting-your-project-with-wikis/changing-access-permissions-for-wikis.md,rendering error
|
||||
translations/ru-RU/content/communities/documenting-your-project-with-wikis/editing-wiki-content.md,rendering error
|
||||
translations/ru-RU/content/communities/setting-up-your-project-for-healthy-contributions/setting-guidelines-for-repository-contributors.md,rendering error
|
||||
translations/ru-RU/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-a-jetbrains-ide.md,broken liquid tags
|
||||
translations/ru-RU/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-neovim.md,rendering error
|
||||
translations/ru-RU/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio-code.md,broken liquid tags
|
||||
translations/ru-RU/content/copilot/getting-started-with-github-copilot/getting-started-with-github-copilot-in-visual-studio.md,broken liquid tags
|
||||
translations/ru-RU/content/copilot/quickstart.md,broken liquid tags
|
||||
translations/ru-RU/content/desktop/contributing-and-collaborating-using-github-desktop/adding-and-cloning-repositories/cloning-a-repository-from-github-to-github-desktop.md,rendering error
|
||||
translations/ru-RU/content/desktop/contributing-and-collaborating-using-github-desktop/making-changes-in-a-branch/index.md,rendering error
|
||||
@@ -1089,6 +1085,7 @@ translations/ru-RU/content/repositories/managing-your-repositorys-settings-and-f
|
||||
translations/ru-RU/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/managing-the-commit-signoff-policy-for-your-repository.md,rendering error
|
||||
translations/ru-RU/content/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility.md,rendering error
|
||||
translations/ru-RU/content/repositories/releasing-projects-on-github/about-releases.md,rendering error
|
||||
translations/ru-RU/content/repositories/releasing-projects-on-github/automatically-generated-release-notes.md,rendering error
|
||||
translations/ru-RU/content/repositories/releasing-projects-on-github/comparing-releases.md,rendering error
|
||||
translations/ru-RU/content/repositories/releasing-projects-on-github/linking-to-releases.md,rendering error
|
||||
translations/ru-RU/content/repositories/releasing-projects-on-github/managing-releases-in-a-repository.md,rendering error
|
||||
|
||||
|
@@ -1,6 +1,7 @@
|
||||
---
|
||||
title: Adicionando etiquetas a problemas
|
||||
intro: 'Você pode usar {% data variables.product.prodname_actions %} para etiquetar problemas automaticamente.'
|
||||
title: Adding labels to issues
|
||||
shortTitle: Add labels to issues
|
||||
intro: 'You can use {% data variables.product.prodname_actions %} to automatically label issues.'
|
||||
redirect_from:
|
||||
- /actions/guides/adding-labels-to-issues
|
||||
versions:
|
||||
@@ -12,32 +13,26 @@ type: tutorial
|
||||
topics:
|
||||
- Workflows
|
||||
- Project management
|
||||
ms.openlocfilehash: 8e80990a1a533ed303f47cbad8dafb95c890893d
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147884306'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
## Introdução
|
||||
{% data reusables.actions.enterprise-beta %}
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
Este tutorial demonstra como usar a [ação `andymckay/labeler`](https://github.com/marketplace/actions/simple-issue-labeler) em um fluxo de trabalho para rotular os problemas recém-abertos ou reabertos. Por exemplo, você pode adicionar o rótulo `triage` sempre que um problema é aberto ou reaberto. Em seguida, veja todos os problemas que precisam ser triagem filtrando os problemas com o rótulo `triage`.
|
||||
## Introduction
|
||||
|
||||
No tutorial, primeiro, você criará um arquivo de fluxo de trabalho que usa a [ação `andymckay/labeler`](https://github.com/marketplace/actions/simple-issue-labeler). Então, você personalizará o fluxo de trabalho para atender às suas necessidades.
|
||||
This tutorial demonstrates how to use the [`actions/github-script` action](https://github.com/marketplace/actions/github-script) in a workflow to label newly opened or reopened issues. For example, you can add the `triage` label every time an issue is opened or reopened. Then, you can see all issues that need to be triaged by filtering for issues with the `triage` label.
|
||||
|
||||
## Criar o fluxo de trabalho
|
||||
The `actions/github-script` action allows you to easily use the {% data variables.product.prodname_dotcom %} API in a workflow.
|
||||
|
||||
In the tutorial, you will first make a workflow file that uses the [`actions/github-script` action](https://github.com/marketplace/actions/github-script). Then, you will customize the workflow to suit your needs.
|
||||
|
||||
## Creating the workflow
|
||||
|
||||
1. {% data reusables.actions.choose-repo %}
|
||||
2. {% data reusables.actions.make-workflow-file %}
|
||||
3. Copie o seguinte conteúdo YAML para o arquivo do fluxo de trabalho.
|
||||
|
||||
3. Copy the following YAML contents into your workflow file.
|
||||
|
||||
```yaml{:copy}
|
||||
{% indented_data_reference reusables.actions.actions-not-certified-by-github-comment spaces=4 %}
|
||||
|
||||
{% indented_data_reference reusables.actions.actions-use-sha-pinning-comment spaces=4 %}
|
||||
|
||||
name: Label issues
|
||||
on:
|
||||
issues:
|
||||
@@ -50,29 +45,34 @@ No tutorial, primeiro, você criará um arquivo de fluxo de trabalho que usa a [
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Label issues
|
||||
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
|
||||
- uses: {% data reusables.actions.action-github-script %}
|
||||
with:
|
||||
add-labels: "triage"
|
||||
repo-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ["triage"]
|
||||
})
|
||||
```
|
||||
|
||||
4. Personalize os parâmetros no seu arquivo do fluxo de trabalho:
|
||||
- Altere o valor de `add-labels` para a lista de rótulos que deseja adicionar ao problema. Separe etiquetas múltiplas com vírgulas. Por exemplo, `"help wanted, good first issue"`. Para obter mais informações sobre rótulos, confira "[Como gerenciar rótulos](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)".
|
||||
4. Customize the `script` parameter in your workflow file:
|
||||
- The `issue_number`, `owner`, and `repo` values are automatically set using the `context` object. You do not need to change these.
|
||||
- Change the value for `labels` to the list of labels that you want to add to the issue. Separate multiple labels with commas. For example, `["help wanted", "good first issue"]`. For more information about labels, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)."
|
||||
5. {% data reusables.actions.commit-workflow %}
|
||||
|
||||
## Testar o fluxo de trabalho
|
||||
## Testing the workflow
|
||||
|
||||
Toda vez que um problema no seu repositório for aberto ou reaberto, esse fluxo de trabalho adicionará as etiquetas que você especificou ao problema.
|
||||
Every time an issue in your repository is opened or reopened, this workflow will add the labels that you specified to the issue.
|
||||
|
||||
Teste o seu fluxo de trabalho criando um problema no seu repositório.
|
||||
Test out your workflow by creating an issue in your repository.
|
||||
|
||||
1. Crie um problema no seu repositório. Para obter mais informações, confira "[Como criar um problema](/github/managing-your-work-on-github/creating-an-issue)".
|
||||
2. Para ver a execução do fluxo de trabalho que foi acionada criando o problema, veja o histórico de execuções do seu fluxo de trabalho. Para obter mais informações, confira "[Como ver o histórico de execução do fluxo de trabalho](/actions/managing-workflow-runs/viewing-workflow-run-history)".
|
||||
3. Quando o fluxo de trabalho é concluído, o problema que você criou deve ter as etiquetas especificadas adicionadas.
|
||||
1. Create an issue in your repository. For more information, see "[Creating an issue](/github/managing-your-work-on-github/creating-an-issue)."
|
||||
2. To see the workflow run that was triggered by creating the issue, view the history of your workflow runs. For more information, see "[Viewing workflow run history](/actions/managing-workflow-runs/viewing-workflow-run-history)."
|
||||
3. When the workflow completes, the issue that you created should have the specified labels added.
|
||||
|
||||
## Próximas etapas
|
||||
## Next steps
|
||||
|
||||
- Para saber mais sobre outras coisas que você pode fazer com a ação `andymckay/labeler`, como remover rótulos ou ignorar essa ação se o problema for atribuído ou tiver um rótulo específico, confira a [documentação da ação `andymckay/labeler`](https://github.com/marketplace/actions/simple-issue-labeler).
|
||||
- Para saber mais sobre diferentes eventos que podem disparar seu fluxo de trabalho, confira "[Eventos que disparam fluxos de trabalho](/actions/reference/events-that-trigger-workflows#issues)". A ação `andymckay/labeler` só funciona em eventos `issues`, `pull_request` ou `project_card`.
|
||||
- [Pesquise o GitHub](https://github.com/search?q=%22uses:+andymckay/labeler%22&type=code) para ver exemplos de fluxos de trabalho que usam essa ação.
|
||||
- To learn more about additional things you can do with the `actions/github-script` action, see the [`actions/github-script` action documentation](https://github.com/marketplace/actions/github-script).
|
||||
- To learn more about different events that can trigger your workflow, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#issues)."
|
||||
- [Search GitHub](https://github.com/search?q=%22uses:+actions/github-script%22&type=code) for examples of workflows using this action.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Remover uma etiqueta quando um cartão é adicionado à coluna de um quadro de projeto
|
||||
intro: 'Você pode usar {% data variables.product.prodname_actions %} para remover automaticamente uma etiqueta quando um problema ou pull request for adicionado a uma coluna específica no quadro de um projeto.'
|
||||
title: Removing a label when a card is added to a project board column
|
||||
intro: 'You can use {% data variables.product.prodname_actions %} to automatically remove a label when an issue or pull request is added to a specific column on a {% data variables.projects.projects_v1_board %}.'
|
||||
redirect_from:
|
||||
- /actions/guides/removing-a-label-when-a-card-is-added-to-a-project-board-column
|
||||
versions:
|
||||
@@ -13,74 +13,73 @@ topics:
|
||||
- Workflows
|
||||
- Project management
|
||||
shortTitle: Remove label when adding card
|
||||
ms.openlocfilehash: c23edb495719c7059c9c5d8dab1c29acb0e78cb6
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147410104'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
## Introdução
|
||||
{% data reusables.actions.enterprise-beta %}
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
Este tutorial demonstra como usar a [ação `andymckay/labeler`](https://github.com/marketplace/actions/simple-issue-labeler) com um condicional para remover um rótulo de solicitações de pull e problemas que são adicionados a uma coluna específica em um quadro de projetos. Por exemplo, você pode remover o rótulo `needs review` quando os cartões de projeto são movidos para a coluna `Done`.
|
||||
## Introduction
|
||||
|
||||
No tutorial, primeiro, você criará um arquivo de fluxo de trabalho que usa a [ação `andymckay/labeler`](https://github.com/marketplace/actions/simple-issue-labeler). Então, você personalizará o fluxo de trabalho para atender às suas necessidades.
|
||||
This tutorial demonstrates how to use the [`actions/github-script` action](https://github.com/marketplace/actions/github-script) along with a conditional to remove a label from issues and pull requests that are added to a specific column on a {% data variables.projects.projects_v1_board %}. For example, you can remove the `needs review` label when project cards are moved into the `Done` column.
|
||||
|
||||
## Criar o fluxo de trabalho
|
||||
In the tutorial, you will first make a workflow file that uses the [`actions/github-script` action](https://github.com/marketplace/actions/github-script). Then, you will customize the workflow to suit your needs.
|
||||
|
||||
## Creating the workflow
|
||||
|
||||
1. {% data reusables.actions.choose-repo %}
|
||||
2. Escolha um projeto que pertence ao repositório. Este fluxo de trabalho não pode ser usado com projetos que pertencem a usuários ou organizações. Você pode usar um projeto existente ou criar um novo projeto. Para obter mais informações sobre como criar um projeto, confira "[Como criar um quadro de projetos](/github/managing-your-work-on-github/creating-a-project-board)".
|
||||
2. Choose a {% data variables.projects.projects_v1_board %} that belongs to the repository. This workflow cannot be used with projects that belong to users or organizations. You can use an existing {% data variables.projects.projects_v1_board %}, or you can create a new {% data variables.projects.projects_v1_board %}. For more information about creating a project, see "[Creating a {% data variables.product.prodname_project_v1 %}](/github/managing-your-work-on-github/creating-a-project-board)."
|
||||
3. {% data reusables.actions.make-workflow-file %}
|
||||
4. Copie o seguinte conteúdo YAML para o arquivo do fluxo de trabalho.
|
||||
4. Copy the following YAML contents into your workflow file.
|
||||
|
||||
```yaml{:copy}
|
||||
{% indented_data_reference reusables.actions.actions-not-certified-by-github-comment spaces=4 %}
|
||||
|
||||
{% indented_data_reference reusables.actions.actions-use-sha-pinning-comment spaces=4 %}
|
||||
|
||||
name: Remove labels
|
||||
name: Remove a label
|
||||
on:
|
||||
project_card:
|
||||
types:
|
||||
- moved
|
||||
jobs:
|
||||
remove_labels:
|
||||
remove_label:
|
||||
if: github.event.project_card.column_id == '12345678'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: remove labels
|
||||
uses: andymckay/labeler@5c59dabdfd4dd5bd9c6e6d255b01b9d764af4414
|
||||
- uses: {% data reusables.actions.action-github-script %}
|
||||
with:
|
||||
remove-labels: "needs review"
|
||||
repo-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
|
||||
script: |
|
||||
// this gets the number at the end of the content URL, which should be the issue/PR number
|
||||
const issue_num = context.payload.project_card.content_url.split('/').pop()
|
||||
github.rest.issues.removeLabel({
|
||||
issue_number: issue_num,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
name: ["needs review"]
|
||||
})
|
||||
```
|
||||
|
||||
5. Personalize os parâmetros no seu arquivo do fluxo de trabalho:
|
||||
- Em `github.event.project_card.column_id == '12345678'`, substitua `12345678` pela ID da coluna em que deseja remover o rótulo de solicitações de pull e problemas que são movidos para ela.
|
||||
5. Customize the parameters in your workflow file:
|
||||
- In `github.event.project_card.column_id == '12345678'`, replace `12345678` with the ID of the column where you want to un-label issues and pull requests that are moved there.
|
||||
|
||||
Para encontrar o ID da coluna, acesse o seu quadro de projetos. Ao lado do título da coluna, clique em {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} e clique em **Copiar link da coluna**. O ID da coluna é o número no final do link copiado. Por exemplo, `24687531` é a ID da coluna para `https://github.com/octocat/octo-repo/projects/1#column-24687531`.
|
||||
To find the column ID, navigate to your {% data variables.projects.projects_v1_board %}. Next to the title of the column, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} then click **Copy column link**. The column ID is the number at the end of the copied link. For example, `24687531` is the column ID for `https://github.com/octocat/octo-repo/projects/1#column-24687531`.
|
||||
|
||||
Caso deseje modificar mais de uma coluna, separe as condições com `||`. Por exemplo, `if github.event.project_card.column_id == '12345678' || github.event.project_card.column_id == '87654321'` funcionará sempre que um cartão de projeto for adicionado à coluna `12345678` ou à coluna `87654321`. As colunas podem estar em diferentes quadros de projetos.
|
||||
- Altere o valor de `remove-labels` para a lista de rótulos que deseja remover de problemas ou solicitações de pull que são movidos para as colunas especificadas. Separe etiquetas múltiplas com vírgulas. Por exemplo, `"help wanted, good first issue"`. Para obter mais informações sobre rótulos, confira "[Como gerenciar rótulos](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)".
|
||||
If you want to act on more than one column, separate the conditions with `||`. For example, `if github.event.project_card.column_id == '12345678' || github.event.project_card.column_id == '87654321'` will act whenever a project card is added to column `12345678` or column `87654321`. The columns may be on different project boards.
|
||||
- Change the value for `name` in the `github.rest.issues.removeLabel()` function to the name of the label that you want to remove from issues or pull requests that are moved to the specified column(s). For more information on labels, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)."
|
||||
6. {% data reusables.actions.commit-workflow %}
|
||||
|
||||
## Testar o fluxo de trabalho
|
||||
## Testing the workflow
|
||||
|
||||
Cada vez que um cartão de projeto em um projeto no seu repositório for transferido, este fluxo de trabalho será executado. Se o cartão for um problema ou uma pull request e for movido para a coluna especificada, o fluxo de trabalho removerá os rótulos especificados do problema ou de um pull request. Os cartões que são observações que não serão afetadas.
|
||||
Every time a project card on a {% data variables.projects.projects_v1_board %} in your repository moves, this workflow will run. If the card is an issue or a pull request and is moved into the column that you specified, then the workflow will remove the specified label from the issue or a pull request. Cards that are notes will not be affected.
|
||||
|
||||
Teste o seu fluxo de trabalho transferindo um problema no seu projeto para a coluna de destino.
|
||||
Test your workflow out by moving an issue on your {% data variables.projects.projects_v1_board %} into the target column.
|
||||
|
||||
1. Abra um problema no seu repositório. Para obter mais informações, confira "[Como criar um problema](/github/managing-your-work-on-github/creating-an-issue)".
|
||||
2. Etiquete o problema com as etiquetas que deseja que o fluxo de trabalho remova. Para obter mais informações, confira "[Como gerenciar rótulos](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)".
|
||||
3. Adicione um problema na coluna do projeto que você especificou no arquivo do fluxo de trabalho. Para obter mais informações, confira "[Como adicionar problemas e solicitações de pull a um quadro de projetos](/github/managing-your-work-on-github/adding-issues-and-pull-requests-to-a-project-board)".
|
||||
4. Para ver a execução do fluxo de trabalho que foi acionada adicionando o problema ao projeto, visualize o histórico da execução do seu fluxo de trabalho. Para obter mais informações, confira "[Como ver o histórico de execução do fluxo de trabalho](/actions/managing-workflow-runs/viewing-workflow-run-history)".
|
||||
5. Quando o fluxo de trabalho é concluído, o problema que você adicionou na coluna do projeto deve ter as etiquetas especificadas removidos.
|
||||
1. Open an issue in your repository. For more information, see "[Creating an issue](/github/managing-your-work-on-github/creating-an-issue)."
|
||||
2. Label the issue with the label that you want the workflow to remove. For more information, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)."
|
||||
3. Add the issue to the {% data variables.projects.projects_v1_board %} column that you specified in your workflow file. For more information, see "[Adding issues and pull requests to a {% data variables.product.prodname_project_v1 %}](/github/managing-your-work-on-github/adding-issues-and-pull-requests-to-a-project-board)."
|
||||
4. To see the workflow run that was triggered by adding the issue to the project, view the history of your workflow runs. For more information, see "[Viewing workflow run history](/actions/managing-workflow-runs/viewing-workflow-run-history)."
|
||||
5. When the workflow completes, the issue that you added to the project column should have the specified label removed.
|
||||
|
||||
## Próximas etapas
|
||||
## Next steps
|
||||
|
||||
- Para saber mais sobre outras coisas que você pode fazer com a ação `andymckay/labeler`, como adicionar rótulos ou ignorar essa ação se o problema for atribuído ou tiver um rótulo específico, acesse a [documentação da ação `andymckay/labeler`](https://github.com/marketplace/actions/simple-issue-labeler).
|
||||
- [Pesquise o GitHub](https://github.com/search?q=%22uses:+andymckay/labeler%22&type=code) para ver exemplos de fluxos de trabalho que usam essa ação.
|
||||
- To learn more about additional things you can do with the `actions/github-script` action, see the [`actions/github-script` action documentation](https://github.com/marketplace/actions/github-script).
|
||||
- [Search GitHub](https://github.com/search?q=%22uses:+actions/github-script%22&type=code) for examples of workflows using this action.
|
||||
|
||||
@@ -17,12 +17,12 @@ topics:
|
||||
redirect_from:
|
||||
- /admin/configuration/restricting-network-traffic-to-your-enterprise
|
||||
- /admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise
|
||||
ms.openlocfilehash: d9a4518f2fcc23d4b49967effb7b9a3022a7c6bd
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.openlocfilehash: b62ab2a143ed0e7ec57f7e7225a09c0ca713295c
|
||||
ms.sourcegitcommit: 7fb7ec2e665856fc5f7cd209b53bd0fb1c9bbc67
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: '148184009'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185040'
|
||||
---
|
||||
## Sobre as restrições de tráfego de rede
|
||||
|
||||
@@ -115,7 +115,7 @@ Você pode adotar a lista de permissões do seu IdP se usar o {% data variables.
|
||||
1. Em "Lista de permissões de IP", selecione o menu suspenso e clique em **Provedor de Identidade**.
|
||||
|
||||

|
||||
- Como alternativa, para permitir que os {% data variables.product.company_short %} e {% data variables.product.prodname_oauth_apps %} acessem sua empresa de qualquer endereço IP, selecione **Ignorar a verificação do IdP nos aplicativos**.
|
||||
1. Como alternativa, para permitir que os {% data variables.product.company_short %} e {% data variables.product.prodname_oauth_apps %} acessem sua empresa de qualquer endereço IP, selecione **Ignorar a verificação do IdP nos aplicativos**.
|
||||
|
||||

|
||||
1. Clique em **Salvar**.
|
||||
|
||||
@@ -236,6 +236,7 @@ Appliances configured for high-availability and geo-replication use replica inst
|
||||
|
||||
- If you have upgraded each node to {% data variables.product.product_name %} 3.6.0 or later and started replication, but `git replication is behind the primary` continues to appear after 45 minutes, contact {% data variables.contact.enterprise_support %}. For more information, see "[Receiving help from {% data variables.contact.github_support %}](/admin/enterprise-support/receiving-help-from-github-support)."
|
||||
{%- endif %}
|
||||
|
||||
- {% ifversion ghes = 3.4 or ghes = 3.5 or ghes = 3.6 %}Otherwise, if{% else %}If{% endif %} `ghe-repl-status` did not return `OK`, contact {% data variables.contact.enterprise_support %}. For more information, see "[Receiving help from {% data variables.contact.github_support %}](/admin/enterprise-support/receiving-help-from-github-support)."
|
||||
6. When you have completed upgrading the last replica, and the resync is complete, disable maintenance mode so users can use {% data variables.location.product_location %}.
|
||||
|
||||
|
||||
@@ -50,51 +50,55 @@ You can disable the {% data variables.product.prodname_server_statistics %} feat
|
||||
|
||||
After you enable {% data variables.product.prodname_server_statistics %}, metrics are collected through a daily job that runs on {% data variables.location.product_location %}. The aggregate metrics are stored on your organization or enterprise account on {% data variables.product.prodname_ghe_cloud %} and are not stored on {% data variables.location.product_location %}.
|
||||
|
||||
The following aggregate metrics will be collected and transmitted on a daily basis and represent the total counts for the day:
|
||||
- `active_hooks`
|
||||
- `admin_users`
|
||||
- `closed_issues`
|
||||
- `closed_milestones`
|
||||
- `collection_date`
|
||||
- `disabled_orgs`
|
||||
- `dormancy_threshold`
|
||||
- `fork_repos`
|
||||
- `ghes_version`
|
||||
- `github_connect_features_enabled`
|
||||
- `inactive_hooks`
|
||||
- `mergeable_pulls`
|
||||
- `merged_pulls`
|
||||
- `open_issues`
|
||||
- `open_milestones`
|
||||
- `org_repos`
|
||||
- `private_gists`
|
||||
- `public_gists`
|
||||
- `root_repos`
|
||||
- `schema_version`
|
||||
- `server_id`
|
||||
- `suspended_users`
|
||||
- `total_commit_comments`
|
||||
- `total_dormant_users`
|
||||
- `total_gist_comments`
|
||||
- `total_gists`
|
||||
- `total_hooks`
|
||||
- `total_issues`
|
||||
- `total_issue_comments`
|
||||
- `total_milestones`
|
||||
- `total_repos`
|
||||
- `total_orgs`
|
||||
- `total_pages`
|
||||
- `total_pull_request_comments`
|
||||
- `total_pulls`
|
||||
- `total_pushes`
|
||||
- `total_team_members`
|
||||
- `total_teams`
|
||||
- `total_users`
|
||||
- `total_wikis`
|
||||
- `unmergeable_pulls`
|
||||
The following aggregate metrics will be collected and transmitted on a daily basis and represent the total counts for the day.
|
||||
|
||||
## {% data variables.product.prodname_server_statistics %} payload example
|
||||
CSV column | Name | Description |
|
||||
---------- | ---- | ----------- |
|
||||
A | `github_connect.features_enabled` | Array of {% data variables.product.prodname_github_connect %} features that are enabled for your instance (see "[About {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect#github-connect-features)" ) |
|
||||
B | `host_name` | The hostname for your instance |
|
||||
C | `dormant_users.dormancy_threshold` | The length of time a user must be inactive to be considered dormant |
|
||||
D | `dormant_users.total_dormant_users` | Number of dormant user accounts |
|
||||
E | `ghes_version` | The version of {% data variables.product.product_name %} that your instance is running |
|
||||
F | `server_id` | The UUID generated for your instance
|
||||
G | `collection_date` | The date the metrics were collected |
|
||||
H | `schema_version` | The version of the database schema used to store this data |
|
||||
I | `ghe_stats.comments.total_commit_comments` | Number of comments on commits |
|
||||
J | `ghe_stats.comments.total_gist_comments` | Number of comments on gists |
|
||||
K | `ghe_stats.comments.total_issue_comments` | Number of comments on issues |
|
||||
L | `ghe_stats.comments.total_pull_request_comments` | Number of comments on pull requests |
|
||||
M | `ghe_stats.gists.total_gists` | Number of gists (both secret and public) |
|
||||
N | `ghe_stats.gists.private_gists` | Number of secret gists |
|
||||
O | `ghe_stats.gists.public_gists` | Number of public gists |
|
||||
P | `ghe_stats.hooks.total_hooks` | Number of pre-receive hooks (both active and inactive) |
|
||||
Q | `ghe_stats.hooks.active_hooks` | Number of active pre-receive hooks |
|
||||
R | `ghe_stats.hooks.inactive_hooks` | Number of inactive pre-receive hooks |
|
||||
S | `ghe_stats.issues.total_issues` | Number of issues (both open and closed) |
|
||||
T | `ghe_stats.issues.open_issues` | Number of open issues |
|
||||
U | `ghe_stats.issues.closed_issues` | Number of closed issues |
|
||||
V | `ghe_stats.milestones.total_milestones` | Number of milestones (both open and closed) |
|
||||
W | `ghe_stats.milestones.open_milestones` | Number of open milestones |
|
||||
X | `ghe_stats.milestones.closed_milestones` | Number of closed milestones |
|
||||
Y | `ghe_stats.orgs.total_orgs` | Number of organizations (both enabled and disabled) |
|
||||
Z | `ghe_stats.orgs.disabled_orgs` | Number of disabled organizations |
|
||||
AA | `ghe_stats.orgs.total_teams` | Number of teams |
|
||||
AB | `ghe_stats.orgs.total_team_members` | Number of team members |
|
||||
AC | `ghe_stats.pages.total_pages` | Number of {% data variables.product.prodname_pages %} sites |
|
||||
AD | `ghe_stats.pulls.total_pulls` | Number of pull requests |
|
||||
AE | `ghe_stats.pulls.merged_pulls` | Number of merged pull requests |
|
||||
AF | `ghe_stats.pulls.mergeable_pulls` | Number of pull requests that are currently mergeable |
|
||||
AG | `ghe_stats.pulls.unmergeable_pulls` | Number of pull requests that are currently unmergeable |
|
||||
AH | `ghe_stats.repos.total_repos` | Number of repositories (both upstream repositories and forks) |
|
||||
AI | `ghe_stats.repos.root_repos` | Number of upstream repositories |
|
||||
AJ | `ghe_stats.repos.fork_repos` | Number of forks |
|
||||
AK | `ghe_stats.repos.org_repos` | Number of repositories owned by organizations |
|
||||
AL | `ghe_stats.repos.total_pushes` | Number of pushes to repositories |
|
||||
AM | `ghe_stats.repos.total_wikis` | Number of wikis |
|
||||
AN | `ghe_stats.users.total_users` | Number of user accounts |
|
||||
AO | `ghe_stats.users.admin_users` | Number of user accounts that are site administrators |
|
||||
AP | `ghe_stats.users.suspended_users` | Number of user accounts that are suspended |
|
||||
|
||||
To see an example of the response payload for the {% data variables.product.prodname_server_statistics %} API, see "[Requesting {% data variables.product.prodname_server_statistics %} using the REST API](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/requesting-server-statistics-using-the-rest-api)."
|
||||
## {% data variables.product.prodname_server_statistics %} data examples
|
||||
|
||||
To see a list of the data collected, see "[{% data variables.product.prodname_server_statistics %} data collected](#server-statistics-data-collected)."
|
||||
To see an example of the headings included in the CSV export for {% data variables.product.prodname_server_statistics %}, download the [{% data variables.product.prodname_server_statistics %} CSV example](/assets/server-statistics-csv-example.csv).
|
||||
|
||||
To see an example of the response payload for the {% data variables.product.prodname_server_statistics %} API, see "[Requesting {% data variables.product.prodname_server_statistics %} using the REST API](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/requesting-server-statistics-using-the-rest-api)."
|
||||
@@ -7,19 +7,13 @@ topics:
|
||||
- Enterprise
|
||||
shortTitle: Export membership information
|
||||
permissions: Enterprise owners can export membership information for an enterprise.
|
||||
ms.openlocfilehash: ba7519aae1b38cd629a46baeacd5edc9d138efdc
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.openlocfilehash: 8da0e7b91e8bff85cb27fb7df3f06e62bdb290f2
|
||||
ms.sourcegitcommit: 7e2b5213fd15d91222725ecab5ee28cef378d3ad
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148106418'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185540'
|
||||
---
|
||||
{% note %}
|
||||
|
||||
**Observação:** a exportação de informações de associação de uma empresa está em versão beta e sujeita a alterações no momento.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
Para executar uma auditoria de pessoas com acesso aos recursos da empresa, você pode baixar um relatório CSV de informações de associação da empresa.
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.people-tab %}
|
||||
|
||||
@@ -230,3 +230,13 @@ You can view all open alerts, and you can reopen alerts that have been previousl
|
||||

|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
## Reviewing the audit logs for {% data variables.product.prodname_dependabot_alerts %}
|
||||
|
||||
When a member of your organization {% ifversion not fpt %}or enterprise {% endif %}performs an action related to {% data variables.product.prodname_dependabot_alerts %}, you can review the actions in the audit log. For more information about accessing the log, see "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#accessing-the-audit-log){% ifversion not fpt %}" and "[Accessing the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise)."{% else %}."{% endif %}
|
||||
{% ifversion dependabot-alerts-audit-log %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
Events in your audit log for {% data variables.product.prodname_dependabot_alerts %} include details such as who performed the action, what the action was, and when the action was performed. {% ifversion dependabot-alerts-audit-log %}The event also includes a link to the alert itself. When a member of your organization dismisses an alert, the event displays the dismissal reason and comment.{% endif %} For information on the {% data variables.product.prodname_dependabot_alerts %} actions, see the `repository_vulnerability_alert` category in "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#repository_vulnerability_alert-category-actions){% ifversion not fpt %}" and "[Audit log events for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise#repository_vulnerability_alert-category-actions)."{% else %}."{% endif %}
|
||||
|
||||
@@ -478,8 +478,28 @@ By default, {% data variables.product.prodname_dependabot %} automatically rebas
|
||||
|
||||
Available rebase strategies
|
||||
|
||||
- `disabled` to disable automatic rebasing.
|
||||
- `auto` to use the default behavior and rebase open pull requests when changes are detected.
|
||||
- `disabled` to disable automatic rebasing.
|
||||
|
||||
When `rebase-strategy` is set to `auto`, {% data variables.product.prodname_dependabot %} attempts to rebase pull requests in the following cases.
|
||||
- When you use {% data variables.product.prodname_dependabot_version_updates %}, for any open {% data variables.product.prodname_dependabot %} pull request when your schedule runs.
|
||||
- When you reopen a closed {% data variables.product.prodname_dependabot %} pull request.
|
||||
- When you change the value of `target-branch` in the {% data variables.product.prodname_dependabot %} configuration file. For more information about this field, see "[`target-branch`](#target-branch)."
|
||||
- When {% data variables.product.prodname_dependabot %} detects that a {% data variables.product.prodname_dependabot %} pull request is in conflict after a recent push to the target branch.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data variables.product.prodname_dependabot %} will keep rebasing a pull request indefinitely until the pull request is closed, merged or you disable {% data variables.product.prodname_dependabot_updates %}.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
When `rebase-strategy` is set to `disabled`, {% data variables.product.prodname_dependabot %} stops rebasing pull requests.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** This behavior only applies to pull requests that go into conflict with the target branch. {% data variables.product.prodname_dependabot %} will keep rebasing pull requests opened prior to the `rebase-strategy` setting being changed, and pull requests that are part of a scheduled run.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.dependabot.option-affects-security-updates %}
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ versions:
|
||||
type: reference
|
||||
topics:
|
||||
- Codespaces
|
||||
ms.openlocfilehash: 8ffd48856a2653f3db3c871122d3acd23c246d7a
|
||||
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
|
||||
ms.openlocfilehash: 3f4ef139386e616d14ef9a9cc5b474c96983de91
|
||||
ms.sourcegitcommit: 1a77ceb9e20c002173dda983db9405bcd5be254a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 11/09/2022
|
||||
ms.locfileid: '148159318'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185174'
|
||||
---
|
||||
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
|
||||
|
||||
@@ -42,16 +42,10 @@ Os ícones na parte superior da janela de ferramentas dos {% data variables.prod
|
||||
|
||||
* **Atualizar o codespace ativo**
|
||||
|
||||

|
||||

|
||||
|
||||
Atualize os detalhes da janela de ferramentas do {% data variables.product.prodname_github_codespaces %}. Por exemplo, se você usou a {% data variables.product.prodname_cli %} para alterar o nome de exibição, clique nesse botão para mostrar o novo nome.
|
||||
|
||||
* **Desconectar e parar**
|
||||
|
||||

|
||||
|
||||
Pare o codespace, pare o IDE de back-end no computador remoto e feche o cliente JetBrains local.
|
||||
|
||||
* **Gerenciar os codespaces na Web**
|
||||
|
||||

|
||||
@@ -63,10 +57,3 @@ Os ícones na parte superior da janela de ferramentas dos {% data variables.prod
|
||||

|
||||
|
||||
Abra o log de criação do codespace na janela do editor. Para ver mais informações, confira "[Logs do {% data variables.product.prodname_github_codespaces %}](/codespaces/troubleshooting/github-codespaces-logs)."
|
||||
|
||||
* **Recompilar o contêiner de desenvolvimento**
|
||||
|
||||

|
||||
|
||||
Recompile o codespace para aplicar as alterações feitas na configuração do contêiner de desenvolvimento. O cliente JetBrains será fechado e você precisará reabrir o codespace. Para obter mais informações, confira "[O ciclo de vida do codespace](/codespaces/developing-in-codespaces/the-codespace-lifecycle#rebuilding-a-codespace)".
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ versions:
|
||||
fpt: '*'
|
||||
permissions: 'Organization owners who are admins for a classroom can connect learning management systems to {% data variables.product.prodname_classroom %}.'
|
||||
shortTitle: Register an LMS
|
||||
ms.openlocfilehash: e1c1abed5ce4ebf82c19b29fef9a005fbe4c7a02
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.openlocfilehash: 408126833cbf7fa8cd4a71d172f6550e82f795a2
|
||||
ms.sourcegitcommit: 1a77ceb9e20c002173dda983db9405bcd5be254a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148106850'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185166'
|
||||
---
|
||||
## Como registrar um LMS na sala de aula
|
||||
|
||||
@@ -63,8 +63,8 @@ Você pode registrar a instalação do Canvas no {% data variables.product.prodn
|
||||
- "Identificador do emissor": `https://canvas.instructure.com`
|
||||
- "Domínio": a URL base da instância do Canvas
|
||||
- "ID do cliente": a "ID do cliente" em "Detalhes" da chave do desenvolvedor que você criou
|
||||
- "Ponto de extremidade de autorização OIDC": a URL base da instância do Canvas com `/login/oauth2/token` acrescentado no final.
|
||||
- "URL de recuperação de token OAuth 2.0": a URL base da instância do Canvas com `/api/lti/authorize_redirect` acrescentado no final.
|
||||
- "Ponto de extremidade de autorização OIDC": a URL base da instância do Canvas com `/api/lti/authorize_redirect` acrescentado no final.
|
||||
- "URL de recuperação de token OAuth 2.0": a URL base da instância do Canvas com `/login/oauth2/token` acrescentado no final.
|
||||
- "URL de definição da chave": a URL base da instância do Canvas com `/api/lti/security/jwks` acrescentado no final.
|
||||
|
||||

|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Notas de versão geradas automaticamente
|
||||
intro: Você pode gerar automaticamente notas de versão para as suas versões do GitHub
|
||||
title: Automatically generated release notes
|
||||
intro: You can automatically generate release notes for your GitHub releases
|
||||
permissions: Repository collaborators and people with write access to a repository can generate and customize automated release notes for a release.
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -13,61 +13,71 @@ shortTitle: Automated release notes
|
||||
communityRedirect:
|
||||
name: Provide GitHub Feedback
|
||||
href: 'https://github.com/orgs/community/discussions/categories/general'
|
||||
ms.openlocfilehash: a4adfa306873ef172950666756add7d0e67e168d
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147432013'
|
||||
---
|
||||
## Sobre notas de versão geradas automaticamente
|
||||
|
||||
As otas de versão geradas automaticamente fornecem uma alternativa automatizada para escrever notas de versão manualmente para as suas versões de {% data variables.product.prodname_dotcom %}. Com as notas de versões geradas automaticamente, você pode gerar rapidamente uma visão geral do conteúdo de uma versão. As notas sobre a versão geradas automaticamente incluem uma lista de solicitações de pull mescladas, uma lista de colaboradores da versão e um link para um changelog completo.
|
||||
## About automatically generated release notes
|
||||
|
||||
Você também pode personalizar suas notas de versão automatizadas, usando etiquetas para criar categorias personalizadas e organizar pull requests que você deseja incluir e excluir certas etiquetas e usuários para que não apareçam na saída.
|
||||
Automatically generated release notes provide an automated alternative to manually writing release notes for your {% data variables.product.prodname_dotcom %} releases. With automatically generated release notes, you can quickly generate an overview of the contents of a release. Automatically generated release notes include a list of merged pull requests, a list of contributors to the release, and a link to a full changelog.
|
||||
|
||||
## Criando notas de versão geradas automaticamente para uma nova versão
|
||||
You can also customize your automated release notes, using labels to create custom categories to organize pull requests you want to include, and exclude certain labels and users from appearing in the output.
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.releases %}
|
||||
3. Clique em **Criar rascunho de uma nova versão**.
|
||||

|
||||
4. {% ifversion fpt or ghec %} Clique em **Escolher uma tag** e digite{% else %}Digite{% endif %} um número de versão para a versão. Como alternativa, selecione um tag existente.
|
||||
{% ifversion fpt or ghec %} 
|
||||
5. Se estiver criando uma marca, clique em **Criar marca**.
|
||||
 {% else %}  {% endif %}
|
||||
6. Se você criou uma nova tag, use o menu suspenso para selecionar o branch que contém o projeto que você deseja liberar.
|
||||
{% ifversion fpt or ghec %} {% else %} {% endif %} {%- data reusables.releases.previous-release-tag %}
|
||||
7. No canto superior direito da caixa de texto da descrição, clique em {% ifversion previous-release-tag %}**Gerar notas sobre a versão**{% else %}**Gerar automaticamente as notas sobre a versão**{% endif %}.{% ifversion previous-release-tag %} {% else %} {% endif %}
|
||||
8. Selecione as notas geradas para garantir que elas incluem todas (e apenas) as informações que você deseja incluir.
|
||||
9. Opcionalmente, para incluir arquivos binários, como programas compilados em sua versão, arraste e solte ou selecione arquivos manualmente na caixa de binários.
|
||||

|
||||
10. Para notificar os usuários de que a versão não está pronta para produção e pode ser instável, selecione **Este é um pré-lançamento**.
|
||||
 {%- ifversion fpt or ghec %}
|
||||
11. Opcionalmente, selecione **Criar uma discussão para esta versão**, escolha o menu suspenso **Categoria** e clique em uma categoria para ver a discussão da versão.
|
||||
 {%- endif %}
|
||||
12. Se estiver pronto para tornar sua versão pública, clique em **Publicar versão**. Para trabalhar na versão posteriormente, clique em **Salvar rascunho**.
|
||||

|
||||
## Creating automatically generated release notes for a new release
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.releases %}
|
||||
3. Click **Draft a new release**.
|
||||

|
||||
4. {% ifversion fpt or ghec %}Click **Choose a tag** and type{% else %}Type{% endif %} a version number for your release. Alternatively, select an existing tag.
|
||||
{% ifversion fpt or ghec %}
|
||||

|
||||
5. If you are creating a new tag, click **Create new tag**.
|
||||

|
||||
{% else %}
|
||||

|
||||
{% endif %}
|
||||
6. If you have created a new tag, use the drop-down menu to select the branch that contains the project you want to release.
|
||||
{% ifversion fpt or ghec %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{%- data reusables.releases.previous-release-tag %}
|
||||
7. To the top right of the description text box, click {% ifversion previous-release-tag %}**Generate release notes**{% else %}**Auto-generate release notes**{% endif %}.{% ifversion previous-release-tag %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
8. Check the generated notes to ensure they include all (and only) the information you want to include.
|
||||
9. Optionally, to include binary files such as compiled programs in your release, drag and drop or manually select files in the binaries box.
|
||||

|
||||
10. To notify users that the release is not ready for production and may be unstable, select **This is a pre-release**.
|
||||

|
||||
{%- ifversion fpt or ghec %}
|
||||
11. Optionally, select **Create a discussion for this release**, then select the **Category** drop-down menu and click a category for the release discussion.
|
||||

|
||||
{%- endif %}
|
||||
12. If you're ready to publicize your release, click **Publish release**. To work on the release later, click **Save draft**.
|
||||

|
||||
|
||||
|
||||
## Configurar notas de versões geradas automaticamente
|
||||
## Configuring automatically generated release notes
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %} {% data reusables.files.add-file %}
|
||||
3. No campo de nome do arquivo, digite `.github/release.yml` para criar o arquivo `release.yml` no diretório `.github`.
|
||||

|
||||
4. No arquivo, usando as opções de configuração abaixo, especifique no YAML as etiquetas de pull request e autores que você deseja excluir desta versão. Você também pode criar novas categorias e listar as etiquetas de pull request para que sejam incluídas cada uma delas.
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.files.add-file %}
|
||||
3. In the file name field, type `.github/release.yml` to create the `release.yml` file in the `.github` directory.
|
||||

|
||||
4. In the file, using the configuration options below, specify in YAML the pull request labels and authors you want to exclude from this release. You can also create new categories and list the pull request labels to be included in each of them.
|
||||
|
||||
### Opções de configuração
|
||||
### Configuration options
|
||||
|
||||
| Parâmetro | Descrição |
|
||||
| Parameter | Description |
|
||||
| :- | :- |
|
||||
| `changelog.exclude.labels` | Uma lista de etiquetas que excluem um pull request de aparecer nas notas de versão. |
|
||||
| `changelog.exclude.authors` | Uma lista de usuários ou servidores de login com os quais os pull requests devem ser excluídos das notas de versão. |
|
||||
| `changelog.categories[*].title` | **Necessário.** O título de uma categoria de alterações nas notas sobre a versão. |
|
||||
| `changelog.categories[*].labels`| **Necessário.** Rótulos que qualificam uma solicitação de pull para essa categoria. Use `*` como um catch-all para as solicitações de pull que não correspondem a nenhuma das categorias anteriores. |
|
||||
| `changelog.categories[*].exclude.labels` | Uma lista de etiquetas que excluem um pull request de aparecer nesta categoria. |
|
||||
| `changelog.categories[*].exclude.authors` | Uma lista gerenciamento de login de sessão de usuários ou bot, cujos pull requests devem ser excluídos desta categoria. |
|
||||
| `changelog.exclude.labels` | A list of labels that exclude a pull request from appearing in release notes. |
|
||||
| `changelog.exclude.authors` | A list of user or bot login handles whose pull requests are to be excluded from release notes. |
|
||||
| `changelog.categories[*].title` | **Required.** The title of a category of changes in release notes. |
|
||||
| `changelog.categories[*].labels`| **Required.** Labels that qualify a pull request for this category. Use `*` as a catch-all for pull requests that didn't match any of the previous categories. |
|
||||
| `changelog.categories[*].exclude.labels` | A list of labels that exclude a pull request from appearing in this category. |
|
||||
| `changelog.categories[*].exclude.authors` | A list of user or bot login handles whose pull requests are to be excluded from this category. |
|
||||
|
||||
### Configuração de exemplo
|
||||
### Example configurations
|
||||
|
||||
A configuration for a repository that labels semver releases
|
||||
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
@@ -94,6 +104,26 @@ changelog:
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
## Leitura adicional
|
||||
A configuration for a repository that doesn't tag pull requests but where we want to separate out {% data variables.product.prodname_dependabot %} automated pull requests in release notes (`labels: '*'` is required to display a catchall category)
|
||||
|
||||
- "[Como gerenciar rótulos](/issues/using-labels-and-milestones-to-track-work/managing-labels)"
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
# .github/release.yml
|
||||
|
||||
changelog:
|
||||
categories:
|
||||
- title: 🏕 Features
|
||||
labels:
|
||||
- '*'
|
||||
exclude:
|
||||
labels:
|
||||
- dependencies
|
||||
- title: 👒 Dependencies
|
||||
labels:
|
||||
- dependencies
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Managing labels](/issues/using-labels-and-milestones-to-track-work/managing-labels)"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Gitignore
|
||||
intro: The Gitignore API fetches `.gitignore` templates that can be used to ignore files and directories.
|
||||
intro: A API Gitignore busca modelos `.gitignore` que podem ser usados para ignorar arquivos e diretórios.
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghes: '*'
|
||||
@@ -11,16 +11,21 @@ topics:
|
||||
miniTocMaxHeadingLevel: 3
|
||||
redirect_from:
|
||||
- /rest/reference/gitignore
|
||||
ms.openlocfilehash: e830b0f00d60f3eb121fa2a99a910b073780700e
|
||||
ms.sourcegitcommit: cfe91073c844cb762131b2de9fb41f7f9db792fc
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 11/24/2022
|
||||
ms.locfileid: '148181265'
|
||||
---
|
||||
## Sobre a API do Gitignore
|
||||
|
||||
## About the Gitignore API
|
||||
Quando você cria um repositório no {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} por meio da API, você pode especificar um [modelo .gitignore](/github/getting-started-with-github/ignoring-files) para aplicá-lo ao repositório após a criação. A API de modelos .gitignore lista modelos do [repositório .gitignore](https://github.com/github/gitignore) do {% data variables.product.product_name %} e efetua fetch deles.
|
||||
|
||||
When you create a new repository on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} via the API, you can specify a [.gitignore template](/github/getting-started-with-github/ignoring-files) to apply to the repository upon creation. The .gitignore templates API lists and fetches templates from the {% data variables.product.product_name %} [.gitignore repository](https://github.com/github/gitignore).
|
||||
### Tipos de mídia personalizados para gitignore
|
||||
|
||||
### Custom media types for gitignore
|
||||
|
||||
You can use this custom media type when getting a gitignore template.
|
||||
Você pode usar este tipo de mídia personalizada ao obter um modelo de gitignore.
|
||||
|
||||
application/vnd.github.raw
|
||||
|
||||
For more information, see "[Media types](/rest/overview/media-types)."
|
||||
Para obter mais informações, confira "[Tipos de mídia](/rest/overview/media-types)".
|
||||
|
||||
@@ -5,12 +5,12 @@ versions:
|
||||
feature: pat-v2
|
||||
miniTocMaxHeadingLevel: 3
|
||||
shortTitle: '{% data variables.product.pat_v2_caps %} permissions'
|
||||
ms.openlocfilehash: 97154c54229f66f3a6b3bf852f7aabab89a0d2ee
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.openlocfilehash: 46a82b0212d4cda2b6883c0b33ba2acb2e50b9d0
|
||||
ms.sourcegitcommit: d2f0b59ed096b9e68ef8f6fa019cd925165762ec
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148107682'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148184209'
|
||||
---
|
||||
## Sobre as permissões necessárias para o {% data variables.product.pat_v2 %}
|
||||
|
||||
@@ -65,11 +65,10 @@ Ao criar um {% data variables.product.pat_v2 %}, você concede a ele um conjunto
|
||||
- [`PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`](/rest/reference/teams/#add-or-update-team-repository-permissions) (gravação)
|
||||
- [`DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`](/rest/reference/teams/#remove-a-repository-from-a-team) (gravação)
|
||||
- [`POST /orgs/{org}/repos`](/rest/reference/repos#create-an-organization-repository) (gravação)
|
||||
- [`PATCH /repos/{owner}/{repo}`](/rest/reference/repos/#update-a-repository) (gravação)
|
||||
- [`PATCH /repos/{owner}/{repo}`](/rest/repos/repos#update-a-repository) (gravação)
|
||||
- [`DELETE /repos/{owner}/{repo}`](/rest/reference/repos#delete-a-repository) (gravação)
|
||||
- [`POST /repos/{owner}/{repo}/forks`](/rest/reference/repos#create-a-fork) (gravação)
|
||||
- [`GET /repos/{owner}/{repo}/teams`](/rest/reference/repos#list-repository-teams) (leitura)
|
||||
- [`POST /repos/{owner}/{repo}/transfer`](/rest/reference/repos#transfer-a-repository) (gravação)
|
||||
- [`POST /user/repos`](/rest/reference/repos#create-a-repository-for-the-authenticated-user) (gravação)
|
||||
- [`GET /repos/{owner}/{repo}/actions/permissions`](/rest/reference/actions#get-github-actions-permissions-for-a-repository) (leitura)
|
||||
- [`PUT /repos/{owner}/{repo}/actions/permissions`](/rest/reference/actions#set-github-actions-permissions-for-a-repository) (gravação)
|
||||
@@ -130,16 +129,6 @@ Ao criar um {% data variables.product.pat_v2 %}, você concede a ele um conjunto
|
||||
|
||||
## Verificações
|
||||
|
||||
- [`POST /repos/{owner}/{repo}/check-runs`](/rest/reference/checks#create-a-check-run) (gravação)
|
||||
- [`GET /repos/{owner}/{repo}/check-runs/{check_run_id}`](/rest/reference/checks#get-a-check-run) (leitura)
|
||||
- [`PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}`](/rest/reference/checks#update-a-check-run) (gravação)
|
||||
- [`GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations`](/rest/reference/checks#list-check-run-annotations) (leitura)
|
||||
- [`POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest`](/rest/reference/checks#rerequest-a-check-run) (gravação)
|
||||
- [`GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs`](/rest/reference/checks#list-check-runs-in-a-check-suite) (leitura)
|
||||
- [`POST /repos/{owner}/{repo}/check-suites`](/rest/reference/checks#create-a-check-suite) (gravação)
|
||||
- [`GET /repos/{owner}/{repo}/check-suites/{check_suite_id}`](/rest/reference/checks#get-a-check-suite) (leitura)
|
||||
- [`POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest`](/rest/reference/checks#rerequest-a-check-suite) (gravação)
|
||||
- [`PATCH /repos/{owner}/{repo}/check-suites/preferences`](/rest/reference/checks#update-repository-preferences-for-check-suites) (gravação)
|
||||
- [`POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments`](/rest/reference/actions#review-pending-deployments-for-a-workflow-run) (leitura)
|
||||
|
||||
## Codespaces
|
||||
@@ -196,20 +185,12 @@ Ao criar um {% data variables.product.pat_v2 %}, você concede a ele um conjunto
|
||||
- [`POST /repos/{owner}/{repo}/git/refs`](/rest/reference/git#create-a-reference) (gravação)
|
||||
- [`POST /repos/{owner}/{repo}/git/tags`](/rest/reference/git#create-a-tag-object) (gravação)
|
||||
- [`POST /repos/{owner}/{repo}/git/trees`](/rest/reference/git#create-a-tree) (gravação)
|
||||
- [`GET /repos/{owner}/{repo}/import`](/rest/reference/migrations#get-an-import-status) (leitura)
|
||||
- [`PUT /repos/{owner}/{repo}/import`](/rest/reference/migrations#start-an-import) (gravação)
|
||||
- [`PATCH /repos/{owner}/{repo}/import`](/rest/reference/migrations#update-an-import) (gravação)
|
||||
- [`DELETE /repos/{owner}/{repo}/import`](/rest/reference/migrations#cancel-an-import) (gravação)
|
||||
- [`GET /repos/{owner}/{repo}/import/authors`](/rest/reference/migrations#get-commit-authors) (leitura)
|
||||
- [`PATCH /repos/{owner}/{repo}/import/authors/{author_id}`](/rest/reference/migrations#map-a-commit-author) (gravação)
|
||||
- [`GET /repos/{owner}/{repo}/import/large_files`](/rest/reference/migrations#get-large-files) (leitura)
|
||||
- [`PATCH /repos/{owner}/{repo}/import/lfs`](/rest/reference/migrations#update-git-lfs-preference) (gravação)
|
||||
- [`PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge`](/rest/reference/pulls#merge-a-pull-request) (gravação)
|
||||
- [`POST /repos/{owner}/{repo}/comments/{comment_id}/reactions`](/rest/reference/reactions#create-reaction-for-a-commit-comment) (gravação)
|
||||
- [`DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}`](/rest/reference/reactions#delete-a-commit-comment-reaction) (gravação)
|
||||
- [`GET /repos/{owner}/{repo}/branches`](/rest/reference/repos#list-branches) (leitura)
|
||||
- [`POST /repos/{owner}/{repo}/merge-upstream`](/rest/reference/repos#sync-a-fork-branch-with-the-upstream-repository) (gravação)
|
||||
- [`POST /repos/{owner}/{repo}/merges`](/rest/reference/repos#merge-a-branch) (gravação)
|
||||
- [`GET /repos/{owner}/{repo}/branches`](/rest/branches/branches#list-branches) (leitura)
|
||||
- [`POST /repos/{owner}/{repo}/merge-upstream`](/rest/branches/branches#sync-a-fork-branch-with-the-upstream-repository) (gravação)
|
||||
- [`POST /repos/{owner}/{repo}/merges`](/rest/branches/branches#merge-a-branch) (gravação)
|
||||
- [`GET /repos/{owner}/{repo}/code-scanning/codeql/databases`](/rest/reference/code-scanning#list-codeql-databases) (leitura)
|
||||
- [`GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}`](/rest/reference/code-scanning#get-codeql-database) (leitura)
|
||||
- [`PATCH /repos/{owner}/{repo}/comments/{comment_id}`](/rest/commits/comments#update-a-commit-comment) (gravação)
|
||||
@@ -320,7 +301,7 @@ Ao criar um {% data variables.product.pat_v2 %}, você concede a ele um conjunto
|
||||
- [`GET /repos/{owner}/{repo}/issues`](/rest/reference/issues#list-repository-issues) (leitura)
|
||||
- [`POST /repos/{owner}/{repo}/issues`](/rest/reference/issues#create-an-issue) (gravação)
|
||||
- [`GET /repos/{owner}/{repo}/issues/{issue_number}`](/rest/reference/issues#get-an-issue) (leitura)
|
||||
- [`PATCH /repos/{owner}/{repo}/issues/{issue_number}`](/rest/reference/issues/#update-an-issue) (gravação)
|
||||
- [`PATCH /repos/{owner}/{repo}/issues/{issue_number}`](/rest/reference/issues#update-an-issue) (gravação)
|
||||
- [`PUT /repos/{owner}/{repo}/issues/{issue_number}/lock`](/rest/reference/issues#lock-an-issue) (gravação)
|
||||
- [`DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock`](/rest/reference/issues#unlock-an-issue) (gravação)
|
||||
- [`GET /repos/{owner}/{repo}/issues/{issue_number}/labels`](/rest/reference/issues#list-labels-for-an-issue) (leitura)
|
||||
@@ -409,7 +390,6 @@ Ao criar um {% data variables.product.pat_v2 %}, você concede a ele um conjunto
|
||||
- [`POST /gists/{gist_id}/forks`](/rest/reference/gists#fork-a-gist) (leitura)
|
||||
- [`PUT /gists/{gist_id}/star`](/rest/reference/gists#star-a-gist) (leitura)
|
||||
- [`DELETE /gists/{gist_id}/star`](/rest/reference/gists#unstar-a-gist) (leitura)
|
||||
- [`GET /notifications`](/rest/reference/activity#list-notifications-for-the-authenticated-user) (leitura)
|
||||
- [`GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`](/rest/reference/teams/#check-team-permissions-for-a-repository) (leitura)
|
||||
- [`PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`](/rest/reference/teams/#add-or-update-team-repository-permissions) (leitura)
|
||||
- [`DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}`](/rest/reference/teams/#remove-a-repository-from-a-team) (leitura)
|
||||
@@ -439,10 +419,6 @@ Ao criar um {% data variables.product.pat_v2 %}, você concede a ele um conjunto
|
||||
- [`GET /search/labels`](/rest/reference/search#search-labels) (leitura)
|
||||
- [`GET /repos/{owner}/{repo}/topics`](/rest/reference/repos#get-all-repository-topics) (leitura)
|
||||
|
||||
## Notificações
|
||||
|
||||
- [`GET /notifications`](/rest/reference/activity#list-notifications-for-the-authenticated-user) (leitura)
|
||||
|
||||
## Administração da organização
|
||||
|
||||
{% ifversion ghec %}– [`GET /orgs/{org}/audit-log`](/rest/reference/orgs#get-audit-log) (leitura){% endif %}
|
||||
@@ -467,7 +443,7 @@ Ao criar um {% data variables.product.pat_v2 %}, você concede a ele um conjunto
|
||||
- [`GET /orgs/{org}/security-managers`](/rest/reference/orgs#list-security-manager-teams) (leitura)
|
||||
- [`PUT /orgs/{org}/security-managers/teams/{team_slug}`](/rest/reference/orgs#add-a-security-manager-team) (gravação)
|
||||
- [`DELETE /orgs/{org}/security-managers/teams/{team_slug}`](/rest/reference/orgs#remove-a-security-manager-team) (gravação)
|
||||
- [`PATCH /orgs/{org}`](/rest/reference/orgs/#update-an-organization) (gravação)
|
||||
- [`PATCH /orgs/{org}`](/rest/reference/orgs#update-an-organization) (gravação)
|
||||
- [`GET /orgs/{org}/installations`](/rest/reference/orgs#list-app-installations-for-an-organization) (leitura)
|
||||
|
||||
## Codespaces da organização
|
||||
@@ -491,6 +467,7 @@ Ao criar um {% data variables.product.pat_v2 %}, você concede a ele um conjunto
|
||||
## Funções personalizadas da organização
|
||||
|
||||
- [`GET /organizations/{organization_id}/custom_roles`](/rest/reference/orgs#list-custom-repository-roles-in-an-organization) (leitura)
|
||||
- [`GET /orgs/{org}/custom_roles/{role_id}`](/rest/reference/orgs/#get-a-custom-role) (leitura)
|
||||
- [`PATCH /orgs/{org}/custom_roles/{role_id}`](/rest/reference/orgs#update-a-custom-role) (gravação)
|
||||
- [`DELETE /orgs/{org}/custom_roles/{role_id}`](/rest/reference/orgs#delete-a-custom-role) (gravação)
|
||||
- [`GET /orgs/{org}/fine_grained_permissions`](/rest/reference/orgs#list-fine-grained-permissions-for-an-organization) (leitura)
|
||||
@@ -523,13 +500,6 @@ Ao criar um {% data variables.product.pat_v2 %}, você concede a ele um conjunto
|
||||
- [`POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts`](/rest/reference/orgs#redeliver-a-delivery-for-an-organization-webhook) (gravação)
|
||||
- [`POST /orgs/{org}/hooks/{hook_id}/pings`](/rest/reference/orgs#ping-an-organization-webhook) (gravação)
|
||||
|
||||
## Projetos da organização
|
||||
|
||||
- [`PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}`](/rest/reference/teams#add-or-update-team-project-permissions) (admin)
|
||||
- [`DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}`](/rest/reference/teams#remove-a-project-from-a-team) (admin)
|
||||
- [`GET /orgs/{org}/projects`](/rest/reference/projects#list-organization-projects) (leitura)
|
||||
- [`POST /orgs/{org}/projects`](/rest/reference/projects#create-an-organization-project) (gravação)
|
||||
|
||||
## Segredos da organização
|
||||
|
||||
- [`GET /orgs/{org}/actions/secrets`](/rest/reference/actions#list-organization-secrets) (leitura)
|
||||
@@ -640,30 +610,6 @@ Ao criar um {% data variables.product.pat_v2 %}, você concede a ele um conjunto
|
||||
- [`POST /repos/{owner}/{repo}/hooks/{hook_id}/pings`](/rest/webhooks/repos#ping-a-repository-webhook) (leitura)
|
||||
- [`POST /repos/{owner}/{repo}/hooks/{hook_id}/tests`](/rest/webhooks/repos#test-the-push-repository-webhook) (leitura)
|
||||
|
||||
## Projetos do repositório
|
||||
|
||||
- [`GET /projects/{project_id}/collaborators`](/rest/reference/projects#list-project-collaborators) (gravação)
|
||||
- [`PUT /projects/{project_id}/collaborators/{username}`](/rest/reference/projects#add-project-collaborator) (gravação)
|
||||
- [`DELETE /projects/{project_id}/collaborators/{username}`](/rest/reference/projects#remove-project-collaborator) (gravação)
|
||||
- [`GET /projects/{project_id}/collaborators/{username}/permission`](/rest/reference/projects#get-project-permission-for-a-user) (gravação)
|
||||
- [`GET /projects/{project_id}`](/rest/reference/projects#get-a-project) (leitura)
|
||||
- [`PATCH /projects/{project_id}`](/rest/reference/projects#update-a-project) (gravação)
|
||||
- [`DELETE /projects/{project_id}`](/rest/reference/projects#delete-a-project) (gravação)
|
||||
- [`GET /projects/{project_id}/columns`](/rest/reference/projects#list-project-columns) (leitura)
|
||||
- [`POST /projects/{project_id}/columns`](/rest/reference/projects#create-a-project-column) (gravação)
|
||||
- [`GET /projects/columns/{column_id}`](/rest/reference/projects#get-a-project-column) (leitura)
|
||||
- [`PATCH /projects/columns/{column_id}`](/rest/reference/projects#update-a-project-column) (gravação)
|
||||
- [`DELETE /projects/columns/{column_id}`](/rest/reference/projects#delete-a-project-column) (gravação)
|
||||
- [`GET /projects/columns/{column_id}/cards`](/rest/reference/projects#list-project-cards) (leitura)
|
||||
- [`POST /projects/columns/{column_id}/cards`](/rest/reference/projects#create-a-project-card) (gravação)
|
||||
- [`POST /projects/columns/{column_id}/moves`](/rest/reference/projects#move-a-project-column) (gravação)
|
||||
- [`GET /projects/columns/cards/{card_id}`](/rest/reference/projects#get-a-project-card) (leitura)
|
||||
- [`PATCH /projects/columns/cards/{card_id}`](/rest/reference/projects#update-a-project-card) (gravação)
|
||||
- [`DELETE /projects/columns/cards/{card_id}`](/rest/reference/projects#delete-a-project-card) (gravação)
|
||||
- [`POST /projects/columns/cards/{card_id}/moves`](/rest/reference/projects#move-a-project-card) (gravação)
|
||||
- [`GET /repos/{owner}/{repo}/projects`](/rest/reference/projects#list-repository-projects) (leitura)
|
||||
- [`POST /repos/{owner}/{repo}/projects`](/rest/reference/projects#create-a-repository-project) (gravação)
|
||||
|
||||
## Alertas de verificação de segredo
|
||||
|
||||
- [`GET /orgs/{org}/secret-scanning/alerts`](/rest/reference/secret-scanning#list-secret-scanning-alerts-for-an-organization) (leitura)
|
||||
@@ -727,6 +673,10 @@ Ao criar um {% data variables.product.pat_v2 %}, você concede a ele um conjunto
|
||||
- [`PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}`](/rest/reference/teams#update-a-discussion-comment) (gravação)
|
||||
- [`DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}`](/rest/reference/teams#delete-a-discussion-comment) (gravação)
|
||||
|
||||
## Alertas de vulnerabilidade
|
||||
|
||||
- [`GET /orgs/{org}/dependabot/alerts`](/rest/dependabot/alerts#list-dependabot-alerts-for-an-organization) (leitura)
|
||||
|
||||
## Observando
|
||||
|
||||
- [`GET /users/{username}/subscriptions`](/rest/reference/activity#list-repositories-watched-by-a-user) (leitura)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Troubleshooting
|
||||
intro: Learn how to resolve the most common problems people encounter in the REST API.
|
||||
title: Solução de problemas
|
||||
intro: Aprenda a resolver os problemas mais comuns que as pessoas enfrentam na API REST.
|
||||
redirect_from:
|
||||
- /v3/troubleshooting
|
||||
versions:
|
||||
@@ -10,78 +10,73 @@ versions:
|
||||
ghec: '*'
|
||||
topics:
|
||||
- API
|
||||
ms.openlocfilehash: ecfa3a360ef9b042d96a1f80a2f0cde49390727f
|
||||
ms.sourcegitcommit: d2f0b59ed096b9e68ef8f6fa019cd925165762ec
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148184226'
|
||||
---
|
||||
|
||||
|
||||
|
||||
If you're encountering some oddities in the API, here's a list of resolutions to
|
||||
some of the problems you may be experiencing.
|
||||
Se você estiver encontrando situações estranhas na API, veja uma lista de resoluções de alguns dos problemas que pode estar enfrentando.
|
||||
|
||||
{% ifversion api-date-versioning %}
|
||||
|
||||
## `400` error for an unsupported API version
|
||||
## Erro `400` para uma versão da API sem suporte
|
||||
|
||||
You should use the `X-GitHub-Api-Version` header to specify an API version. For example:
|
||||
Você deve usar o cabeçalho `X-GitHub-Api-Version` para especificar uma versão da API. Por exemplo:
|
||||
|
||||
```shell
|
||||
$ curl {% data reusables.rest-api.version-header %} https://api.github.com/zen
|
||||
```
|
||||
|
||||
If you specify a version that does not exist, you will receive a `400` error.
|
||||
Se você especificar uma versão que não existe, receberá um erro `400`.
|
||||
|
||||
For more information, see "[API Versions](/rest/overview/api-versions)."
|
||||
Para obter mais informações, confira "[Versões da API](/rest/overview/api-versions)".
|
||||
|
||||
{% endif %}
|
||||
|
||||
## `404` error for an existing repository
|
||||
## Erro `404` em um repositório existente
|
||||
|
||||
Typically, we send a `404` error when your client isn't properly authenticated.
|
||||
You might expect to see a `403 Forbidden` in these cases. However, since we don't
|
||||
want to provide _any_ information about private repositories, the API returns a
|
||||
`404` error instead.
|
||||
Normalmente, enviamos um erro `404` quando o cliente não está autenticado corretamente.
|
||||
Você poderá esperar ver um erro `403 Forbidden` nesses casos. No entanto, como não queremos fornecer _nenhuma_ informação sobre os repositórios privados, a API retorna um erro `404`.
|
||||
|
||||
To troubleshoot, ensure [you're authenticating correctly](/guides/getting-started/), [your OAuth access token has the required scopes](/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), [third-party application restrictions][oap-guide] are not blocking access, and that [the token has not expired or been revoked](/github/authenticating-to-github/keeping-your-account-and-data-secure/token-expiration-and-revocation).
|
||||
Para a solução de problemas, verifique se [você está se autenticando corretamente](/guides/getting-started/), se [o token de acesso OAuth tem os escopos necessários](/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/), se as [restrições de aplicativo de terceiros][oap-guide] não estão bloqueando o acesso e se [o token não expirou ou foi revogado](/github/authenticating-to-github/keeping-your-account-and-data-secure/token-expiration-and-revocation).
|
||||
|
||||
## Not all results returned
|
||||
## Nem todos os resultados retornados
|
||||
|
||||
Most API calls accessing a list of resources (_e.g._, users, issues, _etc._) support
|
||||
pagination. If you're making requests and receiving an incomplete set of results, you're
|
||||
probably only seeing the first page. You'll need to request the remaining pages
|
||||
in order to get more results.
|
||||
A maioria das chamadas à API que acessa uma lista de recursos (_por exemplo_, usuários, problemas _etc._ ) dá suporte à paginação. Se você está fazendo solicitações e recebendo um conjunto incompleto de resultados, provavelmente, só está vendo a primeira página. Você precisará solicitar as páginas restantes para obter mais resultados.
|
||||
|
||||
It's important to *not* try and guess the format of the pagination URL. Not every
|
||||
API call uses the same structure. Instead, extract the pagination information from
|
||||
[the Link Header](/rest#pagination), which is sent with every request.
|
||||
É importante *não* tentar adivinhar o formato da URL de paginação. Nem todas as chamadas à API usam a mesma estrutura. Em vez disso, extraia as informações de paginação do [cabeçalho Link](/rest#pagination), que é enviado com cada solicitação.
|
||||
|
||||
[oap-guide]: https://developer.github.com/changes/2015-01-19-an-integrators-guide-to-organization-application-policies/
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
## Basic authentication errors
|
||||
## Erros de autenticação básica
|
||||
|
||||
On November 13, 2020 username and password authentication to the REST API and the OAuth Authorizations API were deprecated and no longer work.
|
||||
Em 13 de novembro de 2020 a autenticação de nome de usuário e senha da API REST e da API de Autorizações OAuth tornaram-se obsoletas e já não funcionaram mais.
|
||||
|
||||
### Using `username`/`password` for basic authentication
|
||||
### Como usar `username`/`password` para a autenticação básica
|
||||
|
||||
If you're using `username` and `password` for API calls, then they are no longer able to authenticate. For example:
|
||||
Se você estiver usando `username` e `password` para as chamadas à API, elas não poderão mais ser autenticadas. Por exemplo:
|
||||
|
||||
```bash
|
||||
curl -u my_user:my_password https://api.github.com/user/repos
|
||||
```
|
||||
|
||||
Instead, use a [{% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) when testing endpoints or doing local development:
|
||||
Nesse caso, use um [{% data variables.product.pat_generic %}](/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) ao testar pontos de extremidade ou trabalhar em desenvolvimento local:
|
||||
|
||||
```bash
|
||||
curl -H 'Authorization: Bearer my_access_token' https://api.github.com/user/repos
|
||||
```
|
||||
|
||||
For OAuth Apps, you should use the [web application flow](/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) to generate an OAuth token to use in the API call's header:
|
||||
Para os Aplicativos OAuth, você deve usar o [fluxo do aplicativo Web](/apps/building-oauth-apps/authorizing-oauth-apps/#web-application-flow) para gerar um token OAuth a ser usado no cabeçalho da chamada à API:
|
||||
|
||||
```bash
|
||||
curl -H 'Authorization: Bearer my-oauth-token' https://api.github.com/user/repos
|
||||
```
|
||||
|
||||
## Timeouts
|
||||
## Tempos limite
|
||||
|
||||
If {% data variables.product.product_name %} takes more than 10 seconds to process an API request, {% data variables.product.product_name %} will terminate the request and you will receive a timeout response.
|
||||
Se {% data variables.product.product_name %} demorar mais de 10 segundos para processar uma solicitação de API, {% data variables.product.product_name %} encerrará a solicitação e você receberá uma resposta de tempo esgotado.
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
ms.openlocfilehash: 10a6df860ab8205845ae90fcb01d95d8e617096c
|
||||
ms.sourcegitcommit: cfe91073c844cb762131b2de9fb41f7f9db792fc
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: pt-BR
|
||||
ms.lasthandoff: 11/24/2022
|
||||
ms.locfileid: "148181275"
|
||||
---
|
||||
{% ifversion dependabot-actions-support %} {% data variables.product.prodname_dependabot_security_updates %} pode corrigir dependências vulneráveis no {% data variables.product.prodname_actions %}. Quando as atualizações de segurança estiverem habilitadas, o {% data variables.product.prodname_dependabot %} gerará automaticamente uma solicitação de pull para atualizar dados vulneráveis do {% data variables.product.prodname_actions %} usados em seus fluxos de trabalho para a versão mínima corrigida. {% endif %}
|
||||
@@ -13,32 +13,30 @@ type: tutorial
|
||||
topics:
|
||||
- Workflows
|
||||
- Project management
|
||||
ms.openlocfilehash: e5cb19c98e2d136e67a14726c9edff328f299034
|
||||
ms.sourcegitcommit: 7b86410fc3bc9fecf0cb71dda4c7d2f0da745b85
|
||||
ms.openlocfilehash: a3523069b9422ecd8107007ca5e00fb0071dd738
|
||||
ms.sourcegitcommit: 4d6d3735d32540cb6de3b95ea9a75b8b247c580d
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 10/05/2022
|
||||
ms.locfileid: '148010032'
|
||||
ms.lasthandoff: 11/30/2022
|
||||
ms.locfileid: '148185564'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
## Введение
|
||||
|
||||
В этом руководстве показано, как использовать [действие `andymckay/labeler`](https://github.com/marketplace/actions/simple-issue-labeler) в рабочем процессе для добавления меток к новым открытым или повторно открытым проблемам. Например, метку `triage` можно добавлять при каждом открытии или повторном открытии проблемы. Затем можно просмотреть все проблемы, которые необходимо уделить внимание, отфильтровав проблемы с меткой `triage`.
|
||||
В этом руководстве показано, как использовать [действие `actions/github-script`](https://github.com/marketplace/actions/github-script) в рабочем процессе для добавления меток к новым открытым или повторно открытым проблемам. Например, метку `triage` можно добавлять при каждом открытии или повторном открытии проблемы. Затем можно просмотреть все проблемы, которые необходимо уделить внимание, отфильтровав проблемы с меткой `triage`.
|
||||
|
||||
В этом руководстве вы сначала создадите файл рабочего процесса, использующий [действие `andymckay/labeler`](https://github.com/marketplace/actions/simple-issue-labeler). Затем вы настроите рабочий процесс в соответствии с вашими потребностями.
|
||||
Это `actions/github-script` действие позволяет легко использовать API {% data variables.product.prodname_dotcom %} в рабочем процессе.
|
||||
|
||||
В этом руководстве вы сначала создадите файл рабочего процесса, использующий [действие `actions/github-script`](https://github.com/marketplace/actions/github-script). Затем вы настроите рабочий процесс в соответствии с вашими потребностями.
|
||||
|
||||
## Создание рабочего процесса
|
||||
|
||||
1. {% data reusables.actions.choose-repo %}
|
||||
2. {% data reusables.actions.make-workflow-file %}
|
||||
3. Скопируйте следующее содержимое YAML в файл рабочего процесса.
|
||||
|
||||
|
||||
```yaml{:copy}
|
||||
{% indented_data_reference reusables.actions.actions-not-certified-by-github-comment spaces=4 %}
|
||||
|
||||
{% indented_data_reference reusables.actions.actions-use-sha-pinning-comment spaces=4 %}
|
||||
|
||||
name: Label issues
|
||||
on:
|
||||
issues:
|
||||
@@ -51,15 +49,20 @@ ms.locfileid: '148010032'
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Label issues
|
||||
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
|
||||
- uses: {% data reusables.actions.action-github-script %}
|
||||
with:
|
||||
add-labels: "triage"
|
||||
repo-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ["triage"]
|
||||
})
|
||||
```
|
||||
|
||||
4. Настройте параметры в файле рабочего процесса.
|
||||
- В качестве значения для `add-labels` укажите список меток, которые вы хотите добавить к проблеме. Несколько меток следует разделять запятыми. Например, `"help wanted, good first issue"`. Дополнительные сведения о метках см. в статье "[Управление метками](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)".
|
||||
4. `script` Настройте параметр в файле рабочего процесса:
|
||||
- Значения `issue_number`, `owner`и `repo` задаются автоматически с помощью `context` объекта . Изменять их не нужно.
|
||||
- В качестве значения для `labels` укажите список меток, которые вы хотите добавить к проблеме. Несколько меток следует разделять запятыми. Например, `["help wanted", "good first issue"]`. Дополнительные сведения о метках см. в статье "[Управление метками](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)".
|
||||
5. {% data reusables.actions.commit-workflow %}
|
||||
|
||||
## Тестирование рабочего процесса
|
||||
@@ -74,6 +77,6 @@ ms.locfileid: '148010032'
|
||||
|
||||
## Дальнейшие действия
|
||||
|
||||
- Дополнительные сведения о задачах, которые можно выполнять с помощью действия `andymckay/labeler`, например удаление меток или пропуск этого действия, если проблема назначена или имеет определенную метку, см. в [документации по действию `andymckay/labeler`](https://github.com/marketplace/actions/simple-issue-labeler).
|
||||
- Дополнительные сведения о различных событиях, которые могут активировать рабочий процесс, см. в статье "[События, которые активируют рабочие процессы](/actions/reference/events-that-trigger-workflows#issues)". Действие `andymckay/labeler` работает только с событиями `issues`, `pull_request` или `project_card`.
|
||||
- [Выполните поиск в GitHub](https://github.com/search?q=%22uses:+andymckay/labeler%22&type=code), чтобы найти примеры рабочих процессов, использующих это действие.
|
||||
- Дополнительные сведения о дополнительных действиях, которые можно выполнить с `actions/github-script` помощью действия, см. в [документации по`actions/github-script` действию](https://github.com/marketplace/actions/github-script).
|
||||
- Дополнительные сведения о различных событиях, которые могут активировать рабочий процесс, см. в статье "[События, которые активируют рабочие процессы](/actions/reference/events-that-trigger-workflows#issues)".
|
||||
- [Выполните поиск в GitHub](https://github.com/search?q=%22uses:+actions/github-script%22&type=code), чтобы найти примеры рабочих процессов, использующих это действие.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Удаление метки при добавлении карточки в столбец доски проекта
|
||||
intro: 'Вы можете использовать {% data variables.product.prodname_actions %} для автоматического удаления метки при добавлении проблемы или запроса на вытягивание в определенный столбец на доске проекта.'
|
||||
intro: '{% data variables.product.prodname_actions %} можно использовать для автоматического удаления метки при добавлении проблемы или запроса на вытягивание в определенный столбец в {% data variables.projects.projects_v1_board %}.'
|
||||
redirect_from:
|
||||
- /actions/guides/removing-a-label-when-a-card-is-added-to-a-project-board-column
|
||||
versions:
|
||||
@@ -13,74 +13,77 @@ topics:
|
||||
- Workflows
|
||||
- Project management
|
||||
shortTitle: Remove label when adding card
|
||||
ms.openlocfilehash: c23edb495719c7059c9c5d8dab1c29acb0e78cb6
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.openlocfilehash: d86d9e5ad198c9cf8811b47f2a6c8a7114e20104
|
||||
ms.sourcegitcommit: 4d6d3735d32540cb6de3b95ea9a75b8b247c580d
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147410110'
|
||||
ms.lasthandoff: 11/30/2022
|
||||
ms.locfileid: '148185632'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
## Введение
|
||||
|
||||
В этом руководстве показано, как использовать [действие `andymckay/labeler`](https://github.com/marketplace/actions/simple-issue-labeler) с условием для удаления метки из проблем и запросов на вытягивание, добавленных в определенный столбец на доске проекта. Например, можно удалять метку `needs review` при перемещении карточки проекта в столбец `Done`.
|
||||
В этом руководстве показано, как использовать [`actions/github-script` действие](https://github.com/marketplace/actions/github-script) вместе с условным для удаления метки из проблем и запросов на вытягивание, которые добавляются в определенный столбец в {% data variables.projects.projects_v1_board %}. Например, можно удалять метку `needs review` при перемещении карточки проекта в столбец `Done`.
|
||||
|
||||
В этом руководстве вы сначала создадите файл рабочего процесса, использующий [действие `andymckay/labeler`](https://github.com/marketplace/actions/simple-issue-labeler). Затем вы настроите рабочий процесс в соответствии с вашими потребностями.
|
||||
В этом руководстве вы сначала создадите файл рабочего процесса, использующий [действие `actions/github-script`](https://github.com/marketplace/actions/github-script). Затем вы настроите рабочий процесс в соответствии с вашими потребностями.
|
||||
|
||||
## Создание рабочего процесса
|
||||
|
||||
1. {% data reusables.actions.choose-repo %}
|
||||
2. Выберите проект, принадлежащий репозиторию. Этот рабочий процесс нельзя использовать с проектами, принадлежащими пользователям или организациям. Вы можете использовать существующий проект или создать новый. Дополнительные сведения о создании проекта см. в статье [Создание доски проекта](/github/managing-your-work-on-github/creating-a-project-board).
|
||||
2. Выберите {% data variables.projects.projects_v1_board %}, принадлежащий репозиторию. Этот рабочий процесс нельзя использовать с проектами, принадлежащими пользователям или организациям. Можно использовать существующий {% data variables.projects.projects_v1_board %} или создать новый {% data variables.projects.projects_v1_board %}. Дополнительные сведения о создании проекта см. в разделе [Создание {% data variables.product.prodname_project_v1 %}](/github/managing-your-work-on-github/creating-a-project-board).
|
||||
3. {% data reusables.actions.make-workflow-file %}
|
||||
4. Скопируйте следующее содержимое YAML в файл рабочего процесса.
|
||||
|
||||
```yaml{:copy}
|
||||
{% indented_data_reference reusables.actions.actions-not-certified-by-github-comment spaces=4 %}
|
||||
|
||||
{% indented_data_reference reusables.actions.actions-use-sha-pinning-comment spaces=4 %}
|
||||
|
||||
name: Remove labels
|
||||
name: Remove a label
|
||||
on:
|
||||
project_card:
|
||||
types:
|
||||
- moved
|
||||
jobs:
|
||||
remove_labels:
|
||||
remove_label:
|
||||
if: github.event.project_card.column_id == '12345678'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: remove labels
|
||||
uses: andymckay/labeler@5c59dabdfd4dd5bd9c6e6d255b01b9d764af4414
|
||||
- uses: {% data reusables.actions.action-github-script %}
|
||||
with:
|
||||
remove-labels: "needs review"
|
||||
repo-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
|
||||
script: |
|
||||
// this gets the number at the end of the content URL, which should be the issue/PR number
|
||||
const issue_num = context.payload.project_card.content_url.split('/').pop()
|
||||
github.rest.issues.removeLabel({
|
||||
issue_number: issue_num,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
name: ["needs review"]
|
||||
})
|
||||
```
|
||||
|
||||
5. Настройте параметры в файле рабочего процесса.
|
||||
- В `github.event.project_card.column_id == '12345678'` замените `12345678` на идентификатор столбца, в котором нужно удалять метки из проблем и запросов на вытягивание, перемещаемых в этот столбец.
|
||||
|
||||
Чтобы найти идентификатор столбца, перейдите к доске проекта. Рядом с заголовком столбца щелкните {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} и выберите **Копировать ссылку на столбец**. Идентификатор столбца — это номер в конце скопированной ссылки. Например, `24687531` — это идентификатор столбца для `https://github.com/octocat/octo-repo/projects/1#column-24687531`.
|
||||
Чтобы найти идентификатор столбца, перейдите к {% data variables.projects.projects_v1_board %}. Рядом с заголовком столбца щелкните {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} и выберите **Копировать ссылку на столбец**. Идентификатор столбца — это номер в конце скопированной ссылки. Например, `24687531` — это идентификатор столбца для `https://github.com/octocat/octo-repo/projects/1#column-24687531`.
|
||||
|
||||
Если вы хотите выполнять действия сразу с несколькими столбцами, перечислите условия через `||`. Например, условие `if github.event.project_card.column_id == '12345678' || github.event.project_card.column_id == '87654321'` будет выполняться при каждом добавлении карточки проекта в столбец `12345678` или в столбец `87654321`. Столбцы могут находиться на разных досках проектов.
|
||||
- Измените значение `remove-labels` на список меток, которые необходимо удалять из проблем или запросов на вытягивание при их перемещении в указанные столбцы. Несколько меток следует разделять запятыми. Например, `"help wanted, good first issue"`. Дополнительные сведения о метках см. в статье [Управление метками](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests).
|
||||
- Измените значение в `name` `github.rest.issues.removeLabel()` функции на имя метки, которую нужно удалить из проблем или запросов на вытягивание, которые перемещаются в указанные столбцы. Дополнительные сведения о метках см. в статье [Управление метками](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests).
|
||||
6. {% data reusables.actions.commit-workflow %}
|
||||
|
||||
## Тестирование рабочего процесса
|
||||
|
||||
Этот рабочий процесс будет выполняться при перемещении любой карточки проекта в репозитории. Если карточка является проблемой или запросом на вытягивание и перемещается в указанный вами столбец, то рабочий процесс удалит указанные метки из такой проблемы или запроса на вытягивание. Карточки, представляющие собой примечания, останутся без изменений.
|
||||
При каждом перемещении карточки проекта в {% data variables.projects.projects_v1_board %} в репозитории будет выполняться этот рабочий процесс. Если карточка является проблемой или запросом на вытягивание и перемещается в указанный столбец, рабочий процесс удалит указанную метку из проблемы или запроса на вытягивание. Карточки, представляющие собой примечания, останутся без изменений.
|
||||
|
||||
Протестируйте рабочий процесс, переместив проблему в проекте в целевой столбец.
|
||||
Протестируйте рабочий процесс, переместив проблему в {% data variables.projects.projects_v1_board %} в целевой столбец.
|
||||
|
||||
1. Откройте проблему в репозитории. Дополнительные сведения см. в статье "[Создание проблемы](/github/managing-your-work-on-github/creating-an-issue)".
|
||||
2. Добавьте метки в проблему, которую рабочий процесс должен удалить. Дополнительные сведения см. в статье "[Управление метками](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)".
|
||||
3. Добавьте проблему в столбец проекта, указанный в файле рабочего процесса. Дополнительные сведения см. в разделе [Добавление проблем и запросов на вытягивание на доску проекта](/github/managing-your-work-on-github/adding-issues-and-pull-requests-to-a-project-board).
|
||||
2. Пометка проблемы меткой, которую требуется удалить рабочим процессом. Дополнительные сведения см. в статье "[Управление метками](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)".
|
||||
3. Добавьте проблему в столбец {% data variables.projects.projects_v1_board %}, указанный в файле рабочего процесса. Дополнительные сведения: [Добавление проблем и запросов на вытягивание к компоненту "{% data variables.product.prodname_project_v1 %}"](/github/managing-your-work-on-github/adding-issues-and-pull-requests-to-a-project-board).
|
||||
4. Чтобы увидеть выполнение рабочего процесса, который запускается при добавлении проблемы в проект, просмотрите журнал выполнений рабочего процесса. Дополнительные сведения см. в статье "[Просмотр журнала выполнения рабочего процесса](/actions/managing-workflow-runs/viewing-workflow-run-history)".
|
||||
5. После завершения рабочего процесса указанные метки в проблеме, добавленной в столбец проекта, должна быть удалены.
|
||||
5. После завершения рабочего процесса у проблемы, добавленной в столбец проекта, должна быть удалена указанная метка.
|
||||
|
||||
## Дальнейшие действия
|
||||
|
||||
- Дополнительные сведения о задачах, которые можно выполнять с помощью действия `andymckay/labeler`, таких как добавление меток или пропуск этого действия в случае, если проблема назначена или имеет определенную метку, см. в [документации по действию `andymckay/labeler`](https://github.com/marketplace/actions/simple-issue-labeler).
|
||||
- [Выполните поиск в GitHub](https://github.com/search?q=%22uses:+andymckay/labeler%22&type=code), чтобы найти примеры рабочих процессов, использующих это действие.
|
||||
- Дополнительные сведения о дополнительных действиях, которые можно выполнить с `actions/github-script` помощью действия, см. в [документации по`actions/github-script` действию](https://github.com/marketplace/actions/github-script).
|
||||
- [Выполните поиск в GitHub](https://github.com/search?q=%22uses:+actions/github-script%22&type=code), чтобы найти примеры рабочих процессов, использующих это действие.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Ограничение сетевого трафика для предприятия с помощью списка разрешенных IP-адресов
|
||||
shortTitle: Restricting network traffic
|
||||
intro: Вы можете ограничить доступ к предприятиям и разрешить доступ только к ресурсам с указанных IP-адресов с помощью списка разрешенных IP-адресов.
|
||||
intro: Вы можете ограничить доступ к организации и разрешить доступ к ресурсам только с указанных IP-адресов с помощью списка разрешенных IP-адресов.
|
||||
permissions: Enterprise owners can configure IP allow lists.
|
||||
miniTocMaxHeadingLevel: 3
|
||||
versions:
|
||||
@@ -17,12 +17,12 @@ topics:
|
||||
redirect_from:
|
||||
- /admin/configuration/restricting-network-traffic-to-your-enterprise
|
||||
- /admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise
|
||||
ms.openlocfilehash: d9a4518f2fcc23d4b49967effb7b9a3022a7c6bd
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.openlocfilehash: b62ab2a143ed0e7ec57f7e7225a09c0ca713295c
|
||||
ms.sourcegitcommit: 7fb7ec2e665856fc5f7cd209b53bd0fb1c9bbc67
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: '148184015'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185046'
|
||||
---
|
||||
## Сведения об ограничениях сетевого трафика
|
||||
|
||||
@@ -30,13 +30,13 @@ ms.locfileid: '148184015'
|
||||
|
||||
{% ifversion ghec %}
|
||||
|
||||
Если ваше предприятие использует {% data variables.product.prodname_emus %} с OIDC, вы можете выбрать, следует ли использовать функцию списка разрешенных IP-адресов {% data variables.product.company_short %}или использовать ограничения списка разрешений для поставщика удостоверений (IdP). Если ваше предприятие не использует {% data variables.product.prodname_emus %} с OIDC, можно использовать функцию списка разрешений {% data variables.product.company_short %}.
|
||||
Если ваше предприятие использует {% data variables.product.prodname_emus %} с OIDC, вы можете выбрать, следует ли использовать функцию списка разрешенных IP-адресов {% data variables.product.company_short %} или использовать ограничения списка разрешений для поставщика удостоверений (IdP). Если ваше предприятие не использует {% data variables.product.prodname_emus %} с OIDC, можно использовать функцию списка разрешений {% data variables.product.company_short %}.
|
||||
|
||||
{% elsif ghae %}
|
||||
|
||||
По умолчанию правила группы безопасности сети (NSG) Azure оставляют весь входящий трафик открытым на портах 22, 80, 443 и 25. Вы можете связаться с {% data variables.contact.github_support %}, чтобы настроить ограничения доступа для {% data variables.product.product_name %}.
|
||||
|
||||
Для получения ограничений на использование групп безопасности сети Azure обратитесь к {% data variables.contact.github_support %} с IP-адресами, которым должен быть разрешен доступ к {% data variables.product.product_name %}. Укажите диапазоны адресов, используя стандартный формат CIDR (бесклассовая междоменная маршрутизация). {% data variables.contact.github_support %} настроит соответствующие правила брандмауэра, чтобы ограничить сетевой доступ по протоколам HTTP, SSH, HTTPS и SMTP. Дополнительные сведения см. в разделе [Получение помощи от {% data variables.contact.github_support %}](/admin/enterprise-support/receiving-help-from-github-support).
|
||||
Чтобы ограничить использование групп безопасности сети Azure, обратитесь в {% data variables.contact.github_support %} с IP-адресами, которым должен быть разрешен доступ к {% data variables.product.product_name %}. Укажите диапазоны адресов, используя стандартный формат CIDR (бесклассовая междоменная маршрутизация). {% data variables.contact.github_support %} настроит соответствующие правила брандмауэра, чтобы ограничить сетевой доступ по протоколам HTTP, SSH, HTTPS и SMTP. Дополнительные сведения см. в разделе [Получение помощи от {% data variables.contact.github_support %}](/admin/enterprise-support/receiving-help-from-github-support).
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -44,7 +44,7 @@ ms.locfileid: '148184015'
|
||||
|
||||
## Сведения о списке разрешенных IP-адресов {% data variables.product.company_short %}
|
||||
|
||||
Вы можете использовать список разрешенных IP-адресов {% data variables.product.company_short %}, чтобы управлять доступом к вашему предприятию и ресурсам, принадлежащим организациям на предприятии.
|
||||
Список разрешенных IP-адресов {% data variables.product.company_short %} можно использовать для управления доступом к предприятию и ресурсам, принадлежащим организациям предприятия.
|
||||
|
||||
{% data reusables.identity-and-permissions.ip-allow-lists-cidr-notation %}
|
||||
|
||||
@@ -54,13 +54,13 @@ ms.locfileid: '148184015'
|
||||
|
||||
Если вы используете {% data variables.product.prodname_emus %} с OIDC, можно использовать список разрешений поставщика удостоверений.
|
||||
|
||||
Использование списка разрешений поставщика удостоверений отключает конфигурации списков разрешенных IP-адресов {% data variables.product.company_short %} для всех организаций на предприятии и отключает API GraphQL для включения списков разрешенных IP-адресов и управления ими.
|
||||
Использование списка разрешений поставщика удостоверений отключает конфигурации списка разрешений IP-адресов {% data variables.product.company_short %} для всех организаций на предприятии и отключает API GraphQL для включения списков разрешенных IP-адресов и управления ими.
|
||||
|
||||
По умолчанию поставщик удостоверений запускает CAP при начальном интерактивном входе SAML или OIDC в {% data variables.product.company_short %} для любой выбранной конфигурации списка разрешенных IP-адресов.
|
||||
|
||||
Cap OIDC применяется только для запросов к API с использованием маркера типа "пользователь—сервер", например маркера для {% data variables.product.prodname_oauth_app %} или {% data variables.product.prodname_github_app %}, действующего от имени пользователя. Cap OIDC не применяется, если {% data variables.product.prodname_github_app %} использует токен между серверами. Дополнительные сведения см. в разделах [Проверка подлинности с помощью {% data variables.product.prodname_github_apps %}](/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation)и [Сведения о поддержке политики условного доступа поставщиков удостоверений](/enterprise-cloud@latest/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-support-for-your-idps-conditional-access-policy#github-apps-and-oauth-apps).
|
||||
OIDC CAP применяется только к запросам к API с использованием маркера "пользователь—сервер", например маркера для {% data variables.product.prodname_oauth_app %} или {% data variables.product.prodname_github_app %}, действующего от имени пользователя. Cap OIDC не применяется, если {% data variables.product.prodname_github_app %} использует токен "сервер-сервер". Дополнительные сведения см. в разделах [Проверка подлинности с помощью {% data variables.product.prodname_github_apps %}](/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-an-installation)и [Сведения о поддержке политики условного доступа поставщиков удостоверений](/enterprise-cloud@latest/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-support-for-your-idps-conditional-access-policy#github-apps-and-oauth-apps).
|
||||
|
||||
Чтобы обеспечить беспроблемное использование OIDC CAP при одновременном применении политики к маркерам типа "пользователь —сервер", необходимо скопировать все диапазоны IP-адресов из каждого {% data variables.product.prodname_github_app %}, используемых предприятием, в политику поставщика удостоверений.
|
||||
Чтобы обеспечить беспроблемное использование OIDC CAP при одновременном применении политики к маркерам от пользователя к серверу, необходимо скопировать все диапазоны IP-адресов из каждого {% data variables.product.prodname_github_app %}, который использует ваше предприятие, в политику поставщика удостоверений.
|
||||
|
||||
## Использование списка разрешенных IP-адресов {% data variables.product.company_short %}
|
||||
|
||||
@@ -115,7 +115,7 @@ Cap OIDC применяется только для запросов к API с
|
||||
1. В разделе "Список разрешенных IP-адресов" выберите раскрывающийся список и щелкните **Поставщик удостоверений**.
|
||||
|
||||

|
||||
- При необходимости, чтобы разрешить установленным {% data variables.product.company_short %} и {% data variables.product.prodname_oauth_apps %} доступ к организации с любого IP-адреса, выберите **Пропустить проверку поставщика удостоверений для приложений**.
|
||||
1. При необходимости, чтобы разрешить установленным {% data variables.product.company_short %} и {% data variables.product.prodname_oauth_apps %} доступ к организации с любого IP-адреса, выберите **Пропустить проверку поставщика удостоверений для приложений**.
|
||||
|
||||

|
||||
1. Выберите команду **Сохранить**.
|
||||
|
||||
@@ -236,6 +236,7 @@ Appliances configured for high-availability and geo-replication use replica inst
|
||||
|
||||
- If you have upgraded each node to {% data variables.product.product_name %} 3.6.0 or later and started replication, but `git replication is behind the primary` continues to appear after 45 minutes, contact {% data variables.contact.enterprise_support %}. For more information, see "[Receiving help from {% data variables.contact.github_support %}](/admin/enterprise-support/receiving-help-from-github-support)."
|
||||
{%- endif %}
|
||||
|
||||
- {% ifversion ghes = 3.4 or ghes = 3.5 or ghes = 3.6 %}Otherwise, if{% else %}If{% endif %} `ghe-repl-status` did not return `OK`, contact {% data variables.contact.enterprise_support %}. For more information, see "[Receiving help from {% data variables.contact.github_support %}](/admin/enterprise-support/receiving-help-from-github-support)."
|
||||
6. When you have completed upgrading the last replica, and the resync is complete, disable maintenance mode so users can use {% data variables.location.product_location %}.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: About Server Statistics
|
||||
intro: 'You can use {% data variables.product.prodname_server_statistics %} to analyze your own aggregate data from {% data variables.product.prodname_ghe_server %}, and help us improve {% data variables.product.company_short %} products.'
|
||||
title: Сведения о статистике сервера
|
||||
intro: 'Вы можете использовать {% data variables.product.prodname_server_statistics %}, чтобы проанализировать собственные статистические данные из {% data variables.product.prodname_ghe_server %}, а также помочь нам улучшить продукты {% data variables.product.company_short %}.'
|
||||
versions:
|
||||
feature: server-statistics
|
||||
permissions: 'Enterprise owners can enable {% data variables.product.prodname_server_statistics %}.'
|
||||
@@ -8,93 +8,102 @@ redirect_from:
|
||||
- /early-access/github/analyze-how-your-team-works-with-server-statistics/about-server-statistics
|
||||
topics:
|
||||
- Enterprise
|
||||
ms.openlocfilehash: 3d17df54cd5dcf9ad102ab5079794a9bcb3e664b
|
||||
ms.sourcegitcommit: 1a77ceb9e20c002173dda983db9405bcd5be254a
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185188'
|
||||
---
|
||||
## Сведения о преимуществах {% data variables.product.prodname_server_statistics %}
|
||||
|
||||
## About the benefits of {% data variables.product.prodname_server_statistics %}
|
||||
{% data variables.product.prodname_server_statistics %} поможет вам предусмотреть потребности вашей организации, понять, как работает ваша команда, и показать значение, полученное из {% data variables.product.prodname_ghe_server %}.
|
||||
|
||||
{% data variables.product.prodname_server_statistics %} can help you anticipate the needs of your organization, understand how your team works, and show the value you get from {% data variables.product.prodname_ghe_server %}.
|
||||
После включения {% data variables.product.prodname_server_statistics %} собирает статистические данные о том, сколько конкретных функций используется в экземпляре с течением времени. В отличие от других конечных точек [API статистики для администраторов](/rest/reference/enterprise-admin#admin-stats), которые возвращают данные только за последний день, {% data variables.product.prodname_server_statistics %} предоставляет исторические данные всех метрик {% data variables.product.prodname_server_statistics %} с момента включения этой возможности. Дополнительные сведения см. в статье [Включение {% data variables.product.prodname_server_statistics %} для предприятия](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise).
|
||||
|
||||
Once enabled, {% data variables.product.prodname_server_statistics %} collects aggregate data on how much certain features are used on your instance over time. Unlike other [Admin Stats API](/rest/reference/enterprise-admin#admin-stats) endpoints, which only return data for the last day, {% data variables.product.prodname_server_statistics %} provides historical data of all {% data variables.product.prodname_server_statistics %} metrics collected since the day you enabled the feature. For more information, see "[Enabling {% data variables.product.prodname_server_statistics %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)."
|
||||
При включении {% data variables.product.prodname_server_statistics %} вы помогаете выполнять сборку более качественных {% data variables.product.prodname_dotcom %}. Статистические данные, которые вы предоставляете, дают нам представление о том, как {% data variables.product.prodname_dotcom %} добавляет ценность нашим клиентам. Эти сведения позволяют {% data variables.product.company_short %} принимать более обоснованные решения о продукте, что в конечном итоге приносит вам пользу.
|
||||
|
||||
When you enable {% data variables.product.prodname_server_statistics %}, you're helping to build a better {% data variables.product.prodname_dotcom %}. The aggregated data you'll provide gives us insights into how {% data variables.product.prodname_dotcom %} adds value to our customers. This information allows {% data variables.product.company_short %} to make better and more informed product decisions, ultimately benefiting you.
|
||||
## Сведения о безопасности данных
|
||||
|
||||
## About data security
|
||||
Мы уважаем ваши данные. Мы никогда не будем передавать данные из {% data variables.location.product_location %}, если вы сначала не предоставили нам разрешение на это.
|
||||
|
||||
We respect your data. We will never transmit data from {% data variables.location.product_location %} unless you have first given us permission to do so.
|
||||
Мы не собираем персональные данные. Мы также не собираем содержимое {% data variables.product.company_short %}, такое как код, проблемы, комментарии или содержимое запроса на вытягивание.
|
||||
|
||||
We collect no personal data. We also don't collect any {% data variables.product.company_short %} content, such as code, issues, comments, or pull request content.
|
||||
Доступ к данным могут получить только владельцы подключенной корпоративной учетной записи или организации в {% data variables.product.prodname_ghe_cloud %}.
|
||||
|
||||
Only owners of the connected enterprise account or organization on {% data variables.product.prodname_ghe_cloud %} can access the data.
|
||||
В репозиториях, проблемах, запросах на вытягивание и других возможностях собираются только определенные статистические метрики. Список собранных статистических метрик см. в статье [Собранные данные {% data variables.product.prodname_server_statistics %}](#server-statistics-data-collected).
|
||||
|
||||
Only certain aggregate metrics are collected on repositories, issues, pull requests, and other features. To see the list of aggregate metrics collected, see "[{% data variables.product.prodname_server_statistics %} data collected](#server-statistics-data-collected)."
|
||||
Любые обновления собранных метрик будут выполняться в будущих выпусках с новыми функциями {% data variables.product.prodname_ghe_server %} и будут описаны в [заметках о выпуске {% data variables.product.prodname_ghe_server %}](/admin/release-notes). Кроме того, мы добавим в эту статью все обновления метрик.
|
||||
|
||||
Any updates to the collected metrics will happen in future feature releases of {% data variables.product.prodname_ghe_server %} and will be described in the [{% data variables.product.prodname_ghe_server %} release notes](/admin/release-notes). In addition, we will update this article with all metric updates.
|
||||
Чтобы узнать больше о хранении и защите данных {% data variables.product.prodname_server_statistics %}, см. статью [Безопасность GitHub](https://github.com/security).
|
||||
|
||||
For a better understanding of how we store and secure {% data variables.product.prodname_server_statistics %} data, see "[GitHub Security](https://github.com/security)."
|
||||
### Сведения о хранении и удалении данных
|
||||
|
||||
### About data retention and deletion
|
||||
{% data variables.product.company_short %} собирает данные {% data variables.product.prodname_server_statistics %} до тех пор, пока лицензия {% data variables.product.prodname_ghe_server %} активна, а возможность {% data variables.product.prodname_server_statistics %} включена.
|
||||
|
||||
{% data variables.product.company_short %} collects {% data variables.product.prodname_server_statistics %} data for as long as your {% data variables.product.prodname_ghe_server %} license is active and the {% data variables.product.prodname_server_statistics %} feature is enabled.
|
||||
Если необходимо удалить данные, это можно сделать, обратившись в службу поддержки GitHub, к вашему представителю учетной записи {% data variables.product.prodname_dotcom %} или вашему менеджеру по успеху клиентов. Как правило, мы удаляем данные за временной интервал, указанный в нашем заявлении о конфиденциальности. Дополнительные сведения см. в [заявлении о конфиденциальности {% data variables.product.company_short %}](/free-pro-team@latest/site-policy/privacy-policies/github-privacy-statement#data-retention-and-deletion-of-data) в документации по {% data variables.product.prodname_dotcom_the_website %}.
|
||||
|
||||
If you would like to delete your data, you may do so by contacting GitHub Support, your {% data variables.product.prodname_dotcom %} account representative, or your Customer Success Manager. Generally, we delete data in the timeframe specified in our privacy statement. For more information, see [{% data variables.product.company_short %}'s privacy statement](/free-pro-team@latest/site-policy/privacy-policies/github-privacy-statement#data-retention-and-deletion-of-data) in the {% data variables.product.prodname_dotcom_the_website %} documentation.
|
||||
### Сведения о переносимости данных
|
||||
|
||||
### About data portability
|
||||
Как владелец организации или предприятия в {% data variables.product.prodname_ghe_cloud %} вы можете получить доступ к данным {% data variables.product.prodname_server_statistics %} путем экспорта данных в CSV-файле или JSON-файле либо через REST API {% data variables.product.prodname_server_statistics %}. Дополнительные сведения см. в статье [Отправка запроса о {% data variables.product.prodname_server_statistics %} с помощью REST API](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/requesting-server-statistics-using-the-rest-api) или [Экспорт {% data variables.product.prodname_server_statistics %}](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/exporting-server-statistics).
|
||||
|
||||
As an organization owner or enterprise owner on {% data variables.product.prodname_ghe_cloud %}, you can access {% data variables.product.prodname_server_statistics %} data by exporting the data in a CSV or JSON file or through the {% data variables.product.prodname_server_statistics %} REST API. For more information, see "[Requesting {% data variables.product.prodname_server_statistics %} using the REST API](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/requesting-server-statistics-using-the-rest-api)" or "[Exporting {% data variables.product.prodname_server_statistics %}](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/exporting-server-statistics)."
|
||||
## Сведения об отключении сбора данных
|
||||
|
||||
## About disabling data collection
|
||||
Возможность {% data variables.product.prodname_server_statistics %} можно отключить в любое время. Дополнительные сведения см. в статье [Включение {% data variables.product.prodname_server_statistics %} для предприятия](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise).
|
||||
|
||||
You can disable the {% data variables.product.prodname_server_statistics %} feature at any time. For more information, see "[Enabling {% data variables.product.prodname_server_statistics %} for your enterprise](/admin/configuration/configuring-github-connect/enabling-server-statistics-for-your-enterprise)."
|
||||
## Собранные данные {% data variables.product.prodname_server_statistics %}
|
||||
|
||||
## {% data variables.product.prodname_server_statistics %} data collected
|
||||
После включения {% data variables.product.prodname_server_statistics %} метрики собираются с помощью ежедневного задания, которое выполняется в {% data variables.location.product_location %}. Статистические метрики хранятся в вашей организации или корпоративной учетной записи в {% data variables.product.prodname_ghe_cloud %} и не хранятся в {% data variables.location.product_location %}.
|
||||
|
||||
After you enable {% data variables.product.prodname_server_statistics %}, metrics are collected through a daily job that runs on {% data variables.location.product_location %}. The aggregate metrics are stored on your organization or enterprise account on {% data variables.product.prodname_ghe_cloud %} and are not stored on {% data variables.location.product_location %}.
|
||||
Следующие статистические метрики будут собираться и передаваться ежедневно и представлять общее количество за день.
|
||||
|
||||
The following aggregate metrics will be collected and transmitted on a daily basis and represent the total counts for the day:
|
||||
- `active_hooks`
|
||||
- `admin_users`
|
||||
- `closed_issues`
|
||||
- `closed_milestones`
|
||||
- `collection_date`
|
||||
- `disabled_orgs`
|
||||
- `dormancy_threshold`
|
||||
- `fork_repos`
|
||||
- `ghes_version`
|
||||
- `github_connect_features_enabled`
|
||||
- `inactive_hooks`
|
||||
- `mergeable_pulls`
|
||||
- `merged_pulls`
|
||||
- `open_issues`
|
||||
- `open_milestones`
|
||||
- `org_repos`
|
||||
- `private_gists`
|
||||
- `public_gists`
|
||||
- `root_repos`
|
||||
- `schema_version`
|
||||
- `server_id`
|
||||
- `suspended_users`
|
||||
- `total_commit_comments`
|
||||
- `total_dormant_users`
|
||||
- `total_gist_comments`
|
||||
- `total_gists`
|
||||
- `total_hooks`
|
||||
- `total_issues`
|
||||
- `total_issue_comments`
|
||||
- `total_milestones`
|
||||
- `total_repos`
|
||||
- `total_orgs`
|
||||
- `total_pages`
|
||||
- `total_pull_request_comments`
|
||||
- `total_pulls`
|
||||
- `total_pushes`
|
||||
- `total_team_members`
|
||||
- `total_teams`
|
||||
- `total_users`
|
||||
- `total_wikis`
|
||||
- `unmergeable_pulls`
|
||||
Столбец CSV | Имя | Описание |
|
||||
---------- | ---- | ----------- |
|
||||
Объект | `github_connect.features_enabled` | Массив функций {% data variables.product.prodname_github_connect %}, включенных для вашего экземпляра (см. раздел "[Сведения о {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect#github-connect-features)" ) |
|
||||
B | `host_name` | Имя узла для экземпляра |
|
||||
C | `dormant_users.dormancy_threshold` | Время, в течение времени, когда пользователь должен быть неактивным, чтобы считаться неактивным |
|
||||
D | `dormant_users.total_dormant_users` | Число неактивных учетных записей пользователей |
|
||||
E | `ghes_version` | Версия {% data variables.product.product_name %}, на котором выполняется ваш экземпляр |
|
||||
F | `server_id` | UUID, созданный для вашего экземпляра
|
||||
G | `collection_date` | Дата сбора метрик |
|
||||
H | `schema_version` | Версия схемы базы данных, используемая для хранения этих данных |
|
||||
I | `ghe_stats.comments.total_commit_comments` | Количество комментариев к фиксациям |
|
||||
J | `ghe_stats.comments.total_gist_comments` | Количество комментариев в gist |
|
||||
K | `ghe_stats.comments.total_issue_comments` | Количество комментариев по проблемам |
|
||||
L | `ghe_stats.comments.total_pull_request_comments` | Количество комментариев к запросам на вытягивание |
|
||||
M | `ghe_stats.gists.total_gists` | Число gists (как секретная, так и общедоступная) |
|
||||
Нет | `ghe_stats.gists.private_gists` | Число секретов gist |
|
||||
O | `ghe_stats.gists.public_gists` | Количество открытых объектов gist |
|
||||
P | `ghe_stats.hooks.total_hooks` | Количество перехватчиков предварительного получения (активных и неактивных) |
|
||||
Q | `ghe_stats.hooks.active_hooks` | Количество активных перехватчиков предварительного получения |
|
||||
R | `ghe_stats.hooks.inactive_hooks` | Количество неактивных перехватчиков предварительного получения |
|
||||
S | `ghe_stats.issues.total_issues` | Количество проблем (как открытых, так и закрытых) |
|
||||
T | `ghe_stats.issues.open_issues` | Число открытых проблем |
|
||||
U | `ghe_stats.issues.closed_issues` | Количество закрытых проблем |
|
||||
V | `ghe_stats.milestones.total_milestones` | Количество вех (открытых и закрытых) |
|
||||
W | `ghe_stats.milestones.open_milestones` | Количество открытых вех |
|
||||
X | `ghe_stats.milestones.closed_milestones` | Количество закрытых вех |
|
||||
Да | `ghe_stats.orgs.total_orgs` | Число организаций (включенных и отключенных) |
|
||||
Z | `ghe_stats.orgs.disabled_orgs` | Число отключенных организаций |
|
||||
AA | `ghe_stats.orgs.total_teams` | Число команд |
|
||||
AB | `ghe_stats.orgs.total_team_members` | Число участников команды |
|
||||
AC | `ghe_stats.pages.total_pages` | Количество сайтов {% data variables.product.prodname_pages %} |
|
||||
AD | `ghe_stats.pulls.total_pulls` | Количество запросов на вытягивание |
|
||||
AE | `ghe_stats.pulls.merged_pulls` | Количество объединенных запросов на вытягивание |
|
||||
AF | `ghe_stats.pulls.mergeable_pulls` | Количество запросов на вытягивание, которые в настоящее время можно объединить |
|
||||
ГД | `ghe_stats.pulls.unmergeable_pulls` | Количество запросов на вытягивание, которые в настоящее время не могут быть объединяемыми |
|
||||
AH | `ghe_stats.repos.total_repos` | Количество репозиториев (как вышестоящих, так и вилок) |
|
||||
ИИ | `ghe_stats.repos.root_repos` | Число вышестоящих репозиториев |
|
||||
AJ | `ghe_stats.repos.fork_repos` | Количество вилок |
|
||||
AK | `ghe_stats.repos.org_repos` | Количество репозиториев, принадлежащих организациям |
|
||||
AL | `ghe_stats.repos.total_pushes` | Количество отложений в репозитории |
|
||||
AM | `ghe_stats.repos.total_wikis` | Количество вики-сайтов |
|
||||
AN | `ghe_stats.users.total_users` | Количество учетных записей пользователей |
|
||||
АО | `ghe_stats.users.admin_users` | Количество учетных записей пользователей, которые являются администраторами сайта |
|
||||
Доступности и устойчивости к разделению сети | `ghe_stats.users.suspended_users` | Количество приостановленных учетных записей пользователей |
|
||||
|
||||
## {% data variables.product.prodname_server_statistics %} payload example
|
||||
## Примеры данных {% data variables.product.prodname_server_statistics %}
|
||||
|
||||
To see an example of the response payload for the {% data variables.product.prodname_server_statistics %} API, see "[Requesting {% data variables.product.prodname_server_statistics %} using the REST API](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/requesting-server-statistics-using-the-rest-api)."
|
||||
Чтобы просмотреть пример заголовков, включенных в экспорт CSV для {% data variables.product.prodname_server_statistics %}, скачайте [пример CSV-файла {% data variables.product.prodname_server_statistics %}](/assets/server-statistics-csv-example.csv).
|
||||
|
||||
To see a list of the data collected, see "[{% data variables.product.prodname_server_statistics %} data collected](#server-statistics-data-collected)."
|
||||
Пример полезных данных ответа для API {% data variables.product.prodname_server_statistics %} см. в статье [Отправка запроса о {% data variables.product.prodname_server_statistics %} с помощью REST API](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/requesting-server-statistics-using-the-rest-api).
|
||||
|
||||
@@ -7,19 +7,13 @@ topics:
|
||||
- Enterprise
|
||||
shortTitle: Export membership information
|
||||
permissions: Enterprise owners can export membership information for an enterprise.
|
||||
ms.openlocfilehash: ba7519aae1b38cd629a46baeacd5edc9d138efdc
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.openlocfilehash: 8da0e7b91e8bff85cb27fb7df3f06e62bdb290f2
|
||||
ms.sourcegitcommit: 7e2b5213fd15d91222725ecab5ee28cef378d3ad
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148106424'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185546'
|
||||
---
|
||||
{% note %}
|
||||
|
||||
**Примечание:** Экспорт сведений о членстве для enterpirise в настоящее время находится в бета-версии и может быть изменен.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
Чтобы выполнить аудит людей с доступом к ресурсам предприятия, можно скачать CSV-отчет со сведениями о членстве для вашего предприятия.
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.people-tab %}
|
||||
|
||||
@@ -230,3 +230,13 @@ You can view all open alerts, and you can reopen alerts that have been previousl
|
||||

|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
## Reviewing the audit logs for {% data variables.product.prodname_dependabot_alerts %}
|
||||
|
||||
When a member of your organization {% ifversion not fpt %}or enterprise {% endif %}performs an action related to {% data variables.product.prodname_dependabot_alerts %}, you can review the actions in the audit log. For more information about accessing the log, see "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#accessing-the-audit-log){% ifversion not fpt %}" and "[Accessing the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise)."{% else %}."{% endif %}
|
||||
{% ifversion dependabot-alerts-audit-log %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
Events in your audit log for {% data variables.product.prodname_dependabot_alerts %} include details such as who performed the action, what the action was, and when the action was performed. {% ifversion dependabot-alerts-audit-log %}The event also includes a link to the alert itself. When a member of your organization dismisses an alert, the event displays the dismissal reason and comment.{% endif %} For information on the {% data variables.product.prodname_dependabot_alerts %} actions, see the `repository_vulnerability_alert` category in "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#repository_vulnerability_alert-category-actions){% ifversion not fpt %}" and "[Audit log events for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise#repository_vulnerability_alert-category-actions)."{% else %}."{% endif %}
|
||||
|
||||
@@ -478,8 +478,28 @@ By default, {% data variables.product.prodname_dependabot %} automatically rebas
|
||||
|
||||
Available rebase strategies
|
||||
|
||||
- `disabled` to disable automatic rebasing.
|
||||
- `auto` to use the default behavior and rebase open pull requests when changes are detected.
|
||||
- `disabled` to disable automatic rebasing.
|
||||
|
||||
When `rebase-strategy` is set to `auto`, {% data variables.product.prodname_dependabot %} attempts to rebase pull requests in the following cases.
|
||||
- When you use {% data variables.product.prodname_dependabot_version_updates %}, for any open {% data variables.product.prodname_dependabot %} pull request when your schedule runs.
|
||||
- When you reopen a closed {% data variables.product.prodname_dependabot %} pull request.
|
||||
- When you change the value of `target-branch` in the {% data variables.product.prodname_dependabot %} configuration file. For more information about this field, see "[`target-branch`](#target-branch)."
|
||||
- When {% data variables.product.prodname_dependabot %} detects that a {% data variables.product.prodname_dependabot %} pull request is in conflict after a recent push to the target branch.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data variables.product.prodname_dependabot %} will keep rebasing a pull request indefinitely until the pull request is closed, merged or you disable {% data variables.product.prodname_dependabot_updates %}.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
When `rebase-strategy` is set to `disabled`, {% data variables.product.prodname_dependabot %} stops rebasing pull requests.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** This behavior only applies to pull requests that go into conflict with the target branch. {% data variables.product.prodname_dependabot %} will keep rebasing pull requests opened prior to the `rebase-strategy` setting being changed, and pull requests that are part of a scheduled run.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.dependabot.option-affects-security-updates %}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Создание рекомендаций по безопасности репозитория
|
||||
intro: Вы можете создать проект рекомендаций по безопасности для частного обсуждения и устранения уязвимости безопасности в проекте разработки ПО с открытым кодом.
|
||||
title: Creating a repository security advisory
|
||||
intro: You can create a draft security advisory to privately discuss and fix a security vulnerability in your open source project.
|
||||
redirect_from:
|
||||
- /articles/creating-a-maintainer-security-advisory
|
||||
- /github/managing-security-vulnerabilities/creating-a-maintainer-security-advisory
|
||||
@@ -15,31 +15,31 @@ topics:
|
||||
- Security advisories
|
||||
- Vulnerabilities
|
||||
shortTitle: Create repository advisories
|
||||
ms.openlocfilehash: de22432173f6bf909d001a3f780b0f9943769ec0
|
||||
ms.sourcegitcommit: 27882d9b3f19979c817c25952a2fb4dc4c6f0a65
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 10/27/2022
|
||||
ms.locfileid: '148114111'
|
||||
---
|
||||
Любой пользователь с правами администратора в репозитории может создать рекомендации по безопасности.
|
||||
|
||||
Anyone with admin permissions to a repository can create a security advisory.
|
||||
|
||||
{% data reusables.security-advisory.security-researcher-cannot-create-advisory %}
|
||||
|
||||
## Создание рекомендаций по безопасности
|
||||
## Creating a security advisory
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.sidebar-security %} {% data reusables.repositories.sidebar-advisories %}
|
||||
4. Щелкните **Создать черновик рекомендаций по безопасности** , чтобы открыть форму проекта рекомендаций.
|
||||

|
||||
5. Введите заголовок для рекомендаций по безопасности.
|
||||
{% data reusables.repositories.security-advisory-edit-details %} {% data reusables.repositories.security-advisory-edit-severity %} {% data reusables.repositories.security-advisory-edit-cwe-cve %} {% data reusables.repositories.security-advisory-edit-description %}
|
||||
11. Щелкните **Create draft security advisory** (Создать черновик рекомендаций по безопасности).
|
||||

|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.sidebar-security %}
|
||||
{% data reusables.repositories.sidebar-advisories %}
|
||||
1. Click **New draft security advisory** to open the draft advisory form. The fields marked with an asterisk are required.
|
||||

|
||||
1. Type a title for your security advisory.
|
||||
{% data reusables.repositories.security-advisory-edit-details %}
|
||||
{% data reusables.repositories.security-advisory-edit-severity %}
|
||||
{% data reusables.repositories.security-advisory-edit-cwe-cve %}
|
||||
{% data reusables.repositories.security-advisory-edit-description %}
|
||||
1. Click **Create draft security advisory**.
|
||||

|
||||
|
||||
## Дальнейшие действия
|
||||
## Next steps
|
||||
|
||||
- Прокомментируйте черновик рекомендаций по безопасности, чтобы обсудить уязвимость со своей командой.
|
||||
- Добавьте в рекомендации по безопасности участников совместной работы. Дополнительные сведения см. в разделе [Добавление участника совместной работы в рекомендации по безопасности репозитория](/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory).
|
||||
- Осуществляйте закрытую совместную работу для устранения уязвимости во временной частной вилке. Дополнительные сведения см. в разделе [Совместная работа во временной частной вилке для устранения уязвимости репозитория](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability).
|
||||
- Добавьте лиц, на чей счет должен быть отнесен вклад в работу над рекомендациями по безопасности. Дополнительные сведения см. в статье [Изменение рекомендаций по безопасности репозитория](/code-security/repository-security-advisories/editing-a-repository-security-advisory#about-credits-for-security-advisories).
|
||||
- Опубликуйте рекомендации по безопасности, чтобы уведомить свое сообщество об уязвимости. Дополнительные сведения см. в статье [Публикация рекомендаций по безопасности репозитория](/code-security/repository-security-advisories/publishing-a-repository-security-advisory).
|
||||
- Comment on the draft security advisory to discuss the vulnerability with your team.
|
||||
- Add collaborators to the security advisory. For more information, see "[Adding a collaborator to a repository security advisory](/code-security/repository-security-advisories/adding-a-collaborator-to-a-repository-security-advisory)."
|
||||
- Privately collaborate to fix the vulnerability in a temporary private fork. For more information, see "[Collaborating in a temporary private fork to resolve a repository security vulnerability](/code-security/repository-security-advisories/collaborating-in-a-temporary-private-fork-to-resolve-a-repository-security-vulnerability)."
|
||||
- Add individuals who should receive credit for contributing to the security advisory. For more information, see "[Editing a repository security advisory](/code-security/repository-security-advisories/editing-a-repository-security-advisory#about-credits-for-security-advisories)."
|
||||
- Publish the security advisory to notify your community of the security vulnerability. For more information, see "[Publishing a repository security advisory](/code-security/repository-security-advisories/publishing-a-repository-security-advisory)."
|
||||
|
||||
@@ -8,12 +8,12 @@ versions:
|
||||
type: reference
|
||||
topics:
|
||||
- Codespaces
|
||||
ms.openlocfilehash: 8ffd48856a2653f3db3c871122d3acd23c246d7a
|
||||
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
|
||||
ms.openlocfilehash: 3f4ef139386e616d14ef9a9cc5b474c96983de91
|
||||
ms.sourcegitcommit: 1a77ceb9e20c002173dda983db9405bcd5be254a
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 11/09/2022
|
||||
ms.locfileid: '148159938'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185180'
|
||||
---
|
||||
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
|
||||
|
||||
@@ -42,16 +42,10 @@ ms.locfileid: '148159938'
|
||||
|
||||
* **Обновление активного codespace**
|
||||
|
||||

|
||||

|
||||
|
||||
Обновите сведения в окне инструментов {% data variables.product.prodname_github_codespaces %}. Например, если вы использовали {% data variables.product.prodname_cli %} для изменения отображаемого имени, можно нажать эту кнопку, чтобы отобразить новое имя.
|
||||
|
||||
* **Отключение и остановка**
|
||||
|
||||

|
||||
|
||||
Остановите codespace, остановите серверную интегрированную среду разработки на удаленном компьютере и закройте локальный клиент JetBrains.
|
||||
|
||||
* **Управление codespace из Интернета**
|
||||
|
||||

|
||||
@@ -63,10 +57,3 @@ ms.locfileid: '148159938'
|
||||

|
||||
|
||||
Откройте журнал создания codespace в окне редактора. Дополнительные сведения см. в статье [Журналы {% data variables.product.prodname_github_codespaces %}](/codespaces/troubleshooting/github-codespaces-logs).
|
||||
|
||||
* **Перестроение контейнера разработки**
|
||||
|
||||

|
||||
|
||||
Перестройте codespace, чтобы применить изменения, внесенные в конфигурацию контейнера разработки. Клиент JetBrains закроется, и необходимо повторно открыть codespace. Дополнительные сведения см. в разделе [Жизненный цикл codespace](/codespaces/developing-in-codespaces/the-codespace-lifecycle#rebuilding-a-codespace).
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Introduction to dev containers
|
||||
intro: 'When you work in a codespace, the environment you are working in is created using a development container, or dev container, hosted on a virtual machine.'
|
||||
title: Основные сведения о контейнерах разработки
|
||||
intro: 'При работе в codespace среда, в которой вы работаете, создается с помощью контейнера разработки, размещенного на виртуальной машине.'
|
||||
permissions: People with write permissions to a repository can create or edit the codespace configuration.
|
||||
redirect_from:
|
||||
- /github/developing-online-with-github-codespaces/configuring-github-codespaces-for-your-project
|
||||
@@ -16,71 +16,76 @@ topics:
|
||||
- Codespaces
|
||||
- Set up
|
||||
- Fundamentals
|
||||
ms.openlocfilehash: 646f8068e68040f1d12f8155c3ba9e2bdb84c2ca
|
||||
ms.sourcegitcommit: 7fb7ec2e665856fc5f7cd209b53bd0fb1c9bbc67
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185094'
|
||||
---
|
||||
## Сведения о контейнерах разработки
|
||||
|
||||
## About dev containers
|
||||
Контейнеры разработки или контейнеры разработки — это контейнеры Docker, специально настроенные для предоставления полнофункциональный среды разработки. Каждый раз, когда вы работаете в среде codespace, вы используете контейнер разработки на виртуальной машине.
|
||||
|
||||
Development containers, or dev containers, are Docker containers that are specifically configured to provide a fully featured development environment. Whenever you work in a codespace, you are using a dev container on a virtual machine.
|
||||
Можно настроить контейнер разработки для репозитория, чтобы codespace, созданные для этого репозитория, дали вам специализированную среду разработки со всеми инструментами и средами выполнения, которые необходимо использовать для конкретного проекта. Если вы не определили конфигурацию в репозитории, {% data variables.product.prodname_github_codespaces %} использует конфигурацию по умолчанию, которая содержит множество общих средств, которые может потребоваться команде для разработки проекта. Дополнительные сведения см. в разделе [Использование конфигурации контейнера разработки по умолчанию](#using-the-default-dev-container-configuration).
|
||||
|
||||
You can configure the dev container for a repository so that codespaces created for that repository give you a tailored development environment, complete with all the tools and runtimes you need to work on a specific project. If you don't define a configuration in the repository then {% data variables.product.prodname_github_codespaces %} uses a default configuration, which contains many of the common tools that your team might need for development with your project. For more information, see "[Using the default dev container configuration](#using-the-default-dev-container-configuration)."
|
||||
Файлы конфигурации для контейнера разработки содержатся в каталоге `.devcontainer` в репозитории. Для добавления файлов конфигурации можно использовать {% data variables.product.prodname_vscode %}. Можно выбрать одну из стандартных конфигураций для различных типов проектов. Их можно использовать без дополнительной настройки, либо можно изменить конфигурации для более точной настройки среды, которую они создают. Дополнительные сведения см. в разделе [Использование предопределенной конфигурации контейнера разработки](#using-a-predefined-dev-container-configuration).
|
||||
|
||||
The configuration files for a dev container are contained in a `.devcontainer` directory in your repository. You can use {% data variables.product.prodname_vscode %} to add configuration files for you. You can choose from a selection of predefined configurations for various project types. You can use these without further configuration, or you can edit the configurations to refine the development environment they produce. For more information, see "[Using a predefined dev container configuration](#using-a-predefined-dev-container-configuration)."
|
||||
Кроме того, можно добавлять собственные пользовательские файлы конфигурации. Дополнительные сведения см. в разделе [Создание настраиваемой конфигурации контейнера разработки](#creating-a-custom-dev-container-configuration).
|
||||
|
||||
Alternatively, you can add your own custom configuration files. For more information, see "[Creating a custom dev container configuration](#creating-a-custom-dev-container-configuration)."
|
||||
Можно определить одну конфигурацию контейнера разработки для репозитория, разные конфигурации для разных ветвей или несколько конфигураций. При наличии нескольких конфигураций пользователи могут выбрать предпочтительную конфигурацию при создании среды codespace. Это особенно полезно для больших репозиториев, содержащих исходный код на разных языках программирования или для различных проектов. Можно создать набор конфигураций, которые позволяют разным командам работать в codespace, настроенном соответствующим образом для выполняемой ими работы.
|
||||
|
||||
You can define a single dev container configuration for a repository, different configurations for different branches, or multiple configurations. When multiple configurations are available, users can choose their preferred configuration when they create a codespace. This is particularly useful for large repositories that contain source code in different programming languages or for different projects. You can create a choice of configurations that allow different teams to work in a codespace that's set up appropriately for the work they are doing.
|
||||
|
||||
When you create a codespace from a template, you might start with one or more dev container configuration files in your workspace. To configure your environment further, you can add or remove settings from these files and rebuild the container to apply the changes to the codespace you're working in. If you publish your codespace to a repository on {% data variables.product.product_name %}, then any codespaces created from that repository will share the configuration you've defined. For more information, see "[Applying configuration changes to a codespace](#applying-configuration-changes-to-a-codespace)" and "[Creating a codespace from a template](/codespaces/developing-in-codespaces/creating-a-codespace-from-a-template#publishing-to-a-remote-repository)."
|
||||
При создании codespace на основе шаблона можно начать с одного или нескольких файлов конфигурации контейнера разработки в рабочей области. Чтобы дополнительно настроить среду, можно добавить или удалить параметры из этих файлов и перестроить контейнер, чтобы применить изменения к пространству кода, в которой вы работаете. Если вы публикуете codespace в репозитории на {% data variables.product.product_name %}, все пространства кода, созданные из этого репозитория, будут совместно использовать определенную конфигурацию. Дополнительные сведения см. в разделах [Применение изменений конфигурации к codespace](#applying-configuration-changes-to-a-codespace) и [Создание codespace на основе шаблона](/codespaces/developing-in-codespaces/creating-a-codespace-from-a-template#publishing-to-a-remote-repository).
|
||||
|
||||
### devcontainer.json
|
||||
|
||||
The primary file in a dev container configuration is the `devcontainer.json` file. You can use this file to determine the environment of codespaces created for your repository. The contents of this file define a dev container that can include frameworks, tools, extensions, and port forwarding. The `devcontainer.json` file usually contains a reference to a Dockerfile, which is typically located alongside the `devcontainer.json` file.
|
||||
Основным файлом в конфигурации контейнера разработки является файл `devcontainer.json`. Этот файл можно использовать для определения сред codespace, созданных для репозитория. Содержимое этого файла определяет контейнер разработки, который может включать платформы, средства, расширения и перенаправление портов. Файл `devcontainer.json` обычно содержит ссылку на файл Dockerfile, который обычно находится рядом с файлом `devcontainer.json`.
|
||||
|
||||
If you create a codespace from a repository without a `devcontainer.json` file, or if you start from {% data variables.product.company_short %}'s blank template, the default dev container configuration is used. For more information, see "[Using the default dev container configuration](#using-the-default-dev-container-configuration)."
|
||||
Если вы создаете пространство кода из репозитория без `devcontainer.json` файла или начинаете с пустого шаблона {% data variables.product.company_short %}, используется конфигурация контейнера разработки по умолчанию. Дополнительные сведения см. в разделе [Использование конфигурации контейнера разработки по умолчанию](#using-the-default-dev-container-configuration).
|
||||
|
||||
The `devcontainer.json` file is usually located in the `.devcontainer` directory of your repository. Alternatively, you can locate it directly in the root of the repository, in which case the file name must begin with a period: `.devcontainer.json`.
|
||||
Файл `devcontainer.json` обычно находится в каталоге `.devcontainer` репозитория. Кроме того, его можно расположить непосредственно в корне репозитория, в этом случае имя файла должно начинаться с точки: `.devcontainer.json`.
|
||||
|
||||
If you want to have a choice of dev container configurations in your repository, any alternatives to the `.devcontainer/devcontainer.json` (or `.devcontainer.json`) file must be located in their own subdirectory at the path `.devcontainer/SUBDIRECTORY/devcontainer.json`. For example, you could have a choice of two configurations:
|
||||
Если вы хотите выбирать конфигурации контейнеров разработки в репозитории, все альтернативы файлу `.devcontainer/devcontainer.json` (или `.devcontainer.json`) должны находиться в собственном подкаталоге по пути `.devcontainer/SUBDIRECTORY/devcontainer.json`. Например, вы можете иметь на выбор две конфигурации:
|
||||
* `.devcontainer/database-dev/devcontainer.json`
|
||||
* `.devcontainer/gui-dev/devcontainer.json`
|
||||
|
||||
When you have multiple `devcontainer.json` files in your repository, each codespace is created from only one of the configurations. Settings cannot be imported or inherited between `devcontainer.json` files. If a `devcontainer.json` file in a custom subdirectory has dependent files, such as the Dockerfile or scripts that are run by commands in the `devcontainer.json` file, it's recommended that you co-locate these files in the same subdirectory.
|
||||
При наличии нескольких файлов `devcontainer.json` в репозитории каждый codespace создается только из одной из конфигураций. Параметры нельзя импортировать или наследовать между файлами `devcontainer.json`. Если файл `devcontainer.json` в настраиваемом подкаталоге содержит зависимые файлы, такие как Dockerfile или сценарии, выполняемые командами в файле `devcontainer.json`, рекомендуется располагать эти файлы в этом же подкаталоге.
|
||||
|
||||
For information about how to choose your preferred dev container configuration when you create a codespace, see "[Creating a codespace for a repository](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository)."
|
||||
Сведения о том, как выбрать предпочтительную конфигурацию контейнера разработки при создании codespace, см. в разделе [Создание codespace для репозитория](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository).
|
||||
|
||||
{% data reusables.codespaces.more-info-devcontainer %}
|
||||
|
||||
#### How to use the devcontainer.json
|
||||
#### Использование файла devcontainer.json
|
||||
|
||||
It's useful to think of the `devcontainer.json` file as providing "customization" rather than "personalization." You should only include things that everyone working on your codebase needs as standard elements of the development environment, not things that are personal preferences. Things like linters are good to standardize on, and to require everyone to have installed, so they're good to include in your `devcontainer.json` file. Things like user interface decorators or themes are personal choices that should not be put in the `devcontainer.json` file.
|
||||
Рекомендуется рассматривать файл `devcontainer.json` как предоставление "настройки", а не "персонализации". Следует включать только те вещи, которые всем пользователям, работающим с вашей базой кода, необходимы в качестве стандартных элементов среды разработки, а не как личные предпочтения. Такие вещи, как анализатор кода, полезно стандартизировать и требовать, чтобы они были установлены у всех, поэтому они хорошо подходят для включения в файл `devcontainer.json`. Такие элементы, как декораторы пользовательского интерфейса или темы, — это личный выбор каждого, и их не следует помещать в файл `devcontainer.json`.
|
||||
|
||||
You can personalize your codespaces by using dotfiles and Settings Sync. For more information, see "[Personalizing {% data variables.product.prodname_github_codespaces %} for your account](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account)."
|
||||
Вы можете персонализировать свою среду codespace с помощью файлов с точкой и синхронизации параметров. Дополнительные сведения см. в разделе [Персонализация {% data variables.product.prodname_github_codespaces %} для учетной записи](/codespaces/customizing-your-codespace/personalizing-github-codespaces-for-your-account).
|
||||
|
||||
### Dockerfile
|
||||
|
||||
You can add a Dockerfile as part of your dev container configuration.
|
||||
Dockerfile можно добавить как часть конфигурации контейнера разработки.
|
||||
|
||||
The Dockerfile is a text file that contains the instructions needed to create a Docker container image. This image is used to generate a development container each time someone creates a codespace using the `devcontainer.json` file that references this Dockerfile. The instructions in the Dockerfile typically begin by referencing a parent image on which the new image that will be created is based. This is followed by commands that are run during the image creation process, for example to install software packages.
|
||||
Dockerfile — это текстовый файл с инструкциями, необходимыми для создания образа контейнера Docker. Этот образ используется для создания контейнера разработки каждый раз, когда кто-то создает codespace с помощью файла `devcontainer.json`, который ссылается на этот файл Dockerfile. Инструкции в Dockerfile обычно начинаются со ссылки на родительский образ, на котором будет основан новый образ. За этим следуют команды, которые выполняются в процессе создания образа, например для установки пакетов программного обеспечения.
|
||||
|
||||
The Dockerfile for a dev container is typically located in the `.devcontainer` folder, alongside the `devcontainer.json` in which it is referenced.
|
||||
Файл Dockerfile для контейнера разработки обычно находится в папке `.devcontainer` вместе с файлом `devcontainer.json`, который на него ссылается.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: As an alternative to using a Dockerfile you can use the `image` property in the `devcontainer.json` file to refer directly to an existing image you want to use. The image you specify here must be allowed by any organization image policy that has been set. For more information, see "[Restricting the base image for codespaces](/codespaces/managing-codespaces-for-your-organization/restricting-the-base-image-for-codespaces)." If neither a Dockerfile nor an image is found then the default container image is used. For more information, see "[Using the default dev container configuration](#using-the-default-dev-container-configuration)."
|
||||
**Примечание.** В качестве альтернативы использованию Dockerfile можно использовать свойство `image` в файле `devcontainer.json` для ссылки непосредственно на существующий образ, который вы хотите использовать. Указанный здесь образ должен быть разрешен любой заданной политикой образов организации. Дополнительные сведения см. в разделе [Ограничение базового образа для codespace.](/codespaces/managing-codespaces-for-your-organization/restricting-the-base-image-for-codespaces) Если ни файл Dockerfile ни образ не найдены, используется образ контейнера по умолчанию. Дополнительные сведения см. в разделе [Использование конфигурации контейнера разработки по умолчанию](#using-the-default-dev-container-configuration).
|
||||
|
||||
{% endnote %}
|
||||
|
||||
#### Simple Dockerfile example
|
||||
#### Простой пример файла Dockerfile
|
||||
|
||||
The following example uses four instructions:
|
||||
В следующем примере используются четыре инструкции:
|
||||
|
||||
`ARG` defines a build-time variable.
|
||||
`ARG` определяет переменную времени сборки.
|
||||
|
||||
`FROM` specifies the parent image on which the generated Docker image will be based.
|
||||
`FROM` указывает родительский образ, на котором будет основан создаваемый образ Docker.
|
||||
|
||||
`COPY` copies a file and adds it to the filesystem.
|
||||
`COPY` копирует файл и добавляет его в файловую систему.
|
||||
|
||||
`RUN` updates package lists and runs a script. You can also use a `RUN` instruction to install software, as shown by the commented out instructions. To run multiple commands, use `&&` to combine the commands into a single `RUN` statement.
|
||||
`RUN` обновляет списки пакетов и запускает сценарий. Вы также можете использовать инструкцию `RUN` для установки программного обеспечения, как показано в комментариях. Чтобы выполнить несколько команд, используйте оператор `&&` для объединения команд в одну инструкцию `RUN`.
|
||||
|
||||
```Dockerfile{:copy}
|
||||
ARG VARIANT="16-buster"
|
||||
@@ -97,11 +102,11 @@ COPY library-scripts/github-debian.sh /tmp/library-scripts/
|
||||
RUN apt-get update && bash /tmp/library-scripts/github-debian.sh
|
||||
```
|
||||
|
||||
For more information about Dockerfile instructions, see "[Dockerfile reference](https://docs.docker.com/engine/reference/builder)" in the Docker documentation.
|
||||
Дополнительные сведения об инструкциях в файле Dockerfile см. в [Справочнике по Dockerfile](https://docs.docker.com/engine/reference/builder) в документации по Docker.
|
||||
|
||||
#### Using a Dockerfile
|
||||
#### Использование файла Dockerfile
|
||||
|
||||
To use a Dockerfile as part of a dev container configuration, reference it in your `devcontainer.json` file by using the `dockerfile` property.
|
||||
Чтобы использовать файла Dockerfile в рамках конфигурации контейнера разработки, необходимо сделать ссылку на него в файле `devcontainer.json` с помощью свойства `dockerfile`.
|
||||
|
||||
```json{:copy}
|
||||
{
|
||||
@@ -111,134 +116,134 @@ To use a Dockerfile as part of a dev container configuration, reference it in yo
|
||||
}
|
||||
```
|
||||
|
||||
Various options are available to you if you want to use existing container orchestration in your dev container. For more information, see the "Orchestration options" section of the [Specification](https://containers.dev/implementors/spec/#orchestration-options) on the Development Containers website.
|
||||
Если вы хотите использовать существующую оркестрацию контейнеров в контейнере разработки, доступны различные параметры. Дополнительные сведения см. в разделе "Параметры оркестрации" [статьи Спецификация](https://containers.dev/implementors/spec/#orchestration-options) на веб-сайте "Контейнеры разработки".
|
||||
|
||||
## Using the default dev container configuration
|
||||
## Использование конфигурации контейнера разработки по умолчанию
|
||||
|
||||
If you don't define a configuration in your repository, {% data variables.product.prodname_dotcom %} creates a codespace using a default Linux image. This Linux image includes a number of runtime versions for popular languages like Python, Node, PHP, Java, Go, C++, Ruby, and .NET Core/C#. The latest or LTS releases of these languages are used. There are also tools to support data science and machine learning, such as JupyterLab and Conda. The image also includes other developer tools and utilities like Git, GitHub CLI, yarn, openssh, and vim. To see all the languages, runtimes, and tools that are included use the `devcontainer-info content-url` command inside your codespace terminal and follow the URL that the command outputs.
|
||||
Если вы не определили конфигурацию в репозитории, {% data variables.product.prodname_dotcom %} создает codespace с помощью образа Linux по умолчанию. Этот образ Linux включает ряд версий среды выполнения для популярных языков, таких как Python, Node, PHP, Java, Go, C++, Ruby и .NET Core/C#. Используются последние или LTS-выпуски этих языков. Существуют также средства для поддержки обработки и анализа данных и машинного обучения, таких как JupyterLab и Conda. Этот образ также включает другие средства разработчика и служебные программы, такие как Git, GitHub CLI, yarn, openssh и vim. Чтобы просмотреть список всех языков, сред выполнения и средств, которые включены, используйте команду `devcontainer-info content-url` в терминале codespace и перейдите по URL-адресу, который выведет команда.
|
||||
|
||||
For information about what's included in the default Linux image, see the [`devcontainers/images`](https://github.com/devcontainers/images/tree/main/src/universal) repository.
|
||||
Сведения о том, что входит в образ Linux по умолчанию, см. в репозитории [`devcontainers/images`](https://github.com/devcontainers/images/tree/main/src/universal) .
|
||||
|
||||
The default configuration is a good option if you're working on a small project that uses the languages and tools that {% data variables.product.prodname_github_codespaces %} provides.
|
||||
Конфигурация по умолчанию является хорошим вариантом, если вы работаете над небольшим проектом, использующим языки и средства, которые предоставляет {% data variables.product.prodname_github_codespaces %}.
|
||||
|
||||
## Using a predefined dev container configuration
|
||||
## Использование предопределенной конфигурации контейнера разработки
|
||||
|
||||
If you use {% data variables.product.prodname_codespaces %} in {% data variables.product.prodname_vscode %}, or in a web browser, you can create a dev container configuration for your repository by choosing from a list of predefined configurations. These configurations provide common setups for particular project types, and can help you quickly get started with a configuration that already has the appropriate container options, {% data variables.product.prodname_vscode %} settings, and {% data variables.product.prodname_vscode %} extensions that should be installed.
|
||||
Если вы используете {% data variables.product.prodname_codespaces %} в {% data variables.product.prodname_vscode %} или в веб-браузере, вы можете создать конфигурацию контейнера разработки для репозитория, выбрав из списка предопределенных конфигураций. Эти конфигурации предоставляют общие параметры для конкретных типов проектов и помогут вам быстро приступить к работе с конфигурацией, которая уже имеет соответствующие параметры контейнера, параметры {% data variables.product.prodname_vscode %} и расширения {% data variables.product.prodname_vscode %}, которые необходимо установить.
|
||||
|
||||
Using a predefined configuration is a great idea if you need some additional extensibility. You can also start with a predefined configuration and amend it as needed for your project. For more information about the definitions of predefined dev containers, see the [`devcontainers/images`](https://github.com/devcontainers/images/tree/main/src) repository.
|
||||
Использование предопределенной конфигурации — это отличная идея, если требуется дополнительная расширяемость. Вы также можете начать с предопределенной конфигурации и изменять ее по мере необходимости в процессе развития проекта. Дополнительные сведения об определениях предопределенных контейнеров разработки см. в репозитории [`devcontainers/images`](https://github.com/devcontainers/images/tree/main/src) .
|
||||
|
||||
You can add a predefined dev container configuration either while working in a codespace, or while working on a repository locally. To do this in {% data variables.product.prodname_vscode_shortname %} while you are working locally, and not connected to a codespace, you must have the "Dev Containers" extension installed and enabled. For more information about this extension, see the [{% data variables.product.prodname_vs_marketplace_shortname %}](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). The following procedure describes the process when you are using a codespace. The steps in {% data variables.product.prodname_vscode_shortname %} when you are not connected to a codespace are very similar.
|
||||
Можно добавить предопределенную конфигурацию контейнера разработки либо во время работы в codespace, либо при локальной работе с репозиторием. Чтобы сделать это в {% data variables.product.prodname_vscode_shortname %} во время работы локально и не подключены к codespace, необходимо установить и включить расширение Dev Containers. Дополнительные сведения об этом расширении см. в [{% data variables.product.prodname_vs_marketplace_shortname %}](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers). В следующей процедуре описывается процесс использования codespace. Действия в {% data variables.product.prodname_vscode_shortname %}, если вы не подключены к codespace, очень похожи.
|
||||
|
||||
{% data reusables.codespaces.command-palette-container %}
|
||||
1. Click the definition you want to use.
|
||||
1. Щелкните определение, которое вы хотите использовать.
|
||||
|
||||

|
||||

|
||||
|
||||
1. Follow the prompts to customize your definition. For more information on the options to customize your definition, see "[Adding additional features to your `devcontainer.json` file](#adding-additional-features-to-your-devcontainerjson-file)."
|
||||
1. Click **OK**.
|
||||
1. Следуйте инструкциям по настройке определения. Дополнительные сведения о параметрах настройки определения см. в разделе [Добавление дополнительных функций в файл `devcontainer.json`](#adding-additional-features-to-your-devcontainerjson-file).
|
||||
1. Нажмите кнопку **ОК**.
|
||||
|
||||

|
||||

|
||||
|
||||
1. If you are working in a codespace, apply your changes, by clicking **Rebuild now** in the message at the bottom right of the window. For more information about rebuilding your container, see "[Applying changes to your configuration](#applying-configuration-changes-to-a-codespace)."
|
||||
1. Если вы работаете в codespace, примените изменения, нажав кнопку **Перестроить** в сообщении в правом нижнем углу окна. Дополнительные сведения о перестроении контейнера см. в разделе [Применение изменений к конфигурации](#applying-configuration-changes-to-a-codespace).
|
||||
|
||||

|
||||

|
||||
|
||||
### Adding additional features to your `devcontainer.json` file
|
||||
### Добавление дополнительных функций в файл `devcontainer.json`
|
||||
|
||||
{% data reusables.codespaces.about-features %} For more information, see "[Adding features to a `devcontainer.json` file](/codespaces/setting-up-your-project-for-codespaces/adding-features-to-a-devcontainer-file?tool=vscode)."
|
||||
{% data reusables.codespaces.about-features %} Дополнительные сведения см. в разделе [Добавление компонентов в `devcontainer.json` файл](/codespaces/setting-up-your-project-for-codespaces/adding-features-to-a-devcontainer-file?tool=vscode).
|
||||
|
||||
## Creating a custom dev container configuration
|
||||
## Создание настраиваемой конфигурации контейнера разработки
|
||||
|
||||
If none of the predefined configurations meets your needs, you can create a custom configuration by writing your own `devcontainer.json` file.
|
||||
Если ни одна из предопределенных конфигураций не соответствует вашим потребностям, можно создать пользовательскую конфигурацию, написав собственный файл `devcontainer.json`.
|
||||
|
||||
* If you're adding a single `devcontainer.json` file that will be used by everyone who creates a codespace from your repository, create the file within a `.devcontainer` directory at the root of the repository.
|
||||
* If you want to offer users a choice of configuration, you can create multiple custom `devcontainer.json` files, each located within a separate subdirectory of the `.devcontainer` directory.
|
||||
* Если вы добавляете один файл `devcontainer.json`, который будет использоваться всеми, кто создает codespace из репозитория, создайте файл в каталоге `.devcontainer` в корне репозитория.
|
||||
* Если вы хотите предложить пользователям выбор конфигурации, можно создать несколько пользовательских файлов `devcontainer.json`, каждый из которых должен находится в отдельном подкаталоге каталога `.devcontainer`.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Notes**:
|
||||
- You can't locate your `devcontainer.json` files in directories more than one level below `.devcontainer`. For example, a file at `.devcontainer/teamA/devcontainer.json` will work, but `.devcontainer/teamA/testing/devcontainer.json` will not.
|
||||
- {% data reusables.codespaces.configuration-choice-templates %} For more information, see "[Setting up a template repository for {% data variables.product.prodname_github_codespaces %}](/codespaces/setting-up-your-project-for-codespaces/setting-up-a-template-repository-for-github-codespaces)."
|
||||
**Примечания**
|
||||
- Вы не можете найти файлы `devcontainer.json` в каталогах более чем на один уровень ниже `.devcontainer`. Например, файл в каталоге `.devcontainer/teamA/devcontainer.json` будет работать, а в `.devcontainer/teamA/testing/devcontainer.json` — нет.
|
||||
- {% data reusables.codespaces.configuration-choice-templates %} Дополнительные сведения см. в разделе [Настройка репозитория шаблонов для {% data variables.product.prodname_github_codespaces %}](/codespaces/setting-up-your-project-for-codespaces/setting-up-a-template-repository-for-github-codespaces).
|
||||
|
||||
{% endnote %}
|
||||
|
||||
If multiple `devcontainer.json` files are found in the repository, they are listed in the codespace creation options page. For more information, see "[Creating a codespace for a repository](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository)."
|
||||
Если в репозитории найдено несколько файлов `devcontainer.json`, они будут показаны на странице параметров создания codespace. Дополнительные сведения см. в разделе [Создание codespace для репозитория](/codespaces/developing-in-codespaces/creating-a-codespace-for-a-repository#creating-a-codespace-for-a-repository).
|
||||
|
||||

|
||||

|
||||
|
||||
### Adding a `devcontainer.json` file
|
||||
### `devcontainer.json` Добавление файла
|
||||
|
||||
If you don't already have a `devcontainer.json` file in your repository, you can quickly add one from {% data variables.product.prodname_dotcom_the_website %}.
|
||||
1. Navigate to your repository and click the **{% octicon "code" aria-label="The code icon" %} Code** dropdown.
|
||||
1. In the **Codespaces** tab, click the ellipsis (**...**), then select **Configure dev container**.
|
||||
Если у `devcontainer.json` вас еще нет файла в репозитории, его можно быстро добавить из {% data variables.product.prodname_dotcom_the_website %}.
|
||||
1. Перейдите в репозиторий и щелкните раскрывающийся список **{% octicon "code" aria-label="The code icon" %} Code (Код).**
|
||||
1. На вкладке **Codespaces** щелкните многоточие (**...**), а затем выберите **Настроить контейнер разработки**.
|
||||
|
||||

|
||||

|
||||
|
||||
A new `.devcontainer/devcontainer.json` file will open in the editor. The file will contain some initial properties, including a `features` object to which you can add new tools, libraries, or runtimes. For more information, see "[Adding features to a `devcontainer.json` file](/codespaces/setting-up-your-project-for-codespaces/adding-features-to-a-devcontainer-file?tool=webui)."
|
||||
В редакторе откроется новый `.devcontainer/devcontainer.json` файл. Файл будет содержать некоторые начальные свойства, включая `features` объект, в который можно добавить новые инструменты, библиотеки или среды выполнения. Дополнительные сведения см. в разделе [Добавление компонентов в `devcontainer.json` файл](/codespaces/setting-up-your-project-for-codespaces/adding-features-to-a-devcontainer-file?tool=webui).
|
||||
|
||||
If your repository already contains one or more `devcontainer.json` files, then clicking **Configure dev container** will open the existing `devcontainer.json` file with the highest precedence according to the [specification](https://containers.dev/implementors/spec/#devcontainerjson) on containers.dev.
|
||||
Если репозиторий уже содержит один или несколько `devcontainer.json` файлов, щелкните **Настроить контейнер разработки** , чтобы открыть существующий `devcontainer.json` файл с наивысшим приоритетом в соответствии со [спецификацией](https://containers.dev/implementors/spec/#devcontainerjson) containers.dev.
|
||||
|
||||
### Default configuration selection during codespace creation
|
||||
### Выбор конфигурации по умолчанию во время создания пространства кода
|
||||
|
||||
If `.devcontainer/devcontainer.json` or `.devcontainer.json` exists, it will be the default selection in the list of available configuration files when you create a codespace. If neither file exists, the default dev container configuration will be selected by default.
|
||||
Если файл `.devcontainer/devcontainer.json` или `.devcontainer.json` существует, он будет выбором по умолчанию в списке доступных файлов конфигурации при создании пространства кода. Если ни один из файлов не существует, будет выбрана конфигурация контейнера разработки по умолчанию.
|
||||
|
||||

|
||||

|
||||
|
||||
### Editing the devcontainer.json file
|
||||
### Изменение файла devcontainer.json
|
||||
|
||||
You can add and edit the supported configuration keys in the `devcontainer.json` file to specify aspects of the codespace's environment, like which {% data variables.product.prodname_vscode_shortname %} extensions will be installed. {% data reusables.codespaces.more-info-devcontainer %}
|
||||
Можно добавлять и изменять поддерживаемые ключи конфигурации в файле `devcontainer.json`, чтобы указать аспекты среды codespace, например, какие расширения {% data variables.product.prodname_vscode_shortname %} будут установлены. {% data reusables.codespaces.more-info-devcontainer %}
|
||||
|
||||
The `devcontainer.json` file is written using the JSONC (JSON with comments) format. This allows you to include comments within the configuration file. For more information, see "[Editing JSON with {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/docs/languages/json#_json-with-comments)" in the {% data variables.product.prodname_vscode_shortname %} documentation.
|
||||
Файл `devcontainer.json` записывается в формате JSONC (JSON с комментариями). Это позволяет включать комментарии в файл конфигурации. Дополнительные сведения см. в разделе [Редактирование JSON в {% data variables.product.prodname_vscode_shortname %}](https://code.visualstudio.com/docs/languages/json#_json-with-comments) в документации по {% data variables.product.prodname_vscode_shortname %}.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: If you use a linter to validate the `devcontainer.json` file, make sure it is set to JSONC and not JSON or comments will be reported as errors.
|
||||
**Примечание.** Если вы используете анализатор кода для проверки файла `devcontainer.json`, убедитесь, что для него задано значение JSONC, а не JSON. В противном случае комментарии будут отображаться как ошибки.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
### Interface settings for {% data variables.product.prodname_vscode_shortname %}
|
||||
### Параметры интерфейса для {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
You can configure the interface settings for {% data variables.product.prodname_vscode_shortname %}, with three scopes: Workspace, Remote [Codespaces], and User. You can view these scopes in the {% data variables.product.prodname_vscode_shortname %} Settings editor.
|
||||
Параметры интерфейса для {% data variables.product.prodname_vscode_shortname %} можно настроить с тремя областями: Рабочая область, Удаленные [пространства кода] и Пользователь. Эти области можно просмотреть в редакторе параметров {% data variables.product.prodname_vscode_shortname %}.
|
||||
|
||||

|
||||

|
||||
|
||||
If a setting is defined in multiple scopes, Workspace settings take priority, then Remote [Codespaces], then User.
|
||||
Если параметр определен в нескольких областях, в первую очередь приоритет имеют параметры рабочей области, затем параметры удаленного репозитория [Codespaces] , а затем пользователя.
|
||||
|
||||
You can define default interface settings for {% data variables.product.prodname_vscode_shortname %} in two places.
|
||||
Параметры интерфейса по умолчанию для {% data variables.product.prodname_vscode_shortname %} можно определить в двух местах.
|
||||
|
||||
* Interface settings defined in the `.vscode/settings.json` file in your repository are applied as Workspace-scoped settings in the codespace.
|
||||
* Interface settings defined in the `settings` key in the `devcontainer.json` file are applied as Remote [Codespaces]-scoped settings in the codespace.
|
||||
* Параметры интерфейса, определенные в `.vscode/settings.json` файле в репозитории, применяются как параметры области рабочей области в codespace.
|
||||
* Параметры интерфейса, определенные в `settings` ключе в `devcontainer.json` файле, применяются как удаленные [Codespaces] параметры в codespace.
|
||||
|
||||
## Applying configuration changes to a codespace
|
||||
## Применение изменений конфигурации к среде codespace
|
||||
|
||||
Changes to a configuration will be applied the next time you create a codespace. However, you can apply your changes to an existing codespace by rebuilding the container. You can do this within a codespace in the {% data variables.product.prodname_vscode_shortname %} web client or desktop application, or you can use {% data variables.product.prodname_cli %}.
|
||||
Изменения конфигурации будут применены при следующем создании codespace. Однако вы можете применить изменения к существующему пространству кода, перестроив контейнер. Это можно сделать в codespace в веб-клиенте или классическом приложении {% data variables.product.prodname_vscode_shortname %} или использовать {% data variables.product.prodname_cli %}.
|
||||
|
||||
### Rebuilding the dev container in the {% data variables.product.prodname_vscode_shortname %} web client or desktop application
|
||||
### Перестроение контейнера разработки в веб-клиенте или классическом приложении {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
{% data reusables.codespaces.rebuild-command %}
|
||||
1. {% data reusables.codespaces.recovery-mode %}
|
||||
|
||||

|
||||

|
||||
|
||||
- To diagnose the error by reviewing the creation logs, click **View creation log**.
|
||||
- To fix the errors identified in the logs, update your `devcontainer.json` file.
|
||||
- To apply the changes, rebuild your container.
|
||||
- Диагностируйте проблему путем просмотра журналов создания. Для этого нажмите кнопку **Просмотр журнала создания**.
|
||||
- Чтобы устранить ошибки, выявленные в журналах, обновите файл `devcontainer.json`.
|
||||
- Чтобы применить изменения, перестройте контейнер.
|
||||
|
||||
### Using {% data variables.product.prodname_cli %} to rebuild a dev container
|
||||
### Использование {% data variables.product.prodname_cli %} для перестроения контейнера разработки
|
||||
|
||||
If you've changed a dev container configuration outside of VS Code (for example, on {% data variables.product.prodname_dotcom_the_website %} or in a JetBrains IDE), you can use {% data variables.product.prodname_cli %} to rebuild the dev container for an existing codespace.
|
||||
Если вы изменили конфигурацию контейнера разработки за пределами VS Code (например, в {% data variables.product.prodname_dotcom_the_website %} или в интегрированной среде разработки JetBrains), вы можете использовать {% data variables.product.prodname_cli %} для перестроения контейнера разработки для существующего пространства кода.
|
||||
|
||||
1. In a terminal, enter the following command.
|
||||
1. В окне терминала введите следующую команду.
|
||||
|
||||
```
|
||||
gh cs rebuild
|
||||
```
|
||||
|
||||
Your codespaces are listed.
|
||||
В списке перечислены пространства кода.
|
||||
|
||||
1. Use the arrow keys on your keyboard to highlight the required codespace, then press <kbd>Enter</kbd>.
|
||||
1. Используйте клавиши со стрелками на клавиатуре, чтобы выделить требуемое кодовое пространство, а затем нажмите клавишу <kbd>ВВОД</kbd>.
|
||||
|
||||
|
||||
## Further reading
|
||||
## Дополнительные материалы
|
||||
|
||||
- "[Prebuilding your codespaces](/codespaces/prebuilding-your-codespaces)"
|
||||
- [Предварительная сборка сред codespace](/codespaces/prebuilding-your-codespaces)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Устранение неполадок с клиентами GitHub Codespaces
|
||||
title: Устранение неполадок клиентов GitHub Codespaces
|
||||
shortTitle: Codespaces clients
|
||||
intro: 'В этой статье содержатся сведения об устранении неполадок, которые могут возникнуть с клиентом, используемым для {% data variables.product.prodname_github_codespaces %}.'
|
||||
miniTocMaxHeadingLevel: 3
|
||||
@@ -11,12 +11,12 @@ topics:
|
||||
- Codespaces
|
||||
redirect_from:
|
||||
- /codespaces/troubleshooting/troubleshooting-codespaces-clients
|
||||
ms.openlocfilehash: 682160b3b92960487c0709fc411fc2143d18f415
|
||||
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
|
||||
ms.openlocfilehash: 35bd9dd859612307c1f9e49ea8ed9771e4f5efcd
|
||||
ms.sourcegitcommit: bf4e3590ab71b0a1bfa8d74b00183f63193acbbf
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 11/09/2022
|
||||
ms.locfileid: '148159901'
|
||||
ms.lasthandoff: 11/30/2022
|
||||
ms.locfileid: '148186174'
|
||||
---
|
||||
{% jetbrains %}
|
||||
|
||||
@@ -28,9 +28,9 @@ ms.locfileid: '148159901'
|
||||
|
||||
## Устранение неполадок веб-клиента {% data variables.product.prodname_vscode %}
|
||||
|
||||
Если у вас возникли проблемы с использованием {% data variables.product.prodname_github_codespaces %} в браузере, который не является Chromium, попробуйте переключиться на браузер на основе Chromium, например Google Chrome или Microsoft Edge. Кроме того, проверьте наличие известных проблем с браузером в репозитории [`microsoft/vscode`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen) , выполнив поиск проблем с именем браузера, например [`firefox`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen+label%3Afirefox) или [`safari`](https://github.com/Microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Asafari).
|
||||
При возникновении проблем с использованием {% data variables.product.prodname_github_codespaces %} в браузере, который не Chromium, попробуйте переключиться на браузер на основе Chromium, например Google Chrome или Майкрософт Edge. Кроме того, можно проверить наличие известных проблем с браузером в [`microsoft/vscode`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen) репозитории, выполнив поиск проблем с именем браузера, например [`firefox`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen+label%3Afirefox) или [`safari`](https://github.com/Microsoft/vscode/issues?q=is%3Aopen+is%3Aissue+label%3Asafari).
|
||||
|
||||
Если у вас возникли проблемы с использованием {% data variables.product.prodname_github_codespaces %} в браузере на основе Chromium, вы можете проверить, возникла ли другая известная проблема с {% data variables.product.prodname_vscode_shortname %} в репозитории[`microsoft/vscode`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen).
|
||||
При возникновении проблем с использованием {% data variables.product.prodname_github_codespaces %} в браузере на основе Chromium вы можете проверить, возникла ли другая известная проблема с {% data variables.product.prodname_vscode_shortname %} в репозитории[`microsoft/vscode`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen).
|
||||
|
||||
### Отличия от локальной работы в {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
@@ -46,7 +46,7 @@ ms.locfileid: '148159901'
|
||||
|
||||
Щелкните {% octicon "gear" aria-label="The manage icon" %} в левом нижнем углу редактора и выберите **Переключиться на стабильную версию...**. Если веб-клиент {% data variables.product.prodname_vscode_shortname %} не загружается или значок {% octicon "gear" aria-label="The manage icon" %} недоступен, можно принудительно переключиться на {% data variables.product.prodname_vscode %} Stable, добавив `?vscodeChannel=stable` к URL-адресу codespace и загрузив codespace по нему.
|
||||
|
||||
Если проблема не устранена в {% data variables.product.prodname_vscode %} Stable, проверьте наличие известных проблем и при необходимости зафиксировать новую проблему в интерфейсе {% data variables.product.prodname_vscode_shortname %} в репозитории [`microsoft/vscode`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen+codespaces) .
|
||||
Если проблема не устранена в {% data variables.product.prodname_vscode %} Stable, проверьте наличие известных проблем и при необходимости зайдите в журнал новой проблемы в интерфейсе {% data variables.product.prodname_vscode_shortname %} в репозитории [`microsoft/vscode`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen+codespaces) .
|
||||
|
||||
{% endwebui %}
|
||||
|
||||
@@ -54,9 +54,9 @@ ms.locfileid: '148159901'
|
||||
|
||||
## Устранение неполадок с {% data variables.product.prodname_vscode_shortname %}
|
||||
|
||||
При открытии пространства кода в классическом приложении {% data variables.product.prodname_vscode_shortname %} вы можете заметить несколько различий по сравнению с работой в локальной рабочей области, но взаимодействие должно быть аналогичным.
|
||||
При открытии codespace в классическом приложении {% data variables.product.prodname_vscode_shortname %} вы можете заметить несколько различий по сравнению с работой в локальной рабочей области, но взаимодействие должно быть аналогичным.
|
||||
|
||||
При возникновении проблем можно проверить наличие известных проблем и записать новые проблемы в {% data variables.product.prodname_vscode_shortname %} в репозитории [`microsoft/vscode`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen+codespaces) .
|
||||
При возникновении проблем можно проверить наличие известных проблем и записать новые проблемы в интерфейсе {% data variables.product.prodname_vscode_shortname %} в репозитории [`microsoft/vscode`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen+codespaces) .
|
||||
|
||||
### {% data variables.product.prodname_vscode %} Insiders
|
||||
|
||||
@@ -66,23 +66,23 @@ ms.locfileid: '148159901'
|
||||
|
||||
Чтобы переключиться на {% data variables.product.prodname_vscode %} Stable, закройте приложение {% data variables.product.prodname_vscode %}, откройте приложение {% data variables.product.prodname_vscode %} Stable и снова откройте codespace.
|
||||
|
||||
Если проблема не устранена в {% data variables.product.prodname_vscode %} Stable, проверьте наличие известных проблем и при необходимости зафиксировать новую проблему в интерфейсе {% data variables.product.prodname_vscode_shortname %} в репозитории [`microsoft/vscode`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen+codespaces) .
|
||||
Если проблема не устранена в {% data variables.product.prodname_vscode %} Stable, проверьте наличие известных проблем и при необходимости зайдите в журнал новой проблемы в интерфейсе {% data variables.product.prodname_vscode_shortname %} в репозитории [`microsoft/vscode`](https://github.com/microsoft/vscode/issues?q=is%3Aissue+is%3Aopen+codespaces) .
|
||||
|
||||
{% endvscode %}
|
||||
|
||||
{% jetbrains %}
|
||||
|
||||
## Устранение неполадок с URI JetBrains
|
||||
## Устранение неполадок с ИНДЕ JetBrains
|
||||
|
||||
### Проблемы с производительностью
|
||||
|
||||
Тип компьютера {% data variables.product.prodname_github_codespaces %} с по крайней мере 4 ядрами рекомендуется использовать для запуска любого из URI JetBrains. Дополнительные сведения см. в разделе [Изменение типа компьютера для кодового пространства](/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace).
|
||||
Тип компьютера {% data variables.product.prodname_github_codespaces %} с по крайней мере 4 ядрами рекомендуется использовать для выполнения любого из ИНДЕ JetBrains. Дополнительные сведения см. в разделе [Изменение типа компьютера для кодового пространства](/codespaces/customizing-your-codespace/changing-the-machine-type-for-your-codespace).
|
||||
|
||||
Если вы используете компьютер с 4 или более ядрами и производительность JetBrains выглядит немного вялой, может потребоваться увеличить максимальный размер кучи Java.
|
||||
Если вы используете компьютер с 4 или более ядрами и производительность JetBrains кажется немного вялой, может потребоваться увеличить максимальный размер кучи Java.
|
||||
|
||||
Рекомендуется установить максимальный размер кучи в диапазоне от 2862 МиБ (3 ГБ) до 60 % ОЗУ удаленного узла.
|
||||
|
||||
Ниже приведены некоторые рекомендации в качестве начальной точки, которую можно настроить в зависимости от размера базы кода и памяти, необходимой для запуска приложения. Например, если у вас есть большая или сложная база кода, может потребоваться увеличить размер кучи. Если у вас есть приложение большего размера, можно задать меньший размер кучи, чтобы предоставить приложению больше памяти.
|
||||
Ниже приведены некоторые рекомендации в качестве начальной отправной точки, которые можно настроить в зависимости от размера базы кода и памяти, необходимой для запуска приложения. Например, при наличии большой или сложной базы кода может потребоваться дополнительно увеличить размер кучи. Если у вас более крупное приложение, можно задать меньший размер кучи, чтобы предоставить приложению больший объем памяти.
|
||||
|
||||
| Тип компьютера | Максимальный размер кучи |
|
||||
| -------------- | ----------------- |
|
||||
@@ -102,17 +102,41 @@ ms.locfileid: '148159901'
|
||||
|
||||

|
||||
|
||||
1. Щелкните **Сохранить и перезапустить**.
|
||||
1. Нажмите кнопку **Сохранить и перезапустить**.
|
||||
|
||||
### Невозможно открыть клиент в MacOS Ventura
|
||||
|
||||
В MacOS Ventura при первой попытке подключиться к codespace из шлюза JetBrains может появиться сообщение о том, что клиентское приложение JetBrains "повреждено и не может быть открыто".
|
||||
|
||||
<img src="/assets/images/help/codespaces/jetbrains-ventura-error1.png" alt="Screenshot of the 'cannot be opened' error message" style="width:230px;"/>
|
||||
|
||||
Если это происходит, выполните указанные ниже действия.
|
||||
|
||||
1. Нажмите **кнопку Отмена** , чтобы закрыть это сообщение.
|
||||
1. Щелкните значок Apple в левом верхнем углу экрана и щелкните **Параметры системы**.
|
||||
1. Щелкните **Конфиденциальность & Безопасность** и прокрутите вниз до раздела "Безопасность".
|
||||
|
||||

|
||||
|
||||
Вы увидите сообщение о том, что клиент JetBrains заблокирован.
|
||||
|
||||
1. Нажмите кнопку **Открыть в любом случае** , чтобы добавить клиент JetBrains в распознанные приложения.
|
||||
Сообщение отображается снова, но на этот раз с кнопкой **Открыть** .
|
||||
|
||||
<img src="/assets/images/help/codespaces/jetbrains-ventura-error2.png" alt="Screenshot of the error message with an 'Open' button" style="width:230px;"/>
|
||||
|
||||
1. Нажмите кнопку **Отмена** еще раз.
|
||||
1. Назад к приложению шлюза JetBrains и снова подключитесь к требуемому пространству кода.
|
||||
Клиент JetBrains откроется успешно. Авторизовать клиентское приложение для запуска на компьютере Mac вы не увидите сообщение при подключении к codespace в будущем.
|
||||
|
||||
### Проблемы с SSH-подключением
|
||||
|
||||
Чтобы подключиться через SSH-сервер, работающий в codespace, необходимо иметь ключ SSH в каталоге `~/.ssh` (MacOS и Linux) или `%HOMEPATH%\.ssh` каталоге (Windows), который уже был добавлен в учетную запись {% data variables.product.prodname_dotcom %}. Если в этом каталоге нет ключей, {% data variables.product.prodname_cli %} создаст ключи автоматически. Дополнительные сведения см. в разделе [Добавление адреса нового ключа SSH в учетную запись {% data variables.product.prodname_dotcom %}](/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account?platform=windows&tool=webui).
|
||||
Для подключения через сервер SSH, работающий в codespace, необходимо иметь ключ SSH в каталоге `~/.ssh` (MacOS и Linux) или `%HOMEPATH%\.ssh` каталоге (Windows), который уже добавлен в учетную запись {% data variables.product.prodname_dotcom %}. Если в этом каталоге нет ключей, {% data variables.product.prodname_cli %} создаст ключи. Дополнительные сведения см. в разделе [Добавление адреса нового ключа SSH в учетную запись {% data variables.product.prodname_dotcom %}](/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account?platform=windows&tool=webui).
|
||||
|
||||
При возникновении проблем с проверкой ключа попробуйте обновить версию {% data variables.product.prodname_cli %}. Дополнительные сведения см. в [инструкциях по обновлению](https://github.com/cli/cli#installation) в файле сведений для {% data variables.product.prodname_cli %}.
|
||||
|
||||
### Проблемы с интегрированной среды разработки JetBrains
|
||||
|
||||
Сведения о проблемах, связанных с используемой интегрированной среды разработки JetBrains или приложением шлюза JetBrains, см. в разделе Поддержка [продуктов](https://www.jetbrains.com/support/) на веб-сайте JetBrains.
|
||||
Справку по проблемам, связанным с используемой интегрированной среды разработки JetBrains или приложением шлюза JetBrains, см. в разделе Поддержка [продуктов](https://www.jetbrains.com/support/) на веб-сайте JetBrains.
|
||||
|
||||
{% endjetbrains %}
|
||||
|
||||
|
||||
@@ -1,123 +1,125 @@
|
||||
---
|
||||
title: Getting started with GitHub Copilot in a JetBrains IDE
|
||||
title: Начало работы с GitHub Copilot в интегрированной среде разработки JetBrains
|
||||
shortTitle: JetBrains IDE
|
||||
intro: 'Learn how to install {% data variables.product.prodname_copilot %} in a JetBrains IDE, and start seeing suggestions as you write comments and code.'
|
||||
intro: 'Узнайте, как установить {% data variables.product.prodname_copilot %} в интегрированной среде разработки JetBrains и начать видеть предложения при написании комментариев и кода.'
|
||||
product: '{% data reusables.gated-features.copilot %}'
|
||||
versions:
|
||||
feature: copilot
|
||||
topics:
|
||||
- Copilot
|
||||
ms.openlocfilehash: ae879b5834007a34ab0e3a7a45dcae4c1e31bc4f
|
||||
ms.sourcegitcommit: 7fb7ec2e665856fc5f7cd209b53bd0fb1c9bbc67
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185062'
|
||||
---
|
||||
|
||||
{% data reusables.copilot.copilot-cta-button %}
|
||||
|
||||
## About {% data variables.product.prodname_copilot %} and JetBrains IDEs
|
||||
## Сведения о {% data variables.product.prodname_copilot %} и интегрированной среде разработки JetBrains
|
||||
|
||||
{% data reusables.copilot.procedural-intro %}
|
||||
|
||||
If you use a JetBrains IDE, you can view and incorporate suggestions from {% data variables.product.prodname_copilot %} directly within the editor. This guide demonstrates how to use {% data variables.product.prodname_copilot %} within a JetBrains IDE for macOS, Windows, or Linux.
|
||||
Если вы используете интегрированную среду разработки JetBrains, вы можете просматривать и включать предложения из {% data variables.product.prodname_copilot %} непосредственно в редакторе. В этом руководстве описано, как использовать {% data variables.product.prodname_copilot %} в интегрированной среде разработки JetBrains для macOS, Windows или Linux.
|
||||
|
||||
## Prerequisites
|
||||
## Предварительные требования
|
||||
|
||||
{% data reusables.copilot.jetbrains-ides %}
|
||||
|
||||
## Installing the {% data variables.product.prodname_copilot %} extension in your JetBrains IDE
|
||||
## Установка расширения {% data variables.product.prodname_copilot %} в интегрированной среде разработки JetBrains
|
||||
|
||||
To use {% data variables.product.prodname_copilot %} in a JetBrains IDE, you must install the {% data variables.product.prodname_copilot %} extension. The following procedure will guide you through installation of the {% data variables.product.prodname_copilot %} plugin in IntelliJ IDEA. Steps to install the plugin in another supported IDE may differ.
|
||||
Чтобы настроить {% data variables.product.prodname_copilot %} в интегрированной среде разработки JetBrains, установите расширение {% data variables.product.prodname_copilot %}. Следующая процедура поможет вам установить подключаемый модуль {% data variables.product.prodname_copilot %} в IntelliJ IDEA. Шаги по установке подключаемого модуля в другой поддерживаемой интегрированной среде разработки могут отличаться.
|
||||
|
||||
1. In your JetBrains IDE, under the **File** menu for Windows or under the name of your IDE for Mac (for example, **PyCharm** or **IntelliJ**), click **Settings** for Windows or **Preferences** for Mac.
|
||||
2. In the left-side menu of the **Settings/Preferences** dialog box, click **Plugins**.
|
||||
3. At the top of the **Settings/Preferences** dialog box, click **Marketplace**. In the search bar, search for **{% data variables.product.prodname_copilot %}**, then click **Install**.
|
||||

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

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

|
||||
1. A device activation window will open in your browser. Paste the device code, then click **Continue**.
|
||||
1. В интегрированной среде разработки JetBrains в меню **Файл** для Windows или под именем интегрированной среды разработки для Mac (например, **PyCharm** или **IntelliJ**) щелкните **Параметры** для Windows или **Настройки** для Mac.
|
||||
2. В левом меню диалогового окна **Параметры/Настройки** щелкните **"Подключаемые модули**.
|
||||
3. В верхней части диалогового окна **Параметры/Настройки** щелкните **Marketplace**. В строке поиска введите **{% data variables.product.prodname_copilot %}** и нажмите кнопку **Установить**.
|
||||

|
||||
1. После установки {% data variables.product.prodname_copilot %} нажмите кнопку **Перезапустить интегрированную среду разработки**.
|
||||
1. После перезапуска интегрированной среды разработки JetBrains щелкните меню **Сервис**. Щелкните **{% data variables.product.prodname_copilot %}** , а затем нажмите **Вход в {% data variables.product.prodname_dotcom %}** .
|
||||

|
||||
1. В диалоговом окне "Вход в {% data variables.product.prodname_dotcom %}" нажмите кнопку **Копировать и открыть**, чтобы скопировать код устройства и открыть окно активации устройства.
|
||||

|
||||
1. Окно активации устройства откроется в браузере. Вставьте код устройства и нажмите кнопку **Продолжить**.
|
||||
|
||||
- To paste the code in Windows or Linux, press <kbd>Ctrl</kbd>+<kbd>v</kbd>.
|
||||
- To paste the code in macOS, press <kbd>command</kbd>+<kbd>v</kbd>.
|
||||
1. {% data variables.product.prodname_dotcom %} will request the necessary permissions for {% data variables.product.prodname_copilot %}. To approve these permissions, click **Authorize {% data variables.product.prodname_copilot %} Plugin**.
|
||||
1. After the permissions have been approved, your JetBrains IDE will show a confirmation. To begin using {% data variables.product.prodname_copilot %}, click **OK**.
|
||||

|
||||
- Чтобы вставить код в Windows или Linux, нажмите <kbd>CTRL</kbd>+<kbd>V</kbd>.
|
||||
- Чтобы вставить код в macOS, нажмите <kbd>COMMAND</kbd>+<kbd>V</kbd>.
|
||||
1. {% data variables.product.prodname_dotcom %} запросит необходимые разрешения для {% data variables.product.prodname_copilot %}. Чтобы одобрить эти разрешения, щелкните **Авторизовать подключаемый модуль {% data variables.product.prodname_copilot %}** .
|
||||
1. После утверждения разрешений интегрированная среда разработки JetBrains отобразит подтверждение. Чтобы начать использование {% data variables.product.prodname_copilot %}, щелкните **OK**.
|
||||

|
||||
|
||||
|
||||
## Seeing your first suggestion
|
||||
## Просмотр первого предложения
|
||||
|
||||
{% data reusables.copilot.code-examples-limitations %}
|
||||
|
||||
{% data reusables.copilot.supported-languages %} The following samples are in Java, but other languages will work similarly.
|
||||
{% data reusables.copilot.supported-languages %} Следующие примеры приводятся на Java, но будут работать аналогичным образом и для других языков.
|
||||
|
||||
{% data reusables.copilot.create-java-file %}
|
||||
1. In the Java file, create a class by typing `class Test`.
|
||||
{% data variables.product.prodname_copilot %} will automatically suggest a class body in grayed text, as shown below. The exact suggestion may vary.
|
||||

|
||||
{% data reusables.copilot.accept-suggestion %}
|
||||
1. To prompt {% data variables.product.prodname_copilot %} to suggest a function body, type the following line below the bracket of the `main` function. The exact suggestion may vary.
|
||||
1. В файле Java создайте класс, введя `class Test`.
|
||||
{% data variables.product.prodname_copilot %} автоматически предложит текст класса, выделенный серым цветом, как показано ниже. Точное предложение может отличаться.
|
||||
 {% data reusables.copilot.accept-suggestion %}
|
||||
1. Чтобы {% data variables.product.prodname_copilot %} мог предложить текст функции, введите следующую строку под скобкой функции `main`. Точное предложение может отличаться.
|
||||
{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %}
|
||||
|
||||

|
||||
{% data reusables.copilot.accept-suggestion %}
|
||||
 {% data reusables.copilot.accept-suggestion %}
|
||||
|
||||
{% data variables.product.prodname_copilot %} will attempt to match the context and style of your code. You can always edit the suggested code.
|
||||
{% data variables.product.prodname_copilot %} попытается сопоставить контекст и стиль кода. Вы всегда можете изменить предлагаемый код.
|
||||
|
||||
## Seeing alternative suggestions
|
||||
## Просмотр альтернативных предложений
|
||||
|
||||
{% data reusables.copilot.alternative-suggestions %}
|
||||
|
||||
{% data reusables.copilot.create-java-file %}
|
||||
1. To prompt {% data variables.product.prodname_copilot %} to show you a suggestion, type the following line in the Java file.
|
||||
{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %}
|
||||
{% data reusables.copilot.see-alternative-suggestions %}
|
||||
1. Чтобы {% data variables.product.prodname_copilot %} отобразил предложение, введите следующую строку в файле Java.
|
||||
{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %} {% data reusables.copilot.see-alternative-suggestions %}
|
||||
|
||||
| OS | See next suggestion | See previous suggestion |
|
||||
| OS | Смотреть следующее предложение | Смотреть предыдущее предложение |
|
||||
| :- | :- | :- |
|
||||
| macOS | <kbd>Option</kbd>+<kbd>]</kbd> | <kbd>Option</kbd>+<kbd>[</kbd> |
|
||||
| Windows | <kbd>Alt</kbd>+<kbd>]</kbd> | <kbd>Alt</kbd>+<kbd>[</kbd> |
|
||||
| Linux | <kbd>Alt</kbd>+<kbd>]</kbd> | <kbd>Alt</kbd>+<kbd>[</kbd> |
|
||||
| Windows | <kbd>ALT</kbd>+<kbd>]</kbd> | <kbd>ALT</kbd>+<kbd>[</kbd> |
|
||||
| Linux | <kbd>ALT</kbd>+<kbd>]</kbd> | <kbd>ALT</kbd>+<kbd>[</kbd> |
|
||||
{% data reusables.copilot.accept-or-reject-suggestion %}
|
||||
|
||||
## Seeing multiple suggestions in a new tab
|
||||
## Просмотр нескольких предложений на новой вкладке
|
||||
|
||||
{% data reusables.copilot.suggestions-new-tab %}
|
||||
|
||||
{% data reusables.copilot.create-java-file %}
|
||||
1. To prompt {% data variables.product.prodname_copilot %} to show you a suggestion, type the following line in the Java file.
|
||||
1. Чтобы {% data variables.product.prodname_copilot %} отобразил предложение, введите следующую строку в файле Java.
|
||||
{% indented_data_reference reusables.copilot.java-int-snippet spaces=3 %}
|
||||
1. Open a new tab with multiple additional suggestions.
|
||||
- On macOS, press <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>A</kbd>, then click **Open GitHub Copilot**, or press <kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>\</kbd> to open the new tab immediately.
|
||||
- On Windows or Linux, press <kbd>Ctrl</kbd>+<kbd>Enter</kbd>, then click **Open GitHub Copilot**.
|
||||

|
||||
1. To accept a suggestion, above the suggestion, click **Accept Solution**. To reject all suggestions, close the tab.
|
||||
1. Откройте новую вкладку с несколькими дополнительными предложениями.
|
||||
- В macOS нажмите клавиши <kbd>COMMAND</kbd>+<kbd>SHIFT</kbd>+<kbd>A</kbd>, а затем нажмите **Открыть GitHub Copilot** или нажмите клавиши <kbd>COMMAND</kbd>+<kbd>SHIFT</kbd>+<kbd>\</kbd>, чтобы сразу открыть новую вкладку.
|
||||
- В Windows или Linux нажмите <kbd>CTRL</kbd>+<kbd>ВВОД</kbd>, а затем нажмите кнопку **Открыть GitHub Copilot**.
|
||||

|
||||
1. Чтобы принять предложение, над предложением нажмите кнопку **Принять решение**. Чтобы отклонить все предложения, закройте вкладку.
|
||||
|
||||
## Generating code suggestions from comments
|
||||
## Создание предложений кода из комментариев
|
||||
|
||||
{% data reusables.copilot.generating-suggestions-from-comments %}
|
||||
|
||||
{% data reusables.copilot.create-java-file %}
|
||||
1. To prompt {% data variables.product.prodname_copilot %} to suggest an implementation of a function in the Java file, type the following lines.
|
||||
1. Чтобы {% data variables.product.prodname_copilot %} предложил реализацию функции в файле Java, введите следующие строки.
|
||||
```java{:copy}
|
||||
// find all images without alternate text
|
||||
// and give them a red border
|
||||
void process () {
|
||||
```
|
||||

|
||||

|
||||
|
||||
## Enabling and disabling {% data variables.product.prodname_copilot %}
|
||||
## Включение и отключение {% data variables.product.prodname_copilot %}
|
||||
|
||||
You can enable or disable {% data variables.product.prodname_copilot %} for all languages, or for individual languages. The {% data variables.product.prodname_copilot %} status icon in the bottom panel of your JetBrains IDE window indicates whether {% data variables.product.prodname_copilot %} is enabled or disabled. When enabled, the icon is highlighted. When disabled, the icon is grayed out.
|
||||
Вы можете включить или отключить {% data variables.product.prodname_copilot %} для всех языков или для отдельных языков. Значок состояния {% data variables.product.prodname_copilot %} на нижней панели окна интегрированной среды разработки JetBrains указывает, включен или отключен параметр {% data variables.product.prodname_copilot %}. Если этот параметр включен, значок выделен. Если он отключен, значок неактивен.
|
||||
|
||||
1. To enable or disable {% data variables.product.prodname_copilot %}, click the status icon in the bottom panel of the JetBrains window.
|
||||

|
||||
2. If you are disabling {% data variables.product.prodname_copilot %}, you will be asked whether you want to disable it globally, or for the language of the file you are currently editing.
|
||||
1. Чтобы включить или отключить {% data variables.product.prodname_copilot %}, щелкните значок состояния на нижней панели окна JetBrains.
|
||||

|
||||
2. Если вы отключаете {% data variables.product.prodname_copilot %}, появится запрос, следует ли отключить их глобально или для языка файла, который вы редактируете.
|
||||
|
||||
- To disable suggestions from {% data variables.product.prodname_copilot %} globally, click **Disable Completions**.
|
||||
- To disable suggestions from {% data variables.product.prodname_copilot %} for the specified language, click **Disable Completions for _LANGUAGE_**.
|
||||

|
||||
- Чтобы отключить предложения от {% data variables.product.prodname_copilot %} глобально, нажмите кнопку **Отключить завершение**.
|
||||
- Чтобы отключить предложения от {% data variables.product.prodname_copilot %} для указанного языка, нажмите кнопку **Отключить завершение для _ЯЗЫК_**.
|
||||

|
||||
|
||||
|
||||
## Further reading
|
||||
## Дополнительные сведения
|
||||
|
||||
- [The {% data variables.product.prodname_copilot %} website](https://copilot.github.com/)
|
||||
- [About {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot#about-the-license-for-the-github-copilot-plugin-in-jetbrains-ides)
|
||||
- [Веб-сайт {% data variables.product.prodname_copilot %}](https://copilot.github.com/)
|
||||
- [Сведения о {% data variables.product.prodname_copilot %}](/copilot/overview-of-github-copilot/about-github-copilot#about-the-license-for-the-github-copilot-plugin-in-jetbrains-ides)
|
||||
|
||||
@@ -1,105 +1,109 @@
|
||||
---
|
||||
title: Getting started with GitHub Copilot in Visual Studio Code
|
||||
title: Начало работы с GitHub Copilot в Visual Studio Code
|
||||
shortTitle: Visual Studio Code
|
||||
intro: 'Learn how to install {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}, and start seeing suggestions as you write comments and code.'
|
||||
intro: 'Узнайте, как установить {% data variables.product.prodname_copilot %} в {% data variables.product.prodname_vscode %} и начать видеть предложения при написании комментариев и кода.'
|
||||
product: '{% data reusables.gated-features.copilot %}'
|
||||
versions:
|
||||
feature: copilot
|
||||
topics:
|
||||
- Copilot
|
||||
ms.openlocfilehash: 63c670a7cd5263057f79b7761a960854ecac2dd6
|
||||
ms.sourcegitcommit: 7fb7ec2e665856fc5f7cd209b53bd0fb1c9bbc67
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185141'
|
||||
---
|
||||
|
||||
{% data reusables.copilot.copilot-cta-button %}
|
||||
|
||||
## About {% data variables.product.prodname_copilot %} and {% data variables.product.prodname_vscode %}
|
||||
## Сведения о {% data variables.product.prodname_copilot %} и {% data variables.product.prodname_vscode %}
|
||||
|
||||
{% data reusables.copilot.procedural-intro %}
|
||||
|
||||
If you use {% data variables.product.prodname_vscode %}, you can view and incorporate suggestions from {% data variables.product.prodname_copilot %} directly within the editor. This guide demonstrates how to use {% data variables.product.prodname_copilot %} within {% data variables.product.prodname_vscode %} for macOS, Windows, or Linux.
|
||||
Если вы используете {% data variables.product.prodname_vscode %}, вы можете просматривать и включать предложения из {% data variables.product.prodname_copilot %} непосредственно в редакторе. В этом руководстве описано, как использовать {% data variables.product.prodname_copilot %} в {% data variables.product.prodname_vscode %} для macOS, Windows или Linux.
|
||||
|
||||
## Prerequisites
|
||||
## Предварительные требования
|
||||
|
||||
To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vscode %}, you must have {% data variables.product.prodname_vscode %} installed. For more information, see the [{% data variables.product.prodname_vscode %} download page](https://code.visualstudio.com/Download).
|
||||
Чтобы использовать {% data variables.product.prodname_copilot %} в {% data variables.product.prodname_vscode %}, необходимо установить {% data variables.product.prodname_vscode %}. Дополнительные сведения см. на [странице загрузки {% data variables.product.prodname_vscode %}](https://code.visualstudio.com/Download).
|
||||
|
||||
## Installing the {% data variables.product.prodname_vscode %} extension
|
||||
## Установка расширения {% data variables.product.prodname_vscode %}
|
||||
|
||||
To use {% data variables.product.prodname_copilot %}, you must first install the {% data variables.product.prodname_vscode %} extension.
|
||||
Чтобы использовать {% data variables.product.prodname_copilot %}, сначала установите {% data variables.product.prodname_vscode %}.
|
||||
|
||||
1. In the {% data variables.product.prodname_vscode %} Marketplace, go to the [{% data variables.product.prodname_copilot %} extension](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) page and click **Install**.
|
||||

|
||||
1. A popup will appear, asking to open {% data variables.product.prodname_vscode %}. Click **Open {% data variables.product.prodname_vscode %}**.
|
||||
1. In the "Extension: {% data variables.product.prodname_copilot %}" tab in {% data variables.product.prodname_vscode %}, click **Install**.
|
||||

|
||||
1. If you have not previously authorized {% data variables.product.prodname_vscode %} in your {% data variables.product.prodname_dotcom %} account, you will be prompted to sign in to {% data variables.product.prodname_dotcom %} in {% data variables.product.prodname_vscode %}.
|
||||
- If you have previously authorized {% data variables.product.prodname_vscode %} for your account on {% data variables.product.prodname_dotcom %}, {% data variables.product.prodname_copilot %} will be automatically authorized.
|
||||

|
||||
1. In your browser, {% data variables.product.prodname_dotcom %} will request the necessary permissions for {% data variables.product.prodname_copilot %}. To approve these permissions, click **Authorize {% data variables.product.prodname_vscode %}**.
|
||||
1. In {% data variables.product.prodname_vscode %}, in the "{% data variables.product.prodname_vscode %}" dialog box, to confirm the authentication, click **Open**.
|
||||
1. В {% data variables.product.prodname_vscode %} Marketplace перейдите на страницу [Расширение {% data variables.product.prodname_copilot %}](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot) и щелкните **Установить**.
|
||||

|
||||
1. Появится всплывающее окно с просьбой открыть {% data variables.product.prodname_vscode %}. Щелкните **Открыть {% data variables.product.prodname_vscode %}** .
|
||||
1. На вкладке "Расширение: {% data variables.product.prodname_copilot %}" в {% data variables.product.prodname_vscode %} щелкните **Установить**.
|
||||

|
||||
1. Если вы еще не авторизовали {% data variables.product.prodname_vscode %} в учетной записи {% data variables.product.prodname_dotcom %}, появится запрос на вход в {% data variables.product.prodname_dotcom %} в {% data variables.product.prodname_vscode %}.
|
||||
- Если вы уже авторизовали {% data variables.product.prodname_vscode %} для учетной записи на {% data variables.product.prodname_dotcom %}, {% data variables.product.prodname_copilot %} будет авторизован автоматически.
|
||||

|
||||
1. В браузере {% data variables.product.prodname_dotcom %} запросит необходимые разрешения для {% data variables.product.prodname_copilot %}. Чтобы одобрить эти разрешения, щелкните **Авторизовать {% data variables.product.prodname_vscode %}** .
|
||||
1. В {% data variables.product.prodname_vscode %} в диалоговом окне "{% data variables.product.prodname_vscode %}" для подтверждения подлинности щелкните **Открыть**.
|
||||
|
||||
|
||||
## Seeing your first suggestion
|
||||
## Просмотр первого предложения
|
||||
|
||||
{% data reusables.copilot.code-examples-limitations %}
|
||||
|
||||
{% data reusables.copilot.supported-languages %} The following samples are in JavaScript, but other languages will work similarly.
|
||||
{% data reusables.copilot.supported-languages %} Следующие примеры находятся на JavaScript, но другие языки будут работать аналогичным образом.
|
||||
|
||||
{% data reusables.copilot.create-js-file %}
|
||||
1. In the JavaScript file, type the following function header. {% data variables.product.prodname_copilot %} will automatically suggest an entire function body in grayed text, as shown below. The exact suggestion may vary.
|
||||
1. В файле JavaScript введите следующий заголовок функции. {% data variables.product.prodname_copilot %} автоматически предложит весь текст функции, выделенный серым цветом, как показано ниже. Точное предложение может отличаться.
|
||||
```javascript{:copy}
|
||||
function calculateDaysBetweenDates(begin, end) {
|
||||
```
|
||||

|
||||
{% data reusables.copilot.accept-suggestion %}
|
||||
 {% data reusables.copilot.accept-suggestion %}
|
||||
|
||||
## Seeing alternative suggestions
|
||||
## Просмотр альтернативных предложений
|
||||
|
||||
{% data reusables.copilot.alternative-suggestions %}
|
||||
|
||||
{% data reusables.copilot.create-js-file %}
|
||||
1. In the JavaScript file, type the following function header. {% data variables.product.prodname_copilot %} will show you a suggestion.
|
||||
1. В файле JavaScript введите следующий заголовок функции. {% data variables.product.prodname_copilot %} покажет предложение.
|
||||
```javascript{:copy}
|
||||
function calculateDaysBetweenDates(begin, end) {
|
||||
```
|
||||
{% data reusables.copilot.see-alternative-suggestions %}
|
||||
|
||||
| OS | See next suggestion | See previous suggestion |
|
||||
| OS | Смотреть следующее предложение | Смотреть предыдущее предложение |
|
||||
| :- | :- | :- |
|
||||
|macOS|<kbd>Option (⌥) or Alt</kbd>+<kbd>]</kbd>|<kbd>Option (⌥) or Alt</kbd>+<kbd>[</kbd>|
|
||||
|Windows|<kbd>Alt</kbd>+<kbd>]</kbd>|<kbd>Alt</kbd>+<kbd>[</kbd>|
|
||||
|Linux|<kbd>Alt</kbd>+<kbd>]</kbd>|<kbd>Alt</kbd>+<kbd>[</kbd>|
|
||||
1. Alternatively, you can hover over the suggestion to see the {% data variables.product.prodname_copilot %} command palette for choosing suggestions.
|
||||
|macOS|<kbd>Option (⌥) или ALT</kbd>+<kbd>]</kbd>|<kbd>Option (⌥) или ALT</kbd>+<kbd>[</kbd>|
|
||||
|Windows|<kbd>ALT</kbd>+<kbd>]</kbd>|<kbd>ALT</kbd>+<kbd>[</kbd>|
|
||||
|Linux|<kbd>ALT</kbd>+<kbd>]</kbd>|<kbd>ALT</kbd>+<kbd>[</kbd>|
|
||||
1. Кроме того, можно навести указатель мыши на предложение, чтобы просмотреть палитру команд {% data variables.product.prodname_copilot %} для выбора предложений.
|
||||
{% data reusables.copilot.accept-or-reject-suggestion %}
|
||||
|
||||
## Seeing multiple suggestions in a new tab
|
||||
## Просмотр нескольких предложений на новой вкладке
|
||||
|
||||
{% data reusables.copilot.suggestions-new-tab %}
|
||||
|
||||
{% data reusables.copilot.create-js-file %}
|
||||
1. In the JavaScript file, type the following function header. {% data variables.product.prodname_copilot %} will show you a suggestion.
|
||||
1. В файле JavaScript введите следующий заголовок функции. {% data variables.product.prodname_copilot %} покажет предложение.
|
||||
```javascript{:copy}
|
||||
function calculateDaysBetweenDates(begin, end) {
|
||||
```
|
||||
1. To open a new tab with multiple additional options, press <kbd>Ctrl</kbd>+<kbd>Enter</kbd>.
|
||||
1. To accept a suggestion, above the suggestion, click **Accept Solution**. To reject all suggestions, close the tab.
|
||||
1. Чтобы открыть новую вкладку с несколькими дополнительными параметрами, нажмите <kbd>CTRL</kbd>+<kbd>ВВОД</kbd>.
|
||||
1. Чтобы принять предложение, над предложением нажмите кнопку **Принять решение**. Чтобы отклонить все предложения, закройте вкладку.
|
||||
|
||||
## Generating code suggestions from comments
|
||||
## Создание предложений кода из комментариев
|
||||
|
||||
{% data reusables.copilot.generating-suggestions-from-comments %}
|
||||
|
||||
{% data reusables.copilot.create-js-file %}
|
||||
1. In the JavaScript file, type the following comment. {% data variables.product.prodname_copilot %} will suggest an implementation of the function.
|
||||
1. В файле JavaScript введите следующий комментарий. {% data variables.product.prodname_copilot %} предложит реализацию функции.
|
||||
```javascript{:copy}
|
||||
// find all images without alternate text
|
||||
// and give them a red border
|
||||
function process() {
|
||||
```
|
||||
|
||||
## Using a framework
|
||||
## Использование платформы
|
||||
|
||||
You can also use {% data variables.product.prodname_copilot %} to generate suggestions for APIs and frameworks. The following example uses {% data variables.product.prodname_copilot %} to create a simple Express server that returns the current time.
|
||||
Вы также можете использовать {% data variables.product.prodname_copilot %} для создания предложений для API и платформ. В следующем примере для создания простого сервера Express, возвращающего текущее время, используется {% data variables.product.prodname_copilot %}.
|
||||
|
||||
{% data reusables.copilot.create-js-file %}
|
||||
1. In the JavaScript file, type the following comment and then press <kbd>Enter</kbd>. {% data variables.product.prodname_copilot %} will suggest an implementation of the Express app.
|
||||
1. В файле JavaScript введите следующий комментарий и нажмите клавишу <kbd>ВВОД</kbd>. {% data variables.product.prodname_copilot %} предложит реализацию приложения Express.
|
||||
```javascript{:copy}
|
||||
// Express server on port 3000
|
||||
1. To accept each line, press <kbd>Tab</kbd>, then <kbd>Enter</kbd>.
|
||||
@@ -107,10 +111,10 @@ You can also use {% data variables.product.prodname_copilot %} to generate sugge
|
||||
```javascript{:copy}
|
||||
// Return the current time
|
||||
```
|
||||
1. To accept each line, press <kbd>Tab</kbd>.
|
||||
1. Чтобы принять каждую строку, нажмите клавишу <kbd>TAB</kbd>.
|
||||
|
||||
{% data reusables.copilot.enabling-or-disabling-in-vsc %}
|
||||
|
||||
## Further reading
|
||||
## Дополнительные сведения
|
||||
|
||||
- [{% data variables.product.prodname_copilot %}](https://copilot.github.com/)
|
||||
|
||||
@@ -1,84 +1,86 @@
|
||||
---
|
||||
title: Getting started with GitHub Copilot in Visual Studio
|
||||
title: Начало работы с GitHub Copilot в Visual Studio
|
||||
shortTitle: Visual Studio
|
||||
product: '{% data reusables.gated-features.copilot %}'
|
||||
intro: 'Learn how to install {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vs %}, and start seeing suggestions as you write comments and code.'
|
||||
intro: 'Узнайте, как установить {% data variables.product.prodname_copilot %} в {% data variables.product.prodname_vs %} и начать видеть предложения при написании комментариев и кода.'
|
||||
versions:
|
||||
feature: copilot
|
||||
topics:
|
||||
- Copilot
|
||||
ms.openlocfilehash: 353095b0b0490cd12da8d853754b524431605819
|
||||
ms.sourcegitcommit: 7fb7ec2e665856fc5f7cd209b53bd0fb1c9bbc67
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185138'
|
||||
---
|
||||
|
||||
{% data reusables.copilot.copilot-cta-button %}
|
||||
|
||||
## About {% data variables.product.prodname_copilot %} and Visual Studio
|
||||
## Сведения о {% data variables.product.prodname_copilot %} and Visual Studio
|
||||
|
||||
{% data reusables.copilot.procedural-intro %}
|
||||
|
||||
If you use {% data variables.product.prodname_vs %}, you can view and incorporate suggestions from {% data variables.product.prodname_copilot %} directly within the editor. This guide demonstrates how to use {% data variables.product.prodname_copilot %} within {% data variables.product.prodname_vs %} for Windows.
|
||||
Если вы используете {% data variables.product.prodname_vs %}, вы можете просматривать и включать предложения из {% data variables.product.prodname_copilot %} непосредственно в редакторе. В этом руководстве описано, как использовать {% data variables.product.prodname_copilot %} в {% data variables.product.prodname_vs %} для Windows.
|
||||
|
||||
## Prerequisites
|
||||
## Предварительные требования
|
||||
|
||||
To use {% data variables.product.prodname_copilot %} in {% data variables.product.prodname_vs %}, you must have {% data variables.product.prodname_vs %} 2022 17.2 or later installed. For more information, see the [Visual Studio IDE](https://visualstudio.microsoft.com/vs/) documentation.
|
||||
Чтобы использовать {% data variables.product.prodname_copilot %} в {% data variables.product.prodname_vs %}, необходимо установить {% data variables.product.prodname_vs %} 2022 17.2 или более поздней версии. Дополнительные сведения см. в [документации по интегрированной среде разработки Visual Studio](https://visualstudio.microsoft.com/vs/).
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data variables.product.prodname_copilot %} is not currently available for use with Visual Studio for Mac.
|
||||
**Примечание.** {% data variables.product.prodname_copilot %} в настоящее время недоступен для использования с Visual Studio для Mac.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## Installing the {% data variables.product.prodname_vs %} extension
|
||||
## Установка расширения {% data variables.product.prodname_vs %}
|
||||
|
||||
To use {% data variables.product.prodname_copilot %}, you must first install the {% data variables.product.prodname_vs %} extension.
|
||||
1. In the Visual Studio toolbar, click **Extensions**, then click **Manage Extensions**.
|
||||

|
||||
1. In the "Manage Extensions" window, click **Visual Studio Marketplace**, search for the {% data variables.product.prodname_copilot %} extension, then click **Download**.
|
||||

|
||||
1. Close the "Manage Extensions" window, then exit and relaunch {% data variables.product.prodname_vs %}.
|
||||
1. Optionally, to check that {% data variables.product.prodname_copilot %} is installed and enabled, go back to **Manage Extensions**, click **Installed** to view your currently installed extensions, then click **{% data variables.product.prodname_copilot %}** to see status information.
|
||||

|
||||
1. Open or create a new project in {% data variables.product.prodname_vs %}.
|
||||
1. In the "Microsoft {% data variables.product.prodname_vs %}" dialog box, to copy your device activation code, click **OK**.
|
||||

|
||||
1. A device activation window will open in your browser. Paste the device code, then click **Continue**.
|
||||
Чтобы использовать {% data variables.product.prodname_copilot %}, сначала установите {% data variables.product.prodname_vs %}.
|
||||
1. На панели инструментов Visual Studio щелкните **Расширения**, а затем — **Управление расширениями**.
|
||||

|
||||
1. В окне "Управление расширениями" щелкните **Visual Studio Marketplace**, найдите расширение {% data variables.product.prodname_copilot %}, а затем нажмите кнопку **Скачать**.
|
||||

|
||||
1. Закройте окно "Управление расширениями", а затем закройте и повторно запустите {% data variables.product.prodname_vs %}.
|
||||
1. При необходимости, чтобы убедиться, что {% data variables.product.prodname_copilot %} установлен и включен, вернитесь в раздел **Управление расширениями**, нажмите кнопку **Установлено**, чтобы просмотреть установленные расширения, а затем щелкните **{% data variables.product.prodname_copilot %}** , чтобы просмотреть сведения о состоянии.
|
||||

|
||||
1. Откройте или создайте проект в {% data variables.product.prodname_vs %}.
|
||||
1. В диалоговом окне "Microsoft {% data variables.product.prodname_vs %}" скопируйте код активации устройства, нажав кнопку **ОК**.
|
||||

|
||||
1. Окно активации устройства откроется в браузере. Вставьте код устройства и нажмите кнопку **Продолжить**.
|
||||
|
||||
- To paste the code in Windows or Linux, press <kbd>Ctrl</kbd>+<kbd>v</kbd>.
|
||||
- To paste the code in macOS, press <kbd>command</kbd>+<kbd>v</kbd>.
|
||||
1. {% data variables.product.prodname_dotcom %} will request the necessary permissions for {% data variables.product.prodname_copilot %}. To approve these permissions, click **Authorize {% data variables.product.prodname_copilot %} Plugin**.
|
||||
1. After you approve the permissions, {% data variables.product.prodname_vs %} will show a confirmation.
|
||||

|
||||
- Чтобы вставить код в Windows или Linux, нажмите <kbd>CTRL</kbd>+<kbd>V</kbd>.
|
||||
- Чтобы вставить код в macOS, нажмите <kbd>COMMAND</kbd>+<kbd>V</kbd>.
|
||||
1. {% data variables.product.prodname_dotcom %} запросит необходимые разрешения для {% data variables.product.prodname_copilot %}. Чтобы одобрить эти разрешения, щелкните **Авторизовать подключаемый модуль {% data variables.product.prodname_copilot %}** .
|
||||
1. Когда вы одобрите разрешения, {% data variables.product.prodname_vs %} отобразит подтверждение.
|
||||

|
||||
|
||||
## Seeing your first suggestion
|
||||
## Просмотр первого предложения
|
||||
|
||||
{% data reusables.copilot.code-examples-limitations %}
|
||||
{% data reusables.copilot.supported-languages %} The following samples are in C#, but other languages will work similarly.
|
||||
{% data reusables.copilot.code-examples-limitations %} {% data reusables.copilot.supported-languages %} Приведенные ниже примеры используются на языке C#, но другие языки будут работать аналогичным образом.
|
||||
|
||||
{% data reusables.copilot.create-c-file %}
|
||||
1. In the C# file, type the following function signature. {% data variables.product.prodname_copilot %} will automatically suggest an entire function body in grayed text, as shown below. The exact suggestion may vary.
|
||||
1. В файле C# введите следующую сигнатуру функции. {% data variables.product.prodname_copilot %} автоматически предложит весь текст функции, выделенный серым цветом, как показано ниже. Точное предложение может отличаться.
|
||||
```csharp{:copy}
|
||||
int CalculateDaysBetweenDates(
|
||||
```
|
||||

|
||||
{% data reusables.copilot.accept-suggestion %}
|
||||
 {% data reusables.copilot.accept-suggestion %}
|
||||
|
||||
## Seeing alternative suggestions
|
||||
{% data reusables.copilot.alternative-suggestions %}
|
||||
{% data reusables.copilot.create-c-file %}
|
||||
1. In the C# file, type the following function signature. {% data variables.product.prodname_copilot %} will show you a suggestion.
|
||||
## Просмотр альтернативных предложений
|
||||
{% data reusables.copilot.alternative-suggestions %} {% data reusables.copilot.create-c-file %}
|
||||
1. В файле C# введите следующую сигнатуру функции. {% data variables.product.prodname_copilot %} покажет предложение.
|
||||
|
||||
```csharp{:copy}
|
||||
int CalculateDaysBetweenDates(
|
||||
```
|
||||
1. If alternative suggestions are available, you can see these alternatives by pressing <kbd>Alt</kbd>+<kbd>]</kbd> (or <kbd>Alt</kbd>+<kbd>[</kbd>).
|
||||
1. Optionally, you can hover over the suggestion to see the {% data variables.product.prodname_copilot %} command palette for choosing suggestions.
|
||||
1. Если доступны альтернативные предложения, вы можете увидеть эти альтернативы, нажав клавиши <kbd>ALT</kbd>+<kbd>]</kbd> (или <kbd>ALT</kbd>+<kbd>[</kbd>).
|
||||
1. Кроме того, можно навести указатель мыши на предложение, чтобы просмотреть палитру команд {% data variables.product.prodname_copilot %} для выбора предложений.
|
||||
{% data reusables.copilot.accept-or-reject-suggestion %}
|
||||
|
||||
## Generating code suggestions from comments
|
||||
## Создание предложений кода из комментариев
|
||||
|
||||
{% data reusables.copilot.generating-suggestions-from-comments %}
|
||||
|
||||
{% data reusables.copilot.create-c-file %}
|
||||
1. In the C# file, type the following comment. {% data variables.product.prodname_copilot %} will suggest an implementation of the function.
|
||||
1. В файле C# введите следующий комментарий. {% data variables.product.prodname_copilot %} предложит реализацию функции.
|
||||
```csharp{:copy}
|
||||
using System.Xml.Linq;
|
||||
|
||||
@@ -91,6 +93,6 @@ To use {% data variables.product.prodname_copilot %}, you must first install the
|
||||
|
||||
{% data reusables.copilot.enabling-or-disabling-vs %}
|
||||
|
||||
## Further reading
|
||||
## Дополнительные сведения
|
||||
|
||||
- [{% data variables.product.prodname_copilot %}](https://copilot.github.com/)
|
||||
|
||||
@@ -7,12 +7,12 @@ redirect_from:
|
||||
versions:
|
||||
fpt: '*'
|
||||
ghec: '*'
|
||||
ms.openlocfilehash: bba9137fc39c1bc101a75650dcea03e651d37fff
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.openlocfilehash: 27f11aa4ae2693bcc336ecdf4cbfb68d8679d743
|
||||
ms.sourcegitcommit: 74c60a4564bcc17e47b5a67941ac6d9fe13b6a5c
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '145089725'
|
||||
ms.lasthandoff: 11/30/2022
|
||||
ms.locfileid: '148186166'
|
||||
---
|
||||
## Для приложений GitHub
|
||||
|
||||
@@ -39,7 +39,7 @@ ms.locfileid: '145089725'
|
||||
|
||||
## Для GitHub Actions
|
||||
|
||||
Наличие значка {% octicon "verified" aria-label="The verified badge" %} (то есть подтвержденный создатель) у действия означает, что создатель действия является подтвержденной партнерской организацией на {% data variables.product.prodname_dotcom %}.
|
||||
Действия с {% octicon "verified" aria-label="The verified badge" %} или verified creator badge указывают на то, что {% data variables.product.prodname_dotcom %} проверил создателя действия в качестве партнерской организации. Партнеры могут отправить запрос на получение эмблемы проверенного создателя по электронной почте <a href="mailto:partnerships@github.com">partnerships@github.com</a> .
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ versions:
|
||||
fpt: '*'
|
||||
permissions: 'Organization owners who are admins for a classroom can connect learning management systems to {% data variables.product.prodname_classroom %}.'
|
||||
shortTitle: Register an LMS
|
||||
ms.openlocfilehash: e1c1abed5ce4ebf82c19b29fef9a005fbe4c7a02
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.openlocfilehash: 408126833cbf7fa8cd4a71d172f6550e82f795a2
|
||||
ms.sourcegitcommit: 1a77ceb9e20c002173dda983db9405bcd5be254a
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148106856'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185172'
|
||||
---
|
||||
## Сведения о регистрации LMS в классе
|
||||
|
||||
@@ -51,7 +51,7 @@ ms.locfileid: '148106856'
|
||||
| Раскрывающийся список **служб преимущества LTI** | Установите флажок "Может извлекать пользовательские данные, связанные с контекстом, в котором установлено средство". |
|
||||
| **Раскрывающийся список "Дополнительные параметры"** | В разделе "Уровень конфиденциальности" выберите `Public` |
|
||||
| **Размещения** | Выберите `Course Settings Sub Navigation`. <br/><br/>**Примечание**. Если для размещения задано другое значение, это должно быть сообщено преподавателям. В нашей документации предполагается, что это размещение кнопки. |
|
||||
6. Выберите команду **Сохранить**.
|
||||
6. Нажмите **Сохранить**.
|
||||
7. В таблице на странице "Ключи разработчика" в строке ключа разработчика GitHub Classroom запишите значение идентификатора клиента в столбце "Сведения" - это необходимо сообщить преподавателям, чтобы они завершили настройку.
|
||||
8. В таблице на странице "Ключи разработчика" в столбце "Состояние" переведите состояние ключа в положение "Вкл.".
|
||||
|
||||
@@ -63,8 +63,8 @@ ms.locfileid: '148106856'
|
||||
- "Идентификатор издателя": `https://canvas.instructure.com`
|
||||
- "Domain": базовый URL-адрес экземпляра Canvas.
|
||||
- "Идентификатор клиента": "Идентификатор клиента" в разделе "Сведения" из созданного вами ключа разработчика.
|
||||
- "Конечная точка авторизации OIDC": базовый URL-адрес экземпляра Canvas с `/login/oauth2/token` добавлением в конце.
|
||||
- "URL-адрес извлечения маркера OAuth 2.0": базовый URL-адрес экземпляра Canvas с `/api/lti/authorize_redirect` добавлением в конце.
|
||||
- "Конечная точка авторизации OIDC": базовый URL-адрес экземпляра Canvas с `/api/lti/authorize_redirect` добавлением в конце.
|
||||
- "URL-адрес извлечения маркера OAuth 2.0": базовый URL-адрес экземпляра Canvas с `/login/oauth2/token` добавлением в конце.
|
||||
- "URL-адрес набора ключей": базовый URL-адрес экземпляра Canvas с `/api/lti/security/jwks` добавлением в конце.
|
||||
|
||||

|
||||
@@ -127,27 +127,27 @@ ms.locfileid: '148106856'
|
||||

|
||||
|
||||
3. Щелкните **Зарегистрировать**.
|
||||
4. В верхней части экрана должен появиться баннер "Успешно зарегистрировано LMS". Это означает, что вы зарегистрировали экземпляр LMS, а преподаватели теперь могут связать свои классы.
|
||||
4. В верхней части экрана должен появиться баннер "Успешно зарегистрировано LMS". Это означает, что вы зарегистрировали экземпляр LMS, и преподаватели теперь могут связывать свои классы.
|
||||
|
||||
## Настройка Sakai для {% data variables.product.prodname_classroom %}
|
||||
|
||||
### 1. Регистрация {% data variables.product.prodname_classroom %} в качестве внешнего средства
|
||||
|
||||
1. Перейдите к Sakai и войдите в систему.
|
||||
2. Перейдите в раздел "Рабочая область администрирования" и выберите **Внешние средства** на боковой панели слева.
|
||||
2. Перейдите в раздел "Рабочая область администрирования" и выберите **Внешние инструменты** на левой боковой панели.
|
||||
3. Щелкните **Install LTI 1.x Tool (Установить средство LTI 1.x).**
|
||||
4. Введите в поля следующие значения:
|
||||
|
||||
| Поле в конфигурации приложения Sakai | Значение или параметр |
|
||||
| :- | :- |
|
||||
| **Имя средства** | GitHub Classroom — [имя вашего курса] <br/><br/>**Примечание.** Вы можете использовать любое имя, но если для этого параметра задано другое значение, убедитесь, что об этом сообщается преподавателям. |
|
||||
| **Имя средства** | GitHub Classroom — [имя вашего курса] <br/><br/>**Примечание**. Вы можете использовать любое имя, но если для этого параметра задано другое значение, убедитесь, что оно передано преподавателям. |
|
||||
| **Текст кнопки** (текст в меню инструментов) | Что преподаватель увидит на кнопке для запуска {% data variables.product.prodname_classroom %}. Например, значением может быть `sync`. |
|
||||
| **Открытие URL-адреса** | `https://classroom.github.com/context-link` |
|
||||
| **Отправка имен пользователей во внешнее средство** | установите этот флажок. |
|
||||
| **Предоставление списка внешнему средству** | установите этот флажок. |
|
||||
| **Инструмент поддерживает LTI 1.3** | установите этот флажок. |
|
||||
| **URL-адрес набора ключей средства LTI 1.3** | `https://classroom.github.com/.well-known/jwks.json` |
|
||||
| **Средство LTI 1.3 OpenID Connect/конечная точка инициализации** | `https://classroom.github.com/lti1p3/openid-connect/auth` |
|
||||
| **Предоставление списка внешнему инструменту** | установите этот флажок. |
|
||||
| **Средство поддерживает LTI 1.3** | установите этот флажок. |
|
||||
| **URL-адрес набора ключей инструмента LTI 1.3** | `https://classroom.github.com/.well-known/jwks.json` |
|
||||
| **Инструмент LTI 1.3 OpenID Connect/Конечная точка инициализации** | `https://classroom.github.com/lti1p3/openid-connect/auth` |
|
||||
| **Конечная точка перенаправления средства LTI 1.3** | `https://classroom.github.com/lti1p3/openid-connect/redirect` |
|
||||
5. После отправки Sakai отобразит сведения, необходимые для регистрации экземпляра Sakai в {% data variables.product.prodname_classroom %}.
|
||||
|
||||
@@ -158,12 +158,12 @@ ms.locfileid: '148106856'
|
||||
- В разделе "Тип LMS" выберите "Sakai" в раскрывающемся меню.
|
||||
- "Издатель платформы LTI 1.3": поле "Издатель платформы LTI 1.3", предоставленное Sakai
|
||||
- "Domain": базовый URL-адрес экземпляра Sakai.
|
||||
- "Идентификатор клиента LTI 1.3": поле "Идентификатор клиента LTI 1.3", предоставленное Sakai.
|
||||
- "LTI 1.3 Platform OIDC Authentication URL": поле "LTI 1.3 Platform OIDC Authentication URL" (URL-адрес проверки подлинности платформы OIDC), предоставленное Sakai.
|
||||
- "LTI 1.3 Platform OAuth2 Bearer Token Retrieval URL": поле "LTI 1.3 Platform OAuth2 Bearer Token Retrieval URL", предоставленное Sakai
|
||||
- "Идентификатор клиента LTI 1.3": поле "Идентификатор клиента LTI 1.3", предоставленное Sakai
|
||||
- "LTI 1.3 Platform OIDC Authentication URL": поле "LTI 1.3 Platform OIDC Authentication URL" (URL-адрес проверки подлинности платформы OIDC LTI 1.3), предоставленное Sakai
|
||||
- "LTI 1.3 Platform OAuth2 Bearer Token Retrieval URL": поле "LTI 1.3 Platform OAuth2 Bearer Token Retrieval URL" (URL-адрес получения маркера носителя LTI 1.3), предоставленное Sakai.
|
||||
- "LTI 1.3 Platform OAuth2 Well-Known/KeySet URL": поле "LTI 1.3 Platform OAuth2 Well-Known/KeySet URL", предоставленное Sakai
|
||||
|
||||

|
||||
|
||||
3. Щелкните **Зарегистрировать**.
|
||||
4. В верхней части экрана должен появиться баннер "Успешно зарегистрировано LMS". Это означает, что вы зарегистрировали экземпляр LMS, а преподаватели теперь могут связать свои классы.
|
||||
4. В верхней части экрана должен появиться баннер "Успешно зарегистрировано LMS". Это означает, что вы зарегистрировали экземпляр LMS, и преподаватели теперь могут связывать свои классы.
|
||||
|
||||
@@ -4,12 +4,12 @@ intro: 'Сведения об использовании API GraphQL {% data var
|
||||
versions:
|
||||
feature: discussions
|
||||
shortTitle: Use GraphQL for Discussions
|
||||
ms.openlocfilehash: 1512082737df4c92942a40007d2c75897edb1061
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.openlocfilehash: fd296c4e9390cac3500ba7319cb602366a37e262
|
||||
ms.sourcegitcommit: 4d6d3735d32540cb6de3b95ea9a75b8b247c580d
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147408846'
|
||||
ms.lasthandoff: 11/30/2022
|
||||
ms.locfileid: '148185620'
|
||||
---
|
||||
API GraphQL для {% data variables.product.prodname_discussions %} позволяет получать, создавать, изменять и удалять публикации обсуждений. Дополнительные сведения о {% data variables.product.prodname_discussions %} см. в разделе [Сведения об обсуждениях](/discussions/collaborating-with-your-community-using-discussions/about-discussions).
|
||||
|
||||
@@ -72,7 +72,7 @@ enum DiscussionOrderField {
|
||||
|
||||
### Repository.discussionCategories
|
||||
|
||||
Возвращаются доступные категории обсуждений, определенные в этом репозитории. Каждый репозиторий может относиться к нескольким категориям (до 10). Дополнительные сведения о категориях обсуждений см. в разделе [Сведения об обсуждениях](/discussions/collaborating-with-your-community-using-discussions/about-discussions#about-categories-and-formats-for-discussions).
|
||||
Возвращаются доступные категории обсуждений, определенные в этом репозитории. Каждый репозиторий может содержать до 25 категорий. Дополнительные сведения о категориях обсуждений см. в разделе [Сведения об обсуждениях](/discussions/collaborating-with-your-community-using-discussions/about-discussions#about-categories-and-formats-for-discussions).
|
||||
|
||||
_Сигнатура:_
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Автоматическое создание заметок о выпуске
|
||||
intro: Вы можете автоматически создавать заметки о выпуске для своих выпусков GitHub.
|
||||
title: Automatically generated release notes
|
||||
intro: You can automatically generate release notes for your GitHub releases
|
||||
permissions: Repository collaborators and people with write access to a repository can generate and customize automated release notes for a release.
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -13,61 +13,71 @@ shortTitle: Automated release notes
|
||||
communityRedirect:
|
||||
name: Provide GitHub Feedback
|
||||
href: 'https://github.com/orgs/community/discussions/categories/general'
|
||||
ms.openlocfilehash: a4adfa306873ef172950666756add7d0e67e168d
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147432019'
|
||||
---
|
||||
## Сведения об автоматическом создании заметок о выпуске
|
||||
|
||||
Автоматическое создание заметок о выпуске — это альтернатива написанию заметок о выпуске на {% data variables.product.prodname_dotcom %} вручную. С помощью этой функции можно быстро создавать обзор содержимого выпуска. Автоматически созданные заметки о выпуске включают список объединенных запросов на вытягивание, список участников выпуска и ссылку на полный журнал изменений.
|
||||
## About automatically generated release notes
|
||||
|
||||
Автоматические заметки о выпуске можно также настроить с помощью меток, который позволяют создать пользовательские категории для упорядочения включаемых запросов на вытягивание. Кроме того, можно исключить определенные метки и пользователей из выходных данных.
|
||||
Automatically generated release notes provide an automated alternative to manually writing release notes for your {% data variables.product.prodname_dotcom %} releases. With automatically generated release notes, you can quickly generate an overview of the contents of a release. Automatically generated release notes include a list of merged pull requests, a list of contributors to the release, and a link to a full changelog.
|
||||
|
||||
## Автоматическое создание заметок о выпуске для нового выпуска
|
||||
You can also customize your automated release notes, using labels to create custom categories to organize pull requests you want to include, and exclude certain labels and users from appearing in the output.
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.releases %}
|
||||
3. Нажмите кнопку **Создать черновик нового выпуска**.
|
||||

|
||||
4. {% ifversion fpt or ghec %}Щелкните **Выбрать тег** и введите{% else %}Введите{% endif %} номер версии для выпуска. Можно также выбрать существующий тег.
|
||||
{% ifversion fpt or ghec %} 
|
||||
5. Если вы создаете тег, нажмите кнопку **Создать тег**.
|
||||
 {% else %}  {% endif %}
|
||||
6. Если вы создали новый тег, в раскрывающемся меню выберите ветвь с проектом, который необходимо выпустить.
|
||||
{% ifversion fpt or ghec %} {% else %} {% endif %} {%- data reusables.releases.previous-release-tag %}
|
||||
7. В правом верхнем углу текстового поля описания щелкните {% ifversion previous-release-tag %}**Создать заметки о выпуске**{% else %}**Автоматически создать заметки о выпуске**{% endif %}.{% ifversion previous-release-tag %} {% else %} {% endif %}
|
||||
8. Проверьте созданные заметки, чтобы убедиться в том, что они содержат все сведения, которые необходимо включить, и ничего лишнего.
|
||||
9. Если в выпуск необходимо включить двоичные файлы, например скомпилированные программы, перетащите или вручную выберите файлы в области двоичных файлов.
|
||||

|
||||
10. Чтобы уведомить пользователей о том, что выпуск не готов к использованию в рабочей среде и может быть нестабильным, установите флажок **Это предварительный выпуск**.
|
||||
 {%- ifversion fpt or ghec %}
|
||||
11. При необходимости установите флажок **Создать обсуждение для этого выпуска**, а затем в раскрывающемся меню **Категория** выберите категорию для обсуждения выпуска.
|
||||
 {%- endif %}
|
||||
12. Если вы готовы опубликовать выпуск, нажмите кнопку **Опубликовать выпуск**. Чтобы продолжить работу с выпуском позже, нажмите кнопку **Сохранить черновик**.
|
||||

|
||||
## Creating automatically generated release notes for a new release
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.releases %}
|
||||
3. Click **Draft a new release**.
|
||||

|
||||
4. {% ifversion fpt or ghec %}Click **Choose a tag** and type{% else %}Type{% endif %} a version number for your release. Alternatively, select an existing tag.
|
||||
{% ifversion fpt or ghec %}
|
||||

|
||||
5. If you are creating a new tag, click **Create new tag**.
|
||||

|
||||
{% else %}
|
||||

|
||||
{% endif %}
|
||||
6. If you have created a new tag, use the drop-down menu to select the branch that contains the project you want to release.
|
||||
{% ifversion fpt or ghec %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{%- data reusables.releases.previous-release-tag %}
|
||||
7. To the top right of the description text box, click {% ifversion previous-release-tag %}**Generate release notes**{% else %}**Auto-generate release notes**{% endif %}.{% ifversion previous-release-tag %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
8. Check the generated notes to ensure they include all (and only) the information you want to include.
|
||||
9. Optionally, to include binary files such as compiled programs in your release, drag and drop or manually select files in the binaries box.
|
||||

|
||||
10. To notify users that the release is not ready for production and may be unstable, select **This is a pre-release**.
|
||||

|
||||
{%- ifversion fpt or ghec %}
|
||||
11. Optionally, select **Create a discussion for this release**, then select the **Category** drop-down menu and click a category for the release discussion.
|
||||

|
||||
{%- endif %}
|
||||
12. If you're ready to publicize your release, click **Publish release**. To work on the release later, click **Save draft**.
|
||||

|
||||
|
||||
|
||||
## Настройка автоматически созданных заметок о выпуске
|
||||
## Configuring automatically generated release notes
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %} {% data reusables.files.add-file %}
|
||||
3. В поле имени файла введите `.github/release.yml`, чтобы создать файл `release.yml` в каталоге `.github`.
|
||||

|
||||
4. Используя приведенные ниже параметры конфигурации, укажите в коде YAML файла метки запросов на вытягивание и авторов, которых следует исключить из этого выпуска. Вы также можете создать новые категории и перечислить метки запросов на вытягивание, которые должны быть включены в каждую из них.
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.files.add-file %}
|
||||
3. In the file name field, type `.github/release.yml` to create the `release.yml` file in the `.github` directory.
|
||||

|
||||
4. In the file, using the configuration options below, specify in YAML the pull request labels and authors you want to exclude from this release. You can also create new categories and list the pull request labels to be included in each of them.
|
||||
|
||||
### Варианты настройки
|
||||
### Configuration options
|
||||
|
||||
| Параметр | Описание |
|
||||
| Parameter | Description |
|
||||
| :- | :- |
|
||||
| `changelog.exclude.labels` | Список меток, исключающих запрос на вытягивание из заметок о выпуске. |
|
||||
| `changelog.exclude.authors` | Список дескрипторов входа пользователей или ботов, запросы на вытягивание которых должны быть исключены из заметок о выпуске. |
|
||||
| `changelog.categories[*].title` | **Обязательный.** Название категории изменений в заметках о выпуске. |
|
||||
| `changelog.categories[*].labels`| **Обязательный.** Метки, которые относят запрос на вытягивание к этой категории. Символу `*` будут соответствовать все запросы на вытягивание, которые не относятся ни к одной из предыдущих категорий. |
|
||||
| `changelog.categories[*].exclude.labels` | Список меток, исключающих запрос на вытягивание из данной категории. |
|
||||
| `changelog.categories[*].exclude.authors` | Список дескрипторов входа пользователей или ботов, запросы на вытягивание которых должны быть исключены из данной категории. |
|
||||
| `changelog.exclude.labels` | A list of labels that exclude a pull request from appearing in release notes. |
|
||||
| `changelog.exclude.authors` | A list of user or bot login handles whose pull requests are to be excluded from release notes. |
|
||||
| `changelog.categories[*].title` | **Required.** The title of a category of changes in release notes. |
|
||||
| `changelog.categories[*].labels`| **Required.** Labels that qualify a pull request for this category. Use `*` as a catch-all for pull requests that didn't match any of the previous categories. |
|
||||
| `changelog.categories[*].exclude.labels` | A list of labels that exclude a pull request from appearing in this category. |
|
||||
| `changelog.categories[*].exclude.authors` | A list of user or bot login handles whose pull requests are to be excluded from this category. |
|
||||
|
||||
### Пример конфигурации
|
||||
### Example configurations
|
||||
|
||||
A configuration for a repository that labels semver releases
|
||||
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
@@ -94,6 +104,26 @@ changelog:
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
## Дополнительные материалы
|
||||
A configuration for a repository that doesn't tag pull requests but where we want to separate out {% data variables.product.prodname_dependabot %} automated pull requests in release notes (`labels: '*'` is required to display a catchall category)
|
||||
|
||||
- [Управление метками](/issues/using-labels-and-milestones-to-track-work/managing-labels)
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
# .github/release.yml
|
||||
|
||||
changelog:
|
||||
categories:
|
||||
- title: 🏕 Features
|
||||
labels:
|
||||
- '*'
|
||||
exclude:
|
||||
labels:
|
||||
- dependencies
|
||||
- title: 👒 Dependencies
|
||||
labels:
|
||||
- dependencies
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Managing labels](/issues/using-labels-and-milestones-to-track-work/managing-labels)"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
ms.openlocfilehash: 9f7ac09b688bbe2b74a5cba71d2605365b7e7366
|
||||
ms.sourcegitcommit: 7fb7ec2e665856fc5f7cd209b53bd0fb1c9bbc67
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: "148185135"
|
||||
---
|
||||
<a href="https://github.com/github-copilot/signup" target="_blank" class="btn btn-primary mt-3 mr-3 no-underline"><span>Попробуйте {% data variables.product.prodname_copilot %}</span> {% octicon "link-external" height:16 %}</a>
|
||||
@@ -1,9 +1,9 @@
|
||||
---
|
||||
ms.openlocfilehash: 7b782aa3d23143a62b07aedf0a07df3734173d44
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.openlocfilehash: f58fb9410d93c9e50d33de5f1b12b9d6441ea561
|
||||
ms.sourcegitcommit: 4d6d3735d32540cb6de3b95ea9a75b8b247c580d
|
||||
ms.translationtype: MT
|
||||
ms.contentlocale: ru-RU
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: "145137942"
|
||||
ms.lasthandoff: 11/30/2022
|
||||
ms.locfileid: "148185619"
|
||||
---
|
||||
Каждый репозиторий или организация могут иметь до 10 категорий.
|
||||
Каждый репозиторий или организация может иметь до 25 категорий.
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
title: 向议题添加标签
|
||||
intro: '您可以使用 {% data variables.product.prodname_actions %} 自动标记议题。'
|
||||
title: Adding labels to issues
|
||||
shortTitle: Add labels to issues
|
||||
intro: 'You can use {% data variables.product.prodname_actions %} to automatically label issues.'
|
||||
redirect_from:
|
||||
- /actions/guides/adding-labels-to-issues
|
||||
versions:
|
||||
@@ -12,32 +13,26 @@ type: tutorial
|
||||
topics:
|
||||
- Workflows
|
||||
- Project management
|
||||
ms.openlocfilehash: 8e80990a1a533ed303f47cbad8dafb95c890893d
|
||||
ms.sourcegitcommit: 5f9527483381cfb1e41f2322f67c80554750a47d
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/11/2022
|
||||
ms.locfileid: '147884307'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
## 简介
|
||||
{% data reusables.actions.enterprise-beta %}
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
本教程演示如何使用工作流中的 [`andymckay/labeler` 操作](https://github.com/marketplace/actions/simple-issue-labeler) 来标记新打开或重新打开的问题。 例如,每次打开或重新打开问题时,都可以添加 `triage` 标签。 然后,可通过筛选具有 `triage` 标签的问题来查看需要会审的问题。
|
||||
## Introduction
|
||||
|
||||
在本教程中,你将首先创建一个使用 [`andymckay/labeler` 操作](https://github.com/marketplace/actions/simple-issue-labeler)的工作流文件。 然后,您将自定义工作流以适应您的需要。
|
||||
This tutorial demonstrates how to use the [`actions/github-script` action](https://github.com/marketplace/actions/github-script) in a workflow to label newly opened or reopened issues. For example, you can add the `triage` label every time an issue is opened or reopened. Then, you can see all issues that need to be triaged by filtering for issues with the `triage` label.
|
||||
|
||||
## 创建工作流程
|
||||
The `actions/github-script` action allows you to easily use the {% data variables.product.prodname_dotcom %} API in a workflow.
|
||||
|
||||
In the tutorial, you will first make a workflow file that uses the [`actions/github-script` action](https://github.com/marketplace/actions/github-script). Then, you will customize the workflow to suit your needs.
|
||||
|
||||
## Creating the workflow
|
||||
|
||||
1. {% data reusables.actions.choose-repo %}
|
||||
2. {% data reusables.actions.make-workflow-file %}
|
||||
3. 将以下 YAML 内容复制到工作流程文件中。
|
||||
|
||||
3. Copy the following YAML contents into your workflow file.
|
||||
|
||||
```yaml{:copy}
|
||||
{% indented_data_reference reusables.actions.actions-not-certified-by-github-comment spaces=4 %}
|
||||
|
||||
{% indented_data_reference reusables.actions.actions-use-sha-pinning-comment spaces=4 %}
|
||||
|
||||
name: Label issues
|
||||
on:
|
||||
issues:
|
||||
@@ -50,29 +45,34 @@ ms.locfileid: '147884307'
|
||||
permissions:
|
||||
issues: write
|
||||
steps:
|
||||
- name: Label issues
|
||||
uses: andymckay/labeler@e6c4322d0397f3240f0e7e30a33b5c5df2d39e90
|
||||
- uses: {% data reusables.actions.action-github-script %}
|
||||
with:
|
||||
add-labels: "triage"
|
||||
repo-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ["triage"]
|
||||
})
|
||||
```
|
||||
|
||||
4. 自定义工工作流程文件中的参数:
|
||||
- 将 `add-labels` 的值更改为你想要添加到此问题的标签列表。 使用逗号分隔多个标签。 例如 `"help wanted, good first issue"`。 有关标签的详细信息,请参阅[管理标签](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)。
|
||||
4. Customize the `script` parameter in your workflow file:
|
||||
- The `issue_number`, `owner`, and `repo` values are automatically set using the `context` object. You do not need to change these.
|
||||
- Change the value for `labels` to the list of labels that you want to add to the issue. Separate multiple labels with commas. For example, `["help wanted", "good first issue"]`. For more information about labels, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)."
|
||||
5. {% data reusables.actions.commit-workflow %}
|
||||
|
||||
## 测试工作流程
|
||||
## Testing the workflow
|
||||
|
||||
每次打开或重新打开仓库中的议题时,此工作流程将添加您指定给此议题的标签。
|
||||
Every time an issue in your repository is opened or reopened, this workflow will add the labels that you specified to the issue.
|
||||
|
||||
通过在仓库中创建议题来测试工作流程。
|
||||
Test out your workflow by creating an issue in your repository.
|
||||
|
||||
1. 在仓库中创建议题。 有关详细信息,请参阅[创建问题](/github/managing-your-work-on-github/creating-an-issue)。
|
||||
2. 要查看通过创建议题所触发的工作流程运行,请查看工作流程运行的历史记录。 有关详细信息,请参阅“[查看工作流运行历史记录](/actions/managing-workflow-runs/viewing-workflow-run-history)”。
|
||||
3. 当工作流程完成时,您创建的议题应已添加指定的标签。
|
||||
1. Create an issue in your repository. For more information, see "[Creating an issue](/github/managing-your-work-on-github/creating-an-issue)."
|
||||
2. To see the workflow run that was triggered by creating the issue, view the history of your workflow runs. For more information, see "[Viewing workflow run history](/actions/managing-workflow-runs/viewing-workflow-run-history)."
|
||||
3. When the workflow completes, the issue that you created should have the specified labels added.
|
||||
|
||||
## 后续步骤
|
||||
## Next steps
|
||||
|
||||
- 若要详细了解可以使用 `andymckay/labeler` 操作执行的其他操作,例如删除标签或者在问题分配或具有特定标签时跳过此操作,请参阅 [`andymckay/labeler` 操作文档](https://github.com/marketplace/actions/simple-issue-labeler)。
|
||||
- 若要详细了解可以触发工作流的不同事件,请参阅[可触发工作流的事件](/actions/reference/events-that-trigger-workflows#issues)。 `andymckay/labeler` 操作仅适用于 `issues`、`pull_request` 或 `project_card` 事件。
|
||||
- [搜索 GitHub](https://github.com/search?q=%22uses:+andymckay/labeler%22&type=code) 以获取使用此操作的工作流示例。
|
||||
- To learn more about additional things you can do with the `actions/github-script` action, see the [`actions/github-script` action documentation](https://github.com/marketplace/actions/github-script).
|
||||
- To learn more about different events that can trigger your workflow, see "[Events that trigger workflows](/actions/reference/events-that-trigger-workflows#issues)."
|
||||
- [Search GitHub](https://github.com/search?q=%22uses:+actions/github-script%22&type=code) for examples of workflows using this action.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 将卡片添加到项目板列时删除标签
|
||||
intro: '您可以使用 {% data variables.product.prodname_actions %} 在议题或拉取请求添加到项目板上的特定列时自动删除标签。'
|
||||
title: Removing a label when a card is added to a project board column
|
||||
intro: 'You can use {% data variables.product.prodname_actions %} to automatically remove a label when an issue or pull request is added to a specific column on a {% data variables.projects.projects_v1_board %}.'
|
||||
redirect_from:
|
||||
- /actions/guides/removing-a-label-when-a-card-is-added-to-a-project-board-column
|
||||
versions:
|
||||
@@ -13,74 +13,73 @@ topics:
|
||||
- Workflows
|
||||
- Project management
|
||||
shortTitle: Remove label when adding card
|
||||
ms.openlocfilehash: c23edb495719c7059c9c5d8dab1c29acb0e78cb6
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147410105'
|
||||
---
|
||||
{% data reusables.actions.enterprise-beta %} {% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
## 简介
|
||||
{% data reusables.actions.enterprise-beta %}
|
||||
{% data reusables.actions.enterprise-github-hosted-runners %}
|
||||
|
||||
本教程演示如何使用 [`andymckay/labeler` 操作](https://github.com/marketplace/actions/simple-issue-labeler)和条件,从已添加到项目板上指定列的议题和拉取请求中删除标签。 例如,可以在项目卡移至 `Done` 列后删除 `needs review` 标签。
|
||||
## Introduction
|
||||
|
||||
在本教程中,你将首先创建一个使用 [`andymckay/labeler` 操作](https://github.com/marketplace/actions/simple-issue-labeler)的工作流文件。 然后,您将自定义工作流以适应您的需要。
|
||||
This tutorial demonstrates how to use the [`actions/github-script` action](https://github.com/marketplace/actions/github-script) along with a conditional to remove a label from issues and pull requests that are added to a specific column on a {% data variables.projects.projects_v1_board %}. For example, you can remove the `needs review` label when project cards are moved into the `Done` column.
|
||||
|
||||
## 创建工作流程
|
||||
In the tutorial, you will first make a workflow file that uses the [`actions/github-script` action](https://github.com/marketplace/actions/github-script). Then, you will customize the workflow to suit your needs.
|
||||
|
||||
## Creating the workflow
|
||||
|
||||
1. {% data reusables.actions.choose-repo %}
|
||||
2. 选择属于仓库的项目。 此工作流程不能用于属于用户或组织的项目。 您可以使用现有项目,也可以创建新项目。 有关如何创建项目的详细信息,请参阅“[创建项目板](/github/managing-your-work-on-github/creating-a-project-board)”。
|
||||
2. Choose a {% data variables.projects.projects_v1_board %} that belongs to the repository. This workflow cannot be used with projects that belong to users or organizations. You can use an existing {% data variables.projects.projects_v1_board %}, or you can create a new {% data variables.projects.projects_v1_board %}. For more information about creating a project, see "[Creating a {% data variables.product.prodname_project_v1 %}](/github/managing-your-work-on-github/creating-a-project-board)."
|
||||
3. {% data reusables.actions.make-workflow-file %}
|
||||
4. 将以下 YAML 内容复制到工作流程文件中。
|
||||
4. Copy the following YAML contents into your workflow file.
|
||||
|
||||
```yaml{:copy}
|
||||
{% indented_data_reference reusables.actions.actions-not-certified-by-github-comment spaces=4 %}
|
||||
|
||||
{% indented_data_reference reusables.actions.actions-use-sha-pinning-comment spaces=4 %}
|
||||
|
||||
name: Remove labels
|
||||
name: Remove a label
|
||||
on:
|
||||
project_card:
|
||||
types:
|
||||
- moved
|
||||
jobs:
|
||||
remove_labels:
|
||||
remove_label:
|
||||
if: github.event.project_card.column_id == '12345678'
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- name: remove labels
|
||||
uses: andymckay/labeler@5c59dabdfd4dd5bd9c6e6d255b01b9d764af4414
|
||||
- uses: {% data reusables.actions.action-github-script %}
|
||||
with:
|
||||
remove-labels: "needs review"
|
||||
repo-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %}
|
||||
script: |
|
||||
// this gets the number at the end of the content URL, which should be the issue/PR number
|
||||
const issue_num = context.payload.project_card.content_url.split('/').pop()
|
||||
github.rest.issues.removeLabel({
|
||||
issue_number: issue_num,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
name: ["needs review"]
|
||||
})
|
||||
```
|
||||
|
||||
5. 自定义工工作流程文件中的参数:
|
||||
- 在 `github.event.project_card.column_id == '12345678'` 中,将 `12345678` 替换为要取消标记移至其中的议题和拉取请求的列 ID。
|
||||
5. Customize the parameters in your workflow file:
|
||||
- In `github.event.project_card.column_id == '12345678'`, replace `12345678` with the ID of the column where you want to un-label issues and pull requests that are moved there.
|
||||
|
||||
要查找列 ID,请导航到您的项目板。 在列标题旁边,请单击 {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %},然后单击“复制列链接”。 列 ID 是复制的链接末尾的数字。 例如,`24687531` 是 `https://github.com/octocat/octo-repo/projects/1#column-24687531` 的列 ID。
|
||||
To find the column ID, navigate to your {% data variables.projects.projects_v1_board %}. Next to the title of the column, click {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} then click **Copy column link**. The column ID is the number at the end of the copied link. For example, `24687531` is the column ID for `https://github.com/octocat/octo-repo/projects/1#column-24687531`.
|
||||
|
||||
如果想要在多个列上操作,请使用 `||` 分隔条件。 例如,只要项目卡添加到了列 `12345678` 或列 `87654321`,就会使用 `if github.event.project_card.column_id == '12345678' || github.event.project_card.column_id == '87654321'`。 这些列可能在不同的项目板上。
|
||||
- 将 `remove-labels` 的值更改为要从移至指定列的议题或拉取请求中删除的标签列表。 使用逗号分隔多个标签。 例如 `"help wanted, good first issue"`。 有关标签的详细信息,请参阅“[管理标签](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)”。
|
||||
If you want to act on more than one column, separate the conditions with `||`. For example, `if github.event.project_card.column_id == '12345678' || github.event.project_card.column_id == '87654321'` will act whenever a project card is added to column `12345678` or column `87654321`. The columns may be on different project boards.
|
||||
- Change the value for `name` in the `github.rest.issues.removeLabel()` function to the name of the label that you want to remove from issues or pull requests that are moved to the specified column(s). For more information on labels, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)."
|
||||
6. {% data reusables.actions.commit-workflow %}
|
||||
|
||||
## 测试工作流程
|
||||
## Testing the workflow
|
||||
|
||||
每次仓库中项目上的项目卡移动时,此工作流程都会运行。 如果卡是议题或拉取请求,并移入您指定的列,则工作流程将从问题或拉取请求中删除指定的标签。 记事卡不会受到影响。
|
||||
Every time a project card on a {% data variables.projects.projects_v1_board %} in your repository moves, this workflow will run. If the card is an issue or a pull request and is moved into the column that you specified, then the workflow will remove the specified label from the issue or a pull request. Cards that are notes will not be affected.
|
||||
|
||||
通过将项目上的议题移到目标列中来测试工作流程。
|
||||
Test your workflow out by moving an issue on your {% data variables.projects.projects_v1_board %} into the target column.
|
||||
|
||||
1. 在仓库中打开一个议题。 有关详细信息,请参阅“[创建议题](/github/managing-your-work-on-github/creating-an-issue)”。
|
||||
2. 用标签标记您想要工作流程删除的议题。 有关详细信息,请参阅“[管理标签](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)”。
|
||||
3. 将议题添加到您在工作流程文件中指定的项目列。 有关详细信息,请参阅“[向项目板添加议题和拉取请求](/github/managing-your-work-on-github/adding-issues-and-pull-requests-to-a-project-board)”。
|
||||
4. 要查看通过将议题添加到项目所触发的工作流程运行,请查看工作流程运行的历史记录。 有关详细信息,请参阅“[查看工作流运行历史记录](/actions/managing-workflow-runs/viewing-workflow-run-history)”。
|
||||
5. 当工作流程完成时,您添加到项目列的议题应已删除指定的标签。
|
||||
1. Open an issue in your repository. For more information, see "[Creating an issue](/github/managing-your-work-on-github/creating-an-issue)."
|
||||
2. Label the issue with the label that you want the workflow to remove. For more information, see "[Managing labels](/github/managing-your-work-on-github/managing-labels#applying-labels-to-issues-and-pull-requests)."
|
||||
3. Add the issue to the {% data variables.projects.projects_v1_board %} column that you specified in your workflow file. For more information, see "[Adding issues and pull requests to a {% data variables.product.prodname_project_v1 %}](/github/managing-your-work-on-github/adding-issues-and-pull-requests-to-a-project-board)."
|
||||
4. To see the workflow run that was triggered by adding the issue to the project, view the history of your workflow runs. For more information, see "[Viewing workflow run history](/actions/managing-workflow-runs/viewing-workflow-run-history)."
|
||||
5. When the workflow completes, the issue that you added to the project column should have the specified label removed.
|
||||
|
||||
## 后续步骤
|
||||
## Next steps
|
||||
|
||||
- 若要详细了解可以使用 `andymckay/labeler` 操作执行的其他操作,例如添加标签或者在议题分配或具有特定标签时跳过此操作,请访问 [`andymckay/labeler` 操作文档](https://github.com/marketplace/actions/simple-issue-labeler)。
|
||||
- [搜索 GitHub](https://github.com/search?q=%22uses:+andymckay/labeler%22&type=code) 以获取使用此操作的工作流示例。
|
||||
- To learn more about additional things you can do with the `actions/github-script` action, see the [`actions/github-script` action documentation](https://github.com/marketplace/actions/github-script).
|
||||
- [Search GitHub](https://github.com/search?q=%22uses:+actions/github-script%22&type=code) for examples of workflows using this action.
|
||||
|
||||
@@ -17,12 +17,12 @@ topics:
|
||||
redirect_from:
|
||||
- /admin/configuration/restricting-network-traffic-to-your-enterprise
|
||||
- /admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise
|
||||
ms.openlocfilehash: d9a4518f2fcc23d4b49967effb7b9a3022a7c6bd
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.openlocfilehash: b62ab2a143ed0e7ec57f7e7225a09c0ca713295c
|
||||
ms.sourcegitcommit: 7fb7ec2e665856fc5f7cd209b53bd0fb1c9bbc67
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: '148184010'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185041'
|
||||
---
|
||||
## 关于网络流量限制
|
||||
|
||||
@@ -115,7 +115,7 @@ OIDC CAP 仅适用于使用用户到服务器令牌对 API 的请求,例如 {%
|
||||
1. 在“IP 允许列表”下,选择下拉列表并单击“标识提供者”。
|
||||
|
||||

|
||||
- (可选)若要允许已安装的 {% data variables.product.company_short %} 和 {% data variables.product.prodname_oauth_apps %} 从任意 IP 地址访问你的企业,请选择“为应用程序跳过 IdP 检查”。
|
||||
1. (可选)若要允许已安装的 {% data variables.product.company_short %} 和 {% data variables.product.prodname_oauth_apps %} 从任意 IP 地址访问你的企业,请选择“为应用程序跳过 IdP 检查”。
|
||||
|
||||

|
||||
1. 单击“ **保存**”。
|
||||
|
||||
@@ -236,6 +236,7 @@ Appliances configured for high-availability and geo-replication use replica inst
|
||||
|
||||
- If you have upgraded each node to {% data variables.product.product_name %} 3.6.0 or later and started replication, but `git replication is behind the primary` continues to appear after 45 minutes, contact {% data variables.contact.enterprise_support %}. For more information, see "[Receiving help from {% data variables.contact.github_support %}](/admin/enterprise-support/receiving-help-from-github-support)."
|
||||
{%- endif %}
|
||||
|
||||
- {% ifversion ghes = 3.4 or ghes = 3.5 or ghes = 3.6 %}Otherwise, if{% else %}If{% endif %} `ghe-repl-status` did not return `OK`, contact {% data variables.contact.enterprise_support %}. For more information, see "[Receiving help from {% data variables.contact.github_support %}](/admin/enterprise-support/receiving-help-from-github-support)."
|
||||
6. When you have completed upgrading the last replica, and the resync is complete, disable maintenance mode so users can use {% data variables.location.product_location %}.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
title: Configuring SAML single sign-on for your enterprise
|
||||
title: 为企业配置 SAML 单点登录
|
||||
shortTitle: Configure SAML SSO
|
||||
intro: 'You can control and secure access to {% ifversion ghec %}resources like repositories, issues, and pull requests within your enterprise''s organizations{% elsif ghes %}{% data variables.location.product_location %}{% elsif ghae %}your enterprise on {% data variables.product.prodname_ghe_managed %}{% endif %} by {% ifversion ghec %}enforcing{% elsif ghes or ghae %}configuring{% endif %} SAML single sign-on (SSO) through your identity provider (IdP).'
|
||||
intro: '你可以通过{% ifversion ghec %}强制执行{% elsif ghes or ghae %}配置{% endif %}通过身份提供商 (IdP) 的 SAML 单一登录 (SSO),控制和保护对{% ifversion ghec %}资源(如企业组织中的存储库、问题和拉取请求){% elsif ghes %}{% data variables.location.product_location %}{% elsif ghae %}你在 {% data variables.product.prodname_ghe_managed %} 上的企业{% endif %}的访问。'
|
||||
permissions: '{% ifversion ghes %}Site administrators{% elsif ghec or ghae %}Enterprise owners{% endif %} can configure SAML SSO for {% ifversion ghec or ghae %}an enterprise on {% data variables.product.product_name %}{% elsif ghes %}a {% data variables.product.product_name %} instance{% endif %}.'
|
||||
versions:
|
||||
ghec: '*'
|
||||
@@ -21,11 +21,16 @@ redirect_from:
|
||||
- /github/setting-up-and-managing-your-enterprise/configuring-identity-and-access-management-for-your-enterprise-account/enforcing-saml-single-sign-on-for-organizations-in-your-enterprise-account
|
||||
- /admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise
|
||||
- /admin/identity-and-access-management/managing-iam-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise
|
||||
ms.openlocfilehash: 804ba3b262aae15b862e1a14694b82339c8d34a4
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: '148183954'
|
||||
---
|
||||
|
||||
{% data reusables.enterprise-accounts.emu-saml-note %}
|
||||
|
||||
## About SAML SSO
|
||||
## 关于 SAML SSO
|
||||
|
||||
{% ifversion ghec %}
|
||||
|
||||
@@ -33,11 +38,11 @@ redirect_from:
|
||||
|
||||
{% data reusables.saml.saml-accounts %}
|
||||
|
||||
For more information, see "[About identity and access management with SAML single sign-on](/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on)."
|
||||
有关详细信息,请参阅[关于使用 SAML 单一登录进行标识和访问管理](/organizations/managing-saml-single-sign-on-for-your-organization/about-identity-and-access-management-with-saml-single-sign-on)。
|
||||
|
||||
{% data reusables.saml.about-saml-enterprise-accounts %}
|
||||
|
||||
{% data reusables.saml.about-saml-access-enterprise-account %} For more information, see "[Viewing and managing a user's SAML access to your enterprise account](/admin/user-management/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise)."
|
||||
{% data reusables.saml.about-saml-access-enterprise-account %}有关详细信息,请参阅“[查看和管理用户对企业帐户 SAML 的访问](/admin/user-management/managing-users-in-your-enterprise/viewing-and-managing-a-users-saml-access-to-your-enterprise)”。
|
||||
|
||||
{% data reusables.saml.saml-disabled-linked-identities-removed %}
|
||||
|
||||
@@ -45,9 +50,9 @@ For more information, see "[About identity and access management with SAML singl
|
||||
|
||||
{% elsif ghes or ghae %}
|
||||
|
||||
SAML SSO allows you to centrally control and secure access to {% data variables.location.product_location %} from your SAML IdP. When an unauthenticated user visits {% data variables.location.product_location %} in a browser, {% data variables.product.product_name %} will redirect the user to your SAML IdP to authenticate. After the user successfully authenticates with an account on the IdP, the IdP redirects the user back to {% data variables.location.product_location %}. {% data variables.product.product_name %} validates the response from your IdP, then grants access to the user.
|
||||
SAML SSO 允许你从 SAML IdP 集中控制和安全访问 {% data variables.location.product_location %}。 当未经身份验证的用户在浏览器中访问 {% data variables.location.product_location %} 时,{% data variables.product.product_name %} 会将用户重定向到你的 SAML IdP 进行身份验证。 在用户使用 IdP 上的帐户成功进行身份验证后,IdP 会将用户重定向回 {% data variables.location.product_location %}。 {% data variables.product.product_name %} 将验证 IdP 的响应,然后授予用户访问权限。
|
||||
|
||||
After a user successfully authenticates on your IdP, the user's SAML session for {% data variables.location.product_location %} is active in the browser for 24 hours. After 24 hours, the user must authenticate again with your IdP.
|
||||
当用户在 IdP 上成功进行身份验证后,用户对 {% data variables.location.product_location %} 的 SAML 会话将在浏览器中激活 24 小时。 24 小时后,用户必须再次使用您的 IdP 进行身份验证。
|
||||
|
||||
{% data reusables.saml.saml-ghes-account-revocation %}
|
||||
|
||||
@@ -55,171 +60,161 @@ After a user successfully authenticates on your IdP, the user's SAML session for
|
||||
|
||||
{% data reusables.saml.assert-the-administrator-attribute %}
|
||||
|
||||
{% data reusables.scim.after-you-configure-saml %} For more information, see "[Configuring user provisioning for your enterprise](/admin/authentication/configuring-user-provisioning-for-your-enterprise)."
|
||||
{% data reusables.scim.after-you-configure-saml %} 有关详细信息,请参阅[配置企业的用户预配](/admin/authentication/configuring-user-provisioning-for-your-enterprise)。
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Supported identity providers
|
||||
## 支持的身份提供程序
|
||||
|
||||
{% data reusables.saml.saml-supported-idps %}
|
||||
|
||||
{% ifversion ghec %}
|
||||
|
||||
## Username considerations with SAML
|
||||
## 使用 SAML 时的用户名考量因素
|
||||
|
||||
{% ifversion ghec %}If you use {% data variables.product.prodname_emus %}, {% endif %}{% data reusables.enterprise_user_management.consider-usernames-for-external-authentication %} For more information, see "[Username considerations for external authentication](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication)."
|
||||
{% ifversion ghec %}如果使用 {% data variables.product.prodname_emus %},{% endif %}{% data reusables.enterprise_user_management.consider-usernames-for-external-authentication %} 有关详细信息,请参阅“[外部身份验证的用户名注意事项](/admin/identity-and-access-management/managing-iam-for-your-enterprise/username-considerations-for-external-authentication)”。
|
||||
|
||||
## Enforcing SAML single-sign on for organizations in your enterprise account
|
||||
## 为企业帐户中的组织强制实施 SAML 单一登录
|
||||
|
||||
When you enforce SAML SSO for your enterprise, the enterprise configuration will override any existing organization-level SAML configurations. {% data reusables.saml.switching-from-org-to-enterprise %} For more information, see "[Switching your SAML configuration from an organization to an enterprise account](/github/setting-up-and-managing-your-enterprise/configuring-identity-and-access-management-for-your-enterprise-account/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account)."
|
||||
为您的企业实施 SAML SSO 时,企业配置将覆盖任何现有的组织级 SAML 配置。 {% data reusables.saml.switching-from-org-to-enterprise %} 有关详细信息,请参阅“[将 SAML 配置从组织切换为企业帐户](/github/setting-up-and-managing-your-enterprise/configuring-identity-and-access-management-for-your-enterprise-account/switching-your-saml-configuration-from-an-organization-to-an-enterprise-account)”。
|
||||
|
||||
When you enforce SAML SSO for an organization, {% data variables.product.company_short %} removes any members of the organization that have not authenticated successfully with your SAML IdP. When you require SAML SSO for your enterprise, {% data variables.product.company_short %} does not remove members of the enterprise that have not authenticated successfully with your SAML IdP. The next time a member accesses the enterprise's resources, the member must authenticate with your SAML IdP.
|
||||
当你为组织强制实施 SAML SSO 时,{% data variables.product.company_short %} 会删除未通过 SAML IdP 成功进行身份验证的任何组织成员。 当为企业强制实施 SAML SSO 时,{% data variables.product.company_short %} 不会删除未通过 SAML IdP 成功进行身份验证的企业成员。 下一次当某个成员访问企业资源时,该成员必须使用 SAML IdP 进行身份验证。
|
||||
|
||||
For more detailed information about how to enable SAML using Okta, see "[Configuring SAML single sign-on for your enterprise account using Okta](/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise-using-okta)."
|
||||
有关如何使用 Okta 启用 SAML 的详细信息,请参阅“[使用 Okta 为企业帐户配置 SAML 单一登录](/admin/authentication/managing-identity-and-access-for-your-enterprise/configuring-saml-single-sign-on-for-your-enterprise-using-okta)”。
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.security-tab %}
|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %}
|
||||
4. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %}
|
||||
5. Under "SAML single sign-on", select **Require SAML authentication**.
|
||||

|
||||
6. In the **Sign on URL** field, type the HTTPS endpoint of your IdP for single sign-on requests. This value is available in your IdP configuration.
|
||||

|
||||
7. Optionally, in the **Issuer** field, type your SAML issuer URL to verify the authenticity of sent messages.
|
||||

|
||||
8. Under **Public Certificate**, paste a certificate to verify SAML responses.
|
||||

|
||||
9. To verify the integrity of the requests from your SAML issuer, click {% octicon "pencil" aria-label="The edit icon" %}. Then in the "Signature Method" and "Digest Method" drop-downs, choose the hashing algorithm used by your SAML issuer.
|
||||

|
||||
10. Before enabling SAML SSO for your enterprise, click **Test SAML configuration** to ensure that the information you've entered is correct. 
|
||||
11. Click **Save**.
|
||||
5. 在“SAML 单一登录”下,选择“要求 SAML 身份验证”。
|
||||

|
||||
6. 在“登录 URL”字段中,为单一登录请求键入 IdP 的 HTTPS 终结点。 此值可在 IdP 配置中找到。
|
||||

|
||||
7. (可选)在“颁发者”字段中,键入 SAML 颁发者 URL 以验证已发送消息的真实性。
|
||||

|
||||
8. 在“公共证书”下,粘贴证书以验证 SAML 响应。
|
||||

|
||||
9. 若要验证来自 SAML 颁发者的请求完整性,请单击 {% octicon "pencil" aria-label="The edit icon" %}。 然后,在“Signature Method(签名方法)”和“Digest Method(摘要方法)”下拉菜单中,选择 SAML 签发者使用的哈希算法。
|
||||

|
||||
10. 在为企业启用 SAML SSO 之前,请单击“测试 SMAL 配置”,以确保已输入的信息正确。 
|
||||
11. 单击“ **保存**”。
|
||||
{% data reusables.enterprise-accounts.download-recovery-codes %}
|
||||
|
||||
{% elsif ghes %}
|
||||
|
||||
## Configuring SAML SSO
|
||||
## 配置 SAML SSO
|
||||
|
||||
You can enable or disable SAML authentication for {% data variables.location.product_location %}, or you can edit an existing configuration. You can view and edit authentication settings for {% data variables.product.product_name %} in the management console. For more information, see "[Accessing the management console](/admin/configuration/configuring-your-enterprise/accessing-the-management-console)."
|
||||
可以为 {% data variables.location.product_location %} 启用或禁用 SAML 身份验证,也可以编辑现有配置。 可以在管理控制台中查看和编辑 {% data variables.product.product_name %} 的身份验证设置。 有关详细信息,请参阅“[访问管理控制台](/admin/configuration/configuring-your-enterprise/accessing-the-management-console)”。
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data reusables.enterprise.test-in-staging %}
|
||||
注意:{% data reusables.enterprise.test-in-staging %}
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.enterprise_site_admin_settings.access-settings %}
|
||||
{% data reusables.enterprise_site_admin_settings.management-console %}
|
||||
{% data reusables.enterprise_management_console.authentication %}
|
||||
1. Select **SAML**.
|
||||
{% data reusables.enterprise_site_admin_settings.access-settings %} {% data reusables.enterprise_site_admin_settings.management-console %} {% data reusables.enterprise_management_console.authentication %}
|
||||
1. 选择“SAML”。
|
||||
|
||||

|
||||

|
||||
1. {% data reusables.enterprise_user_management.built-in-authentication-option %}
|
||||
|
||||

|
||||
1. Optionally, to enable unsolicited response SSO, select **IdP initiated SSO**. By default, {% data variables.product.prodname_ghe_server %} will reply to an unsolicited Identity Provider (IdP) initiated request with an `AuthnRequest` back to the IdP.
|
||||

|
||||
1. (可选)若要启用未经请求的响应 SSO,请选择“IdP 发起的 SSO”。 默认情况下,{% data variables.product.prodname_ghe_server %} 将对未经请求的标识提供者 (IdP) 发起的请求进行回复,并向 IdP 返回一个 `AuthnRequest`。
|
||||
|
||||

|
||||

|
||||
|
||||
{% tip %}
|
||||
|
||||
**Note**: We recommend keeping this value **unselected**. You should enable this feature **only** in the rare instance that your SAML implementation does not support service provider initiated SSO, and when advised by {% data variables.contact.enterprise_support %}.
|
||||
注意:建议将此值保持未选中状态。 应仅在罕见情况下才启用此功能,即 SAML 实现不支持服务提供程序发起的 SSO,并且 {% data variables.contact.enterprise_support %} 建议执行此操作。
|
||||
|
||||
{% endtip %}
|
||||
|
||||
1. Select **Disable administrator demotion/promotion** if you **do not** want your SAML provider to determine administrator rights for users on {% data variables.location.product_location %}.
|
||||
1. 如果你不希望 SAML 提供程序为 {% data variables.location.product_location %} 上的用户确定管理员权限,请选择“禁用管理员降级/升级” 。
|
||||
|
||||

|
||||
{%- ifversion ghes > 3.3 %}
|
||||
1. Optionally, to allow {% data variables.location.product_location %} to receive encrypted assertions from your SAML IdP, select **Require encrypted assertions**. You must ensure that your IdP supports encrypted assertions and that the encryption and key transport methods in the management console match the values configured on your IdP. You must also provide {% data variables.location.product_location %}'s public certificate to your IdP. For more information, see "[Enabling encrypted assertions](/admin/identity-and-access-management/using-saml-for-enterprise-iam/enabling-encrypted-assertions)."
|
||||
 {%- ifversion ghes > 3.3 %}
|
||||
1. (可选)若要允许 {% data variables.location.product_location %} 从 SAML IdP 接收加密断言,请选择“需要加密断言”。 必须确保 IdP 支持加密断言,并且管理控制台中的加密和密钥传输方法与 IdP 上配置的值相匹配。 还必须向 IdP 提供 {% data variables.location.product_location %} 的公共证书。 有关详细信息,请参阅“[启用加密断言](/admin/identity-and-access-management/using-saml-for-enterprise-iam/enabling-encrypted-assertions)”。
|
||||
|
||||

|
||||
{%- endif %}
|
||||
1. In the **Single sign-on URL** field, type the HTTP or HTTPS endpoint on your IdP for single sign-on requests. This value is provided by your IdP configuration. If the host is only available from your internal network, you may need to [configure {% data variables.location.product_location %} to use internal nameservers](/enterprise/admin/guides/installation/configuring-dns-nameservers/).
|
||||
 {%- endif %}
|
||||
1. 在“单一登录 URL”字段中,输入 IdP 上用于单一登录请求的 HTTP 或 HTTPS 终结点。 此值由您的 IdP 配置提供。 如果主机只能在内部网络中使用,则可能需要[配置 {% data variables.location.product_location %} 以使用内部名称服务器](/enterprise/admin/guides/installation/configuring-dns-nameservers/)。
|
||||
|
||||

|
||||
1. Optionally, in the **Issuer** field, type your SAML issuer's name. This verifies the authenticity of messages sent to {% data variables.location.product_location %}.
|
||||

|
||||
1. (可选)在“颁发者”字段中,键入 SAML 颁发者的名称。 这将验证发送到 {% data variables.location.product_location %} 的消息的真实性。
|
||||
|
||||

|
||||
1. In the **Signature Method** and **Digest Method** drop-down menus, choose the hashing algorithm used by your SAML issuer to verify the integrity of the requests from {% data variables.location.product_location %}. Specify the format with the **Name Identifier Format** drop-down menu.
|
||||

|
||||
1. 在“签名方法”和“摘要方法”下拉菜单中,选择 SAML 颁发者用来验证来自 {% data variables.location.product_location %} 的请求完整性的哈希算法 。 使用“名称标识符格式”下拉菜单指定格式。
|
||||
|
||||

|
||||
1. Under **Verification certificate**, click **Choose File** and choose a certificate to validate SAML responses from the IdP.
|
||||

|
||||
1. 在“验证证书”下,单击“选择文件”并选择一个证书以验证来自 IdP 的 SAML 响应 。
|
||||
|
||||

|
||||
1. Modify the SAML attribute names to match your IdP if needed, or accept the default names.
|
||||

|
||||
1. 如果需要,请修改 SAML 属性名称以匹配您的 IdP,或者接受默认名称。
|
||||
|
||||

|
||||

|
||||
|
||||
{% elsif ghae %}
|
||||
|
||||
## Enabling SAML SSO
|
||||
## 启用 SAML SSO
|
||||
|
||||
{% data reusables.saml.ae-enable-saml-sso-during-bootstrapping %}
|
||||
|
||||
The following IdPs provide documentation about configuring SAML SSO for {% data variables.product.product_name %}. If your IdP isn't listed, please contact your IdP to request support for {% data variables.product.product_name %}.
|
||||
以下 IdP 提供有关为 {% data variables.product.product_name %} 配置 SAML SSO 的文档。 如果您的 IdP 未列出,请与您的 IdP 联系,以请求 {% data variables.product.product_name %}。
|
||||
|
||||
| IdP | More information |
|
||||
| IdP | 详细信息 |
|
||||
| :- | :- |
|
||||
| Azure AD | "[Configuring authentication and provisioning for your enterprise using Azure AD](/admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad)" |
|
||||
| Okta | "[Configuring authentication and provisioning for your enterprise using Okta](/admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/configuring-authentication-and-provisioning-for-your-enterprise-using-okta)" |
|
||||
| Azure AD | “[使用 Azure AD 为企业配置身份验证和预置](/admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/configuring-authentication-and-provisioning-for-your-enterprise-using-azure-ad)” |
|
||||
| Okta | “[使用 Okta 为企业配置身份验证和预配](/admin/authentication/configuring-authentication-and-provisioning-with-your-identity-provider/configuring-authentication-and-provisioning-for-your-enterprise-using-okta)” |
|
||||
|
||||
During initialization for {% data variables.product.product_name %}, you must configure {% data variables.product.product_name %} as a SAML service provider (SP) on your IdP. You must enter several unique values on your IdP to configure {% data variables.product.product_name %} as a valid SP. For more information, see "[SAML configuration reference](/admin/identity-and-access-management/using-saml-for-enterprise-iam/saml-configuration-reference#saml-metadata)."
|
||||
在 {% data variables.product.product_name %} 的初始化期间,必须在 IdP 上将 {% data variables.product.product_name %} 配置为 SAML 服务提供程序 (SP)。 您必须在 IdP 上输入多个唯一值以将 {% data variables.product.product_name %} 配置为有效的 SP。 有关详细信息,请参阅“[SAML 配置参考](/admin/identity-and-access-management/using-saml-for-enterprise-iam/saml-configuration-reference#saml-metadata)”。
|
||||
|
||||
## Editing the SAML SSO configuration
|
||||
## 编辑 SAML SSO 配置
|
||||
|
||||
If the details for your IdP change, you'll need to edit the SAML SSO configuration for {% data variables.location.product_location %}. For example, if the certificate for your IdP expires, you can edit the value for the public certificate.
|
||||
如果 IdP 的详细信息发生更改,则需要编辑 {% data variables.location.product_location %} 的 SAML SSO 配置。 例如,如果 IdP 的证书过期,您可以编辑公共证书的值。
|
||||
|
||||
{% ifversion ghae %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data reusables.saml.contact-support-if-your-idp-is-unavailable %}
|
||||
注意:{% data reusables.saml.contact-support-if-your-idp-is-unavailable %}
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.security-tab %}
|
||||
1. Under "SAML single sign-on", type the new details for your IdP.
|
||||

|
||||
1. Optionally, click {% octicon "pencil" aria-label="The edit icon" %} to configure a new signature or digest method.
|
||||

|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %}
|
||||
1. 在“SAML single sign-on(SAML 单点登录)”下,键入 IdP 的新详细信息。
|
||||

|
||||
1. (可选)单击 {% octicon "pencil" aria-label="The edit icon" %} 以配置新的签名或摘要方法。
|
||||

|
||||
|
||||
- Use the drop-down menus and choose the new signature or digest method.
|
||||

|
||||
1. To ensure that the information you've entered is correct, click **Test SAML configuration**.
|
||||

|
||||
1. Click **Save**.
|
||||

|
||||
1. Optionally, to automatically provision and deprovision user accounts for {% data variables.location.product_location %}, reconfigure user provisioning with SCIM. For more information, see "[Configuring user provisioning for your enterprise](/admin/authentication/configuring-user-provisioning-for-your-enterprise)."
|
||||
- 使用下拉菜单并选择新的签名或摘要方法。
|
||||

|
||||
1. 要确保输入的信息是正确的,请单击“测试 SAML 配置”。
|
||||

|
||||
1. 单击“ **保存**”。
|
||||

|
||||
1. (可选)要自动预配和取消预配 {% data variables.location.product_location %} 的用户帐户,请使用 SCIM 重新配置用户预配。 有关详细信息,请参阅“[为企业配置用户预配](/admin/authentication/configuring-user-provisioning-for-your-enterprise)”。
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% ifversion ghae %}
|
||||
|
||||
## Disabling SAML SSO
|
||||
## 禁用 SAML SSO
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warning**: If you disable SAML SSO for {% data variables.location.product_location %}, users without existing SAML SSO sessions cannot sign into {% data variables.location.product_location %}. SAML SSO sessions on {% data variables.location.product_location %} end after 24 hours.
|
||||
警告:如果禁用 {% data variables.location.product_location %} 的 SAML SSO,没有现有 SAML SSO 会话的用户不能登录 {% data variables.location.product_location %}。 {% data variables.location.product_location %} 上的 SAML SSO 会话在 24 小时后结束。
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note**: {% data reusables.saml.contact-support-if-your-idp-is-unavailable %}
|
||||
注意:{% data reusables.saml.contact-support-if-your-idp-is-unavailable %}
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.security-tab %}
|
||||
1. Under "SAML single sign-on", unselect **Enable SAML authentication**.
|
||||

|
||||
1. To disable SAML SSO and require signing in with the built-in user account you created during initialization, click **Save**.
|
||||

|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %}
|
||||
1. 在“SAML 单一登录”下,取消选择“启用 SAML 身份验证”。
|
||||

|
||||
1. 若要禁用 SAML SSO 并要求使用在初始化期间创建的内置用户帐户进行登录,请单击“保存”。
|
||||

|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -227,13 +222,10 @@ If the details for your IdP change, you'll need to edit the SAML SSO configurati
|
||||
|
||||
{% ifversion ghec or ghes %}
|
||||
|
||||
## Further reading
|
||||
## 延伸阅读
|
||||
|
||||
{%- ifversion ghec %}
|
||||
- "[Managing SAML single sign-on for your organization](/organizations/managing-saml-single-sign-on-for-your-organization)"
|
||||
{%- endif %}
|
||||
{%- ifversion ghes %}
|
||||
- "[Promoting or demoting a site administrator](/admin/user-management/managing-users-in-your-enterprise/promoting-or-demoting-a-site-administrator)"
|
||||
{%- endif %}
|
||||
- “[管理组织的 SAML 单一登录](/organizations/managing-saml-single-sign-on-for-your-organization)”{%- endif %} {%- ifversion ghes %}
|
||||
- “[升级或降级站点管理员](/admin/user-management/managing-users-in-your-enterprise/promoting-or-demoting-a-site-administrator)”{%- endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -50,51 +50,55 @@ You can disable the {% data variables.product.prodname_server_statistics %} feat
|
||||
|
||||
After you enable {% data variables.product.prodname_server_statistics %}, metrics are collected through a daily job that runs on {% data variables.location.product_location %}. The aggregate metrics are stored on your organization or enterprise account on {% data variables.product.prodname_ghe_cloud %} and are not stored on {% data variables.location.product_location %}.
|
||||
|
||||
The following aggregate metrics will be collected and transmitted on a daily basis and represent the total counts for the day:
|
||||
- `active_hooks`
|
||||
- `admin_users`
|
||||
- `closed_issues`
|
||||
- `closed_milestones`
|
||||
- `collection_date`
|
||||
- `disabled_orgs`
|
||||
- `dormancy_threshold`
|
||||
- `fork_repos`
|
||||
- `ghes_version`
|
||||
- `github_connect_features_enabled`
|
||||
- `inactive_hooks`
|
||||
- `mergeable_pulls`
|
||||
- `merged_pulls`
|
||||
- `open_issues`
|
||||
- `open_milestones`
|
||||
- `org_repos`
|
||||
- `private_gists`
|
||||
- `public_gists`
|
||||
- `root_repos`
|
||||
- `schema_version`
|
||||
- `server_id`
|
||||
- `suspended_users`
|
||||
- `total_commit_comments`
|
||||
- `total_dormant_users`
|
||||
- `total_gist_comments`
|
||||
- `total_gists`
|
||||
- `total_hooks`
|
||||
- `total_issues`
|
||||
- `total_issue_comments`
|
||||
- `total_milestones`
|
||||
- `total_repos`
|
||||
- `total_orgs`
|
||||
- `total_pages`
|
||||
- `total_pull_request_comments`
|
||||
- `total_pulls`
|
||||
- `total_pushes`
|
||||
- `total_team_members`
|
||||
- `total_teams`
|
||||
- `total_users`
|
||||
- `total_wikis`
|
||||
- `unmergeable_pulls`
|
||||
The following aggregate metrics will be collected and transmitted on a daily basis and represent the total counts for the day.
|
||||
|
||||
## {% data variables.product.prodname_server_statistics %} payload example
|
||||
CSV column | Name | Description |
|
||||
---------- | ---- | ----------- |
|
||||
A | `github_connect.features_enabled` | Array of {% data variables.product.prodname_github_connect %} features that are enabled for your instance (see "[About {% data variables.product.prodname_github_connect %}](/admin/configuration/configuring-github-connect/about-github-connect#github-connect-features)" ) |
|
||||
B | `host_name` | The hostname for your instance |
|
||||
C | `dormant_users.dormancy_threshold` | The length of time a user must be inactive to be considered dormant |
|
||||
D | `dormant_users.total_dormant_users` | Number of dormant user accounts |
|
||||
E | `ghes_version` | The version of {% data variables.product.product_name %} that your instance is running |
|
||||
F | `server_id` | The UUID generated for your instance
|
||||
G | `collection_date` | The date the metrics were collected |
|
||||
H | `schema_version` | The version of the database schema used to store this data |
|
||||
I | `ghe_stats.comments.total_commit_comments` | Number of comments on commits |
|
||||
J | `ghe_stats.comments.total_gist_comments` | Number of comments on gists |
|
||||
K | `ghe_stats.comments.total_issue_comments` | Number of comments on issues |
|
||||
L | `ghe_stats.comments.total_pull_request_comments` | Number of comments on pull requests |
|
||||
M | `ghe_stats.gists.total_gists` | Number of gists (both secret and public) |
|
||||
N | `ghe_stats.gists.private_gists` | Number of secret gists |
|
||||
O | `ghe_stats.gists.public_gists` | Number of public gists |
|
||||
P | `ghe_stats.hooks.total_hooks` | Number of pre-receive hooks (both active and inactive) |
|
||||
Q | `ghe_stats.hooks.active_hooks` | Number of active pre-receive hooks |
|
||||
R | `ghe_stats.hooks.inactive_hooks` | Number of inactive pre-receive hooks |
|
||||
S | `ghe_stats.issues.total_issues` | Number of issues (both open and closed) |
|
||||
T | `ghe_stats.issues.open_issues` | Number of open issues |
|
||||
U | `ghe_stats.issues.closed_issues` | Number of closed issues |
|
||||
V | `ghe_stats.milestones.total_milestones` | Number of milestones (both open and closed) |
|
||||
W | `ghe_stats.milestones.open_milestones` | Number of open milestones |
|
||||
X | `ghe_stats.milestones.closed_milestones` | Number of closed milestones |
|
||||
Y | `ghe_stats.orgs.total_orgs` | Number of organizations (both enabled and disabled) |
|
||||
Z | `ghe_stats.orgs.disabled_orgs` | Number of disabled organizations |
|
||||
AA | `ghe_stats.orgs.total_teams` | Number of teams |
|
||||
AB | `ghe_stats.orgs.total_team_members` | Number of team members |
|
||||
AC | `ghe_stats.pages.total_pages` | Number of {% data variables.product.prodname_pages %} sites |
|
||||
AD | `ghe_stats.pulls.total_pulls` | Number of pull requests |
|
||||
AE | `ghe_stats.pulls.merged_pulls` | Number of merged pull requests |
|
||||
AF | `ghe_stats.pulls.mergeable_pulls` | Number of pull requests that are currently mergeable |
|
||||
AG | `ghe_stats.pulls.unmergeable_pulls` | Number of pull requests that are currently unmergeable |
|
||||
AH | `ghe_stats.repos.total_repos` | Number of repositories (both upstream repositories and forks) |
|
||||
AI | `ghe_stats.repos.root_repos` | Number of upstream repositories |
|
||||
AJ | `ghe_stats.repos.fork_repos` | Number of forks |
|
||||
AK | `ghe_stats.repos.org_repos` | Number of repositories owned by organizations |
|
||||
AL | `ghe_stats.repos.total_pushes` | Number of pushes to repositories |
|
||||
AM | `ghe_stats.repos.total_wikis` | Number of wikis |
|
||||
AN | `ghe_stats.users.total_users` | Number of user accounts |
|
||||
AO | `ghe_stats.users.admin_users` | Number of user accounts that are site administrators |
|
||||
AP | `ghe_stats.users.suspended_users` | Number of user accounts that are suspended |
|
||||
|
||||
To see an example of the response payload for the {% data variables.product.prodname_server_statistics %} API, see "[Requesting {% data variables.product.prodname_server_statistics %} using the REST API](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/requesting-server-statistics-using-the-rest-api)."
|
||||
## {% data variables.product.prodname_server_statistics %} data examples
|
||||
|
||||
To see a list of the data collected, see "[{% data variables.product.prodname_server_statistics %} data collected](#server-statistics-data-collected)."
|
||||
To see an example of the headings included in the CSV export for {% data variables.product.prodname_server_statistics %}, download the [{% data variables.product.prodname_server_statistics %} CSV example](/assets/server-statistics-csv-example.csv).
|
||||
|
||||
To see an example of the response payload for the {% data variables.product.prodname_server_statistics %} API, see "[Requesting {% data variables.product.prodname_server_statistics %} using the REST API](/admin/monitoring-activity-in-your-enterprise/analyzing-how-your-team-works-with-server-statistics/requesting-server-statistics-using-the-rest-api)."
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Enforcing policies for security settings in your enterprise
|
||||
intro: 'You can enforce policies to manage security settings in your enterprise''s organizations, or allow policies to be set in each organization.'
|
||||
title: 为企业中的安全设置实施策略
|
||||
intro: 您可以实施策略来管理企业组织中的安全设置,或允许在每个组织中设置策略。
|
||||
permissions: Enterprise owners can enforce policies for security settings in an enterprise.
|
||||
miniTocMaxHeadingLevel: 3
|
||||
redirect_from:
|
||||
@@ -21,100 +21,89 @@ topics:
|
||||
- Policies
|
||||
- Security
|
||||
shortTitle: Policies for security settings
|
||||
ms.openlocfilehash: 7a383ed586d084a7e2562a5927dd198caca65037
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: '148183962'
|
||||
---
|
||||
## 关于企业中安全设置的策略
|
||||
|
||||
## About policies for security settings in your enterprise
|
||||
|
||||
You can enforce policies to control the security settings for organizations owned by your enterprise on {% data variables.product.product_name %}. By default, organization owners can manage security settings.
|
||||
您可以在 {% data variables.product.product_name %} 上实施策略以控制企业拥有的组织的安全设置。 默认情况下,组织所有者可以管理安全设置。
|
||||
|
||||
{% ifversion ghec or ghes %}
|
||||
|
||||
## Requiring two-factor authentication for organizations in your enterprise
|
||||
## 要求企业中的组织进行双重身份验证
|
||||
|
||||
Enterprise owners can require that organization members, billing managers, and outside collaborators in all organizations owned by an enterprise use two-factor authentication to secure their user accounts.
|
||||
企业所有者可以要求企业拥有的所有组织中的组织成员、帐单管理员和外部协作者使用双重身份验证来保护其用户帐户。
|
||||
|
||||
Before you can require 2FA for all organizations owned by your enterprise, you must enable two-factor authentication for your own account. For more information, see "[Securing your account with two-factor authentication (2FA)](/articles/securing-your-account-with-two-factor-authentication-2fa/)."
|
||||
您必须为自己的帐户启用双重身份验证,然后才能对企业拥有的所有组织都要求 2FA。 有关详细信息,请参阅“[使用双因素身份验证 (2FA) 保护帐户](/articles/securing-your-account-with-two-factor-authentication-2fa/)”。
|
||||
|
||||
{% warning %}
|
||||
|
||||
**Warnings:**
|
||||
警告:
|
||||
|
||||
- When you require two-factor authentication for your enterprise, members, outside collaborators, and billing managers (including bot accounts) in all organizations owned by your enterprise who do not use 2FA will be removed from the organization and lose access to its repositories. They will also lose access to their forks of the organization's private repositories. You can reinstate their access privileges and settings if they enable two-factor authentication for their account within three months of their removal from your organization. For more information, see "[Reinstating a former member of your organization](/articles/reinstating-a-former-member-of-your-organization)."
|
||||
- Any organization owner, member, billing manager, or outside collaborator in any of the organizations owned by your enterprise who disables 2FA for their account after you've enabled required two-factor authentication will automatically be removed from the organization.
|
||||
- If you're the sole owner of an enterprise that requires two-factor authentication, you won't be able to disable 2FA for your user account without disabling required two-factor authentication for the enterprise.
|
||||
- 当您需要为企业进行双重身份验证时,不使用 2FA 的企业拥有的所有组织中的成员、外部协作者和帐单管理员(包括自动程序帐户)将从组织中删除,并失去对其仓库的访问权限。 他们还会失去对组织私有仓库的复刻的访问权限。 如果他们在从你的组织中删除后的三个月内为其帐户启用双因素身份验证,则可以恢复其访问特权和设置。 有关详细信息,请参阅“[恢复组织的前成员](/articles/reinstating-a-former-member-of-your-organization)”。
|
||||
- 为其帐户禁用 2FA 的企业拥有的任何组织中的任何组织所有者、成员、帐单管理员或外部协作者在你启用所需的双重身份验证后将自动从组织中删除。
|
||||
- 如果你是某个要求双因素身份验证的企业的唯一所有者,则在不为企业禁用双因素身份验证要求的情况下,你将无法为用户帐户禁用 2FA。
|
||||
|
||||
{% endwarning %}
|
||||
|
||||
Before you require use of two-factor authentication, we recommend notifying organization members, outside collaborators, and billing managers and asking them to set up 2FA for their accounts. Organization owners can see if members and outside collaborators already use 2FA on each organization's People page. For more information, see "[Viewing whether users in your organization have 2FA enabled](/articles/viewing-whether-users-in-your-organization-have-2fa-enabled)."
|
||||
在您要求使用双重身份验证之前,我们建议通知组织成员、外部协作者和帐单管理员,并要求他们为帐户设置双重身份验证。 组织所有者可以查看成员和外部协作者是否已在每个组织的 People(人员)页面上使用 2FA。 有关详细信息,请参阅“[查看组织中的用户是否启用了 2FA](/articles/viewing-whether-users-in-your-organization-have-2fa-enabled)”。
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.security-tab %}
|
||||
4. Under "Two-factor authentication", review the information about changing the setting. {% data reusables.enterprise-accounts.view-current-policy-config-orgs %}
|
||||
5. Under "Two-factor authentication", select **Require two-factor authentication for all organizations in your business**, then click **Save**.
|
||||

|
||||
6. If prompted, read the information about members and outside collaborators who will be removed from the organizations owned by your enterprise. To confirm the change, type your enterprise's name, then click **Remove members & require two-factor authentication**.
|
||||

|
||||
7. Optionally, if any members or outside collaborators are removed from the organizations owned by your enterprise, we recommend sending them an invitation to reinstate their former privileges and access to your organization. Each person must enable two-factor authentication before they can accept your invitation.
|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %}
|
||||
4. 在“Two-factor authentication(双重身份验证)”下,审查有关更改设置的信息。 {% data reusables.enterprise-accounts.view-current-policy-config-orgs %}
|
||||
5. 在“双因素身份验证”下,选择“要求对企业中的所有组织进行双因素身份验证”,然后单击“保存” 。
|
||||

|
||||
6. 如果出现提示,请阅读有关将从企业所拥有的组织中删除的成员和外部协作者的信息。 若要确认更改,请键入企业的名称,然后单击“删除成员并要求进行双因素身份验证”。
|
||||

|
||||
7. (可选)如果从您的企业拥有的组织中删除了任何成员或外部协作者,我们建议向他们发送邀请,以恢复其以前对组织的权限和访问权限。 每个人都必须启用双重身份验证,然后才能接受您的邀请。
|
||||
|
||||
{% endif %}
|
||||
|
||||
## Managing SSH certificate authorities for your enterprise
|
||||
## 管理企业的 SSH 认证机构
|
||||
|
||||
You can use a SSH certificate authorities (CA) to allow members of any organization owned by your enterprise to access that organization's repositories using SSH certificates you provide. {% data reusables.organizations.can-require-ssh-cert %} For more information, see "[About SSH certificate authorities](/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities)."
|
||||
您可以使用 SSH 认证机构 (CA) 来允许企业拥有的任何组织的成员使用您提供的 SSH 证书访问该组织的存储库。 {% data reusables.organizations.can-require-ssh-cert %} 有关详细信息,请参阅“[关于 SSH 证书颁发机构](/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities)”。
|
||||
|
||||
{% data reusables.organizations.add-extension-to-cert %}
|
||||
|
||||
### Adding an SSH certificate authority
|
||||
### 添加 SSH 认证中心
|
||||
|
||||
If you require SSH certificates for your enterprise, enterprise members should use a special URL for Git operations over SSH. For more information, see "[About SSH certificate authorities](/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities#about-ssh-urls-with-ssh-certificates)."
|
||||
如果您的企业需要 SSH 证书,企业成员应使用特殊的 URL 通过 SSH 进行 Git 操作。 有关详细信息,请参阅“[关于 SSH 证书颁发机构](/organizations/managing-git-access-to-your-organizations-repositories/about-ssh-certificate-authorities#about-ssh-urls-with-ssh-certificates)”。
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.security-tab %}
|
||||
{% data reusables.organizations.new-ssh-ca %}
|
||||
{% data reusables.organizations.require-ssh-cert %}
|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %} {% data reusables.organizations.new-ssh-ca %} {% data reusables.organizations.require-ssh-cert %}
|
||||
|
||||
### Deleting an SSH certificate authority
|
||||
### 删除 SSH 认证中心
|
||||
|
||||
Deleting a CA cannot be undone. If you want to use the same CA in the future, you'll need to upload the CA again.
|
||||
对 CA 的删除无法撤销。 如果以后要使用同一 CA,您需要重新上传该 CA。
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.security-tab %}
|
||||
{% data reusables.organizations.delete-ssh-ca %}
|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %} {% data reusables.organizations.delete-ssh-ca %}
|
||||
|
||||
{% ifversion sso-redirect %}
|
||||
## Managing SSO for unauthenticated users
|
||||
## 管理未经身份验证的用户的 SSO
|
||||
|
||||
{% data reusables.enterprise-managed.sso-redirect-release-phase %}
|
||||
|
||||
If your enterprise uses {% data variables.product.prodname_emus %}, you can choose what unauthenticated users see when they attempt to access your enterprise's resources. For more information about {% data variables.product.prodname_emus %}, see "[About {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users)."
|
||||
如果你的企业使用 {% data variables.product.prodname_emus %},你可以选择未经身份验证的用户在尝试访问企业资源时看到的内容。 有关 {% data variables.product.prodname_emus %} 的详细信息,请参阅“[关于 {% data variables.product.prodname_emus %}](/enterprise-cloud@latest/admin/identity-and-access-management/using-enterprise-managed-users-for-iam/about-enterprise-managed-users)”。
|
||||
|
||||
By default, to hide the existence of private resources, when an unauthenticated user attempts to access your enterprise, {% data variables.product.company_short %} displays a 404 error.
|
||||
默认情况下,为了隐藏专用资源的存在,当未经身份验证的用户尝试访问你的企业时,{% data variables.product.company_short %} 将显示 404 错误。
|
||||
|
||||
To prevent confusion from your developers, you can change this behavior so that users are automatically redirected to single sign-on (SSO) through your identity provider (IdP). When you enable automatic redirects, anyone who visits the URL for any of your enterprise's resources will be able to see that the resource exists. However, they'll only be able to see the resource if they have appropriate access after authenticating with your IdP.
|
||||
为防止你的开发人员混淆,你可以更改此行为,以便用户通过标识提供者 (IdP) 自动重定向到单一登录 (SSO)。 启用自动重定向后,访问企业任何资源的 URL 的任何人都可以看到该资源是否存在。 但是,只有在他们使用你的 IdP 进行身份验证后具有适当的访问权限时,他们才能看到资源。
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If a user is signed in to their personal account when they attempt to access any of your enterprise's resources, they'll be automatically signed out and redirected to SSO to sign in to their {% data variables.enterprise.prodname_managed_user %}. For more information, see "[Managing multiple accounts](/enterprise-cloud@latest/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/managing-multiple-accounts)."
|
||||
注意:如果用户在尝试访问企业的任何资源时登录到其个人帐户,他们将被自动注销并重定向到 SSO 以登录到其 {% data variables.enterprise.prodname_managed_user %}。 有关详细信息,请参阅“[管理多个帐户](/enterprise-cloud@latest/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-your-personal-account/managing-multiple-accounts)”。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %}
|
||||
{% data reusables.enterprise-accounts.settings-tab %}
|
||||
{% data reusables.enterprise-accounts.security-tab %}
|
||||
1. Under "Single sign-on settings", select or deselect **Automatically redirect users to sign in**.
|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.settings-tab %} {% data reusables.enterprise-accounts.security-tab %}
|
||||
1. 在“单一登录设置”下,选择或取消选择“自动重定向用户以登录”。
|
||||
|
||||

|
||||
{% endif %}
|
||||
 {% endif %}
|
||||
|
||||
## Further reading
|
||||
## 延伸阅读
|
||||
|
||||
- "[About identity and access management for your enterprise](/admin/authentication/managing-identity-and-access-for-your-enterprise/about-identity-and-access-management-for-your-enterprise)"
|
||||
{%- ifversion ghec %}
|
||||
- "[Accessing compliance reports for your enterprise](/admin/overview/accessing-compliance-reports-for-your-enterprise)"
|
||||
{%- endif %}
|
||||
{%- ifversion ghec or ghae %}
|
||||
- "[Restricting network traffic with an IP allow list with an IP allow list](/admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise-with-an-ip-allow-list)"
|
||||
{%- endif %}
|
||||
- “[关于企业的标识和访问管理](/admin/authentication/managing-identity-and-access-for-your-enterprise/about-identity-and-access-management-for-your-enterprise)”{%- ifversion ghec %}
|
||||
- “[访问企业的合规性报告](/admin/overview/accessing-compliance-reports-for-your-enterprise)”{%- endif %} {%- ifversion ghec or ghae %}
|
||||
- [使用 IP 允许列表限制网络流量](/admin/configuration/configuring-your-enterprise/restricting-network-traffic-to-your-enterprise-with-an-ip-allow-list){%- endif %}
|
||||
|
||||
@@ -7,19 +7,13 @@ topics:
|
||||
- Enterprise
|
||||
shortTitle: Export membership information
|
||||
permissions: Enterprise owners can export membership information for an enterprise.
|
||||
ms.openlocfilehash: ba7519aae1b38cd629a46baeacd5edc9d138efdc
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.openlocfilehash: 8da0e7b91e8bff85cb27fb7df3f06e62bdb290f2
|
||||
ms.sourcegitcommit: 7e2b5213fd15d91222725ecab5ee28cef378d3ad
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148106419'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185541'
|
||||
---
|
||||
{% note %}
|
||||
|
||||
注意:导出企业的成员身份信息目前为 beta 版,可能会随时更改。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
若要对有权访问企业资源的人员执行审核,可以下载企业成员身份信息的 CSV 报表。
|
||||
|
||||
{% data reusables.enterprise-accounts.access-enterprise %} {% data reusables.enterprise-accounts.people-tab %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Authorizing OAuth Apps
|
||||
intro: 'You can connect your {% data variables.product.product_name %} identity to third-party applications using OAuth. When authorizing an {% data variables.product.prodname_oauth_app %}, you should ensure you trust the application, review who it''s developed by, and review the kinds of information the application wants to access.'
|
||||
title: 授权 OAuth 应用
|
||||
intro: '您可以将 {% data variables.product.product_name %} 身份连接到使用 OAuth 的第三方应用程序。 在授权 {% data variables.product.prodname_oauth_app %} 时,应确保您信任应用程序,查阅开发者是谁,并查阅应用程序要访问的信息类型。'
|
||||
redirect_from:
|
||||
- /articles/authorizing-oauth-apps
|
||||
- /github/authenticating-to-github/authorizing-oauth-apps
|
||||
@@ -13,89 +13,95 @@ versions:
|
||||
topics:
|
||||
- Identity
|
||||
- Access management
|
||||
ms.openlocfilehash: 7d116f8fc5117cdcbdbd5582e007351c47b2d55d
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: '148184018'
|
||||
---
|
||||
When an {% data variables.product.prodname_oauth_app %} wants to identify you by your account on {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %}, you'll see a page with the app's developer contact information and a list of the specific data that's being requested.
|
||||
当 {% data variables.product.prodname_oauth_app %} 想要通过你在 {% ifversion ghae %}{% data variables.product.product_name %}{% else %}{% data variables.location.product_location %}{% endif %} 上的帐户识别你时,你会看到一个页面,其中包含该应用的开发者联系信息以及所请求的特定数据列表。
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** You must [verify your email address](/articles/verifying-your-email-address) before you can authorize an {% data variables.product.prodname_oauth_app %}.
|
||||
提示:必须先[验证电子邮件地址](/articles/verifying-your-email-address),才能为 {% data variables.product.prodname_oauth_app %} 授权。
|
||||
|
||||
{% endtip %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
## {% data variables.product.prodname_oauth_app %} access
|
||||
## {% data variables.product.prodname_oauth_app %} 访问
|
||||
|
||||
{% data variables.product.prodname_oauth_apps %} can have *read* or *write* access to your {% data variables.product.product_name %} data.
|
||||
{% data variables.product.prodname_oauth_apps %} 可以具有对 {% data variables.product.product_name %} 数据的读取或写入权限 。
|
||||
|
||||
- **Read access** only allows an app to *look at* your data.
|
||||
- **Write access** allows an app to *change* your data.
|
||||
- 读取权限仅允许应用查看数据。
|
||||
- 写入权限允许应用更改数据。
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Tip:** {% data reusables.user-settings.review_oauth_tokens_tip %}
|
||||
提示:{% data reusables.user-settings.review_oauth_tokens_tip %}
|
||||
|
||||
{% endtip %}
|
||||
|
||||
### About OAuth scopes
|
||||
### 关于 OAuth 范围
|
||||
|
||||
*Scopes* are named groups of permissions that an {% data variables.product.prodname_oauth_app %} can request to access both public and non-public data.
|
||||
范围是 {% data variables.product.prodname_oauth_app %} 可以申请访问公共及非公共数据的权限组。
|
||||
|
||||
When you want to use an {% data variables.product.prodname_oauth_app %} that integrates with {% data variables.product.product_name %}, that app lets you know what type of access to your data will be required. If you grant access to the app, then the app will be able to perform actions on your behalf, such as reading or modifying data. For example, if you want to use an app that requests `user:email` scope, the app will have read-only access to your private email addresses. For more information, see "[About scopes for {% data variables.product.prodname_oauth_apps %}](/apps/building-integrations/setting-up-and-registering-oauth-apps/about-scopes-for-oauth-apps)."
|
||||
当您想使用集成了 {% data variables.product.product_name %} 的 {% data variables.product.prodname_oauth_app %} 时,该应用程序可让您了解需要的数据访问权限类型。 如果您授予应用程序访问权限,则应用程序将能代您执行操作,例如读取或修改数据。 例如,如果要使用请求 `user:email` 作用域的应用,该应用将具有对专用电子邮件地址的只读访问权限。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_oauth_apps %} 的范围](/apps/building-integrations/setting-up-and-registering-oauth-apps/about-scopes-for-oauth-apps)”。
|
||||
|
||||
{% tip %}
|
||||
|
||||
**Note:** Currently, you can't scope source code access to read-only.
|
||||
注意:目前,无法将源代码访问范围限定为只读。
|
||||
|
||||
{% endtip %}
|
||||
|
||||
{% data reusables.apps.oauth-token-limit %}
|
||||
|
||||
### Types of requested data
|
||||
### 申请的数据类型
|
||||
|
||||
{% data variables.product.prodname_oauth_apps %} can request several types of data.
|
||||
{% data variables.product.prodname_oauth_apps %} 可以申请多种类型的数据。
|
||||
|
||||
| Type of data | Description |
|
||||
| 数据类型 | 说明 |
|
||||
| --- | --- |
|
||||
| Commit status | You can grant access for an app to report your commit status. Commit status access allows apps to determine if a build is a successful against a specific commit. Apps won't have access to your code, but they can read and write status information against a specific commit. |
|
||||
| Deployments | Deployment status access allows apps to determine if a deployment is successful against a specific commit for public and private repositories. Apps won't have access to your code. |
|
||||
| Gists | [Gist](https://gist.github.com) access allows apps to read or write to both your public and secret Gists. |
|
||||
| Hooks | [Webhooks](/webhooks) access allows apps to read or write hook configurations on repositories you manage. |
|
||||
| Notifications | Notification access allows apps to read your {% data variables.product.product_name %} notifications, such as comments on issues and pull requests. However, apps remain unable to access anything in your repositories. |
|
||||
| Organizations and teams | Organization and teams access allows apps to access and manage organization and team membership. |
|
||||
| Personal user data | User data includes information found in your user profile, like your name, e-mail address, and location. |
|
||||
| Repositories | Repository information includes the names of contributors, the branches you've created, and the actual files within your repository. Apps can request access for either public or private repositories on a user-wide level. |
|
||||
| Repository delete | Apps can request to delete repositories that you administer, but they won't have access to your code. |{% ifversion projects-oauth-scope %}
|
||||
| Projects | Access to user and organization {% data variables.projects.projects_v2 %}. Apps can request either read/write or read only access. |{% endif %}
|
||||
| 提交状态 | 您可以授权应用程序报告您的提交状态。 提交状态访问权限允许应用程序确定对特定提交的构建是否成功。 应用程序无法访问您的代码,但可以读取和写入特定提交的状态信息。 |
|
||||
| 部署 | 部署状态访问权限允许应用程序根据公共和私有仓库的特定提交确定部署是否成功。 应用程序无法访问您的代码。 |
|
||||
| Gists | [Gist](https://gist.github.com) 访问权限允许应用读取或写入公共和机密 Gist。 |
|
||||
| 挂钩 | [Webhook](/webhooks) 访问权限允许应用在你管理的存储库上读取或写入挂钩配置。 |
|
||||
| 通知 | 通知访问权限允许应用程序读取您的 {% data variables.product.product_name %} 通知,如议题和拉取请求的评论。 但应用程序仍然无法访问仓库中的任何内容。 |
|
||||
| Organizations and teams(组织和团队) | 组织和团队访问权限允许应用程序访问并管理组织和团队成员资格。 |
|
||||
| 个人用户数据 | 用户数据包括您的用户个人资料中的信息,例如您的姓名、电子邮件地址和地点。 |
|
||||
| 存储库 | 仓库信息包括贡献者的姓名、您创建的分支以及仓库中的实际文件。 应用程序可以申请访问用户级别的公共或私有仓库。 |
|
||||
| 仓库删除 | 应用程序可以申请删除您管理的仓库,但无法访问您的代码。 |{% ifversion projects-oauth-scope %}
|
||||
| 项目 | 访问用户和组织 {% data variables.projects.projects_v2 %}。 应用可以请求读/写或只读访问权限。 |{% endif %}
|
||||
|
||||
## Requesting updated permissions
|
||||
## 申请更新的权限
|
||||
|
||||
When {% data variables.product.prodname_oauth_apps %} request new access permissions, they will notify you of the differences between their current permissions and the new permissions.
|
||||
当 {% data variables.product.prodname_oauth_apps %} 申请新的访问权限时,将会通知其当前权限与新权限之间的差异。
|
||||
|
||||
{% ifversion fpt or ghec %}
|
||||
|
||||
## {% data variables.product.prodname_oauth_apps %} and organizations
|
||||
## {% data variables.product.prodname_oauth_apps %} 和组织
|
||||
|
||||
When you authorize an {% data variables.product.prodname_oauth_app %} for your personal account, you'll also see how the authorization will affect each organization you're a member of.
|
||||
当你授权 {% data variables.product.prodname_oauth_app %} 访问你的个人帐户时,你还会看到该授权对你所在的每个组织的影响。
|
||||
|
||||
- **For organizations *with* {% data variables.product.prodname_oauth_app %} access restrictions, you can request that organization admins approve the application for use in that organization.** If the organization does not approve the application, then the application will only be able to access the organization's public resources. If you're an organization admin, you can [approve the application](/articles/approving-oauth-apps-for-your-organization) yourself.
|
||||
- 对于具有 {% data variables.product.prodname_oauth_app %} 访问限制的组织,你可以请求组织管理员批准应用程序在该组织中使用。 如果组织未批准应用程序,则应用程序只能访问组织的公共资源。 如果你是组织管理员,则可以自行[批准应用程序](/articles/approving-oauth-apps-for-your-organization)。
|
||||
|
||||
- **For organizations *without* {% data variables.product.prodname_oauth_app %} access restrictions, the application will automatically be authorized for access to that organization's resources.** For this reason, you should be careful about which {% data variables.product.prodname_oauth_apps %} you approve for access to your personal account resources as well as any organization resources.
|
||||
- 对于没有 {% data variables.product.prodname_oauth_app %} 访问限制的组织,将自动授予应用程序对该组织资源的访问权限。 因此,应注意批准哪些 {% data variables.product.prodname_oauth_apps %} 访问你的个人帐户资源以及任何组织资源。
|
||||
|
||||
If you belong to any organizations with SAML single sign-on (SSO) enabled, and you have created a linked identity for that organization by authenticating via SAML in the past, you must have an active SAML session for each organization each time you authorize an {% data variables.product.prodname_oauth_app %}.
|
||||
如果你属于启用了 SAML 单一登录 (SSO) 的任何组织,并且你过去已通过 SAML 进行身份验证为该组织创建了链接标识,则每次授权 {% data variables.product.prodname_oauth_app %} 时,都必须为每个组织创建一个活动的 SAML 会话。
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** If you're encountering issues with an authorized {% data variables.product.prodname_oauth_app %} or {% data variables.product.prodname_github_app %} accessing an organization that is protected by SAML, you may need to revoke the app from your [Authorized {% data variables.product.prodname_github_apps %}](https://github.com/settings/applications) or [Authorized {% data variables.product.prodname_oauth_apps %}](https://github.com/settings/apps/authorizations) page, visit the organization to authenticate and establish an active SAML session, and then attempt to reauthorize the app by accessing it.
|
||||
注意:如果在访问受 SAML 保护的组织时遇到授权 {% data variables.product.prodname_oauth_app %} 或 {% data variables.product.prodname_github_app %} 的问题,则可能需要从[授权的 {% data variables.product.prodname_github_apps %}](https://github.com/settings/applications) 或[授权的 {% data variables.product.prodname_oauth_apps %}](https://github.com/settings/apps/authorizations) 页面撤销应用,访问组织进行身份验证并建立活动的 SAML 会话,然后尝试通过访问应用重新授权该应用。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
## Further reading
|
||||
## 延伸阅读
|
||||
|
||||
- "[About {% data variables.product.prodname_oauth_app %} access restrictions](/articles/about-oauth-app-access-restrictions)"
|
||||
- "[Authorizing GitHub Apps](/github/authenticating-to-github/keeping-your-account-and-data-secure/authorizing-github-apps)"
|
||||
- "[{% data variables.product.prodname_marketplace %} support](/articles/github-marketplace-support)"
|
||||
- [关于 {% data variables.product.prodname_oauth_app %} 访问限制](/articles/about-oauth-app-access-restrictions)
|
||||
- [为 GitHub 应用授权](/github/authenticating-to-github/keeping-your-account-and-data-secure/authorizing-github-apps)
|
||||
- [{% data variables.product.prodname_marketplace %} 支持](/articles/github-marketplace-support)
|
||||
|
||||
{% endif %}
|
||||
|
||||
@@ -230,3 +230,13 @@ You can view all open alerts, and you can reopen alerts that have been previousl
|
||||

|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
## Reviewing the audit logs for {% data variables.product.prodname_dependabot_alerts %}
|
||||
|
||||
When a member of your organization {% ifversion not fpt %}or enterprise {% endif %}performs an action related to {% data variables.product.prodname_dependabot_alerts %}, you can review the actions in the audit log. For more information about accessing the log, see "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/reviewing-the-audit-log-for-your-organization#accessing-the-audit-log){% ifversion not fpt %}" and "[Accessing the audit log for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise)."{% else %}."{% endif %}
|
||||
{% ifversion dependabot-alerts-audit-log %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
Events in your audit log for {% data variables.product.prodname_dependabot_alerts %} include details such as who performed the action, what the action was, and when the action was performed. {% ifversion dependabot-alerts-audit-log %}The event also includes a link to the alert itself. When a member of your organization dismisses an alert, the event displays the dismissal reason and comment.{% endif %} For information on the {% data variables.product.prodname_dependabot_alerts %} actions, see the `repository_vulnerability_alert` category in "[Reviewing the audit log for your organization](/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization#repository_vulnerability_alert-category-actions){% ifversion not fpt %}" and "[Audit log events for your enterprise](/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise#repository_vulnerability_alert-category-actions)."{% else %}."{% endif %}
|
||||
|
||||
@@ -478,8 +478,28 @@ By default, {% data variables.product.prodname_dependabot %} automatically rebas
|
||||
|
||||
Available rebase strategies
|
||||
|
||||
- `disabled` to disable automatic rebasing.
|
||||
- `auto` to use the default behavior and rebase open pull requests when changes are detected.
|
||||
- `disabled` to disable automatic rebasing.
|
||||
|
||||
When `rebase-strategy` is set to `auto`, {% data variables.product.prodname_dependabot %} attempts to rebase pull requests in the following cases.
|
||||
- When you use {% data variables.product.prodname_dependabot_version_updates %}, for any open {% data variables.product.prodname_dependabot %} pull request when your schedule runs.
|
||||
- When you reopen a closed {% data variables.product.prodname_dependabot %} pull request.
|
||||
- When you change the value of `target-branch` in the {% data variables.product.prodname_dependabot %} configuration file. For more information about this field, see "[`target-branch`](#target-branch)."
|
||||
- When {% data variables.product.prodname_dependabot %} detects that a {% data variables.product.prodname_dependabot %} pull request is in conflict after a recent push to the target branch.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** {% data variables.product.prodname_dependabot %} will keep rebasing a pull request indefinitely until the pull request is closed, merged or you disable {% data variables.product.prodname_dependabot_updates %}.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
When `rebase-strategy` is set to `disabled`, {% data variables.product.prodname_dependabot %} stops rebasing pull requests.
|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** This behavior only applies to pull requests that go into conflict with the target branch. {% data variables.product.prodname_dependabot %} will keep rebasing pull requests opened prior to the `rebase-strategy` setting being changed, and pull requests that are part of a scheduled run.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
{% data reusables.dependabot.option-affects-security-updates %}
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ versions:
|
||||
type: reference
|
||||
topics:
|
||||
- Codespaces
|
||||
ms.openlocfilehash: 8ffd48856a2653f3db3c871122d3acd23c246d7a
|
||||
ms.sourcegitcommit: e8c012864f13f9146e53fcb0699e2928c949ffa8
|
||||
ms.openlocfilehash: 3f4ef139386e616d14ef9a9cc5b474c96983de91
|
||||
ms.sourcegitcommit: 1a77ceb9e20c002173dda983db9405bcd5be254a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/09/2022
|
||||
ms.locfileid: '148159444'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185175'
|
||||
---
|
||||
{% data reusables.codespaces.codespaces-jetbrains-beta-note %}
|
||||
|
||||
@@ -42,16 +42,10 @@ ms.locfileid: '148159444'
|
||||
|
||||
* **刷新活动 codespace**
|
||||
|
||||

|
||||

|
||||
|
||||
刷新 {% data variables.product.prodname_github_codespaces %} 工具窗口中的详细信息。 例如,如果使用了 {% data variables.product.prodname_cli %} 更改显示名称,则可以单击此按钮以显示新名称。
|
||||
|
||||
* **断开连接并停止**
|
||||
|
||||

|
||||
|
||||
停止 codespace,停止远程计算机上的后端 IDE,然后关闭本地 JetBrains 客户端。
|
||||
|
||||
* **从 Web 管理 codespace**
|
||||
|
||||

|
||||
@@ -63,10 +57,3 @@ ms.locfileid: '148159444'
|
||||

|
||||
|
||||
在编辑器窗口中打开 codespace 创建日志。 有关详细信息,请参阅“[{% data variables.product.prodname_github_codespaces %} 日志](/codespaces/troubleshooting/github-codespaces-logs)”。
|
||||
|
||||
* **重新生成开发容器**
|
||||
|
||||

|
||||
|
||||
重新生成 codespace 以应用对开发容器配置所做的更改。 JetBrains 客户端将关闭,必须重新打开 codespace。 有关详细信息,请参阅“[codespace 生命周期](/codespaces/developing-in-codespaces/the-codespace-lifecycle#rebuilding-a-codespace)”。
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ versions:
|
||||
fpt: '*'
|
||||
permissions: 'Organization owners who are admins for a classroom can connect learning management systems to {% data variables.product.prodname_classroom %}.'
|
||||
shortTitle: Register an LMS
|
||||
ms.openlocfilehash: e1c1abed5ce4ebf82c19b29fef9a005fbe4c7a02
|
||||
ms.sourcegitcommit: f638d569cd4f0dd6d0fb967818267992c0499110
|
||||
ms.openlocfilehash: 408126833cbf7fa8cd4a71d172f6550e82f795a2
|
||||
ms.sourcegitcommit: 1a77ceb9e20c002173dda983db9405bcd5be254a
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 10/25/2022
|
||||
ms.locfileid: '148106851'
|
||||
ms.lasthandoff: 11/29/2022
|
||||
ms.locfileid: '148185167'
|
||||
---
|
||||
## 关于将 LMS 注册到课堂
|
||||
|
||||
@@ -63,8 +63,8 @@ ms.locfileid: '148106851'
|
||||
- “颁发者标识符”:`https://canvas.instructure.com`
|
||||
- “域”:画布实例的基 URL
|
||||
- “客户端 ID”:创建的开发人员密钥中“详细信息”下的“客户端 ID”
|
||||
- “OIDC 授权终结点”:Canvas 实例的基 URL,其末尾添加了 `/login/oauth2/token`。
|
||||
- “OAuth 2.0 令牌检索 URL”:Canvas 实例的基 URL,其末尾添加了 `/api/lti/authorize_redirect`。
|
||||
- “OIDC 授权终结点”:Canvas 实例的基 URL,其末尾添加了 `/api/lti/authorize_redirect`。
|
||||
- “OAuth 2.0 令牌检索 URL”:Canvas 实例的基 URL,其末尾添加了 `/login/oauth2/token`。
|
||||
- “密钥集 UEL”:Canvas 实例的基 URL,其末尾添加了 `/api/lti/security/jwks`。
|
||||
|
||||

|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: 自动生成的发行说明
|
||||
intro: 您可以为 GitHub 版本自动生成发行说明
|
||||
title: Automatically generated release notes
|
||||
intro: You can automatically generate release notes for your GitHub releases
|
||||
permissions: Repository collaborators and people with write access to a repository can generate and customize automated release notes for a release.
|
||||
versions:
|
||||
fpt: '*'
|
||||
@@ -13,61 +13,71 @@ shortTitle: Automated release notes
|
||||
communityRedirect:
|
||||
name: Provide GitHub Feedback
|
||||
href: 'https://github.com/orgs/community/discussions/categories/general'
|
||||
ms.openlocfilehash: a4adfa306873ef172950666756add7d0e67e168d
|
||||
ms.sourcegitcommit: 47bd0e48c7dba1dde49baff60bc1eddc91ab10c5
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 09/05/2022
|
||||
ms.locfileid: '147432014'
|
||||
---
|
||||
## 关于自动生成的发行说明
|
||||
|
||||
自动生成的发行说明为 {% data variables.product.prodname_dotcom %} 发行版手动编写发行说明提供了一种自动替代方法。 使用自动生成的发行说明,您可以快速生成发行版内容的概览。 自动生成的发行说明包括合并的拉取请求列表、发布参与者列表和完整更改日志的链接。
|
||||
## About automatically generated release notes
|
||||
|
||||
您还可以自定义自动发行说明,使用标签创建自定义类别来组织要包含的拉取请求,并排除某些标签和用户不出现在输出中。
|
||||
Automatically generated release notes provide an automated alternative to manually writing release notes for your {% data variables.product.prodname_dotcom %} releases. With automatically generated release notes, you can quickly generate an overview of the contents of a release. Automatically generated release notes include a list of merged pull requests, a list of contributors to the release, and a link to a full changelog.
|
||||
|
||||
## 为新版本创建自动生成的发行说明
|
||||
You can also customize your automated release notes, using labels to create custom categories to organize pull requests you want to include, and exclude certain labels and users from appearing in the output.
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %} {% data reusables.repositories.releases %}
|
||||
3. 单击“草拟新发行版”。
|
||||

|
||||
4. {% ifversion fpt or ghec %}单击“选择标记”,然后键入{% else %}键入{% endif %}发行版的版本号。 或者,选择现有标记。
|
||||
{% ifversion fpt or ghec %} 
|
||||
5. 如果要创建新标记,请单击“创建新标记”。
|
||||
 {% else %}  {% endif %}
|
||||
6. 如果已创建新标记,请使用下拉菜单选择包含要发布的项目的分支。
|
||||
{% ifversion fpt or ghec %}{% else %} {% endif %} {%- data reusables.releases.previous-release-tag %}
|
||||
7. 在说明文本框右上角,单击{% ifversion previous-release-tag %}“生成发行说明”{% else %}“自动生成发行说明”{% endif %}。{% ifversion previous-release-tag %}{% else %}{% endif %}
|
||||
8. 检查生成的注释,确保它们包含所有(且仅有)您要包含的信息。
|
||||
9. (可选)要在发行版中包含二进制文件(例如已编译的程序),请在二进制文件框中拖放或手动选择文件。
|
||||

|
||||
10. 若要通知用户发行版尚未准备投入生产,并且可能不稳定,请选择“这是预发行版”。
|
||||
 {%- ifversion fpt or ghec %}
|
||||
11. (可选)选择“为此版本创建讨论”,然后选择“类别”下拉菜单,然后单击类别进行版本讨论 。
|
||||
 {%- endif %}
|
||||
12. 如果已准备好公开发行版,请单击“发布发行版”。 若要稍后处理发行版,请单击“保存草稿”。
|
||||

|
||||
## Creating automatically generated release notes for a new release
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.repositories.releases %}
|
||||
3. Click **Draft a new release**.
|
||||

|
||||
4. {% ifversion fpt or ghec %}Click **Choose a tag** and type{% else %}Type{% endif %} a version number for your release. Alternatively, select an existing tag.
|
||||
{% ifversion fpt or ghec %}
|
||||

|
||||
5. If you are creating a new tag, click **Create new tag**.
|
||||

|
||||
{% else %}
|
||||

|
||||
{% endif %}
|
||||
6. If you have created a new tag, use the drop-down menu to select the branch that contains the project you want to release.
|
||||
{% ifversion fpt or ghec %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{%- data reusables.releases.previous-release-tag %}
|
||||
7. To the top right of the description text box, click {% ifversion previous-release-tag %}**Generate release notes**{% else %}**Auto-generate release notes**{% endif %}.{% ifversion previous-release-tag %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
8. Check the generated notes to ensure they include all (and only) the information you want to include.
|
||||
9. Optionally, to include binary files such as compiled programs in your release, drag and drop or manually select files in the binaries box.
|
||||

|
||||
10. To notify users that the release is not ready for production and may be unstable, select **This is a pre-release**.
|
||||

|
||||
{%- ifversion fpt or ghec %}
|
||||
11. Optionally, select **Create a discussion for this release**, then select the **Category** drop-down menu and click a category for the release discussion.
|
||||

|
||||
{%- endif %}
|
||||
12. If you're ready to publicize your release, click **Publish release**. To work on the release later, click **Save draft**.
|
||||

|
||||
|
||||
|
||||
## 配置自动生成的发行说明
|
||||
## Configuring automatically generated release notes
|
||||
|
||||
{% data reusables.repositories.navigate-to-repo %} {% data reusables.files.add-file %}
|
||||
3. 在文件名字段中,键入 `.github/release.yml` 以在 `.github` 目录中创建 `release.yml` 文件。
|
||||

|
||||
4. 在文件中,使用下面的配置选项,在 YAML 中指定要从此版本中排除的拉取请求标签和作者。 您还可以创建新类别并列出要包含在每个类别中的拉取请求标签。
|
||||
{% data reusables.repositories.navigate-to-repo %}
|
||||
{% data reusables.files.add-file %}
|
||||
3. In the file name field, type `.github/release.yml` to create the `release.yml` file in the `.github` directory.
|
||||

|
||||
4. In the file, using the configuration options below, specify in YAML the pull request labels and authors you want to exclude from this release. You can also create new categories and list the pull request labels to be included in each of them.
|
||||
|
||||
### 配置选项
|
||||
### Configuration options
|
||||
|
||||
| 参数 | 说明 |
|
||||
| Parameter | Description |
|
||||
| :- | :- |
|
||||
| `changelog.exclude.labels` | 不在发行说明中显示拉取请求的标签列表。 |
|
||||
| `changelog.exclude.authors` | 要从发行说明中排除其拉取请求的用户或自动程序登录句柄的列表。 |
|
||||
| `changelog.categories[*].title` | **必填。** 发行说明中更改类别的标题。 |
|
||||
| `changelog.categories[*].labels`| **必填。** 符合此类别的拉取请求条件的标签。 使用 `*` 作为与上述任何类别都不匹配的拉取请求的统称。 |
|
||||
| `changelog.categories[*].exclude.labels` | 不在此类别中显示拉取请求的标签列表。 |
|
||||
| `changelog.categories[*].exclude.authors` | 要从此类别中排除其拉取请求的用户或自动程序登录句柄的列表。 |
|
||||
| `changelog.exclude.labels` | A list of labels that exclude a pull request from appearing in release notes. |
|
||||
| `changelog.exclude.authors` | A list of user or bot login handles whose pull requests are to be excluded from release notes. |
|
||||
| `changelog.categories[*].title` | **Required.** The title of a category of changes in release notes. |
|
||||
| `changelog.categories[*].labels`| **Required.** Labels that qualify a pull request for this category. Use `*` as a catch-all for pull requests that didn't match any of the previous categories. |
|
||||
| `changelog.categories[*].exclude.labels` | A list of labels that exclude a pull request from appearing in this category. |
|
||||
| `changelog.categories[*].exclude.authors` | A list of user or bot login handles whose pull requests are to be excluded from this category. |
|
||||
|
||||
### 配置示例
|
||||
### Example configurations
|
||||
|
||||
A configuration for a repository that labels semver releases
|
||||
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
@@ -94,6 +104,26 @@ changelog:
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
## 延伸阅读
|
||||
A configuration for a repository that doesn't tag pull requests but where we want to separate out {% data variables.product.prodname_dependabot %} automated pull requests in release notes (`labels: '*'` is required to display a catchall category)
|
||||
|
||||
- [管理标签](/issues/using-labels-and-milestones-to-track-work/managing-labels)
|
||||
{% raw %}
|
||||
```yaml{:copy}
|
||||
# .github/release.yml
|
||||
|
||||
changelog:
|
||||
categories:
|
||||
- title: 🏕 Features
|
||||
labels:
|
||||
- '*'
|
||||
exclude:
|
||||
labels:
|
||||
- dependencies
|
||||
- title: 👒 Dependencies
|
||||
labels:
|
||||
- dependencies
|
||||
```
|
||||
{% endraw %}
|
||||
|
||||
## Further reading
|
||||
|
||||
- "[Managing labels](/issues/using-labels-and-milestones-to-track-work/managing-labels)"
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
ms.openlocfilehash: a95067136ba91760fb48dae77a42cf9b9377dbeb
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: "148184040"
|
||||
---
|
||||
启用 SAML SSO 后,可能需要撤销 {% data variables.product.prodname_oauth_app %} 和 {% data variables.product.prodname_github_app %} 授权并重新授权,然后才能访问组织。 有关详细信息,请参阅“[授权 {% data variables.product.prodname_oauth_apps %}](/authentication/keeping-your-account-and-data-secure/authorizing-oauth-apps#oauth-apps-and-organizations)”。
|
||||
@@ -1,192 +1,116 @@
|
||||
| Category name | Description
|
||||
---
|
||||
ms.openlocfilehash: 1dd9305ca2b7cb3e8d25d697de8ae3a83e0c46bb
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: "148183978"
|
||||
---
|
||||
| 类别名称 | 说明
|
||||
|------------------|-------------------
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `account` | Contains activities related to an organization account.
|
||||
| `advisory_credit` | Contains activities related to crediting a contributor for a security advisory in the {% data variables.product.prodname_advisory_database %}. For more information, see "[About {% data variables.product.prodname_dotcom %} Security Advisories](/github/managing-security-vulnerabilities/about-github-security-advisories)."
|
||||
{%- endif %}
|
||||
| `artifact` | Contains activities related to {% data variables.product.prodname_actions %} workflow run artifacts.
|
||||
{%- ifversion audit-log-streaming %}
|
||||
| `audit_log_streaming` | Contains activities related to streaming audit logs for organizations in an enterprise account.
|
||||
{%- endif %}
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `billing` | Contains activities related to an organization's billing.
|
||||
{%- endif %}
|
||||
{%- ifversion ghec or ghes or ghae %}
|
||||
| `business` | Contains activities related to business settings for an enterprise.
|
||||
{%- endif %}
|
||||
{%- ifversion code-security-audit-log-events %}
|
||||
| `business_advanced_security` | Contains activities related to {% data variables.product.prodname_GH_advanced_security %} in an enterprise. For more information, see "[Managing {% data variables.product.prodname_GH_advanced_security %} features for your enterprise](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)."
|
||||
| `business_secret_scanning` | Contains activities related to {% data variables.product.prodname_secret_scanning %} in an enterprise. For more information, see "[Managing {% data variables.product.prodname_GH_advanced_security %} features for your enterprise](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)."
|
||||
{%- endif %}
|
||||
{%- ifversion secret-scanning-audit-log-custom-patterns %}
|
||||
| `business_secret_scanning_custom_pattern` | Contains activities related to custom patterns for {% data variables.product.prodname_secret_scanning %} in an enterprise.
|
||||
{%- endif %}
|
||||
{%- ifversion code-security-audit-log-events %}
|
||||
| `business_secret_scanning_push_protection` | Contains activities related to the push protection feature of {% data variables.product.prodname_secret_scanning %} in an enterprise. For more information, see "[Managing {% data variables.product.prodname_GH_advanced_security %} features for your enterprise](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)."
|
||||
| `business_secret_scanning_push_protection_custom_message` | Contains activities related to the custom message displayed when push protection is triggered in an enterprise. For more information, see "[Managing {% data variables.product.prodname_GH_advanced_security %} features for your enterprise](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)."
|
||||
{%- endif %}
|
||||
| `checks` | Contains activities related to check suites and runs.
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `codespaces` | Contains activities related to an organization's codespaces.
|
||||
{%- endif %}
|
||||
| `commit_comment` | Contains activities related to updating or deleting commit comments.
|
||||
{%- ifversion ghes %}
|
||||
| `config_entry` | Contains activities related to configuration settings. These events are only visible in the site admin audit log.
|
||||
{%- endif %}
|
||||
| `dependabot_alerts` | Contains organization-level configuration activities for {% data variables.product.prodname_dependabot_alerts %} in existing repositories. For more information, see "[About {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)."
|
||||
| `dependabot_alerts_new_repos` | Contains organization-level configuration activities for {% data variables.product.prodname_dependabot_alerts %} in new repositories created in the organization.
|
||||
| `dependabot_repository_access` | Contains activities related to which private repositories in an organization {% data variables.product.prodname_dependabot %} is allowed to access.
|
||||
{%- ifversion fpt or ghec or ghes %}
|
||||
| `dependabot_security_updates` | Contains organization-level configuration activities for {% data variables.product.prodname_dependabot_security_updates %} in existing repositories. For more information, see "[Configuring {% data variables.product.prodname_dependabot_security_updates %}](/github/managing-security-vulnerabilities/configuring-dependabot-security-updates)."
|
||||
| `dependabot_security_updates_new_repos` | Contains organization-level configuration activities for {% data variables.product.prodname_dependabot_security_updates %} for new repositories created in the organization.
|
||||
{%- endif %}
|
||||
| `dependency_graph` | Contains organization-level configuration activities for dependency graphs for repositories. For more information, see "[About the dependency graph](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)."
|
||||
| `dependency_graph_new_repos` | Contains organization-level configuration activities for new repositories created in the organization.
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `discussion` | Contains activities related to team discussions.
|
||||
| `discussion_comment` | Contains activities related to comments posted in discussions on a team page.
|
||||
| `discussion_post` | Contains activities related to discussions posted to a team page.
|
||||
| `discussion_post_reply` | Contains activities related to replies to discussions posted to a team page.
|
||||
{%- endif %}
|
||||
{%- ifversion ghec or ghes %}
|
||||
| `dotcom_connection` | Contains activities related to {% data variables.product.prodname_github_connect %}.
|
||||
| `enterprise` | Contains activities related to enterprise settings.
|
||||
{%- endif %}
|
||||
{%- ifversion ghec %}
|
||||
| `enterprise_domain` | Contains activities related to verified enterprise domains.
|
||||
| `enterprise_installation` | Contains activities related to {% data variables.product.prodname_github_app %}s associated with an {% data variables.product.prodname_github_connect %} enterprise connection.
|
||||
{%- endif %}
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `environment` | Contains activities related to {% data variables.product.prodname_actions %} environments.
|
||||
{%- endif %}
|
||||
{%- ifversion ghae %}
|
||||
| `external_group` | Contains activities related to Okta groups.
|
||||
| `external_identity` | Contains activities related to a user in an Okta group.
|
||||
{%- endif %}
|
||||
| `gist` | Contains activities related to Gists.
|
||||
| `hook` | Contains activities related to webhooks.
|
||||
| `integration` | Contains activities related to integrations in an account.
|
||||
| `integration_installation` | Contains activities related to integrations installed in an account.
|
||||
| `integration_installation_request` | Contains activities related to organization member requests for owners to approve integrations for use in the organization.
|
||||
{%- ifversion ghec or ghae %}
|
||||
| `ip_allow_list` | Contains activities related to enabling or disabling the IP allow list for an organization.
|
||||
| `ip_allow_list_entry` | Contains activities related to the creation, deletion, and editing of an IP allow list entry for an organization.
|
||||
{%- endif %}
|
||||
| `issue` | Contains activities related to pinning, transferring, or deleting an issue in a repository.
|
||||
| `issue_comment` | Contains activities related to pinning, transferring, or deleting issue comments.
|
||||
| `issues` | Contains activities related to enabling or disabling issue creation for an organization.
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `marketplace_agreement_signature` | Contains activities related to signing the {% data variables.product.prodname_marketplace %} Developer Agreement.
|
||||
| `marketplace_listing` | Contains activities related to listing apps in {% data variables.product.prodname_marketplace %}.
|
||||
{%- endif %}
|
||||
| `members_can_create_pages` | Contains activities related to managing the publication of {% data variables.product.prodname_pages %} sites for repositories in the organization. For more information, see "[Managing the publication of {% data variables.product.prodname_pages %} sites for your organization](/organizations/managing-organization-settings/managing-the-publication-of-github-pages-sites-for-your-organization)."
|
||||
| `members_can_create_private_pages` | Contains activities related to managing the publication of private {% data variables.product.prodname_pages %} sites for repositories in the organization.
|
||||
| `members_can_create_public_pages` | Contains activities related to managing the publication of public {% data variables.product.prodname_pages %} sites for repositories in the organization.
|
||||
{%- ifversion ghec or ghes or ghae %}
|
||||
| `members_can_delete_repos` | Contains activities related to enabling or disabling repository creation for an organization.
|
||||
{%- endif %}
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `members_can_view_dependency_insights` | Contains organization-level configuration activities allowing organization members to view dependency insights.
|
||||
| `migration` | Contains activities related to transferring data from a *source* location (such as a {% data variables.product.prodname_dotcom_the_website %} organization or a {% data variables.product.prodname_ghe_server %} instance) to a *target* {% data variables.product.prodname_ghe_server %} instance.
|
||||
{%- endif %}
|
||||
| `oauth_access` | Contains activities related to OAuth access tokens.
|
||||
| `oauth_application` | Contains activities related to OAuth Apps.
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `oauth_authorization` | Contains activities related to authorizing OAuth Apps.
|
||||
{%- endif %}
|
||||
| `org` | Contains activities related to organization membership.
|
||||
{%- ifversion ghec or ghes or ghae %}
|
||||
| `org_credential_authorization` | Contains activities related to authorizing credentials for use with SAML single sign-on.
|
||||
{%- endif %}
|
||||
{%- ifversion secret-scanning-audit-log-custom-patterns %}
|
||||
| `org_secret_scanning_custom_pattern` | Contains activities related to custom patterns for secret scanning in an organization. For more information, see "[Defining custom patterns for secret scanning](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)."
|
||||
| `org.secret_scanning_push_protection` | Contains activities related to secret scanning custom patterns in an organization. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)."
|
||||
{%- endif %}
|
||||
| `organization_default_label` | Contains activities related to default labels for repositories in an organization.
|
||||
{%- ifversion fpt or ghec or ghes %}
|
||||
| `organization_domain` | Contains activities related to verified organization domains.
|
||||
| `organization_projects_change` | Contains activities related to organization-wide project boards in an enterprise.
|
||||
{%- endif %}
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `pages_protected_domain` | Contains activities related to verified custom domains for {% data variables.product.prodname_pages %}.
|
||||
| `payment_method` | Contains activities related to how an organization pays for {% data variables.product.prodname_dotcom %}.
|
||||
| `prebuild_configuration` | Contains activities related to prebuild configurations for {% data variables.product.prodname_github_codespaces %}.
|
||||
{%- endif %}
|
||||
{%- ifversion ghes %}
|
||||
| `pre_receive_environment` | Contains activities related to pre-receive hook environments.
|
||||
| `pre_receive_hook` | Contains activities related to pre-receive hooks.
|
||||
{%- endif %}
|
||||
{%- ifversion ghes %}
|
||||
| `private_instance_encryption` | Contains activities related to enabling private mode for an enterprise.
|
||||
{%- endif %}
|
||||
| `private_repository_forking` | Contains activities related to allowing forks of private and internal repositories, for a repository, organization or enterprise.
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `profile_picture` | Contains activities related to an organization's profile picture.
|
||||
{%- endif %}
|
||||
| `project` | Contains activities related to project boards.
|
||||
| `project_field` | Contains activities related to field creation and deletion in a project board.
|
||||
| `project_view` | Contains activities related to view creation and deletion in a project board.
|
||||
| `protected_branch` | Contains activities related to protected branches.
|
||||
| `public_key` | Contains activities related to SSH keys and deploy keys.
|
||||
| `pull_request` | Contains activities related to pull requests.
|
||||
| `pull_request_review` | Contains activities related to pull request reviews.
|
||||
| `pull_request_review_comment` | Contains activities related to pull request review comments.
|
||||
| `repo` | Contains activities related to the repositories owned by an organization.
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `repository_advisory` | Contains repository-level activities related to security advisories in the {% data variables.product.prodname_advisory_database %}. For more information, see "[About {% data variables.product.prodname_dotcom %} Security Advisories](/github/managing-security-vulnerabilities/about-github-security-advisories)."
|
||||
| `repository_content_analysis` | Contains activities related to [enabling or disabling data use for a private repository](/articles/about-github-s-use-of-your-data).
|
||||
| `repository_dependency_graph` | Contains repository-level activities related to enabling or disabling the dependency graph for a {% ifversion fpt or ghec %}private {% endif %}repository. For more information, see "[About the dependency graph](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)."
|
||||
{%- endif %}
|
||||
| `repository_image` | Contains activities related to images for a repository.
|
||||
| `repository_invitation` | Contains activities related to invitations to join a repository.
|
||||
| `repository_projects_change` | Contains activities related to enabling projects for a repository or for all repositories in an organization.
|
||||
{%- ifversion ghec or ghes or ghae %}
|
||||
| `repository_secret_scanning` | Contains repository-level activities related to secret scanning. For more information, see "[About secret scanning](/github/administering-a-repository/about-secret-scanning)."
|
||||
{%- endif %}
|
||||
{%- ifversion secret-scanning-audit-log-custom-patterns %}
|
||||
| `repository_secret_scanning_custom_pattern` | Contains activities related to secret scanning custom patterns in a repository. For more information, see "[Defining custom patterns for secret scanning](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)." {% endif %}{% ifversion secret-scanning-audit-log-custom-patterns %}
|
||||
| `repository_secret_scanning_push_protection` | Contains activities related to secret scanning custom patterns in a repository. For more information, see "[Protecting pushes with secret scanning](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)."
|
||||
{%- endif %}
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `repository_visibility_change` | Contains activities related to allowing organization members to change repository visibilities for the organization.
|
||||
{%- endif %}
|
||||
| `repository_vulnerability_alert` | Contains activities related to [{% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts).
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `repository_vulnerability_alerts` | Contains repository-level configuration activities for {% data variables.product.prodname_dependabot_alerts %}.
|
||||
| `required_status_check` | Contains activities related to required status checks for protected branches.
|
||||
{%- endif %}
|
||||
{%- ifversion ghec or ghes %}
|
||||
| `restrict_notification_delivery` | Contains activities related to the restriction of email notifications to approved or verified domains for an enterprise.
|
||||
{%- endif %}
|
||||
{%- ifversion custom-repository-roles %}
|
||||
| `role` | Contains activities related to [custom repository roles](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization).
|
||||
{%- endif %}
|
||||
{%- ifversion ghec or ghes or ghae %}
|
||||
| `secret_scanning` | Contains organization-level configuration activities for secret scanning in existing repositories. For more information, see "[About secret scanning](/github/administering-a-repository/about-secret-scanning)."
|
||||
| `secret_scanning_new_repos` | Contains organization-level configuration activities for secret scanning for new repositories created in the organization.
|
||||
{%- endif %}
|
||||
{%- ifversion ghec or ghes or ghae %}
|
||||
| `security_key` | Contains activities related to security keys registration and removal.
|
||||
{%- endif %}
|
||||
{%- ifversion fpt or ghec %}
|
||||
| `sponsors` | Contains events related to sponsor buttons (see "[Displaying a sponsor button in your repository](/articles/displaying-a-sponsor-button-in-your-repository)").
|
||||
{%- endif %}
|
||||
{%- ifversion ghec or ghes or ghae %}
|
||||
| `ssh_certificate_authority` | Contains activities related to a SSH certificate authority in an organization or enterprise.
|
||||
| `ssh_certificate_requirement` | Contains activities related to requiring members use SSH certificates to access organization resources.
|
||||
{%- endif %}{% ifversion sso-redirect %}
|
||||
| `sso_redirect` | Contains activities related to automatically redirecting users to sign in (see "[Enforcing policies for security settings in your enterprise](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-sso-for-unauthenticated-users)").{% endif %}
|
||||
| `staff` | Contains activities related to a site admin performing an action.
|
||||
| `team` | Contains activities related to teams in an organization.
|
||||
| `team_discussions` | Contains activities related to managing team discussions for an organization.
|
||||
{%- ifversion ghec %}
|
||||
| `team_sync_tenant` | Contains activities related to team synchronization with an IdP for an enterprise or organization.
|
||||
{%- endif %}
|
||||
{%- ifversion fpt or ghes %}
|
||||
| `two_factor_authentication` | Contains activities related to two-factor authentication.
|
||||
{%- endif %}
|
||||
| `user` | Contains activities related to users in an enterprise or organization.
|
||||
{%- ifversion ghec or ghes %}
|
||||
| `user_license` | Contains activities related to a user occupying a licensed seat in, and being a member of, an enterprise.
|
||||
{%- endif %}
|
||||
| `workflows` | Contains activities related to {% data variables.product.prodname_actions %} workflows.
|
||||
{%- ifversion fpt or ghec %} | `account` | 包含与组织帐户相关的活动。
|
||||
| `advisory_credit` | 包含与 {% data variables.product.prodname_advisory_database %} 中安全通告的贡献者积分相关的活动。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dotcom %} 安全通知](/github/managing-security-vulnerabilities/about-github-security-advisories)”。
|
||||
{%- endif %} | `artifact` | 包含与 {% data variables.product.prodname_actions %} 工作流运行工件相关的活动。
|
||||
{%- ifversion audit-log-streaming %} | `audit_log_streaming` | 包含与企业帐户中组织的流式审核日志相关的活动。
|
||||
{%- endif %} {%- ifversion fpt or ghec %} | `billing` | 包含与组织计费相关的活动。
|
||||
{%- endif %} {%- ifversion ghec or ghes or ghae %} | `business` | 包含与企业的业务设置相关的活动。
|
||||
{%- endif %} {%- ifversion code-security-audit-log-events %} | `business_advanced_security` | 包含与企业中的 {% data variables.product.prodname_GH_advanced_security %} 相关的活动。 有关详细信息,请参阅“[管理企业的 {% data variables.product.prodname_GH_advanced_security %} 功能](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)”。
|
||||
| `business_secret_scanning` | 包含与企业中的 {% data variables.product.prodname_secret_scanning %} 相关的活动。 有关详细信息,请参阅“[管理企业的 {% data variables.product.prodname_GH_advanced_security %} 功能](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)”。
|
||||
{%- endif %} {%- ifversion secret-scanning-audit-log-custom-patterns %} | `business_secret_scanning_custom_pattern` | 包含与企业中 {% data variables.product.prodname_secret_scanning %} 的自定义模式相关的活动。
|
||||
{%- endif %} {%- ifversion code-security-audit-log-events %} | `business_secret_scanning_push_protection` | 包含与企业中 {% data variables.product.prodname_secret_scanning %} 的推送保护功能相关的活动。 有关详细信息,请参阅“[管理企业的 {% data variables.product.prodname_GH_advanced_security %} 功能](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)”。
|
||||
| `business_secret_scanning_push_protection_custom_message` | 包含与在企业中触发推送保护时显示的自定义消息相关的活动。 有关详细信息,请参阅“[管理企业的 {% data variables.product.prodname_GH_advanced_security %} 功能](/admin/code-security/managing-github-advanced-security-for-your-enterprise/managing-github-advanced-security-features-for-your-enterprise)”。
|
||||
{%- endif %} | `checks` | 包含与检查套件和运行相关的活动。
|
||||
{%- ifversion fpt or ghec %} | `codespaces` | 包含与组织的 codespaces 相关的活动。
|
||||
{%- endif %} | `commit_comment` | 包含与更新或删除提交评论相关的活动。
|
||||
{%- ifversion ghes %} | `config_entry` | 包含与配置设置相关的活动。 这些事件仅在站点管理员审核日志中可见。
|
||||
{%- endif %} | `dependabot_alerts` | 包含现有存储库中 {% data variables.product.prodname_dependabot_alerts %} 的组织级配置活动。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts)”。
|
||||
| `dependabot_alerts_new_repos` | 包含组织新建存储库中 {% data variables.product.prodname_dependabot_alerts %} 的组织级配置活动。
|
||||
| `dependabot_repository_access` | 包含与允许 {% data variables.product.prodname_dependabot %} 访问组织中哪些专用存储库相关的活动。
|
||||
{%- ifversion fpt or ghec or ghes %} | `dependabot_security_updates` | 包含现有存储库中 {% data variables.product.prodname_dependabot_security_updates %} 的组织级配置活动。 有关详细信息,请参阅“[配置 {% data variables.product.prodname_dependabot_security_updates %}](/github/managing-security-vulnerabilities/configuring-dependabot-security-updates)”。
|
||||
| `dependabot_security_updates_new_repos` | 包含组织新建存储库中 {% data variables.product.prodname_dependabot_security_updates %} 的组织级配置活动。
|
||||
{%- endif %} | `dependency_graph` | 包含存储库依赖项关系图的组织级配置活动。 有关详细信息,请参阅“[关于依赖项关系图](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)”。
|
||||
| `dependency_graph_new_repos` | 包含组织新建存储库的组织级配置活动。
|
||||
{%- ifversion fpt or ghec %} | `discussion` | 包含与团队讨论相关的活动。
|
||||
| `discussion_comment` | 包含与发布到团队页的讨论中的评论相关的活动。
|
||||
| `discussion_post` | 包含与发布到团队页的讨论相关的活动。
|
||||
| `discussion_post_reply` | 包含与发布到团队页的讨论回复相关的活动。
|
||||
{%- endif %} {%- ifversion ghec or ghes %} | `dotcom_connection` | 包含与 {% data variables.product.prodname_github_connect %} 相关的活动。
|
||||
| `enterprise` | 包含与企业设置相关的活动。
|
||||
{%- endif %} {%- ifversion ghec %} | `enterprise_domain` | 包含与已验证的企业域相关的活动。
|
||||
| `enterprise_installation` | 包含与和 {% data variables.product.prodname_github_connect %} 企业连接关联的 {% data variables.product.prodname_github_app %} 相关的活动。
|
||||
{%- endif %} {%- ifversion fpt or ghec %} | `environment` | 包含与 {% data variables.product.prodname_actions %} 环境相关的活动。
|
||||
{%- endif %} {%- ifversion ghae %} | `external_group` | 包含与 Okta 组相关的活动。
|
||||
| `external_identity` | 包含与 Okta 组中的用户相关的活动。
|
||||
{%- endif %} | `gist` | 包含与 Gists 相关的活动。
|
||||
| `hook` | 包含与 Webhook 相关的活动。
|
||||
| `integration` | 包含与帐户中的集成相关的活动。
|
||||
| `integration_installation` | 包含与帐户中安装的集成相关的活动。
|
||||
| `integration_installation_request` | 包含与组织成员请求所有者批准在组织中使用的集成相关的活动。
|
||||
{%- ifversion ghec or ghae %} | `ip_allow_list` | 包含与为组织启用或禁用 IP 允许列表相关的活动。
|
||||
| `ip_allow_list_entry` | 包含与为组织创建、删除和编辑 IP 允许列表条目相关的活动。
|
||||
{%- endif %} | `issue` | 包含与固定、转移或删除存储库中问题相关的活动。
|
||||
| `issue_comment` | 包含与固定、转移或删除问题评论相关的活动。
|
||||
| `issues` | 包含与为组织启用或禁用问题创建相关的活动。
|
||||
{%- ifversion fpt or ghec %} | `marketplace_agreement_signature` | 包含与签署 {% data variables.product.prodname_marketplace %} 开发者协议相关的活动。
|
||||
| `marketplace_listing` | 包含与 {% data variables.product.prodname_marketplace %} 中列出的应用相关的活动。
|
||||
{%- endif %} | `members_can_create_pages` | 包含与管理组织存储库的 {% data variables.product.prodname_pages %} 站点发布相关的活动。 有关详细信息,请参阅“[为组织管理 {% data variables.product.prodname_pages %} 站点的发布](/organizations/managing-organization-settings/managing-the-publication-of-github-pages-sites-for-your-organization)”。
|
||||
| `members_can_create_private_pages` | 包含与管理组织存储库的专用 {% data variables.product.prodname_pages %} 站点发布相关的活动。
|
||||
| `members_can_create_public_pages` | 包含与管理组织存储库的公共 {% data variables.product.prodname_pages %} 站点发布相关的活动。
|
||||
{%- ifversion ghec or ghes or ghae %} | `members_can_delete_repos` | 包含与为组织启用或禁用存储库创建相关的活动。
|
||||
{%- endif %} {%- ifversion fpt or ghec %} | `members_can_view_dependency_insights` | 包含允许组织成员查看依赖项见解的组织级配置活动。
|
||||
| `migration` | 包含与将数据从源位置(例如 {% data variables.product.prodname_dotcom_the_website %} 组织或 {% data variables.product.prodname_ghe_server %} 实例)传输到目标 {% data variables.product.prodname_ghe_server %} 实例相关的活动 。
|
||||
{%- endif %} | `oauth_access` | 包含与 OAuth 访问令牌相关的活动。
|
||||
| `oauth_application` | 包含与 OAuth 应用相关的活动。
|
||||
{%- ifversion fpt or ghec %} | `oauth_authorization` | 包含与授权 OAuth 应用相关的活动。
|
||||
{%- endif %} | `org` | 包含与组织成员身份相关的活动。
|
||||
{%- ifversion ghec or ghes or ghae %} | `org_credential_authorization` | 包含与授权凭据以用于 SAML 单一登录相关的活动。
|
||||
{%- endif %} {%- ifversion secret-scanning-audit-log-custom-patterns %} | `org_secret_scanning_custom_pattern` | 包含与组织中机密扫描的自定义模式相关的活动。 有关详细信息,请参阅“[为机密扫描定义自定义模式](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)”。
|
||||
| `org.secret_scanning_push_protection` | 包含与组织中的机密扫描自定义模式相关的活动。 有关详细信息,请参阅“[使用机密扫描保护推送](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)”。
|
||||
{%- endif %} | `organization_default_label` | 包含与组织中存储库的默认标签相关的活动。
|
||||
{%- ifversion fpt or ghec or ghes %} | `organization_domain` | 包含与已验证的组织域相关的活动。
|
||||
| `organization_projects_change` | 包含与企业中组织范围的项目板相关的活动。
|
||||
{%- endif %} {%- ifversion fpt or ghec %} | `pages_protected_domain` | 包含与 {% data variables.product.prodname_pages %} 的已验证自定义域相关的活动。
|
||||
| `payment_method` | 包含与组织如何支付 {% data variables.product.prodname_dotcom %} 相关的活动。
|
||||
| `prebuild_configuration` | 包含与 {% data variables.product.prodname_github_codespaces %} 的预生成配置相关的活动。
|
||||
{%- endif %} {%- ifversion ghes %} | `pre_receive_environment` | 包含与预接收挂钩环境相关的活动。
|
||||
| `pre_receive_hook` | 包含与预接收挂钩相关的活动。
|
||||
{%- endif %} {%- ifversion ghes %} | `private_instance_encryption` | 包含与为企业启用专用模式相关的活动。
|
||||
{%- endif %} | `private_repository_forking` | 包含与允许存储库、组织或企业的专用和内部存储库分支相关的活动。
|
||||
{%- ifversion fpt or ghec %} | `profile_picture` | 包含与组织的配置文件图片相关的活动。
|
||||
{%- endif %} | `project` | 包含与项目板相关的活动。
|
||||
| `project_field` | 包含与项目板中的字段创建和删除相关的活动。
|
||||
| `project_view` | 包含与项目板中的视图创建和删除相关的活动。
|
||||
| `protected_branch` | 包含与受保护分支相关的活动。
|
||||
| `public_key` | 包含与 SSH 密钥和部署密钥相关的活动。
|
||||
| `pull_request` | 包含与拉取请求评审相关的活动。
|
||||
| `pull_request_review` | 包含与拉取请求评审相关的活动。
|
||||
| `pull_request_review_comment` | 包含与拉取请求评审评论相关的活动。
|
||||
| `repo` | 包含与组织拥有的存储库相关的活动。
|
||||
{%- ifversion fpt or ghec %} | `repository_advisory` | 包含与 {% data variables.product.prodname_advisory_database %} 中的安全通告相关的存储库级活动。 有关详细信息,请参阅“[关于 {% data variables.product.prodname_dotcom %} 安全通知](/github/managing-security-vulnerabilities/about-github-security-advisories)”。
|
||||
| `repository_content_analysis` | 包含与[为专用存储库启用或禁用数据使用](/articles/about-github-s-use-of-your-data)相关的活动。
|
||||
| `repository_dependency_graph` | 包含与为{% ifversion fpt or ghec %}专用{% endif %}存储库启用或禁用依赖项关系图相关的存储库级活动。 有关详细信息,请参阅“[关于依赖项关系图](/github/visualizing-repository-data-with-graphs/about-the-dependency-graph)”。
|
||||
{%- endif %} | `repository_image` | 包含与存储库映像相关的活动。
|
||||
| `repository_invitation` | 包含与邀请加入存储库相关的活动。
|
||||
| `repository_projects_change` | 包含与为存储库或组织中的所有存储库启用项目相关的活动。
|
||||
{%- ifversion ghec or ghes or ghae %} | `repository_secret_scanning` | 包含与机密扫描相关的存储库级活动。 有关详细信息,请参阅“[关于机密扫描](/github/administering-a-repository/about-secret-scanning)”。
|
||||
{%- endif %} {%- ifversion secret-scanning-audit-log-custom-patterns %} | `repository_secret_scanning_custom_pattern` | 包含与存储库中的机密扫描自定义模式相关的活动。 有关详细信息,请参阅“[为机密扫描定义自定义模式](/code-security/secret-scanning/defining-custom-patterns-for-secret-scanning)”。 {% endif %}{% ifversion secret-scanning-audit-log-custom-patterns %} | `repository_secret_scanning_push_protection` | 包含与存储库中的机密扫描自定义模式相关的活动。 有关详细信息,请参阅“[使用机密扫描保护推送](/code-security/secret-scanning/protecting-pushes-with-secret-scanning)”。
|
||||
{%- endif %} {%- ifversion fpt or ghec %} | `repository_visibility_change` | 包含与允许组织成员更改组织的存储库可见性相关的活动。
|
||||
{%- endif %} | `repository_vulnerability_alert` | 包含与 [{% data variables.product.prodname_dependabot_alerts %}](/code-security/dependabot/dependabot-alerts/about-dependabot-alerts) 相关的活动。
|
||||
{%- ifversion fpt or ghec %} | `repository_vulnerability_alerts` | 包含 {% data variables.product.prodname_dependabot_alerts %} 的存储库级配置活动。
|
||||
| `required_status_check` | 包含与受保护分支所需的状态检查相关的活动。
|
||||
{%- endif %} {%- ifversion ghec or ghes %} | `restrict_notification_delivery` | 包含与将电子邮件通知限制为企业的已批准或已验证域相关的活动。
|
||||
{%- endif %} {%- ifversion custom-repository-roles %} | `role` | 包含与[自定义存储库角色](/organizations/managing-peoples-access-to-your-organization-with-roles/managing-custom-repository-roles-for-an-organization)相关的活动。
|
||||
{%- endif %} {%- ifversion ghec or ghes or ghae %} | `secret_scanning` | 包含现有存储库中机密扫描的组织级配置活动。 有关详细信息,请参阅“[关于机密扫描](/github/administering-a-repository/about-secret-scanning)”。
|
||||
| `secret_scanning_new_repos` | 包含组织新建存储库中机密扫描的组织级配置活动。
|
||||
{%- endif %} {%- ifversion ghec or ghes or ghae %} | `security_key` | 包含与安全密钥注册和删除相关的活动。
|
||||
{%- endif %} {%- ifversion fpt or ghec %} | `sponsors` | 包含与赞助按钮相关的事件(请参阅“[在存储库中显示赞助按钮](/articles/displaying-a-sponsor-button-in-your-repository)”)。
|
||||
{%- endif %} {%- ifversion ghec or ghes or ghae %} | `ssh_certificate_authority` | 包含与组织或企业中的 SSH 证书颁发机构相关的活动。
|
||||
| `ssh_certificate_requirement` | 包含与要求成员使用 SSH 证书访问组织资源相关的活动。
|
||||
{%- endif %}{% ifversion sso-redirect %} | `sso_redirect` | 包含与自动重定向用户以进行登录相关的活动(请参阅“[为企业中的安全设置实施策略](/admin/policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-security-settings-in-your-enterprise#managing-sso-for-unauthenticated-users)”)。{% endif %} | `staff` | 包含与执行操作的站点管理员相关的活动。
|
||||
| `team` | 包含与组织中的团队相关的活动。
|
||||
| `team_discussions` | 包含与管理组织的团队讨论相关的活动。
|
||||
{%- ifversion ghec %} | `team_sync_tenant` | 包含与企业或组织的 IdP 进行团队同步相关的活动。
|
||||
{%- endif %} {%- ifversion fpt or ghes %} | `two_factor_authentication` | 包含与双因素身份验证相关的活动。
|
||||
{%- endif %} | `user` | 包含与企业或组织中的用户相关的活动。
|
||||
{%- ifversion ghec or ghes %} | `user_license` | 包含与占用企业许可席位并身为企业成员的用户相关的活动。
|
||||
{%- endif %} | `workflows` | 包含与 {% data variables.product.prodname_actions %} 工作流相关的活动。
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
ms.openlocfilehash: f246dbf76575a4338b8fa28ffbd5439c4121505f
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: "148184042"
|
||||
---
|
||||
{% note %}
|
||||
|
||||
注意:自动重定向用户以登录目前处于 {% data variables.product.prodname_emus %} 的 beta 版本,并可能会发生更改。
|
||||
|
||||
{% endnote %}
|
||||
@@ -1,5 +1,13 @@
|
||||
When you enable the allow list, the IP addresses you have configured are immediately added to the allow lists of organizations in your enterprise. If you disable the allow list, the addresses are removed from the organization allow lists.
|
||||
---
|
||||
ms.openlocfilehash: f88150299e77eff08e5db75a7ef5bf5bd460328b
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: "148184061"
|
||||
---
|
||||
启用允许列表时,您配置的 IP 地址将立即添加到企业中的组织允许列表中。 如果禁用允许列表,则地址将从组织允许列表中删除。
|
||||
|
||||
{% data reusables.identity-and-permissions.org-enterprise-allow-list-interaction %} For more information, see "[Managing allowed IP addresses for your organization](/organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization)."
|
||||
{% data reusables.identity-and-permissions.org-enterprise-allow-list-interaction %}有关详细信息,请参阅“[管理组织允许的 IP 地址](/organizations/keeping-your-organization-secure/managing-allowed-ip-addresses-for-your-organization)”。
|
||||
|
||||
You can choose to automatically add to your allow list any IP addresses configured for {% data variables.product.prodname_github_apps %} installed in your enterprise. The creator of a {% data variables.product.prodname_github_app %} can configure an allow list for their application, specifying the IP addresses at which the application runs. By inheriting their allow list into yours, you avoid connection requests from the application being refused. For more information, see "[Allowing access by GitHub Apps](#allowing-access-by-github-apps)."
|
||||
您可以选择将为组织中安装的 {% data variables.product.prodname_github_apps %} 配置的任何 IP 地址自动添加到允许列表中。 {% data variables.product.prodname_github_app %} 的创建者可以为其应用程序配置允许列表,指定应用程序运行的 IP 地址。 通过将允许列表继承到您的列表中,您可以避免申请中的连接请求被拒绝。 有关详细信息,请参阅“[允许 GitHub 应用进行访问](#allowing-access-by-github-apps)”。
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
ms.openlocfilehash: 5ce9d5cc32dc07a1fe4ead5b16b75a7b10509467
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: "148184041"
|
||||
---
|
||||
组织所有者可以向其组织的允许列表添加其他条目,但他们无法管理从企业帐户的允许列表继承的条目,企业所有者也无法管理添加到组织的允许列表的条目。
|
||||
@@ -1,8 +1,16 @@
|
||||
1. Optionally, to require members to use SSH certificates, select **Require SSH Certificates**, then click **Save**.
|
||||

|
||||
---
|
||||
ms.openlocfilehash: abb4b47406958c1933c5c2bdf7d7e2e2c1091907
|
||||
ms.sourcegitcommit: 7a74d5796695bb21c30e4031679253cbc16ceaea
|
||||
ms.translationtype: HT
|
||||
ms.contentlocale: zh-CN
|
||||
ms.lasthandoff: 11/28/2022
|
||||
ms.locfileid: "148184039"
|
||||
---
|
||||
1. (可选)若要要求成员使用 SSH 证书,请选择“需要 SSH 证书”,然后单击“保存” 。
|
||||

|
||||
|
||||
{% note %}
|
||||
|
||||
**Note:** When you require SSH certificates, the requirement does not apply to authorized third-party integrations or to {% data variables.product.prodname_dotcom %} features such as {% data variables.product.prodname_actions %}{% ifversion fpt or ghec %} and {% data variables.product.prodname_codespaces %}{% endif %}, which are trusted environments within the {% data variables.product.prodname_dotcom %} ecosystem.
|
||||
注意:需要 SSH 证书时,该要求不适用于获得授权的第三方集成或 {% data variables.product.prodname_dotcom %} 功能,例如 {% data variables.product.prodname_actions %}{% ifversion fpt or ghec %} 和 {% data variables.product.prodname_codespaces %}{% endif %},它们是 {% data variables.product.prodname_dotcom %} 生态系统中的受信任环境。
|
||||
|
||||
{% endnote %}
|
||||
|
||||
Reference in New Issue
Block a user