Event Payloads

このページの内容

When you have a webhook with an event, Bitbucket sends the event request to the server URL for the webhook whenever that event occurs. This page describes the structure of these requests. 

For Bitbucket to send event payload requests for a webhook with HTTPS endpoints, make sure your URL has a valid SSL certificate that a public certificate authority has signed.

You may need to know the Bitbucket Cloud IP addresses to whitelist.

 

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 headers

All event payload requests have the following HTTP headers:

HTTP header 説明
X-Event-Key The event key of the event that triggers the webhook (for example, repo:push).
X-Hook-UUID The UUID of the webhook that an event triggers. For details about the UUID of a webhook, see the webhook Resource.
X-Request-UUID The UUID of the request.
X-Attempt-Number The number of times Bitbucket attempts to send the payload. After the first request, Bitbucket tries to send the payload two more times if the previous attempts fail. The number of attempts also includes those anyone makes from the  Resend Request  button.

Repository events

You can create webhooks for the following events that occur in a repository.

Push

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:
    • Commits that have not been pushed for this reference–If someone created the reference recently, it could have commits that have been pushed to the repository, but they have not been pushed to this specific reference. If that is the case, the array includes these previously pushed commits as well. For example, if you create a new feature branch off of a master branch with a lot of commits, and then you push a single commit to it, the array in the payload contains 5 commits that are all new to the feature branch. These commits include the single commit you just made and the 4 most recent commits of the master branch.
    • Commits that have been force pushed–When you perform a rebase followed by a force push, the commits of the old reference are replaced with all the commits in the new reference. As a result, the array includes the commits part of the new reference. The array does not include commits that are deleted during a rebase or a force push.
  • 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
      }
    ]
  }
}

Fork

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.
変更

The details of the change, including the new setting and what it was previously. The payload will only include properties whose values have changed:

  • 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"
    }
}
}

Transfer

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 payload
{
"actor": Owner,
"repository": Repository,
"previous_owner": Owner
}


Commit comment created

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.
コメント The comment created. See the Comment entity sample.
repository The repository with the commit. See the Repository entity sample.
commit

The details of the commit, including the hash.

repo:commit_comment_created payload
{
"actor": Owner,
"comment": Comment,
"repository": Repository,
"commit": {
"hash": "d3022fc0ca3d65c7f6654eea129d6bf0cf0ee08e"
}
}

Build status created

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

The details of the commit status, which includes the following properties:

  • 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 payload
{
"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"
}
}
}
}

Build status updated

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

The details of the commit status, which includes the following properties:

  • 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 payload
{
"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"
}
}
}
}

Issue events

You can create webhooks for the following events that occur on an issue.

