> 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-torirsunogtingu/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" %}
この連携を正しく動作させるには、組織内のすべてのプロジェクトでサービス フックを管理できる必要があることにご注意ください。これは通常、Azure ワークスペース管理者に予約された権限です。
{% endhint %}

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

**まず**、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. 「**ユーザー設定**' > '**個人用アクセストークン**」へ、ここに示されているヘッダーアイコンから移動します

   ![検索とプロフィールのオプションの近くで強調表示されたユーザー設定メニュー。](/files/ffe534f5d30f1a21081b46fc36da183fc4da741f)

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

   ![トークンを生成または更新するオプション付きの個人用アクセストークン入力欄。](/files/d09ceb418f516ce2225407c3936547220f63084f)
2. 最終的に、次のようなページになります

   ![Azure DevOps: 個人用アクセストークンはまだ作成されていません。新しいトークンを生成するオプションがあります。](/files/6c7ea27260f6f369837771fc9d3c354d37e8dfe4)
3. Aikido ワークスペースと同じ組織が「**アクセス範囲**」ボタンから右上で選択されていることを確認してください
4. 「**新しいトークン**"
5. 次に、トークンに対して以下の権限を選択する必要があります: **作業項目（読み取りと書き込み）**, **コード（読み取りと書き込み）**, **コード（ステータス）** および **ビルド（読み取り）**

   ![特定のセキュリティおよびリポジトリ権限を持つカスタムの個人用アクセストークンを作成します。](/files/88c546d0ba5140b3b8f46f32ba4742664b63369f)
6. 有効期限は「カスタム」を使用し、1 年後に設定します。これは Azure DevOps でトークンの有効期間として許可される最大期間です。
7. 「**作成**」をクリックしてアクセストークンを作成します
8. 次の画面でトークンをコピーし、Aikido の個人用アクセストークン管理ページに入力します。

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

既定の設定を自動的に適用するには、こちらを参照してください [新しいリポジトリの既定の PR/MR ガーティング設定](/docs/docs-ja/pr-torirsunogtingu/aikido-ci-gating-functionality/default-pr-mr-gating-configuration-for-new-repositories.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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
