> For the complete documentation index, see [llms.txt](https://manual.dxable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://manual.dxable.com/clickup/integrations-and-clickup-api/integrations/bitbucket-integration.md).

# Bitbucket インテグレーション

[Bitbucket ](https://clickup.com/bitbucket-integration)のコミット、ブランチ、プル リクエストをClickUpタスクと統合します。 これにより、次のことが可能になります。

* タスクに関連するすべての Bitbucket アクティビティをClickUpで直接表示します。
* オプションで、新しい Bitbucket アクティビティ項目がタスクに追加されたときに[ClickUp通知](https://help.clickup.com/hc/en-us/articles/6326004036887-Notifications-overview)を受信します。
* [ClickUpタスク](https://help.clickup.com/hc/en-us/articles/6309944875671-Task-Overview)に自動的 (または手動で) アタッチします。
* \#{taskID}\[status]という形式を使用してコミットにClickUpタスク ID を追加することで、Bitbucket アクションで[ステータス](https://help.clickup.com/hc/en-us/articles/6309452618647-Create-and-manage-custom-statuses)を自動的に変更します。例： #1abc2de\[closed]

<img src="/files/pImXF09qS7r2TFlijsYa" alt="Screenshot of a Bitbucket task activity notification." width="194">

### **必要なもの** <a href="#gjdgxs" id="gjdgxs"></a>

* Bitbucket 統合は[すべてのClickUpプラン](https://clickup.com/pricing)で利用できます。
* 統合を設定できるのは、ワークスペースの[オーナーと管理者のみ](https://help.clickup.com/hc/en-us/articles/6310033667223-User-Roles)です。
* [Guests](https://help.clickup.com/hc/en-us/articles/6310022323991-Guests-overview)はBitbucket 統合を使用できません。

### **ClickUp がBitbucket に接続することを承認する** <a href="#id-30j0zll" id="id-30j0zll"></a>

ClickUpと Bitbucket.org またはセルフホスト バージョンの Bitbucket を統合できます。 認証プロセスは、使用する Bitbucket のバージョンによって異なります。

* [オプション 1 ： Bitbucket.org アカウントを認証する](https://help.clickup.com/hc/en-us/articles/6305592182423-Bitbucket-integration#step-1-option-1-authorize-bitbucketcom-)
* [オプション 2 ：セルフホスト型 Bitbucket アカウントを承認する](https://help.clickup.com/hc/en-us/articles/6305592182423-Bitbucket-integration#step-1-option-2-authorize-self-hosted-bitbucket)

### **オプション 1 ：** [**Bitbucket.org**](http://bitbucket.org/)**アカウントを認証する** <a href="#id-1fob9te" id="id-1fob9te"></a>

{% hint style="info" %}
***注：***[*チームのスペース*](https://help.clickup.com/hc/en-us/articles/13856392825367-The-Hierarchy-overview)*にリポジトリを添付できるのはClickUp*[*管理者のみ*](https://help.clickup.com/hc/en-us/articles/6309225399703-Permissions-overview)*です。*
{% endhint %}

1. [App Center ](https://help.clickup.com/hc/en-us/articles/12580135233559-App-Center-overview)を開きます。
2. **\[Bitbucket]** をクリックします。
3. **\[Activate Bitbucket for Team]**&#x3092;クリックします。
4. **\[+ Add Bitbucket]**&#x3092;クリックします。
5. **\[No, I use bitbucket.com]**&#x3092;選択し、**\[Link Bitbucket]**&#x3092;クリックします。<br>

   <figure><img src="/files/kD2wIFaIZ2UCcrE8wW6A" alt="" width="445"><figcaption></figcaption></figure>
6. ログインしていない場合は、Bitbucket.orgアカウントにログインするように求められます。
7. 必要な権限を確認し、**\[Grant access]**&#x3092;クリックします

<figure><img src="/files/OaNunVkPeGlErVCiUl0w" alt="" width="375"><figcaption></figcaption></figure>

アカウントを承認したので、次の手順に進み、 [Bitbucket リポジトリをワークスペースに接続します](https://help.clickup.com/hc/en-us/articles/6305592182423-Bitbucket-integration#h_317574b18f)。

### **オプション 2 ：セルフホスト型**[**Bitbucket**](https://clickup.com/integrations/bitbucket)**アカウントを承認する** <a href="#id-3znysh7" id="id-3znysh7"></a>

セルフホスト版の Bitbucket を使用している場合は、HTTP アクセス トークンを作成してClickUpを承認できます。 [Bitbucket HTTP アクセス トークン](https://confluence.atlassian.com/bitbucketserver/personal-access-tokens-939515499.html)の詳細をご覧ください。

1. [App Center ](https://help.clickup.com/hc/en-us/articles/12580135233559-App-Center-overview)を開きます。
2. **\[Bitbucket]**&#x3092;クリック
3. **\[Activate Bitbucket for Team]**&#x3092;クリック
4. **\[+ Add Bitbucket]**&#x3092;クリック
5. **\[Yes, I use a hosted version of Bitbucket]**&#x3092;選択し、Bitbucket で次の手順に従います。<br>

   <figure><img src="/files/bKf9bKXh9dvyo6RBHtdj" alt="" width="440"><figcaption></figcaption></figure>
6. ホストされている Bitbucket で、右上にあるユーザー プロファイル アバターをクリックします。
7. **\[Manage account]**&#x3092;選択します。<br>

   <figure><img src="/files/Xa1u1Zv0QMBE57cC1u4x" alt="" width="563"><figcaption></figcaption></figure>
8. 左サイドバー&#x306E;**\[HTTP** **access tokens]**&#x3092;選択しま&#x3059;**。**
9. **Projects**と**Repositories**の両方に対して**admin権限**を持つ新しいアクセス トークンを作成します。
10. **HTTP access token**をコピーします。
11. ClickUpに戻り、コピーしたトークン&#x3092;**\[Access token]**&#x30D5;ィールドに貼り付けます。
12. 以下の Bitbucket アカウントの詳細を入力：
    * Host URL
    * Canonical URL (オプション)<br>

      <figure><img src="/files/ckylePldpcdkYoW5jVa3" alt="" width="421"><figcaption></figcaption></figure>
13. 設定を選択してください：
    * ホストされたシークレットを使用しますか?
    * 固定IP
14. **\[Link Bitbucket]**&#x3092;クリックします。

アカウントを承認したので、次の手順に進み、 [Bitbucket リポジトリをワークスペースに接続します](https://help.clickup.com/hc/en-us/articles/6305592182423-Bitbucket-integration#h_317574b18f)。

### **Bitbucket リポジトリをワークスペースにアタッチする** <a href="#id-2et92p0" id="id-2et92p0"></a>

ClickUpでは[ワークスペース内で複数の人がBitbuckett認証することができ、](https://help.clickup.com/hc/en-us/articles/6309225399703-Permissions-overview)ワークスペースと共有するリポジトリをカスタマイズすることもできます。

つまり、すべてのリポジトリをアタッチしなくても個人アカウントを承認でき、アタッチするリポジトリをカスタマイズできます。

リポジトリをアタッチしても、ユーザーにリポジトリのコードベースへのアクセス権が付与されるわけでは**ありません**。 ユーザーは、指定した[スペース](https://help.clickup.com/hc/en-us/articles/6309390855319-How-to-Create-a-Space)にそのリポジトリの履歴項目を添付できるようになります。

{% hint style="info" %}
***注：**&#x7BA1;理者アクセス権を持つ Bitbucket リポジトリのみを関連付けることができます。*
{% endhint %}

<figure><img src="/files/aFw3GRQHkVYuSFHK3ibq" alt="" width="563"><figcaption></figcaption></figure>

### **ステップ3 ：リポジトリに添付するスペースを選択する** <a href="#tyjcwt" id="tyjcwt"></a>

**Team Repos**の右側にあるドロップダウンを展開すると、リポジトリがアタッチされるスペースをカスタマイズできます。 Bitbucket アイテムをタスクに添付するには、スペースをリポジトリに添付する必要があります。

<img src="/files/3o69oupARs7GPLzIjIB6" alt="Screenshot linking Bitbucket repositories with ClickUp Spaces." width="563">

### **ClickUpで Bitbucket アクティビティを自動的に関連付ける** <a href="#id-3dy6vkm" id="id-3dy6vkm"></a>

ClickUp は新しいアクティビティを自動的に取得し、タスクに関連付けます。

これを有効にするには、次の操作を行う必要があります。

**プル リクエストのタイトル、ブランチ名、またはコミット メッセージの任意の部分に、次のいずれかの形式でClickUp**[**タスク ID**](https://help.clickup.com/hc/en-us/articles/6309890818071-Task-IDs-overview)**を追加します。**

\#{task\_id}

CU-{task\_id}

{custom\_task\_id}

例えば​​：

\#1abc2de

CU-1abc2de

prefix-1

### **Bitbucketアクティビティを手動で関連付ける** <a href="#id-1t3h5sf" id="id-1t3h5sf"></a>

<figure><img src="/files/D2h1R4Yg9rLxGpO7YxF6" alt="" width="151"><figcaption></figcaption></figure>

1. 任意のタスクのBitbucketアイコンをクリックします
2. リポジトリを選択
3. Branchを選択
4. コミットを添付する

### **Bitbucket 経由でタスクのStatusを自動的に変更する** <a href="#id-4d34og8" id="id-4d34og8"></a>

コミットまたはプルリクエストからタスクのステータスを変更することもできます。\
これを行うには、次の手順を実行します。

コミット メッセージの任意の部分に\
ClickUp[タスク ID](https://help.clickup.com/hc/en-us/articles/6309890818071-Task-IDs-overview)を追加し、括弧内に希望するステータスを追加します。

例： **#ud5b\[ready]**

<figure><img src="/files/6DsWc5G321GtWPHfDhe3" alt="" width="420"><figcaption></figcaption></figure>

{% hint style="info" %}
**注**： Bitbucket からClickUpにタスク ID をリンクすることもできます。
{% endhint %}

<img src="/files/zWUSOcT5OykOZtik01Kk" alt="Screenshot of a commit in Bitbucket." width="563">

1. リポジトリ設定に移動
2. **\[Links]**&#x3092;クリック
3. 新しいリンクを追加
4. Link type：**Custom**
5. Link URL ： [app.clickup.com/t/\1](http://app.clickup.com/t/%5C1)
6. Link key： CU-(\w{3,10})(\\\[\w+\\])?

これはコミットとプルリクエストの両方で機能します。

### **Actions** <a href="#id-2s8eyo1" id="id-2s8eyo1"></a>

Quick actionsを使用して、 ClickUp内から新しいブランチをすばやく簡単に作成します。

1. **\[Bitbucket icon]**&#x3092;クリックしてGitモーダルを開きます
2. 左側には、提案された名前、ローカルで新しいブランチをチェックアウトしてリンクするコマンド、単一のコミットをリンクするコマンド、プルリクエストを開くコマンドなど、自動生成されたさまざまなクイックコピーオプションがあります。

![Screenshot of the git branch modal on a ClickUp task.](/files/h6kMi8BKcYXUVTyKluOF)

これらのオプションで使用される自動生成された名前は、Bitbucket 統合設定でカスタマイズできます。

<img src="/files/FUWVHkSmtyft7RErIuRs" alt="Screenshot of the Bitbucket branch name settings." width="563">

### **プルリクエスト** <a href="#id-17dp8vu" id="id-17dp8vu"></a>

これで、 ClickUp内からプル リクエストを作成したり、既存のプル リクエストをリンクしたりできるようになりました。ClickUpで新しいプルリクエストを作成するには：

1. リンクするタスクの Bitbucket アイコンをクリックし、\[New Pull Request]ボタンをクリックします。
2. モーダルでは、提案されたプル リクエストのタイトルに、提案されたタイトルが事前に入力されます。 自動生成されたタイトルが気に入らない場合は、Bitbucket 統合設定で調整できます。
3. ターゲットブランチとソースブランチを選択する
4. descriptionを入力
5. プルリクエストを作成する

ClickUpでプル リクエストを作成するか、既存のプル リクエストをリンクするとすぐに、関連付けられたClickUpタスクへのリンクがプル リクエストに追加されます。

<img src="/files/SMXw7gQXXUQGVXGQoxYD" alt="Screenshot of a task linked notification in Bitbucket." width="563">

プル リクエストがリンクされると、リンクされた ClickUp タスク内から、誰がそれを開いたか、ClickUp担当者 (割り当てられている場合)、CI/CD ステータス、プル リクエスト ステータス (オープン、レビュー要求済み、レビュー中、マージ済み、クローズ済み) をすべて確認できるようになります。

<img src="/files/cgMCH1n66HGSXy57iehk" alt="Screenshot of pull request activity in ClickUp&#x27;s git modal." width="563">

### **Bitbucket で問題が発生していますか?** <a href="#id-3rdcrjn" id="id-3rdcrjn"></a>

[トラブルシューティングのドキュメント](https://help.clickup.com/hc/en-us/articles/6327889851287-Troubleshooting-Bitbucket)を読むか、Bitbucket カスタマー サポートに[こちら](https://support.atlassian.com/bitbucket/)からお問い合わせください。

### **Bitbucket統合をRemove** <a href="#id-26in1rg" id="id-26in1rg"></a>

統合を無効にできるのは、ワークスペースのオーナーと管理者のみです。

統合を削除するには、 App Centerから次の手順を実行します。

1. **\[Bitbucket]**&#x3092;選択します。
2. 下にスクロールして、**\[authorization for my Bitbucket repositories]**&#x3092;クリックします。


---

# 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:

```
GET https://manual.dxable.com/clickup/integrations-and-clickup-api/integrations/bitbucket-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
