From 54b3cfe8a14e99ab2372fc5095facc3a2259f077 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Thu, 7 Jan 2016 20:16:05 -0500 Subject: Move bitbucket webhook to an external plugin --- tests/units/Integration/BitbucketWebhookTest.php | 399 --------------------- .../units/fixtures/bitbucket_comment_created.json | 147 -------- tests/units/fixtures/bitbucket_issue_assigned.json | 209 ----------- tests/units/fixtures/bitbucket_issue_closed.json | 183 ---------- tests/units/fixtures/bitbucket_issue_opened.json | 112 ------ tests/units/fixtures/bitbucket_issue_reopened.json | 183 ---------- .../units/fixtures/bitbucket_issue_unassigned.json | 193 ---------- tests/units/fixtures/bitbucket_push.json | 182 ---------- 8 files changed, 1608 deletions(-) delete mode 100644 tests/units/Integration/BitbucketWebhookTest.php delete mode 100644 tests/units/fixtures/bitbucket_comment_created.json delete mode 100644 tests/units/fixtures/bitbucket_issue_assigned.json delete mode 100644 tests/units/fixtures/bitbucket_issue_closed.json delete mode 100644 tests/units/fixtures/bitbucket_issue_opened.json delete mode 100644 tests/units/fixtures/bitbucket_issue_reopened.json delete mode 100644 tests/units/fixtures/bitbucket_issue_unassigned.json delete mode 100644 tests/units/fixtures/bitbucket_push.json (limited to 'tests') diff --git a/tests/units/Integration/BitbucketWebhookTest.php b/tests/units/Integration/BitbucketWebhookTest.php deleted file mode 100644 index bb6755c2..00000000 --- a/tests/units/Integration/BitbucketWebhookTest.php +++ /dev/null @@ -1,399 +0,0 @@ -container['dispatcher']->addListener(BitbucketWebhook::EVENT_COMMIT, array($this, 'onCommit')); - - $tc = new TaskCreation($this->container); - $p = new Project($this->container); - $bw = new BitbucketWebhook($this->container); - $payload = json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_push.json'), true); - - $this->assertEquals(1, $p->create(array('name' => 'test'))); - $bw->setProjectId(1); - - // No task - $this->assertFalse($bw->handlePush($payload)); - - // Create task with the wrong id - $this->assertEquals(1, $tc->create(array('title' => 'test1', 'project_id' => 1))); - $this->assertFalse($bw->handlePush($payload)); - - // Create task with the right id - $this->assertEquals(2, $tc->create(array('title' => 'test2', 'project_id' => 1))); - $this->assertTrue($bw->handlePush($payload)); - - $called = $this->container['dispatcher']->getCalledListeners(); - $this->assertArrayHasKey(BitbucketWebhook::EVENT_COMMIT.'.BitbucketWebhookTest::onCommit', $called); - } - - public function testIssueOpened() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_OPENED, array($this, 'onIssueOpened')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $bw = new BitbucketWebhook($this->container); - $bw->setProjectId(1); - - $this->assertNotFalse($bw->parsePayload( - 'issue:created', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_opened.json'), true) - )); - } - - public function testCommentCreatedWithNoUser() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_COMMENT, array($this, 'onCommentCreatedWithNoUser')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertNotFalse($g->parsePayload( - 'issue:comment_created', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_comment_created.json'), true) - )); - } - - public function testCommentCreatedWithNotMember() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_COMMENT, array($this, 'onCommentCreatedWithNotMember')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $u = new User($this->container); - $this->assertEquals(2, $u->create(array('username' => 'fguillot'))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertNotFalse($g->parsePayload( - 'issue:comment_created', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_comment_created.json'), true) - )); - } - - public function testCommentCreatedWithUser() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_COMMENT, array($this, 'onCommentCreatedWithUser')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $u = new User($this->container); - $this->assertEquals(2, $u->create(array('username' => 'minicoders'))); - - $pp = new ProjectUserRole($this->container); - $this->assertTrue($pp->addUser(1, 2, Role::PROJECT_MEMBER)); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertNotFalse($g->parsePayload( - 'issue:comment_created', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_comment_created.json'), true) - )); - } - - public function testIssueClosed() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_CLOSED, array($this, 'onIssueClosed')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertNotFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_closed.json'), true) - )); - } - - public function testIssueClosedWithNoTask() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_CLOSED, array($this, 'onIssueClosed')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 42, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_closed.json'), true) - )); - - $this->assertEmpty($this->container['dispatcher']->getCalledListeners()); - } - - public function testIssueReopened() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_REOPENED, array($this, 'onIssueReopened')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertNotFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_reopened.json'), true) - )); - } - - public function testIssueReopenedWithNoTask() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_REOPENED, array($this, 'onIssueReopened')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 42, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_reopened.json'), true) - )); - - $this->assertEmpty($this->container['dispatcher']->getCalledListeners()); - } - - public function testIssueUnassigned() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_ASSIGNEE_CHANGE, array($this, 'onIssueUnassigned')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertNotFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_unassigned.json'), true) - )); - } - - public function testIssueAssigned() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_ASSIGNEE_CHANGE, array($this, 'onIssueAssigned')); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $u = new User($this->container); - $this->assertEquals(2, $u->create(array('username' => 'minicoders'))); - - $pp = new ProjectUserRole($this->container); - $this->assertTrue($pp->addUser(1, 2, Role::PROJECT_MEMBER)); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertNotFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_assigned.json'), true) - )); - - $this->assertNotEmpty($this->container['dispatcher']->getCalledListeners()); - } - - public function testIssueAssignedWithNoPermission() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_ASSIGNEE_CHANGE, function () {}); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $u = new User($this->container); - $this->assertEquals(2, $u->create(array('username' => 'minicoders'))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_assigned.json'), true) - )); - - $this->assertEmpty($this->container['dispatcher']->getCalledListeners()); - } - - public function testIssueAssignedWithNoUser() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_ASSIGNEE_CHANGE, function () {}); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 1, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_assigned.json'), true) - )); - - $this->assertEmpty($this->container['dispatcher']->getCalledListeners()); - } - - public function testIssueAssignedWithNoTask() - { - $this->container['dispatcher']->addListener(BitbucketWebhook::EVENT_ISSUE_ASSIGNEE_CHANGE, function () {}); - - $p = new Project($this->container); - $this->assertEquals(1, $p->create(array('name' => 'foobar'))); - - $tc = new TaskCreation($this->container); - $this->assertEquals(1, $tc->create(array('title' => 'boo', 'reference' => 43, 'project_id' => 1))); - - $g = new BitbucketWebhook($this->container); - $g->setProjectId(1); - - $this->assertFalse($g->parsePayload( - 'issue:updated', - json_decode(file_get_contents(__DIR__.'/../fixtures/bitbucket_issue_assigned.json'), true) - )); - - $this->assertEmpty($this->container['dispatcher']->getCalledListeners()); - } - - public function onCommit($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(2, $data['task_id']); - $this->assertEquals('test2', $data['title']); - $this->assertEquals("Test another commit #2\n\n\n[Commit made by @Frederic Guillot on Bitbucket](https://bitbucket.org/minicoders/test-webhook/commits/824059cce7667d3f8d8780cc707391be821e0ea6)", $data['comment']); - $this->assertEquals("Test another commit #2\n", $data['commit_message']); - $this->assertEquals('https://bitbucket.org/minicoders/test-webhook/commits/824059cce7667d3f8d8780cc707391be821e0ea6', $data['commit_url']); - } - - public function onIssueOpened($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['reference']); - $this->assertEquals('My new issue', $data['title']); - $this->assertEquals("**test**\n\n[Bitbucket Issue](https://bitbucket.org/minicoders/test-webhook/issue/1/my-new-issue)", $data['description']); - } - - public function onCommentCreatedWithNoUser($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['task_id']); - $this->assertEquals(0, $data['user_id']); - $this->assertEquals(19176252, $data['reference']); - $this->assertEquals("1. step1\n2. step2\n\n[By @Frederic Guillot on Bitbucket](https://bitbucket.org/minicoders/test-webhook/issue/1#comment-19176252)", $data['comment']); - } - - public function onCommentCreatedWithNotMember($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['task_id']); - $this->assertEquals(0, $data['user_id']); - $this->assertEquals(19176252, $data['reference']); - $this->assertEquals("1. step1\n2. step2\n\n[By @Frederic Guillot on Bitbucket](https://bitbucket.org/minicoders/test-webhook/issue/1#comment-19176252)", $data['comment']); - } - - public function onCommentCreatedWithUser($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['task_id']); - $this->assertEquals(2, $data['user_id']); - $this->assertEquals(19176252, $data['reference']); - $this->assertEquals("1. step1\n2. step2\n\n[By @Frederic Guillot on Bitbucket](https://bitbucket.org/minicoders/test-webhook/issue/1#comment-19176252)", $data['comment']); - } - - public function onIssueClosed($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['task_id']); - $this->assertEquals(1, $data['reference']); - } - - public function onIssueReopened($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['task_id']); - $this->assertEquals(1, $data['reference']); - } - - public function onIssueAssigned($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['task_id']); - $this->assertEquals(1, $data['reference']); - $this->assertEquals(2, $data['owner_id']); - } - - public function onIssueUnassigned($event) - { - $data = $event->getAll(); - $this->assertEquals(1, $data['project_id']); - $this->assertEquals(1, $data['task_id']); - $this->assertEquals(1, $data['reference']); - $this->assertEquals(0, $data['owner_id']); - } -} diff --git a/tests/units/fixtures/bitbucket_comment_created.json b/tests/units/fixtures/bitbucket_comment_created.json deleted file mode 100644 index 66a09bb8..00000000 --- a/tests/units/fixtures/bitbucket_comment_created.json +++ /dev/null @@ -1,147 +0,0 @@ -{ - "actor": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "repository": { - "full_name": "minicoders/test-webhook", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "type": "repository", - "links": { - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - } - }, - "owner": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "name": "test-webhook" - }, - "comment": { - "content": { - "html": "
    \n
  1. step1
  2. \n
  3. step2
  4. \n
