イベント ペイロード

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

イベントに関連付けられた Webhook がある場合、Bitbucket はイベントが発生するたびに Webhook のサーバー URL にイベント リクエストを送信します。このページでは、これらのリクエストの構造について説明します。 

HTTPS エンドポイントに関連付けられた Webhook のイベント ペイロード リクエストを Bitbucket が送信する場合、URL に公的な認証局が署名した有効な SSL 証明書があることを確認してください。

また、ホワイトリストに追加する Bitbucket Cloud IP アドレスもご確認ください。


The following payloads contain some of the five common entity typesU serRepositoryIssueComment, and Pull Request which have consistent representations in all the payloads where they appear. For example, the actor property in the repo:push payload is a representation of the event's user. The common entities section includes examples of these entities.

HTTP ヘッダー

すべてのイベント ペイロードには次の HTTP ヘッダーがあります。

HTTP ヘッダー 説明
X-Event-Key The event key of the event that triggers the webhook (for example, repo:push).
X-Hook-UUID イベントがトリガーする Webhook の UUID。Webhook の UUID の詳細については、「Webhook リソース」を参照してください。
X-Request-UUID リクエストの UUID。
X-Attempt-Number Bitbucket がペイロードの送信を試みた回数。最初のリクエストの後、以前の試行が失敗した場合、Bitbucket はさらに 2 回ペイロードの送信を試みます。試行回数には、[リクエストの再送] ボタンから実行したすべてのユーザーの操作も含まれます。

リポジトリ イベント

リポジトリで発生する次のイベント用に Webhook を作成できます。

プッシュ

A user pushes 1 or more commits to a repository. This payload, with an event key of repo:push, provides the following fields:

パラメーター 説明
actor The user who pushed the commits. See the Owner entity sample.
repository The repository with the commits. See the Repository entity sample.
push

The details of the push, which includes the changes property. This property contains an array with all the references that the push updated and the following properties:

  • new: An object containing information about the state of the reference after the push. When a branch is deleted, new is null. new contains these properties:
    • type : The type of reference with the change.
      • branch, or tag  for Git repositories.
      • named_branch, bookmark or tag for Mercurial repositories.
    • name: The name of the branch, tag, named branch, or bookmark.
    • target: The details of the most recent commit after the push.
    • links: Links to the reference in the API (self and commits) and on Bitbucket (html).
  • oldAn object containing information about the state of the reference before the push. When a branch is created, old is null. old contains these properties:
    • type : The type of reference with the change:
      • branch, tag, or annotated_ tag for Git repositories.
      • named_branch or bookmark for Mercurial repositories.
    • nameThe name of the branch, tag, named branch, or bookmark.
    • target: The details of the most recent commit before the push.
    • links: Links to the reference in the API ( self and commits ) and on Bitbucket ( html ).
  • links Links to the change on Bitbucket (html), in the API (commits), and in the form of a diff (diff).
  • createdtrue or false to indicate whether the reference is new.
  • closedtrue or false to indicate whether the reference is old.
  • forcedtrue or false to indicate whether the push was forced.
  • commits: An array containing up to 5 of the most recent commits pushed to the reference. The array for a push with more than 5 commits is truncated, which is indicated by the truncated property. In addition to new commits, the array might also include the following commits:
    • そのリファレンスにプッシュされていないコミット - リファレンスが最近作成された場合、リポジトリへプッシュされたが、この特定のリファレンスにはプッシュされていないコミットがある可能性があります。この場合、配列には、このような以前プッシュしたコミットも含まれます。たとえば、多数のコミットがある master ブランチから新しいフィーチャー ブランチを作成し、そこに 1 件のコミットをプッシュすると、ペイロードの配列には、5 件のコミット (すべてがそのフィーチャー ブランチにとって新しいコミット) が含まれます。これらのコミットには、先ほど行った 1 つのコミットと、master ブランチの最新コミット 4 件が含まれます。
    • 強制的にプッシュされたコミット - リベースの後に強制プッシュを実行すると、古いリファレンスのコミットはすべて新しいリファレンス内のコミットに置き換えられます。その結果、配列には新しいリファレンスのコミット部分が含まれるようになります。配列には、リベースまたは強制プッシュの際に削除されたコミットは含まれません。
  • truncated: true or false to indicate whether Bitbucket truncated the commits array in this payload. The array is truncated when more than 5 commits were pushed. In that case, the commits array includes only the most recent 5 commits.