作成済み

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.
課題 The issue the user created. See the Issue entity sample.
repository The repository with the issue. See the Repository entity sample.
issue:created payload
{
"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.
課題 The issue the user created. See the Issue entity sample.
repository The repository with the issue. See the Repository entity sample.
コメント The comment added about the update to the issue. See the Comment entity sample.
変更

The details of the changes to the issue, which includes the following properties:

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

Comment created

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.
課題 The issue created. See the Issue entity sample.
コメント

The comment created. See the Comment entity sample.

issue:comment_created payload
{
  "actor": Owner,
"repository": Repository,
"issue": Issue,
"comment": Comment
}

Pull request events

You can create webhooks for the following events that occur on a pull request.

作成済み

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 payload
{
"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 payload
{
"actor": Owner,
"pullrequest": PullRequest,
"repository": Repository
}

Approved

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

The details of the approval, including the following properties:

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

Approval removed

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

The details of the approval, including the following properties:

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

Merged

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 payload
{
"actor": Owner,
"pullrequest": PullRequest,
"repository": Repository
}

Declined

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 payload
{
"actor": Owner,
"pullrequest": PullRequest,
"repository": Repository
}

Comment created

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.
コメント

The comment created. See the Comment entity sample.

pullrequest:comment_created payload
{
  "actor": Owner,
"repository": Repository,
"pullrequest": PullRequest,
"comment": Comment
}

Comment updated

A user updates a comment on a pull request. If a user updates the same comment with not much time in between, Bitbucket only sends the event request the first time the comment is updated. However, if some time passes and that user updates the comment again, Bitbucket sends the event request a second time.

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.
コメント

The comment updated. See the Comment entity sample.

pullrequest:comment_updated payload
{
  "actor": Owner,
"repository": Repository,
"pullrequest": PullRequest,
"comment": Comment
}

Comment deleted

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.
コメント

The comment deleted. See the Comment entity sample.

pullrequest:comment_deleted payload
{
  "actor": Owner,
"repository": Repository,
"pullrequest": PullRequest,
"comment": Comment
}

Common entities for event payloads

This section includes examples of how payloads represent users, repositories, issues, comments, or pull requests.

Owner

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

パラメーター 説明
タイプ The account type: user or team.
ユーザ名 The username or team ID.
display_name The Full name of the user or the Team name that displays in Bitbucket.
uuid The universally unique identifier of the user or team.

リンク

Links to representations of the user or team in the API or on Bitbucket.
User property
{
  "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.

パラメーター 説明
タイプ The property type. In this case, repository .
name The name of the repository.
full_name The username or team name where the repository is located and the name the user.
uuid The universally unique identifier of the repository.
リンク Links to representations of the repository in the API or on Bitbucket.
プロジェクト The project that contains the repository (if one does). See the Project entity sample.
website The URL to the repository's website when the code is hosted for a specific website.
所有者 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 property
{
  "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
},

プロジェクト

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

パラメーター 説明
タイプ The property type. In this case, project .
name The Name of the project.
uuid The universally unique identifier of the user or team.
リンク Links to representations of the project's avatar or the project on Bitbucket.
鍵 (キー) The Key of the project.
Project property
{
  "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"
},

課題

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

パラメーター 説明
ID The id number of the issue.
component(コンポーネント) The component of the issue.
タイトル The title of the issue.

content

The description of the issue.

  • raw: the raw text as the user typed it
  • markup: the markup language used
  • html: the rendered HTML version of the markup
優先度 The priority category of the issue.
状態 The status of the issue.
タイプ The type of issue.
milestone The milestone reached with the issue.
VERSION (バージョン) The version number associated with the issue.
created_on The date and time (in ISO 8601 format) the issue was created. 
updated_on The date and time (in ISO 8601 format) the issue was last updated. 
リンク Links to representations of the issue in the API or on Bitbucket.
Issue property
{
   "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 The id number of the comment.
Parent (親) The id number of the comment's parent comment.
content

The actual comment. It contains the following nested elements:

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

inline

An indication of whether the comment is an inline code comment. It contains the following nested elements:

  • 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 The date and time (in ISO 8601 format) the issue was created. 
updated_on The date and time (in ISO 8601 format) the issue was last updated.
リンク Links to representations of the comment in the API or on Bitbucket.
Comment property
{
   "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 The id number that identifies the pull request.
タイトル The name of the pull request.
説明 The description of the pull request.

状態

The status of the pull request.
author The creator of the pull request.
source Information about the source of the pull request. It contains the following nested elements:
  • branch: the name of the branch
  • commit: the SHA1 of the branch head
  • repository: the representation of the repository with the branch
destination Information about the destination of the pull request. It contains the following nested elements:
  • branch: the name of the branch
  • commit: the SHA1 of the branch head
  • repository: the representation of the repository with the branch
merge_commit The SHA1 of the commit when the pull request merges.
参加者 A list of participants part of the pull request.
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 The user who closes the pull request, either by merging or declining it.
理由 The reason the pull request is declined (if necessary).
created_on The date and time (in ISO 8601 format) the pull request was created. 
updated_on The date and time (in ISO 8601 format) the pull request was last updated.
リンク Links to representations of the pull request in the API or on Bitbucket.
Pull Request property
{
   "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"
    }
  }
}
Last modified on Jul 13, 2017

この翻訳に満足しましたか?

はい
いいえ
この記事についてのフィードバックを送信する

Not finding the help you need?

コミュニティへの質問

Powered by Confluence and Scroll Viewport.