", - "raw": "1. step1\n2. step2", - "markup": "markdown" - }, - "created_on": "2015-06-21T02:51:40.532529+00:00", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/issue/1#comment-19176252" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments/19176252" - } - }, - "id": 19176252, - "user": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "updated_on": null - }, - "issue": { - "updated_on": "2015-06-21T02:51:40.536516+00:00", - "votes": 0, - "assignee": null, - "links": { - "vote": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/vote" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/issue/1/my-new-issue" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1" - }, - "watch": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/watch" - }, - "comments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments" - }, - "attachments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/attachments" - } - }, - "priority": "major", - "kind": "bug", - "watches": 1, - "edited_on": null, - "state": "new", - "content": { - "html": "

test

", - "raw": "**test**", - "markup": "markdown" - }, - "component": null, - "milestone": null, - "version": null, - "id": 1, - "created_on": "2015-06-21T02:17:40.990654+00:00", - "type": "issue", - "reporter": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "title": "My new issue" - } -} \ No newline at end of file diff --git a/tests/units/fixtures/bitbucket_issue_assigned.json b/tests/units/fixtures/bitbucket_issue_assigned.json deleted file mode 100644 index 0324afb2..00000000 --- a/tests/units/fixtures/bitbucket_issue_assigned.json +++ /dev/null @@ -1,209 +0,0 @@ -{ - "repository": { - "name": "test-webhook", - "type": "repository", - "full_name": "minicoders/test-webhook", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - }, - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - } - }, - "owner": { - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - } - }, - "changes": { - "responsible": { - "new": { - "is_system": false, - "name": "Frederic Guillot", - "username": "minicoders", - "id": 1290132, - "billing_external_uuid": null - }, - "old": null - }, - "assignee": { - "new": { - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "old": null - } - }, - "actor": { - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "issue": { - "repository": { - "links": { - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - }, - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - } - }, - "type": "repository", - "full_name": "minicoders/test-webhook", - "name": "test-webhook", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}" - }, - "edited_on": null, - "component": null, - "updated_on": "2015-06-21T15:21:28.023525+00:00", - "reporter": { - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "state": "open", - "content": { - "raw": "**test**", - "markup": "markdown", - "html": "

test

" - }, - "kind": "bug", - "links": { - "attachments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/attachments" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/issue/1/my-new-issue" - }, - "watch": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/watch" - }, - "vote": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/vote" - }, - "comments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1" - } - }, - "created_on": "2015-06-21T02:17:40.990654+00:00", - "watches": 1, - "milestone": null, - "version": null, - "assignee": { - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "title": "My new issue", - "priority": "major", - "id": 1, - "votes": 0, - "type": "issue" - }, - "comment": { - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments/19181255" - } - }, - "updated_on": null, - "content": { - "raw": null, - "markup": "markdown", - "html": "" - }, - "id": 19181255, - "created_on": "2015-06-21T15:21:28.043980+00:00", - "user": { - "display_name": "Frederic Guillot", - "type": "user", - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - } - } -} \ No newline at end of file diff --git a/tests/units/fixtures/bitbucket_issue_closed.json b/tests/units/fixtures/bitbucket_issue_closed.json deleted file mode 100644 index 473b5167..00000000 --- a/tests/units/fixtures/bitbucket_issue_closed.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "actor": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user", - "display_name": "Frederic Guillot", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "changes": { - "status": { - "old": "new", - "new": "closed" - } - }, - "repository": { - "full_name": "minicoders/test-webhook", - "type": "repository", - "links": { - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - } - }, - "owner": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user", - "display_name": "Frederic Guillot", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "name": "test-webhook" - }, - "comment": { - "content": { - "html": "", - "raw": null, - "markup": "markdown" - }, - "created_on": "2015-06-21T02:54:40.263014+00:00", - "updated_on": null, - "id": 19176265, - "user": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user", - "display_name": "Frederic Guillot", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments/19176265" - } - } - }, - "issue": { - "state": "closed", - "votes": 0, - "assignee": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user", - "display_name": "Frederic Guillot", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "links": { - "vote": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/vote" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/issue/1/my-new-issue" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1" - }, - "watch": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/watch" - }, - "comments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments" - }, - "attachments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/attachments" - } - }, - "priority": "major", - "version": null, - "watches": 1, - "edited_on": null, - "reporter": { - "username": "minicoders", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user", - "display_name": "Frederic Guillot", - "links": { - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - } - }, - "content": { - "html": "

test

", - "raw": "**test**", - "markup": "markdown" - }, - "component": null, - "created_on": "2015-06-21T02:17:40.990654+00:00", - "updated_on": "2015-06-21T02:54:40.249466+00:00", - "kind": "bug", - "id": 1, - "milestone": null, - "type": "issue", - "repository": { - "full_name": "minicoders/test-webhook", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "type": "repository", - "name": "test-webhook", - "links": { - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - } - } - }, - "title": "My new issue" - } -} \ No newline at end of file diff --git a/tests/units/fixtures/bitbucket_issue_opened.json b/tests/units/fixtures/bitbucket_issue_opened.json deleted file mode 100644 index 7891c230..00000000 --- a/tests/units/fixtures/bitbucket_issue_opened.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "issue": { - "type": "issue", - "links": { - "attachments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/attachments" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/issue/1/my-new-issue" - }, - "comments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments" - }, - "vote": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/vote" - }, - "watch": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/watch" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1" - } - }, - "component": null, - "updated_on": "2015-06-21T02:17:40.990654+00:00", - "reporter": { - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "type": "user", - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "watches": 1, - "kind": "bug", - "edited_on": null, - "created_on": "2015-06-21T02:17:40.990654+00:00", - "milestone": null, - "version": null, - "state": "new", - "assignee": null, - "content": { - "raw": "**test**", - "markup": "markdown", - "html": "