repo:push payload
{    
  "actor": Owner,
  "repository": Repository,
  "push": {
    "changes": [
      {
        "new": {
          "type": "branch",
          "name": "name-of-branch",
          "target": {
            "type": "commit",
            "hash": "709d658dc5b6d6afcd46049c2f332ee3f515a67d",
            "author": User,
            "message": "new commit message\n",
            "date": "2015-06-09T03:34:49+00:00",
            "parents": [
              {
                "type": "commit",
                "hash": "1e65c05c1d5171631d92438a13901ca7dae9618c",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/8cbbd65829c7ad834a97841e0defc965718036a0"
},
                  "html": {
                    "href": "https://bitbucket.org/user_name/repo_name/commits/8cbbd65829c7ad834a97841e0defc965718036a0"
                  }
                }
              }
            ],
            "links": {
              "self": {
                "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/c4b2b7914156a878aa7c9da452a09fb50c2091f2"
},
              "html": {
                "href": "https://bitbucket.org/user_name/repo_name/commits/c4b2b7914156a878aa7c9da452a09fb50c2091f2"
              }
            }
          },
          "links": {
            "self": {
              "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/refs/branches/master"
},
            "commits": {
              "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master"
},
            "html": {
              "href": "https://bitbucket.org/user_name/repo_name/branch/master"
            }
          }
        },
        "old": {
          "type": "branch",
          "name": "name-of-branch",
          "target": {
            "type": "commit",
            "hash": "1e65c05c1d5171631d92438a13901ca7dae9618c",
            "author": User,
            "message": "old commit message\n",
            "date": "2015-06-08T21:34:56+00:00",
            "parents": [
              {
                "type": "commit",
                "hash": "e0d0c2041e09746be5ce4b55067d5a8e3098c843",
                "links": {
                  "self": {
                    "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/9c4a3452da3bc4f37af5a6bb9c784246f44406f7"
},
                  "html": {
                    "href": "https://bitbucket.org/user_name/repo_name/commits/9c4a3452da3bc4f37af5a6bb9c784246f44406f7"
                  }
                }
              }
            ],
            "links": {
              "self": {
                "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commit/b99ea6dad8f416e57c5ca78c1ccef590600d841b"
},
              "html": {
                "href": "https://bitbucket.org/user_name/repo_name/commits/b99ea6dad8f416e57c5ca78c1ccef590600d841b"
              }
            }
          },
          "links": {
            "self": {
              "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/refs/branches/master"
},
            "commits": {
              "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits/master"
},
            "html": {
              "href": "https://bitbucket.org/user_name/repo_name/branch/master"
            }
          }
        },
        "links": {
          "html": {
            "href": "https://bitbucket.org/user_name/repo_name/branches/compare/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b"
          },
          "diff": {
            "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/diff/c4b2b7914156a878aa7c9da452a09fb50c2091f2..b99ea6dad8f416e57c5ca78c1ccef590600d841b"
          },
          "commits": {
            "href": "https://api.bitbucket.org/2.0/repositories/user_name/repo_name/commits?include=c4b2b7914156a878aa7c9da452a09fb50c2091f2&exclude=b99ea6dad8f416e57c5ca78c1ccef590600d841b"
          }
        },
        "created": false,
        "forced": false,
        "closed": false,
        "commits": [
          {
            "hash": "03f4a7270240708834de475bcf21532d6134777e",
            "type": "commit",
            "message": "commit message\n",
            "author": User,
            "links": {
              "self": {
                "href": "https://api.bitbucket.org/2.0/repositories/user/repo/commit/03f4a7270240708834de475bcf21532d6134777e"
              },
              "html": {
                "href": "https://bitbucket.org/user/repo/commits/03f4a7270240708834de475bcf21532d6134777e"
              }
            }
          }
        ],
        "truncated": false
      }
    ]
  }
}

