Git Integration for Jira Cloud Documentation

Contact support  

Bitbucket webhook events

GIT INTEGRATION: JIRA CLOUD

The following are the supported types of Bitbucket events for triggering webhooks:

Bitbucket (Repository Push Events)

Type
pushEvents: "^repo:push$"

Request URI
/api/1/webhook/reindex/install/<secret_key>/web

Request headers
Content-Type: application/json
X-Event-Key: repo:push

Request payload example

{  
  "repository": {
    "full_name": "johnsmith/test-bitbucket",
    "name": "Test Bitbucket",
    "links": {
      "html": {"href": "https://bitbucket.org/johnsmith/test-bitbucket"},
    },
    "scm": "git",
    "type": "repository",
  },
}

Bitbucket (Pullrequest Created Events)

Type
"^pullrequest:.*$"

Request URI
/api/1/webhook/reindex/install/<secret_key>/web

Request headers
Content-Type: application/json
X-Event-Key: pullrequest:created

Request payload example

{
  "pullrequest": {
    "destination": {
      "repository": {
        "full_name": "johnsmith/test-bitbucket",
        "name": "Test Bitbucket",
        "links": {
          "html": {"href": "https://bitbucket.org/johnsmith/test-bitbucket"}
        },
      },
      "branch": {"name": "P5-1-second-issue-for-progect5"}
    },
    "source": {
      "repository": {
        "links": {
          "html": {"href": "https://bitbucket.org/johnsmith/test-bitbucket"},                  },
        },
      },
      "branch": {"name": "master"}
    },
    "type": "pullrequest",
    "title": "TES-1 Master",     
    "close_source_branch": false,
    "state": "OPEN"    
  },  
}

Bitbucket (Repository Commit Comment Created Events)

Type
"^repo:commit_comment_created$"

Request URI
/api/1/webhook/reindex/install/<secret_key>/web

Request headers
Content-type: application/json
X-Event-Key: repo:commit_comment_created

Request payload example

{
  "comment": {
    "commit": {
      "links": {
        "html": {"href": "https://bitbucket.org/johnsmith/test-bitbucket/commits/6d32f7643bfffdea17e8c498454971508fbdd5b1"}
      },
      "hash": "6d32f7643bfffdea17e8c498454971508fbdd5b1"
    },
    "id": 8917242,
    "type": "commit_comment",    
    "content": {
      "markup": "markdown",
      "raw": "Comment",
      "html": "<p>This is a comment</p>",
      "type": "rendered"
    },  
  },
}

Other webhook type events

GitHub webhook events

GitLab webhook events

AWS CodeCommit webhook events)

Microsoft webhook events)

Have feedback about this article? Did we miss something? Let us know!
On this page