Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #29 from PrestaShop/fix-event-error-handler
Browse files Browse the repository at this point in the history
Fixed event error handler
  • Loading branch information
mickaelandrieu authored Nov 24, 2016
2 parents 72abef1 + f38cf0f commit 25ca53c
Show file tree
Hide file tree
Showing 4 changed files with 235 additions and 26 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "^2.0",
"knplabs/github-api": "^1.7",
"lp-digital/github-event-parser": "~0.7"
"lp-digital/github-event-parser": "~0.8"
},
"require-dev": {
"phpunit/phpunit": "5.4.*",
Expand Down
50 changes: 25 additions & 25 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions tests/AppBundle/Controller/WebhookControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,11 @@ public function getTests()
'wrong_repository.pull_request.json',
[],
];
$tests['Status'] = [
'pull_request',
'status.json',
[],
];
$tests['Pull request synchronize'] = [
'pull_request',
'pull_request.synchronize.json',
Expand Down
204 changes: 204 additions & 0 deletions tests/AppBundle/webhook_examples/status.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
{
"id": 874981546,
"sha": "c4df002569fff5a4711d4ac38e76db81a94866d0",
"name": "PrestaShop/PrestaShop",
"target_url": "https://travis-ci.org/PrestaShop/PrestaShop/builds/178532369",
"context": "continuous-integration/travis-ci/pr",
"description": "The Travis CI build passed",
"state": "success",
"commit": {
"sha": "c4df002569fff5a4711d4ac38e76db81a94866d0",
"commit": {
"author": {
"name": "Thomas Nabord",
"email": "[email protected]",
"date": "2016-11-23T15:45:15Z"
},
"committer": {
"name": "Thomas Nabord",
"email": "[email protected]",
"date": "2016-11-23T15:45:15Z"
},
"message": "IN: Bring back cookie standalone mode",
"tree": {
"sha": "beb506156f548a1a44a42c902ce284d2ba6de6fd",
"url": "https://api.github.com/repos/PrestaShop/PrestaShop/git/trees/beb506156f548a1a44a42c902ce284d2ba6de6fd"
},
"url": "https://api.github.com/repos/PrestaShop/PrestaShop/git/commits/c4df002569fff5a4711d4ac38e76db81a94866d0",
"comment_count": 0
},
"url": "https://api.github.com/repos/PrestaShop/PrestaShop/commits/c4df002569fff5a4711d4ac38e76db81a94866d0",
"html_url": "https://github.com/PrestaShop/PrestaShop/commit/c4df002569fff5a4711d4ac38e76db81a94866d0",
"comments_url": "https://api.github.com/repos/PrestaShop/PrestaShop/commits/c4df002569fff5a4711d4ac38e76db81a94866d0/comments",
"author": {
"login": "Quetzacoalt91",
"id": 6768917,
"avatar_url": "https://avatars.githubusercontent.com/u/6768917?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/Quetzacoalt91",
"html_url": "https://github.com/Quetzacoalt91",
"followers_url": "https://api.github.com/users/Quetzacoalt91/followers",
"following_url": "https://api.github.com/users/Quetzacoalt91/following{/other_user}",
"gists_url": "https://api.github.com/users/Quetzacoalt91/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Quetzacoalt91/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Quetzacoalt91/subscriptions",
"organizations_url": "https://api.github.com/users/Quetzacoalt91/orgs",
"repos_url": "https://api.github.com/users/Quetzacoalt91/repos",
"events_url": "https://api.github.com/users/Quetzacoalt91/events{/privacy}",
"received_events_url": "https://api.github.com/users/Quetzacoalt91/received_events",
"type": "User",
"site_admin": false
},
"committer": {
"login": "Quetzacoalt91",
"id": 6768917,
"avatar_url": "https://avatars.githubusercontent.com/u/6768917?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/Quetzacoalt91",
"html_url": "https://github.com/Quetzacoalt91",
"followers_url": "https://api.github.com/users/Quetzacoalt91/followers",
"following_url": "https://api.github.com/users/Quetzacoalt91/following{/other_user}",
"gists_url": "https://api.github.com/users/Quetzacoalt91/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Quetzacoalt91/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Quetzacoalt91/subscriptions",
"organizations_url": "https://api.github.com/users/Quetzacoalt91/orgs",
"repos_url": "https://api.github.com/users/Quetzacoalt91/repos",
"events_url": "https://api.github.com/users/Quetzacoalt91/events{/privacy}",
"received_events_url": "https://api.github.com/users/Quetzacoalt91/received_events",
"type": "User",
"site_admin": false
},
"parents": [
{
"sha": "dff9a9833c96a9141401d3c6a2191a0ebdca9812",
"url": "https://api.github.com/repos/PrestaShop/PrestaShop/commits/dff9a9833c96a9141401d3c6a2191a0ebdca9812",
"html_url": "https://github.com/PrestaShop/PrestaShop/commit/dff9a9833c96a9141401d3c6a2191a0ebdca9812"
}
]
},
"branches": [

],
"created_at": "2016-11-24T09:06:28Z",
"updated_at": "2016-11-24T09:06:28Z",
"repository": {
"id": 6763587,
"name": "PrestaShop",
"full_name": "loveOSS/test",
"owner": {
"login": "PrestaShop",
"id": 2815696,
"avatar_url": "https://avatars.githubusercontent.com/u/2815696?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/PrestaShop",
"html_url": "https://github.com/PrestaShop",
"followers_url": "https://api.github.com/users/PrestaShop/followers",
"following_url": "https://api.github.com/users/PrestaShop/following{/other_user}",
"gists_url": "https://api.github.com/users/PrestaShop/gists{/gist_id}",
"starred_url": "https://api.github.com/users/PrestaShop/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/PrestaShop/subscriptions",
"organizations_url": "https://api.github.com/users/PrestaShop/orgs",
"repos_url": "https://api.github.com/users/PrestaShop/repos",
"events_url": "https://api.github.com/users/PrestaShop/events{/privacy}",
"received_events_url": "https://api.github.com/users/PrestaShop/received_events",
"type": "Organization",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/PrestaShop/PrestaShop",
"description": "PrestaShop offers a free, fully scalable, Open Source e-commerce solution.",
"fork": false,
"url": "https://api.github.com/repos/PrestaShop/PrestaShop",
"forks_url": "https://api.github.com/repos/PrestaShop/PrestaShop/forks",
"keys_url": "https://api.github.com/repos/PrestaShop/PrestaShop/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/PrestaShop/PrestaShop/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/PrestaShop/PrestaShop/teams",
"hooks_url": "https://api.github.com/repos/PrestaShop/PrestaShop/hooks",
"issue_events_url": "https://api.github.com/repos/PrestaShop/PrestaShop/issues/events{/number}",
"events_url": "https://api.github.com/repos/PrestaShop/PrestaShop/events",
"assignees_url": "https://api.github.com/repos/PrestaShop/PrestaShop/assignees{/user}",
"branches_url": "https://api.github.com/repos/PrestaShop/PrestaShop/branches{/branch}",
"tags_url": "https://api.github.com/repos/PrestaShop/PrestaShop/tags",
"blobs_url": "https://api.github.com/repos/PrestaShop/PrestaShop/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/PrestaShop/PrestaShop/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/PrestaShop/PrestaShop/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/PrestaShop/PrestaShop/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/PrestaShop/PrestaShop/statuses/{sha}",
"languages_url": "https://api.github.com/repos/PrestaShop/PrestaShop/languages",
"stargazers_url": "https://api.github.com/repos/PrestaShop/PrestaShop/stargazers",
"contributors_url": "https://api.github.com/repos/PrestaShop/PrestaShop/contributors",
"subscribers_url": "https://api.github.com/repos/PrestaShop/PrestaShop/subscribers",
"subscription_url": "https://api.github.com/repos/PrestaShop/PrestaShop/subscription",
"commits_url": "https://api.github.com/repos/PrestaShop/PrestaShop/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/PrestaShop/PrestaShop/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/PrestaShop/PrestaShop/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/PrestaShop/PrestaShop/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/PrestaShop/PrestaShop/contents/{+path}",
"compare_url": "https://api.github.com/repos/PrestaShop/PrestaShop/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/PrestaShop/PrestaShop/merges",
"archive_url": "https://api.github.com/repos/PrestaShop/PrestaShop/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/PrestaShop/PrestaShop/downloads",
"issues_url": "https://api.github.com/repos/PrestaShop/PrestaShop/issues{/number}",
"pulls_url": "https://api.github.com/repos/PrestaShop/PrestaShop/pulls{/number}",
"milestones_url": "https://api.github.com/repos/PrestaShop/PrestaShop/milestones{/number}",
"notifications_url": "https://api.github.com/repos/PrestaShop/PrestaShop/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/PrestaShop/PrestaShop/labels{/name}",
"releases_url": "https://api.github.com/repos/PrestaShop/PrestaShop/releases{/id}",
"deployments_url": "https://api.github.com/repos/PrestaShop/PrestaShop/deployments",
"created_at": "2012-11-19T16:41:31Z",
"updated_at": "2016-11-22T17:39:13Z",
"pushed_at": "2016-11-24T08:53:34Z",
"git_url": "git://github.com/PrestaShop/PrestaShop.git",
"ssh_url": "[email protected]:PrestaShop/PrestaShop.git",
"clone_url": "https://github.com/PrestaShop/PrestaShop.git",
"svn_url": "https://github.com/PrestaShop/PrestaShop",
"homepage": "http://www.prestashop.com/",
"size": 346905,
"stargazers_count": 2124,
"watchers_count": 2124,
"language": "PHP",
"has_issues": false,
"has_downloads": true,
"has_wiki": false,
"has_pages": false,
"forks_count": 2092,
"mirror_url": null,
"open_issues_count": 371,
"forks": 2092,
"open_issues": 371,
"watchers": 2124,
"default_branch": "develop"
},
"organization": {
"login": "PrestaShop",
"id": 2815696,
"url": "https://api.github.com/orgs/PrestaShop",
"repos_url": "https://api.github.com/orgs/PrestaShop/repos",
"events_url": "https://api.github.com/orgs/PrestaShop/events",
"hooks_url": "https://api.github.com/orgs/PrestaShop/hooks",
"issues_url": "https://api.github.com/orgs/PrestaShop/issues",
"members_url": "https://api.github.com/orgs/PrestaShop/members{/member}",
"public_members_url": "https://api.github.com/orgs/PrestaShop/public_members{/member}",
"avatar_url": "https://avatars.githubusercontent.com/u/2815696?v=3",
"description": "The free ecommerce solution to start your online business and start selling online. Build an online store for free with PrestaShop."
},
"sender": {
"login": "Quetzacoalt91",
"id": 6768917,
"avatar_url": "https://avatars.githubusercontent.com/u/6768917?v=3",
"gravatar_id": "",
"url": "https://api.github.com/users/Quetzacoalt91",
"html_url": "https://github.com/Quetzacoalt91",
"followers_url": "https://api.github.com/users/Quetzacoalt91/followers",
"following_url": "https://api.github.com/users/Quetzacoalt91/following{/other_user}",
"gists_url": "https://api.github.com/users/Quetzacoalt91/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Quetzacoalt91/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Quetzacoalt91/subscriptions",
"organizations_url": "https://api.github.com/users/Quetzacoalt91/orgs",
"repos_url": "https://api.github.com/users/Quetzacoalt91/repos",
"events_url": "https://api.github.com/users/Quetzacoalt91/events{/privacy}",
"received_events_url": "https://api.github.com/users/Quetzacoalt91/received_events",
"type": "User",
"site_admin": false
}
}

0 comments on commit 25ca53c

Please sign in to comment.