フォーク

A user forks a repository. This payload, with an event key of repo:fork, provides the following fields:

パラメーター 説明
actor The user who forks the repository. This user is also the owner of the fork. See the Owner entity sample.
repository The original repository that is forked. See the Repository entity sample.
fork

The new repository that is a result of the fork. See the Repository entity sample .

repo:fork
{
"actor": Owner,
  "repository": Repository,
  "fork": Repository
}

更新日

A user updates the  Name Description Website , or  Language  fields under the  Repository details  page of the repository settings. This payload, with an event key of  repo:updated , provides the following fields:

パラメーター 説明
actor The user who made the update. See the Owner entity sample.
repository The repository updated. See the Repository entity sample.
changes

変更の詳細 (新しい設定と以前の設定内容を含む)。ペイロードには、値が変更されたプロパティのみが含まれます。

  • name: The new Name of the repository and its old name.
  • website: The new Website for the repository and its old website.
  • language: The new Language for the repository and its old language.
  • linksnew and old links to the repository's avatar (avatar), the repository in the API (self), and the repository in Bitbucket (html).
  • description: The new Description of the repository and its old description.
  • full_name: The new and old full name of the repository, which includes its team or user account name, a slash (/), and the repository name.
repo:updated payload
{
"actor": Owner,
"repository": Repository,
"changes": {
"name": {
      "new": "repository",
      "old": "repository_name"
    }
    "website": {
      "new": "http://www.example.com/",
      "old": ""
    }
"language": {
      "new": "java",
      "old": ""
    }
    "links": {
"new": {
        "avatar": {
"href": "https://bitbucket.org/teamawesome/repository/avatar/32/"
        },
"self": {
"href": "https://api.bitbucket.org/2.0/repositories/teamawesome/repository"
}
        "html": {
          "href": "https://bitbucket.org/teamawesome/repository"
        }
      },
      "old": {
        "avatar": {
          "href": "https://bitbucket.org/teamawesome/repository_name/avatar/32/"
        },
        "self": {
          "href": "https://api.bitbucket.org/2.0/repositories/teamawesome/repository_name"
        },
        "html": {
          "href": "https://bitbucket.org/teamawesome/repository_name"
        }
      }
},
    "description": {
      "new": "This is a better description.",
      "old": "This is a description."
    }
    "full_name": {
      "new": "teamawesome/repository",
      "old": "teamawesome/repository_name"
    }
}
}

転送

A repository transfer is accepted. This with an event key of repo:transfer, provides the following fields:

パラメーター 説明
actor
The user who transferred the repository. See the Owner entity sample.
repository
The repository that was transferred. See the Repository entity sample .
previous_owner
The previous owner of the repository. See the Owner entity sample .
repo:transfer ペイロード
{
"actor": Owner,
"repository": Repository,
"previous_owner": Owner
}


作成したコメントのコミット

A user comments on a commit in a repository. This payload, with an event key of repo:commit_comment_created, provides the following fields:

パラメーター 説明
actor The user who comments on the commit. See the Owner entity sample.
comment The comment created. See the Comment entity sample.
repository The repository with the commit. See the Repository entity sample.
commit

コミットの詳細 (ハッシュを含む)。

repo:commit_comment_created ペイロード
{
"actor": Owner,
"comment": Comment,
"repository": Repository,
"commit": {
"hash": "d3022fc0ca3d65c7f6654eea129d6bf0cf0ee08e"
}
}

ビルド ステータスの作成

A build system, CI tool, or another vendor recognizes that a user recently pushed a commit and updates the commit with its status. This payload, with an event key of repo:commit_status_created, provides the following fields:

パラメーター 説明
actor The user who made the commit. See the Owner entity sample.
repository The repository with the commit. See the Repository entity sample.
commit_status

コミット ステータスの詳細。次のプロパティが含まれています。

  • name: The name of the commit status.
  • description : The description of the commit status.
  • state: The commit status, which is either INPROGRESS, SUCCESSFUL, or FAILED.
  • key: The key that the system or vendor provides to distinguish the status from other statuses associated with the same commit.
  • url: The URL to the vendor or system that produces the status.
  • type :   The type of commit status. Currently, Bitbucket can only associate commit statuses with a build, so the only supported type is build.
  • created_on: The date and time (in ISO 8601 format) the commit status was created. 
  • updated_on: The date and time (in ISO 8601 format) the commit status was last updated.
  • links: Links to representations of the commit and commit status in the API or on Bitbucket.
repo:commit_status_created ペイロード
{
"actor": Owner,
"repository": Repository,
"commit_status": {
"name": "Unit Tests (Python)",
"description": "Build started",
"state": "INPROGRESS",
"key": "mybuildtool",
"url": "https://my-build-tool.com/builds/MY-PROJECT/BUILD-777",
"type": "build",
"created_on": "2015-11-19T20:37:35.547563+00:00",
"updated_on": "2015-11-19T20:37:35.547563+00:00",
    "links": {
"commit": {
"href": "http://api.bitbucket.org/2.0/repositories/tk/test/commit/9fec847784abb10b2fa567ee63b85bd238955d0e"
},
"self": {
"href": "http://api.bitbucket.org/2.0/repositories/tk/test/commit/9fec847784abb10b2fa567ee63b85bd238955d0e/statuses/build/mybuildtool"
}
}
}
}

ビルド ステータスの更新

A build system, CI tool, or another vendor recognizes that a commit has a new status and updates the commit with its status. This payload, with an event key of repo:commit_status_updated, provides the following fields:

パラメーター 説明
actor The user who made the commit. See the Owner entity sample.
repository The repository with the commit. See the Repository entity sample.
commit_status

コミット ステータスの詳細。次のプロパティが含まれています。

  • name: The name of the commit status.
  • description: The description of the commit status.
  • state: The commit status, which is either INPROGRESS, SUCCESSFUL, or FAILED.
  • key: The key that the system or vendor provides to distinguish the status from other statuses associated with the same commit.
  • url: The URL to the vendor or system that produces the status.
  • type: The type of commit status. Currently, Bitbucket can only associate commit statuses with a build, so the only supported type is build.
  • created_on: The date and time (in ISO 8601 format) the commit status was created. 
  • updated_on: The date and time (in ISO 8601 format) the commit status was last updated.
  • links: Links to representations of the commit and commit status in the API or on Bitbucket.
repo:commit_status_updated ペイロード
{
"actor": Owner,
"repository": Repository,
"commit_status": {
"name": "Unit Tests (Python)",
"description": "All tests passed",
"state": "SUCCESSFUL",
"key": "mybuildtool",
"url": "https://my-build-tool.com/builds/MY-PROJECT/BUILD-792",
"type": "build",
"created_on": "2015-11-19T20:37:35.547563+00:00",
"updated_on": "2015-11-20T08:01:16.433108+00:00",
    "links": {
"commit": {
"href": "http://api.bitbucket.org/2.0/repositories/tk/test/commit/9fec847784abb10b2fa567ee63b85bd238955d0e"
},
"self": {
"href": "http://api.bitbucket.org/2.0/repositories/tk/test/commit/9fec847784abb10b2fa567ee63b85bd238955d0e/statuses/build/mybuildtool"
}
}
}
}

課題のイベント

課題で発生する次のイベントのために webhook を作成できます。

作成日

A user creates an issue for a repository. This payload, with an event key of issue:created, provides the following fields:

パラメーター 説明
actor The user who created the issue. See the Owner entity sample.
issue The issue the user created. See the Issue entity sample.
repository The repository with the issue. See the Repository entity sample.
issue:created ペイロード
{
"actor": Owner,
"issue": Issue,
"repository": Repository
}

更新日

A user updated an issue for a repository. This payload, with an event key of issue:updated, provides the following fields:

パラメーター 説明
actor The user who created the issue. See the Owner entity sample.
issue The issue the user created. See the Issue entity sample.
repository The repository with the issue. See the Repository entity sample.
comment The comment added about the update to the issue. See the Comment entity sample.
changes

課題に対する変更の詳細。次のプロパティが含まれています。

  • old: The previous value for an issue field.
  • new: The new value for an issue field.
issue:updated ペイロード
{
"actor": Owner,
"issue": Issue,
"repository": Repository,
  "comment": Comment,
  "changes": {
    "status": {
      "old": "open",
      "new": "on hold"
    }
  }
}

コメントの作成

A user comments on an issue associated with a repository. This payload, with an event key of issue:comment_created, provides the following fields:

パラメーター 説明
actor The user who comments on the issue. See the Owner entity sample.
repository The repository with the issue. See the Repository entity sample.
issue The issue created. See the Issue entity sample.
comment

The comment created. See the Comment entity sample.

issue:comment_created ペイロード
{
  "actor": Owner,
"repository": Repository,
"issue": Issue,
"comment": Comment
}

プル リクエスト イベント

プル リクエストで発生する次のイベントのために webhook を作成できます。

作成日

A user creates a pull request for a repository. This payload, with an event key of pullrequest:created, provides the following fields:

パラメーター 説明
actor The user who creates the pull request. See the Owner entity sample.
pullrequest The new pull request. See the Pull Request entity sample.
repository A representation of the repository with the issue. See the Repository entity sample.
pullrequest:created ペイロード
{
"actor": Owner,
"pullrequest": PullRequest,
"repository": Repository
}

更新日

A user updates a pull request for a repository. This payload, with an event key of pullrequest:updated, provides the following fields:

パラメーター 説明
actor The user who updates the pull request. See the Owner entity sample.
pullrequest The updated pull request. See the Pull Request entity sample.
repository The repository with the pull request. See the Repository entity sample.
pullrequest:updated ペイロード
{
"actor": Owner,
"pullrequest": PullRequest,
"repository": Repository
}

承認

A user approves a pull request for a repository. This payload, with an event key of pullrequest:approved, provides the following fields:

パラメーター 説明
actor The user who approves the pull request. See the Owner entity sample.
pullrequest The approved pull request. See the Pull Request entity sample.
repository The repository with the pull request. See the Repository entity sample.
approval

承認の詳細。次のプロパティが含まれています。

  • date: When the approval was created.
  • user: The user who created the approval.
pullrequest:approved ペイロード
{
"actor": Owner,
"pullrequest": PullRequest,
"repository": Repository,
"approval": {
"date": "2015-04-06T16:34:59.195330+00:00",
"user": User
}
}

承認の取り消し

A user removes an approval from a pull request for a repository. This payload, with an event key of pullrequest:unapproved, provides the following fields:

パラメーター 説明
actor The user who removes the approval. See the Owner entity sample.
pullrequest The pull request with the removed approval. See the Pull Request entity sample.
repository A representation of the repository with the pull request. See the Repository entity sample.
approval

承認の詳細。次のプロパティが含まれています。

  • date: When the approval was created.
  • user: The user who created the approval.
pullrequest:unapproved ペイロード
{
"actor": Owner,
"pullrequest": PullRequest,
"repository": Repository,
"approval": {
"date": "2015-04-06T16:34:59.195330+00:00",
"user": User
}
}

マージ

A user merges a pull request for a repository. This payload, with an event key of pullrequest:fulfilled, provides the following fields:

パラメーター 説明
actor The user who merges the pull request. See the Owner entity sample.
pullrequest The merged pull request. See the Pull Request entity sample.
repository The repository with the pull request. See the Repository entity sample.
pullrequest:fulfilled ペイロード
{
"actor": Owner,
"pullrequest": PullRequest,
"repository": Repository
}