test

" - }, - "priority": "major", - "id": 1, - "votes": 0, - "title": "My new issue" - }, - "repository": { - "links": { - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - }, - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - } - }, - "type": "repository", - "full_name": "minicoders/test-webhook", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "name": "test-webhook", - "owner": { - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "type": "user", - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - } - }, - "actor": { - "links": { - "html": { - "href": "https://bitbucket.org/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - } - }, - "username": "minicoders", - "type": "user", - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - } -} \ No newline at end of file diff --git a/tests/units/fixtures/bitbucket_issue_reopened.json b/tests/units/fixtures/bitbucket_issue_reopened.json deleted file mode 100644 index bb950916..00000000 --- a/tests/units/fixtures/bitbucket_issue_reopened.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "issue": { - "edited_on": null, - "watches": 1, - "created_on": "2015-06-21T02:17:40.990654+00:00", - "reporter": { - "username": "minicoders", - "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/" - } - }, - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user" - }, - "content": { - "markup": "markdown", - "raw": "**test**", - "html": "

test

" - }, - "id": 1, - "milestone": null, - "repository": { - "full_name": "minicoders/test-webhook", - "type": "repository", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "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/" - } - }, - "name": "test-webhook" - }, - "component": null, - "version": null, - "votes": 0, - "priority": "major", - "type": "issue", - "state": "open", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1" - }, - "comments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/issue/1/my-new-issue" - }, - "watch": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/watch" - }, - "attachments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/attachments" - }, - "vote": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/vote" - } - }, - "kind": "bug", - "updated_on": "2015-06-21T14:56:49.739063+00:00", - "assignee": { - "username": "minicoders", - "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/" - } - }, - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user" - }, - "title": "My new issue" - }, - "comment": { - "id": 19181022, - "created_on": "2015-06-21T14:56:49.749362+00:00", - "content": { - "markup": "markdown", - "raw": null, - "html": "" - }, - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments/19181022" - } - }, - "user": { - "username": "minicoders", - "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/" - } - }, - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user" - }, - "updated_on": null - }, - "repository": { - "name": "test-webhook", - "owner": { - "username": "minicoders", - "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/" - } - }, - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user" - }, - "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" - }, - "changes": { - "status": { - "new": "open", - "old": "closed" - } - }, - "actor": { - "username": "minicoders", - "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/" - } - }, - "display_name": "Frederic Guillot", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}", - "type": "user" - } -} \ No newline at end of file diff --git a/tests/units/fixtures/bitbucket_issue_unassigned.json b/tests/units/fixtures/bitbucket_issue_unassigned.json deleted file mode 100644 index 3cbab2ea..00000000 --- a/tests/units/fixtures/bitbucket_issue_unassigned.json +++ /dev/null @@ -1,193 +0,0 @@ -{ - "comment": { - "updated_on": null, - "content": { - "html": "", - "markup": "markdown", - "raw": null - }, - "created_on": "2015-06-21T15:07:45.787623+00:00", - "user": { - "display_name": "Frederic Guillot", - "username": "minicoders", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - }, - "type": "user", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments/19181143" - } - }, - "id": 19181143 - }, - "issue": { - "state": "open", - "content": { - "html": "

test

", - "markup": "markdown", - "raw": "**test**" - }, - "milestone": null, - "type": "issue", - "version": null, - "title": "My new issue", - "assignee": null, - "kind": "bug", - "component": null, - "priority": "major", - "reporter": { - "display_name": "Frederic Guillot", - "username": "minicoders", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - }, - "type": "user", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "created_on": "2015-06-21T02:17:40.990654+00:00", - "edited_on": null, - "updated_on": "2015-06-21T15:07:45.775705+00:00", - "id": 1, - "votes": 0, - "repository": { - "full_name": "minicoders/test-webhook", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - }, - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - } - }, - "type": "repository", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}", - "name": "test-webhook" - }, - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1" - }, - "watch": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/watch" - }, - "vote": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/vote" - }, - "comments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/comments" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook/issue/1/my-new-issue" - }, - "attachments": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook/issues/1/attachments" - } - }, - "watches": 1 - }, - "actor": { - "display_name": "Frederic Guillot", - "username": "minicoders", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - }, - "type": "user", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "repository": { - "full_name": "minicoders/test-webhook", - "owner": { - "display_name": "Frederic Guillot", - "username": "minicoders", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - }, - "type": "user", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "type": "repository", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/repositories/minicoders/test-webhook" - }, - "avatar": { - "href": "https://bitbucket.org/minicoders/test-webhook/avatar/16/" - }, - "html": { - "href": "https://bitbucket.org/minicoders/test-webhook" - } - }, - "name": "test-webhook", - "uuid": "{590fd9c4-0812-425e-8d72-ab08b4fd5735}" - }, - "changes": { - "responsible": { - "old": { - "is_system": false, - "username": "minicoders", - "name": "Frederic Guillot", - "billing_external_uuid": null, - "id": 1290132 - }, - "new": null - }, - "assignee": { - "old": { - "display_name": "Frederic Guillot", - "username": "minicoders", - "links": { - "self": { - "href": "https://bitbucket.org/api/2.0/users/minicoders" - }, - "avatar": { - "href": "https://bitbucket.org/account/minicoders/avatar/32/" - }, - "html": { - "href": "https://bitbucket.org/minicoders" - } - }, - "type": "user", - "uuid": "{fc59b45a-f68b-4fc1-ad1f-a17d4f17cd2c}" - }, - "new": null - } - } -} \ No newline at end of file diff --git a/tests/units/fixtures/bitbucket_push.json b/tests/units/fixtures/bitbucket_push.json deleted file mode 100644 index f480b074..00000000 --- a/tests/units/fixtures/bitbucket_push.json +++ /dev/null @@ -1,182 +0,0 @@ -{ - "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 ", - "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 " - } - }, - "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" - } -} \ No newline at end of file -- cgit v1.2.3