Update Bitbucket webhooks to handle issues/commit/comments
This commit is contained in:
182
tests/units/fixtures/bitbucket_push.json
Normal file
182
tests/units/fixtures/bitbucket_push.json
Normal file
@@ -0,0 +1,182 @@
|
||||
{
|
||||
"push": {
|
||||
"changes": [
|
||||
{
|
||||
"forced": false,
|
||||
"old": {
|
||||
"links": {
|
||||
"self": {
|
||||
"href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/refs/branches/master"
|
||||
},
|
||||
"commits": {
|
||||
"href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/commits/master"
|
||||
},
|
||||
"html": {
|
||||
"href": "https://bitbucket.org/minicoders/test-webhook/branch/master"
|
||||
}
|
||||
},
|
||||
"name": "master",
|
||||
"target": {
|
||||
"date": "2015-06-21T00:50:37+00:00",
|
||||
"hash": "b6b46580eb9b20a06396f5f697ea1a55cf170e69",
|
||||
"message": "test edited online with Bitbucket for task #5",
|
||||
"type": "commit",
|
||||
"links": {
|
||||
"self": {
|
||||
"href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/commit/b6b46580eb9b20a06396f5f697ea1a55cf170e69"
|
||||
},
|
||||
"html": {
|
||||
"href": "https://bitbucket.org/minicoders/test-webhook/commits/b6b46580eb9b20a06396f5f697ea1a55cf170e69"
|
||||
}
|
||||
},
|
||||
"parents": [
|
||||
{
|
||||
"links": {
|
||||
"self": {
|
||||
"href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/commit/7251db4b505cbfca3f845ebcff0ec0ddc4003ed8"
|
||||
},
|
||||
"html": {
|
||||
"href": "https://bitbucket.org/minicoders/test-webhook/commits/7251db4b505cbfca3f845ebcff0ec0ddc4003ed8"
|
||||
}
|
||||
},
|
||||
"type": "commit",
|
||||
"hash": "7251db4b505cbfca3f845ebcff0ec0ddc4003ed8"
|
||||
}
|
||||
],
|
||||
"author": {
|
||||
"raw": "Frederic Guillot <bob>",
|
||||
"user": {
|
||||
"links": {
|
||||
"self": {
|
||||
"href": "https://bitbucket.org/api/2.0/users/minicoders"
|
||||
},
|
||||
"html": {
|
||||
"href": "https://bitbucket.org/minicoders"
|
||||
},
|
||||
"avatar": {
|
||||
"href": "https://bitbucket.org/account/minicoders/avatar/32/"
|
||||
}
|
||||
},
|
||||
"type": "user",
|
||||
"uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}",
|
||||
"username": "minicoders",
|
||||
"display_name": "Frederic Guillot"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "branch"
|
||||
},
|
||||
"created": false,
|
||||
"links": {
|
||||
"diff": {
|
||||
"href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/diff/824059cce7667d3f8d8780cc707391be821e0ea6..b6b46580eb9b20a06396f5f697ea1a55cf170e69"
|
||||
},
|
||||
"commits": {
|
||||
"href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/commits?include=824059cce7667d3f8d8780cc707391be821e0ea6exclude=b6b46580eb9b20a06396f5f697ea1a55cf170e69"
|
||||
},
|
||||
"html": {
|
||||
"href": "https://bitbucket.org/minicoders/test-webhook/branches/compare/824059cce7667d3f8d8780cc707391be821e0ea6..b6b46580eb9b20a06396f5f697ea1a55cf170e69"
|
||||
}
|
||||
},
|
||||
"new": {
|
||||
"links": {
|
||||
"self": {
|
||||
"href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/refs/branches/master"
|
||||
},
|
||||
"commits": {
|
||||
"href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/commits/master"
|
||||
},
|
||||
"html": {
|
||||
"href": "https://bitbucket.org/minicoders/test-webhook/branch/master"
|
||||
}
|
||||
},
|
||||
"name": "master",
|
||||
"target": {
|
||||
"date": "2015-06-21T03:15:08+00:00",
|
||||
"hash": "824059cce7667d3f8d8780cc707391be821e0ea6",
|
||||
"message": "Test another commit #2\n",
|
||||
"type": "commit",
|
||||
"links": {
|
||||
"self": {
|
||||
"href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/commit/824059cce7667d3f8d8780cc707391be821e0ea6"
|
||||
},
|
||||
"html": {
|
||||
"href": "https://bitbucket.org/minicoders/test-webhook/commits/824059cce7667d3f8d8780cc707391be821e0ea6"
|
||||
}
|
||||
},
|
||||
"parents": [
|
||||
{
|
||||
"links": {
|
||||
"self": {
|
||||
"href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/commit/24aa9d82bbb6f9a60f743fe538deb0a44622fc98"
|
||||
},
|
||||
"html": {
|
||||
"href": "https://bitbucket.org/minicoders/test-webhook/commits/24aa9d82bbb6f9a60f743fe538deb0a44622fc98"
|
||||
}
|
||||
},
|
||||
"type": "commit",
|
||||
"hash": "24aa9d82bbb6f9a60f743fe538deb0a44622fc98"
|
||||
}
|
||||
],
|
||||
"author": {
|
||||
"raw": "Frederic Guillot <bob@localhost>"
|
||||
}
|
||||
},
|
||||
"type": "branch"
|
||||
},
|
||||
"closed": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"repository": {
|
||||
"name": "test-webhook",
|
||||
"owner": {
|
||||
"links": {
|
||||
"self": {
|
||||
"href": "https://bitbucket.org/api/2.0/users/minicoders"
|
||||
},
|
||||
"html": {
|
||||
"href": "https://bitbucket.org/minicoders"
|
||||
},
|
||||
"avatar": {
|
||||
"href": "https://bitbucket.org/account/minicoders/avatar/32/"
|
||||
}
|
||||
},
|
||||
"type": "user",
|
||||
"uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}",
|
||||
"username": "minicoders",
|
||||
"display_name": "Frederic Guillot"
|
||||
},
|
||||
"uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}",
|
||||
"type": "repository",
|
||||
"links": {
|
||||
"self": {
|
||||
"href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook"
|
||||
},
|
||||
"html": {
|
||||
"href": "https://bitbucket.org/minicoders/test-webhook"
|
||||
},
|
||||
"avatar": {
|
||||
"href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/"
|
||||
}
|
||||
},
|
||||
"full_name": "minicoders/test-webhook"
|
||||
},
|
||||
"actor": {
|
||||
"links": {
|
||||
"self": {
|
||||
"href": "https://bitbucket.org/api/2.0/users/minicoders"
|
||||
},
|
||||
"html": {
|
||||
"href": "https://bitbucket.org/minicoders"
|
||||
},
|
||||
"avatar": {
|
||||
"href": "https://bitbucket.org/account/minicoders/avatar/32/"
|
||||
}
|
||||
},
|
||||
"type": "user",
|
||||
"uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}",
|
||||
"username": "minicoders",
|
||||
"display_name": "Frederic Guillot"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user