却下

A user declines a pull request for a repository. This payload, with an event key of pullrequest:rejected, provides the following fields:

パラメーター 説明
actor The user who declined the pull request. See the Owner entity sample.
pullrequest The declined pull request. See the Pull Request entity sample.
repository The repository with the pull request. See the Repository entity sample.
pullrequest:rejected ペイロード
{
"actor": Owner,
"pullrequest": PullRequest,
"repository": Repository
}

コメントの作成

A user comments on a pull request. This payload, with an event key of pullrequest:comment_created, provides the following fields:

パラメーター 説明
actor The user who comments on the pull request. See the Owner entity sample.
repository The repository with the pull request. See the Repository entity sample.
pull request The pull request with the comment. See the Pull Request entity sample.
comment

The comment created. See the Comment entity sample.

pullrequest:comment_created ペイロード
{
  "actor": Owner,
"repository": Repository,
"pullrequest": PullRequest,
"comment": Comment
}

コメントの更新

ユーザーによるプル リクエストのコメントの更新です。ユーザーが同じ再びすぐにコメントを更新する場合、Bitbucket は初回のコメント更新時にのみイベント リクエストを送信します。ユーザーが時間を空けてから再度コメントを更新する場合、Bitbucket は 2 回目にイベント リクエストを送信します。

This payload, with an event key of pullrequest:comment_updated, provides the following fields:

パラメーター 説明
actor The user who updates the comment on the pull request. See the Owner entity sample.
repository The repository with the pull request. See the Repository entity sample.
pull request The pull request with the comment. See the Pull Request entity sample.
comment

The comment updated. See the Comment entity sample.

pullrequest:comment_updated ペイロード
{
  "actor": Owner,
"repository": Repository,
"pullrequest": PullRequest,
"comment": Comment
}

コメントの削除

A user deletes a comment on a pull request. This payload, with an event key of pullrequest:comment_deleted, provides the following fields:

パラメーター 説明
actor The user who deletes the comment on the pull request. See the Owner entity sample.
repository The repository with the pull request. See the Repository entity sample.
pull request The pull request with the comment. See the Pull Request entity sample.
comment

The comment deleted. See the Comment entity sample.

pullrequest:comment_deleted ペイロード
{
  "actor": Owner,
"repository": Repository,
"pullrequest": PullRequest,
"comment": Comment
}

イベント ペイロードの一般的なエンティティ

このセクションでは、ペイロードでユーザー、リポジトリ、課題、コメント、またはプル リクエストを表現する方法についての例を紹介します。

所有者

The Owner in event payloads. In addition to the following fields, the user entity may include other fields as well.

パラメーター 説明
type The account type: user or team.
username ユーザー名またはチーム ID。
display_name Bitbucket に表示されるユーザーの氏名またはチーム名
uuid 全体で一意のユーザーまたはチーム ID。
links API または Bitbucket での、ユーザーまたはチームの表現へのリンク。
user プロパティ
{
  "type": "user",
  "username": "emmap1",
  "display_name": "Emma",
  "uuid": "{a54f16da-24e9-4d7f-a3a7-b1ba2cd98aa3}",
  "links": {
    "self": {
      "href": "https://api.bitbucket.org/api/2.0/users/emmap1"
},
    "html": {
      "href": "https://api.bitbucket.org/emmap1"
},
    "avatar": {
      "href": "https://bitbucket-api-assetroot.s3.amazonaws.com/c/photos/2015/Feb/26/3613917261-0-emmap1-avatar_avatar.png"
}
  }
},

リポジトリ

The Repository in event payloads. In addition to the following fields, the repository entity may include other fields as well.

