> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/docs/docs-ja/pr-torirsugtingu/azure-pipelines-ci-pr-gating-via-aikido-dashboard-with-a-personal-access-token.md).

# Azure DevOps PRゲーティング

Azure DevOps の PR ゲーティングでは、マージ前に新たに導入された問題をブロックし、プルリクエストがどの既存の問題を解決するかを確認できます。

{% hint style="info" %}
この連携は、 **新しく作成したユーザー** Azure 内の（例：Aikido という名前のもの）です。コメント機能では、連携を設定したユーザーの名前が使用されます。
{% endhint %}

{% hint style="warning" %}
連携を正しく動作させるには、組織内のすべてのプロジェクトで service hooks を管理できる必要があることにご注意ください。これは通常、Azure ワークスペース管理者に予約された権限です。
{% endhint %}

{% hint style="warning" %}
Aikido 経由の Azure DevOps PR ゲーティングは、Azure Repos Git リポジトリのみをサポートします。Team Foundation Version Control (TFVC) リポジトリは、PR ゲーティングや Code Quality ゲートではサポートされていません。
{% endhint %}

組織が Microsoft Entra に接続されている場合、PAT の代わりに、有効期限がなく、シークレットを保存しないサービス プリンシパルを使用できます。参照してください。 [Entra サービス プリンシパルを使用した Azure DevOps PR ゲーティング](/docs/docs-ja/pr-torirsugtingu/azure-devops-pr-gating-with-an-entra-service-principal.md).

**まず**、Aikido の PAT 管理ページに移動してください。これは [こちら](https://app.aikido.dev/settings/integrations/azure-devops/checks/personal-access-token).

**次に**、Azure DevOps で PAT を生成するには、以下の手順に従ってください。

## PAT を生成する <a href="#generating-a-pat" id="generating-a-pat"></a>

1. 「**ユーザー設定**' > '**個人用アクセストークン**』、ここに示すヘッダーアイコンから

   ![検索およびプロフィールオプションの近くで強調表示されたユーザー設定メニュー。](https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-dbdf98d9c26bf068a22f453cd3fa94fb3b0d392f%2Fucarecdn-6a98aaa9-d4dd-439c-8523-1243b85bccd2.png?alt=media)

   またはショートカットリンク「**ここでアクセストークンを生成**」を Aikido の個人用アクセストークン管理ページで。

   ![個人用アクセストークンの入力欄。トークンを生成または更新するオプション付き。](https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-0fc8dc37da02d72f78b7bba57748ab5518334b62%2Fucarecdn-1cf64447-e410-41ee-90d3-f54530e55d9b.png?alt=media)
2. 最終的には、次のようなページになります。

   ![Azure DevOps: 個人用アクセストークンはまだ作成されていません。新しいトークンを生成するオプションがあります。](https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-d893201a3719b19f2dda8b241d48dce920cbdd3b%2Fucarecdn-9e46833a-3d8c-484d-a9fe-d444b6b6da34.png?alt=media)
3. Aikido ワークスペースと同じ組織が選択されていることを確認してください。'**アクセス範囲**' ボタン（右上）
4. 「**新しいトークン**"
5. 次に、トークンに対して次の権限を選択する必要があります。 **作業項目（読み取りと書き込み）**, **コード（読み取りと書き込み）**, **コード（ステータス）** と **ビルド（読み取り）**

   ![特定のセキュリティ権限とリポジトリ権限を持つカスタム個人用アクセストークンを作成しています。](https://715870456-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyKbzcQGrx7UtrG0nPZZ7%2Fuploads%2Fgit-blob-571c2d2b193e2f56b51ebb4f7f65cf5ccf969e6f%2Fucarecdn-33865be9-0c62-4642-8ae7-b47280f0f4be.png?alt=media)
6. 有効期限は「カスタムで定義」を使用し、1 年後に設定してください。これは、Azure DevOps でトークンに設定できる最大有効期間です。
7. 「をクリックします**作成**」をクリックしてアクセストークンを作成します
8. 次の画面でトークンをコピーし、Aikido の個人用アクセストークン管理ページに入力してください。

{% hint style="info" %}
初期設定後に新しいリポジトリを追加した場合は、それらのリポジトリも設定する必要があります。

既定の構成を自動的に適用するには、こちらを参照してください [新しいリポジトリに対するデフォルトのPR/MRゲーティング設定](/docs/docs-ja/pr-torirsugtingu/aikido-ci-gating-functionality/default-pr-mr-gating-configuration-for-new-repositories.md).
{% endhint %}

## PR コメントから直接問題を無視する <a href="#ignore-issues-directly-from-pr-comments" id="ignore-issues-directly-from-pr-comments"></a>

Aikido が検出結果に対してインラインの PR コメントを投稿した場合、コメントに次のように返信することで Azure DevOps から直接その問題を無視できます:

`@AikidoSec ignore: [無視する理由]`

例:

`@AikidoSec ignore: このシークレットはテスト専用です。`

これは、Aikido プラットフォームで手動で問題を無視するのと同じ操作です:

* 問題は Aikido で無視済みとしてマークされます。
* 無視理由が保存されます。
* すべてのブロッキング問題が解決または無視されると、PR ゲーティングは緑色になります。

{% hint style="info" %}
無視権限がない場合、このコメントは次の場所にリクエストを作成します: [承認受信箱](/docs/docs-ja/hajimeni/core-functionalities/approval-inbox-for-ignored-issues.md) すぐに問題を無視する代わりに、検出結果は管理者が承認または却下するまでフィードに残ります。
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.aikido.dev/docs/docs-ja/pr-torirsugtingu/azure-pipelines-ci-pr-gating-via-aikido-dashboard-with-a-personal-access-token.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