パラメーター 説明
type The property type. In this case, repository .
name リポジトリの名前
full_name リポジトリが所属するユーザー名またはチーム名、およびユーザーの名前。
uuid 全体で一意のユーザーまたはリポジトリ ID。
links API または Bitbucket でのリポジトリの表現へのリンク。
project The project that contains the repository (if one does). See the Project entity sample.
website 特定の Web サイトでコードがホストされている場合のリポジトリの Web サイトへの URL。
owner The user or team that owns the repository. See the Owner entity sample.
scm The type repository: Git (git) or Mercurial (hg).
is_private true or false to indicate whether the repository is private.
repository プロパティ
{
  "type": "repository",
  "links": {
    "self": {
      "href": "https://api.bitbucket.org/api/2.0/repositories/bitbucket/bitbucket"
},
    "html": {
      "href": "https://api.bitbucket.org/bitbucket/bitbucket"
},
    "avatar": {
      "href": "https://api-staging-assetroot.s3.amazonaws.com/c/photos/2014/Aug/01/bitbucket-logo-2629490769-3_avatar.png"
}
  },
  "uuid": "{673a6070-3421-46c9-9d48-90745f7bfe8e}",
  "project": Project,
  "full_name": "team_name/repo_name",
  "name": "repo_name",
  "website": "https://mywebsite.com/",
  "owner": Owner,
  "scm": "git",
  "is_private": true
},

Project

The Project in event payloads. In addition to the following fields, the project entity may include other fields as well.

パラメーター 説明
type The property type. In this case, project .
name プロジェクトの名前
uuid 全体で一意のユーザーまたはチーム ID。
links プロジェクトのアバターまたは Bitbucket でのプロジェクトの表現へのリンク。
key プロジェクトのキー
project プロパティ
{
  "type": "project",
  "project": "Untitled project",
  "uuid": "{3b7898dc-6891-4225-ae60-24613bb83080}",
  "links": {
    "html": {
      "href": "https://bitbucket.org/account/user/teamawesome/projects/proj"
    },
    "avatar": {
      "href": "https://bitbucket.org/account/user/teamawesome/projects/proj/avatar/32"
    }
  },
  "key": "proj"
},

Issue

The Issue in event payloads. In addition to the following fields, the issue entity may include other fields as well.

パラメーター 説明
id 課題の ID 番号。
component 課題のコンポーネント。
title 課題のタイトル。

content

課題の説明。

  • raw: the raw text as the user typed it
  • markup: the markup language used
  • html: the rendered HTML version of the markup
priority 課題の優先度カテゴリ。
state 課題のステータス。
type 課題のタイプ。
milestone 課題が到達したマイルストーン。
version 課題に関連付けられたバージョン番号。
created_on 課題が作成された日時 (ISO 8601 形式)。 
updated_on 課題が最後に更新された日時 (ISO 8601 形式)。 
links API または Bitbucket での課題の表現へのリンク。
issue プロパティ
{
   "id" 1 ,
   "component" "component" ,
   "title" "Issue title" ,
   "content" : {
     "raw" "Issue description" ,
     "html" "<p>Issue description</p>" ,
     "markup" "markdown"
   },
   "priority" "trivial|minor|major|critical|blocker" ,
   "state" "new|open|on hold|resolved|duplicate|invalid|wontfix|closed" ,
   "type" "bug|enhancement|proposal|task" ,
   "milestone" : {  "name" "milestone 1"  },
   "version" : {  "name" "version 1"  },
   "created_on" "2015-04-06T15:23:38.179678+00:00" ,
   "updated_on" "2015-04-06T15:23:38.179678+00:00" ,
  "links": {
    "self": {
      "href": "https://api.bitbucket.org/api/2.0/issues/issue_id"
},
    "html": {
      "href": "https://api.bitbucket.org/issue_id"
}
  }
}

コメント

The Comment in event payloads. In addition to the following fields, the comment entity may include other fields as well.

パラメーター 説明
id コメントの ID 番号。
parent コメントの親コメントの ID 番号。
content

実際のコメント。以下の子要素が含まれています。

  • raw: the raw text as the user typed it
  • markup: the markup language used
  • html: the rendered HTML version of the markup

inline

コメントがインライン コード コメントかどうかを示します。以下の子要素が含まれています。

  • to: the line number of the new version in the diff that the comment was made on (the "green" line). null if the line does not exist in the new version
  • from: the line number of the old version in the diff that the comment was made on (the "red" line). null if the line does not exist in the old version
  • path: the name of the file the comment was made on

Inline comments also have an additional link (rel: "code") in the links section that points to the raw file diff.

created_on 課題が作成された日時 (ISO 8601 形式)。 
updated_on 課題が最後に更新された日時 (ISO 8601 形式)。
links API または Bitbucket でのコメントの表現へのリンク。
comment プロパティ
{
   "id" 17 ,
   "parent" : {  "id" 16  },
   "content" : {
     "raw" "Comment text" ,
     "html" "<p>Comment text</p>" ,
     "markup" "markdown" ,
   },
   "inline" : {
     "path" "path/to/file" ,
     "from" null ,
     "to" 10
   },
   "created_on" "2015-04-06T16:52:29.982346+00:00" ,
   "updated_on" "2015-04-06T16:52:29.983730+00:00",
  "links": {
    "self": {
      "href": "https://api.bitbucket.org/api/2.0/comments/comment_id"
},
    "html": {
      "href": "https://api.bitbucket.org/comment_id"
}
  }
}

Pull request

The Pull Request in event payloads. In addition to the following fields, the pull request entity may include other fields as well.

パラメーター 説明
id プル リクエストを識別する ID 番号。
title プル リクエストの名前。
description プル リクエストの説明。

state

プル リクエストのステータス。
author プル リクエストの作成者。
source プル リクエストのソースに関する情報。以下の子要素が含まれています。
  • branch: the name of the branch
  • commit: the SHA1 of the branch head
  • repository: the representation of the repository with the branch
destination プル リクエストの宛先に関する情報。以下の子要素が含まれています。
  • branch: the name of the branch
  • commit: the SHA1 of the branch head
  • repository: the representation of the repository with the branch
merge_commit プル リクエストがマージされるときのコミットの SHA1。
participants プル リクエストの参加者の一覧。
reviewers A list of reviewers on the pull request. You only need to provide the username element of the user object.
close_source_branch true or false to indicate whether Bitbucket should close the source branch after the pull requests is successfully merged. Only use this parameter when the source and destination are in the same repo.
closed_by マージまたは却下によってプル リクエストをクローズしたユーザー。
reason プル リクエストが却下された理由 (必要に応じて)。
created_on プル リクエストが作成された日時 (ISO 8601 形式)。 
updated_on プル リクエストが最後に更新された日時 (ISO 8601 形式)。
links API または Bitbucket でのプル リクエストの表現へのリンク。
pull request プロパティ
{
   "id" 1 ,
   "title" "Title of pull request" ,
   "description" "Description of pull request" ,
   "state" "OPEN|MERGED|DECLINED" ,
   "author" : User,
   "source" : {
     "branch" : {  "name" "branch2"  },
     "commit" : {  "hash" "d3022fc0ca3d"  },
     "repository" : Repository
   },
   "destination" : {
     "branch" : {  "name" "master"  },
     "commit" : {  "hash" "ce5965ddd289"  },
     "repository" : Repository
   },
   "merge_commit" : {  "hash" "764413d85e29"  },
   "participants" : [User],
   "reviewers" : [User],
   "close_source_branch" true ,
   "closed_by" : User,
   "reason" "reason for declining the PR (if applicable)" ,
   "created_on" "2015-04-06T15:23:38.179678+00:00" ,
   "updated_on" "2015-04-06T15:23:38.205705+00:00",
  "links": {
    "self": {
      "href": "https://api.bitbucket.org/api/2.0/pullrequests/pullrequest_id"
},
    "html": {
      "href": "https://api.bitbucket.org/pullrequest_id"
}
  }
}
最終更新日 2018 年 7 月 3 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.