Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathGitController.php
More file actions
executable file
·90 lines (70 loc) · 86.3 KB
/
Copy pathGitController.php
File metadata and controls
executable file
·90 lines (70 loc) · 86.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
namespace App\Controllers;
use Slim\Http\Request;
use Slim\Http\Response;
class GitController
{
private $db, $utils, $logger, $git;
public function __construct($db, $utils, $logger, $git)
{
$this->db = $db;
$this->utils = $utils;
$this->logger = $logger;
$this->git = $git;
}
public function webhook(Request $request, Response $response, $args)
{
$tm = microtime(true);
try
{
$debug = 0;
if ($debug)
{
$data = $this->sampleDataBitBucket('master');
}
//p_d(json_decode($data['post']['payload'],1));
if (!isset($data) || !$data)
{
$data['get'] = $request->getQueryParams();
$data['post'] = $request->getParsedBody();
$data['args'] = $args;
$data['headers'] = $request->getHeaders();
$data['body'] = file_get_contents('php://input');
}
// $this->logger->info(json_encode($data));
//die("x");
$gitRepo = $this->git->identifyandValidateRepo($data, $request);
if (!$gitRepo)
{
throw new \Exception("No valid handler found");
}
$msg = "Repo '{$gitRepo->project['name']}' branch {$gitRepo->project['branch']} synced in " . number_format(microtime(true) - $tm, 2) . " second(s)";
$this->logger->info($msg);
return $response->withStatus(200)->withJson(['status' => 1, 'message' => $msg]);
}
catch (\Exception $e)
{
$this->logger->info($e->getMessage());
return $response->withStatus(200)->withJson(['status' => 0, 'message' => $e->getMessage()]);
}
}
public function sampleDataGitHub($branch)
{
$str['master'] = '{"get":[],"post":{"payload":"{\"ref\":\"refs\/heads\/master\",\"before\":\"6e60d121155e246496d507439a848bc29565475e\",\"after\":\"ad19aae5d9595e24968dfbc49ac375853c61675c\",\"created\":false,\"deleted\":false,\"forced\":false,\"base_ref\":null,\"compare\":\"https:\/\/github.com\/scriptburn\/test\/compare\/6e60d121155e...ad19aae5d959\",\"commits\":[{\"id\":\"ad19aae5d9595e24968dfbc49ac375853c61675c\",\"tree_id\":\"6dc597ccdbbc53c1b0430473fe6cc2b17f859dda\",\"distinct\":true,\"message\":\"2 commit\",\"timestamp\":\"2017-06-27T21:15:46+05:30\",\"url\":\"https:\/\/github.com\/scriptburn\/test\/commit\/ad19aae5d9595e24968dfbc49ac375853c61675c\",\"author\":{\"name\":\"rajneesh\",\"email\":\"rajneesh@rajneeshs-MacBook-Pro.local\"},\"committer\":{\"name\":\"rajneesh\",\"email\":\"rajneesh@rajneeshs-MacBook-Pro.local\"},\"added\":[],\"removed\":[],\"modified\":[\"README.md\"]}],\"head_commit\":{\"id\":\"ad19aae5d9595e24968dfbc49ac375853c61675c\",\"tree_id\":\"6dc597ccdbbc53c1b0430473fe6cc2b17f859dda\",\"distinct\":true,\"message\":\"2 commit\",\"timestamp\":\"2017-06-27T21:15:46+05:30\",\"url\":\"https:\/\/github.com\/scriptburn\/test\/commit\/ad19aae5d9595e24968dfbc49ac375853c61675c\",\"author\":{\"name\":\"rajneesh\",\"email\":\"rajneesh@rajneeshs-MacBook-Pro.local\"},\"committer\":{\"name\":\"rajneesh\",\"email\":\"rajneesh@rajneeshs-MacBook-Pro.local\"},\"added\":[],\"removed\":[],\"modified\":[\"README.md\"]},\"repository\":{\"id\":95572810,\"name\":\"test\",\"full_name\":\"scriptburn\/test\",\"owner\":{\"name\":\"scriptburn\",\"email\":\"contact@scriptburn.com\",\"login\":\"scriptburn\",\"id\":20643070,\"avatar_url\":\"https:\/\/avatars0.githubusercontent.com\/u\/20643070?v=3\",\"gravatar_id\":\"\",\"url\":\"https:\/\/api.github.com\/users\/scriptburn\",\"html_url\":\"https:\/\/github.com\/scriptburn\",\"followers_url\":\"https:\/\/api.github.com\/users\/scriptburn\/followers\",\"following_url\":\"https:\/\/api.github.com\/users\/scriptburn\/following{\/other_user}\",\"gists_url\":\"https:\/\/api.github.com\/users\/scriptburn\/gists{\/gist_id}\",\"starred_url\":\"https:\/\/api.github.com\/users\/scriptburn\/starred{\/owner}{\/repo}\",\"subscriptions_url\":\"https:\/\/api.github.com\/users\/scriptburn\/subscriptions\",\"organizations_url\":\"https:\/\/api.github.com\/users\/scriptburn\/orgs\",\"repos_url\":\"https:\/\/api.github.com\/users\/scriptburn\/repos\",\"events_url\":\"https:\/\/api.github.com\/users\/scriptburn\/events{\/privacy}\",\"received_events_url\":\"https:\/\/api.github.com\/users\/scriptburn\/received_events\",\"type\":\"User\",\"site_admin\":false},\"private\":false,\"html_url\":\"https:\/\/github.com\/scriptburn\/test\",\"description\":\"just for testing purpose move on nothing to see here\",\"fork\":false,\"url\":\"https:\/\/github.com\/scriptburn\/test\",\"forks_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/forks\",\"keys_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/keys{\/key_id}\",\"collaborators_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/collaborators{\/collaborator}\",\"teams_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/teams\",\"hooks_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/hooks\",\"issue_events_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/issues\/events{\/number}\",\"events_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/events\",\"assignees_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/assignees{\/user}\",\"branches_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/branches{\/branch}\",\"tags_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/tags\",\"blobs_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/git\/blobs{\/sha}\",\"git_tags_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/git\/tags{\/sha}\",\"git_refs_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/git\/refs{\/sha}\",\"trees_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/git\/trees{\/sha}\",\"statuses_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/statuses\/{sha}\",\"languages_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/languages\",\"stargazers_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/stargazers\",\"contributors_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/contributors\",\"subscribers_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/subscribers\",\"subscription_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/subscription\",\"commits_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/commits{\/sha}\",\"git_commits_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/git\/commits{\/sha}\",\"comments_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/comments{\/number}\",\"issue_comment_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/issues\/comments{\/number}\",\"contents_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/contents\/{+path}\",\"compare_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/compare\/{base}...{head}\",\"merges_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/merges\",\"archive_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/{archive_format}{\/ref}\",\"downloads_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/downloads\",\"issues_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/issues{\/number}\",\"pulls_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/pulls{\/number}\",\"milestones_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/milestones{\/number}\",\"notifications_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/notifications{?since,all,participating}\",\"labels_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/labels{\/name}\",\"releases_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/releases{\/id}\",\"deployments_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/deployments\",\"created_at\":1498577020,\"updated_at\":\"2017-06-27T15:23:40Z\",\"pushed_at\":1498578363,\"git_url\":\"git:\/\/github.com\/scriptburn\/test.git\",\"ssh_url\":\"git@github.com:scriptburn\/test.git\",\"clone_url\":\"https:\/\/github.com\/scriptburn\/test.git\",\"svn_url\":\"https:\/\/github.com\/scriptburn\/test\",\"homepage\":null,\"size\":0,\"stargazers_count\":0,\"watchers_count\":0,\"language\":null,\"has_issues\":true,\"has_projects\":true,\"has_downloads\":true,\"has_wiki\":true,\"has_pages\":false,\"forks_count\":0,\"mirror_url\":null,\"open_issues_count\":0,\"forks\":0,\"open_issues\":0,\"watchers\":0,\"default_branch\":\"master\",\"stargazers\":0,\"master_branch\":\"master\"},\"pusher\":{\"name\":\"scriptburn\",\"email\":\"contact@scriptburn.com\"},\"sender\":{\"login\":\"scriptburn\",\"id\":20643070,\"avatar_url\":\"https:\/\/avatars0.githubusercontent.com\/u\/20643070?v=3\",\"gravatar_id\":\"\",\"url\":\"https:\/\/api.github.com\/users\/scriptburn\",\"html_url\":\"https:\/\/github.com\/scriptburn\",\"followers_url\":\"https:\/\/api.github.com\/users\/scriptburn\/followers\",\"following_url\":\"https:\/\/api.github.com\/users\/scriptburn\/following{\/other_user}\",\"gists_url\":\"https:\/\/api.github.com\/users\/scriptburn\/gists{\/gist_id}\",\"starred_url\":\"https:\/\/api.github.com\/users\/scriptburn\/starred{\/owner}{\/repo}\",\"subscriptions_url\":\"https:\/\/api.github.com\/users\/scriptburn\/subscriptions\",\"organizations_url\":\"https:\/\/api.github.com\/users\/scriptburn\/orgs\",\"repos_url\":\"https:\/\/api.github.com\/users\/scriptburn\/repos\",\"events_url\":\"https:\/\/api.github.com\/users\/scriptburn\/events{\/privacy}\",\"received_events_url\":\"https:\/\/api.github.com\/users\/scriptburn\/received_events\",\"type\":\"User\",\"site_admin\":false}}"},"args":[],"headers":{"Host":["deploy.tools2.com"],"HTTP_USER_AGENT":["GitHub-Hookshot\/18889e1"],"CONTENT_LENGTH":["9698"],"HTTP_ACCEPT":["*\/*"],"CONTENT_TYPE":["application\/x-www-form-urlencoded"],"HTTP_X_FORWARDED_FOR":["192.30.252.45"],"HTTP_X_FORWARDED_PROTO":["https"],"HTTP_X_GITHUB_DELIVERY":["b9b2db60-5b4f-11e7-81fd-8da56a7a7fed"],"HTTP_X_GITHUB_EVENT":["push"],"HTTP_X_HUB_SIGNATURE":["sha1=107e132dd0c459654a5764e0abce192f0b76770e"],"HTTP_X_ORIGINAL_HOST":["1ee7a1c9.ngrok.io"]},"body":"payload=%7B%22ref%22%3A%22refs%2Fheads%2Fmaster%22%2C%22before%22%3A%226e60d121155e246496d507439a848bc29565475e%22%2C%22after%22%3A%22ad19aae5d9595e24968dfbc49ac375853c61675c%22%2C%22created%22%3Afalse%2C%22deleted%22%3Afalse%2C%22forced%22%3Afalse%2C%22base_ref%22%3Anull%2C%22compare%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%2Ftest%2Fcompare%2F6e60d121155e...ad19aae5d959%22%2C%22commits%22%3A%5B%7B%22id%22%3A%22ad19aae5d9595e24968dfbc49ac375853c61675c%22%2C%22tree_id%22%3A%226dc597ccdbbc53c1b0430473fe6cc2b17f859dda%22%2C%22distinct%22%3Atrue%2C%22message%22%3A%222+commit%22%2C%22timestamp%22%3A%222017-06-27T21%3A15%3A46%2B05%3A30%22%2C%22url%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%2Ftest%2Fcommit%2Fad19aae5d9595e24968dfbc49ac375853c61675c%22%2C%22author%22%3A%7B%22name%22%3A%22rajneesh%22%2C%22email%22%3A%22rajneesh%40rajneeshs-MacBook-Pro.local%22%7D%2C%22committer%22%3A%7B%22name%22%3A%22rajneesh%22%2C%22email%22%3A%22rajneesh%40rajneeshs-MacBook-Pro.local%22%7D%2C%22added%22%3A%5B%5D%2C%22removed%22%3A%5B%5D%2C%22modified%22%3A%5B%22README.md%22%5D%7D%5D%2C%22head_commit%22%3A%7B%22id%22%3A%22ad19aae5d9595e24968dfbc49ac375853c61675c%22%2C%22tree_id%22%3A%226dc597ccdbbc53c1b0430473fe6cc2b17f859dda%22%2C%22distinct%22%3Atrue%2C%22message%22%3A%222+commit%22%2C%22timestamp%22%3A%222017-06-27T21%3A15%3A46%2B05%3A30%22%2C%22url%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%2Ftest%2Fcommit%2Fad19aae5d9595e24968dfbc49ac375853c61675c%22%2C%22author%22%3A%7B%22name%22%3A%22rajneesh%22%2C%22email%22%3A%22rajneesh%40rajneeshs-MacBook-Pro.local%22%7D%2C%22committer%22%3A%7B%22name%22%3A%22rajneesh%22%2C%22email%22%3A%22rajneesh%40rajneeshs-MacBook-Pro.local%22%7D%2C%22added%22%3A%5B%5D%2C%22removed%22%3A%5B%5D%2C%22modified%22%3A%5B%22README.md%22%5D%7D%2C%22repository%22%3A%7B%22id%22%3A95572810%2C%22name%22%3A%22test%22%2C%22full_name%22%3A%22scriptburn%2Ftest%22%2C%22owner%22%3A%7B%22name%22%3A%22scriptburn%22%2C%22email%22%3A%22contact%40scriptburn.com%22%2C%22login%22%3A%22scriptburn%22%2C%22id%22%3A20643070%2C%22avatar_url%22%3A%22https%3A%2F%2Favatars0.githubusercontent.com%2Fu%2F20643070%3Fv%3D3%22%2C%22gravatar_id%22%3A%22%22%2C%22url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%22%2C%22html_url%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%22%2C%22followers_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Ffollowers%22%2C%22following_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Ffollowing%7B%2Fother_user%7D%22%2C%22gists_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fgists%7B%2Fgist_id%7D%22%2C%22starred_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fstarred%7B%2Fowner%7D%7B%2Frepo%7D%22%2C%22subscriptions_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fsubscriptions%22%2C%22organizations_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Forgs%22%2C%22repos_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Frepos%22%2C%22events_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fevents%7B%2Fprivacy%7D%22%2C%22received_events_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Freceived_events%22%2C%22type%22%3A%22User%22%2C%22site_admin%22%3Afalse%7D%2C%22private%22%3Afalse%2C%22html_url%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%2Ftest%22%2C%22description%22%3A%22just+for+testing+purpose+move+on+nothing+to+see+here%22%2C%22fork%22%3Afalse%2C%22url%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%2Ftest%22%2C%22forks_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fforks%22%2C%22keys_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fkeys%7B%2Fkey_id%7D%22%2C%22collaborators_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fcollaborators%7B%2Fcollaborator%7D%22%2C%22teams_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fteams%22%2C%22hooks_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fhooks%22%2C%22issue_events_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fissues%2Fevents%7B%2Fnumber%7D%22%2C%22events_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fevents%22%2C%22assignees_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fassignees%7B%2Fuser%7D%22%2C%22branches_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fbranches%7B%2Fbranch%7D%22%2C%22tags_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Ftags%22%2C%22blobs_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fgit%2Fblobs%7B%2Fsha%7D%22%2C%22git_tags_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fgit%2Ftags%7B%2Fsha%7D%22%2C%22git_refs_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fgit%2Frefs%7B%2Fsha%7D%22%2C%22trees_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fgit%2Ftrees%7B%2Fsha%7D%22%2C%22statuses_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fstatuses%2F%7Bsha%7D%22%2C%22languages_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Flanguages%22%2C%22stargazers_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fstargazers%22%2C%22contributors_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fcontributors%22%2C%22subscribers_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fsubscribers%22%2C%22subscription_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fsubscription%22%2C%22commits_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fcommits%7B%2Fsha%7D%22%2C%22git_commits_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fgit%2Fcommits%7B%2Fsha%7D%22%2C%22comments_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fcomments%7B%2Fnumber%7D%22%2C%22issue_comment_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fissues%2Fcomments%7B%2Fnumber%7D%22%2C%22contents_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fcontents%2F%7B%2Bpath%7D%22%2C%22compare_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fcompare%2F%7Bbase%7D...%7Bhead%7D%22%2C%22merges_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fmerges%22%2C%22archive_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2F%7Barchive_format%7D%7B%2Fref%7D%22%2C%22downloads_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fdownloads%22%2C%22issues_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fissues%7B%2Fnumber%7D%22%2C%22pulls_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fpulls%7B%2Fnumber%7D%22%2C%22milestones_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fmilestones%7B%2Fnumber%7D%22%2C%22notifications_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fnotifications%7B%3Fsince%2Call%2Cparticipating%7D%22%2C%22labels_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Flabels%7B%2Fname%7D%22%2C%22releases_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Freleases%7B%2Fid%7D%22%2C%22deployments_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fdeployments%22%2C%22created_at%22%3A1498577020%2C%22updated_at%22%3A%222017-06-27T15%3A23%3A40Z%22%2C%22pushed_at%22%3A1498578363%2C%22git_url%22%3A%22git%3A%2F%2Fgithub.com%2Fscriptburn%2Ftest.git%22%2C%22ssh_url%22%3A%22git%40github.com%3Ascriptburn%2Ftest.git%22%2C%22clone_url%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%2Ftest.git%22%2C%22svn_url%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%2Ftest%22%2C%22homepage%22%3Anull%2C%22size%22%3A0%2C%22stargazers_count%22%3A0%2C%22watchers_count%22%3A0%2C%22language%22%3Anull%2C%22has_issues%22%3Atrue%2C%22has_projects%22%3Atrue%2C%22has_downloads%22%3Atrue%2C%22has_wiki%22%3Atrue%2C%22has_pages%22%3Afalse%2C%22forks_count%22%3A0%2C%22mirror_url%22%3Anull%2C%22open_issues_count%22%3A0%2C%22forks%22%3A0%2C%22open_issues%22%3A0%2C%22watchers%22%3A0%2C%22default_branch%22%3A%22master%22%2C%22stargazers%22%3A0%2C%22master_branch%22%3A%22master%22%7D%2C%22pusher%22%3A%7B%22name%22%3A%22scriptburn%22%2C%22email%22%3A%22contact%40scriptburn.com%22%7D%2C%22sender%22%3A%7B%22login%22%3A%22scriptburn%22%2C%22id%22%3A20643070%2C%22avatar_url%22%3A%22https%3A%2F%2Favatars0.githubusercontent.com%2Fu%2F20643070%3Fv%3D3%22%2C%22gravatar_id%22%3A%22%22%2C%22url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%22%2C%22html_url%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%22%2C%22followers_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Ffollowers%22%2C%22following_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Ffollowing%7B%2Fother_user%7D%22%2C%22gists_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fgists%7B%2Fgist_id%7D%22%2C%22starred_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fstarred%7B%2Fowner%7D%7B%2Frepo%7D%22%2C%22subscriptions_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fsubscriptions%22%2C%22organizations_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Forgs%22%2C%22repos_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Frepos%22%2C%22events_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fevents%7B%2Fprivacy%7D%22%2C%22received_events_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Freceived_events%22%2C%22type%22%3A%22User%22%2C%22site_admin%22%3Afalse%7D%7D"}';
$str['develop'] = '{"get":[],"post":{"payload":"{\"ref\":\"refs\/heads\/develop\",\"before\":\"0000000000000000000000000000000000000000\",\"after\":\"ad19aae5d9595e24968dfbc49ac375853c61675c\",\"created\":true,\"deleted\":false,\"forced\":false,\"base_ref\":\"refs\/heads\/master\",\"compare\":\"https:\/\/github.com\/scriptburn\/test\/compare\/develop\",\"commits\":[],\"head_commit\":{\"id\":\"ad19aae5d9595e24968dfbc49ac375853c61675c\",\"tree_id\":\"6dc597ccdbbc53c1b0430473fe6cc2b17f859dda\",\"distinct\":true,\"message\":\"2 commit\",\"timestamp\":\"2017-06-27T21:15:46+05:30\",\"url\":\"https:\/\/github.com\/scriptburn\/test\/commit\/ad19aae5d9595e24968dfbc49ac375853c61675c\",\"author\":{\"name\":\"rajneesh\",\"email\":\"rajneesh@rajneeshs-MacBook-Pro.local\"},\"committer\":{\"name\":\"rajneesh\",\"email\":\"rajneesh@rajneeshs-MacBook-Pro.local\"},\"added\":[],\"removed\":[],\"modified\":[\"README.md\"]},\"repository\":{\"id\":95572810,\"name\":\"test\",\"full_name\":\"scriptburn\/test\",\"owner\":{\"name\":\"scriptburn\",\"email\":\"contact@scriptburn.com\",\"login\":\"scriptburn\",\"id\":20643070,\"avatar_url\":\"https:\/\/avatars0.githubusercontent.com\/u\/20643070?v=3\",\"gravatar_id\":\"\",\"url\":\"https:\/\/api.github.com\/users\/scriptburn\",\"html_url\":\"https:\/\/github.com\/scriptburn\",\"followers_url\":\"https:\/\/api.github.com\/users\/scriptburn\/followers\",\"following_url\":\"https:\/\/api.github.com\/users\/scriptburn\/following{\/other_user}\",\"gists_url\":\"https:\/\/api.github.com\/users\/scriptburn\/gists{\/gist_id}\",\"starred_url\":\"https:\/\/api.github.com\/users\/scriptburn\/starred{\/owner}{\/repo}\",\"subscriptions_url\":\"https:\/\/api.github.com\/users\/scriptburn\/subscriptions\",\"organizations_url\":\"https:\/\/api.github.com\/users\/scriptburn\/orgs\",\"repos_url\":\"https:\/\/api.github.com\/users\/scriptburn\/repos\",\"events_url\":\"https:\/\/api.github.com\/users\/scriptburn\/events{\/privacy}\",\"received_events_url\":\"https:\/\/api.github.com\/users\/scriptburn\/received_events\",\"type\":\"User\",\"site_admin\":false},\"private\":false,\"html_url\":\"https:\/\/github.com\/scriptburn\/test\",\"description\":\"just for testing purpose move on nothing to see here\",\"fork\":false,\"url\":\"https:\/\/github.com\/scriptburn\/test\",\"forks_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/forks\",\"keys_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/keys{\/key_id}\",\"collaborators_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/collaborators{\/collaborator}\",\"teams_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/teams\",\"hooks_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/hooks\",\"issue_events_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/issues\/events{\/number}\",\"events_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/events\",\"assignees_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/assignees{\/user}\",\"branches_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/branches{\/branch}\",\"tags_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/tags\",\"blobs_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/git\/blobs{\/sha}\",\"git_tags_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/git\/tags{\/sha}\",\"git_refs_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/git\/refs{\/sha}\",\"trees_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/git\/trees{\/sha}\",\"statuses_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/statuses\/{sha}\",\"languages_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/languages\",\"stargazers_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/stargazers\",\"contributors_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/contributors\",\"subscribers_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/subscribers\",\"subscription_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/subscription\",\"commits_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/commits{\/sha}\",\"git_commits_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/git\/commits{\/sha}\",\"comments_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/comments{\/number}\",\"issue_comment_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/issues\/comments{\/number}\",\"contents_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/contents\/{+path}\",\"compare_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/compare\/{base}...{head}\",\"merges_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/merges\",\"archive_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/{archive_format}{\/ref}\",\"downloads_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/downloads\",\"issues_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/issues{\/number}\",\"pulls_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/pulls{\/number}\",\"milestones_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/milestones{\/number}\",\"notifications_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/notifications{?since,all,participating}\",\"labels_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/labels{\/name}\",\"releases_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/releases{\/id}\",\"deployments_url\":\"https:\/\/api.github.com\/repos\/scriptburn\/test\/deployments\",\"created_at\":1498577020,\"updated_at\":\"2017-06-27T15:23:40Z\",\"pushed_at\":1498637436,\"git_url\":\"git:\/\/github.com\/scriptburn\/test.git\",\"ssh_url\":\"git@github.com:scriptburn\/test.git\",\"clone_url\":\"https:\/\/github.com\/scriptburn\/test.git\",\"svn_url\":\"https:\/\/github.com\/scriptburn\/test\",\"homepage\":null,\"size\":0,\"stargazers_count\":0,\"watchers_count\":0,\"language\":null,\"has_issues\":true,\"has_projects\":true,\"has_downloads\":true,\"has_wiki\":true,\"has_pages\":false,\"forks_count\":0,\"mirror_url\":null,\"open_issues_count\":0,\"forks\":0,\"open_issues\":0,\"watchers\":0,\"default_branch\":\"master\",\"stargazers\":0,\"master_branch\":\"master\"},\"pusher\":{\"name\":\"scriptburn\",\"email\":\"contact@scriptburn.com\"},\"sender\":{\"login\":\"scriptburn\",\"id\":20643070,\"avatar_url\":\"https:\/\/avatars0.githubusercontent.com\/u\/20643070?v=3\",\"gravatar_id\":\"\",\"url\":\"https:\/\/api.github.com\/users\/scriptburn\",\"html_url\":\"https:\/\/github.com\/scriptburn\",\"followers_url\":\"https:\/\/api.github.com\/users\/scriptburn\/followers\",\"following_url\":\"https:\/\/api.github.com\/users\/scriptburn\/following{\/other_user}\",\"gists_url\":\"https:\/\/api.github.com\/users\/scriptburn\/gists{\/gist_id}\",\"starred_url\":\"https:\/\/api.github.com\/users\/scriptburn\/starred{\/owner}{\/repo}\",\"subscriptions_url\":\"https:\/\/api.github.com\/users\/scriptburn\/subscriptions\",\"organizations_url\":\"https:\/\/api.github.com\/users\/scriptburn\/orgs\",\"repos_url\":\"https:\/\/api.github.com\/users\/scriptburn\/repos\",\"events_url\":\"https:\/\/api.github.com\/users\/scriptburn\/events{\/privacy}\",\"received_events_url\":\"https:\/\/api.github.com\/users\/scriptburn\/received_events\",\"type\":\"User\",\"site_admin\":false}}"},"args":[],"headers":{"Host":["deploy.tools2.com"],"HTTP_USER_AGENT":["GitHub-Hookshot\/18889e1"],"CONTENT_LENGTH":["9023"],"HTTP_ACCEPT":["*\/*"],"CONTENT_TYPE":["application\/x-www-form-urlencoded"],"HTTP_X_FORWARDED_FOR":["192.30.252.40"],"HTTP_X_FORWARDED_PROTO":["https"],"HTTP_X_GITHUB_DELIVERY":["442166c0-5bd9-11e7-961e-40b9eabccd98"],"HTTP_X_GITHUB_EVENT":["push"],"HTTP_X_HUB_SIGNATURE":["sha1=934d317889c9f20f0dad55d841a941e38e55c512"],"HTTP_X_ORIGINAL_HOST":["1ee7a1c9.ngrok.io"]},"body":"payload=%7B%22ref%22%3A%22refs%2Fheads%2Fdevelop%22%2C%22before%22%3A%220000000000000000000000000000000000000000%22%2C%22after%22%3A%22ad19aae5d9595e24968dfbc49ac375853c61675c%22%2C%22created%22%3Atrue%2C%22deleted%22%3Afalse%2C%22forced%22%3Afalse%2C%22base_ref%22%3A%22refs%2Fheads%2Fmaster%22%2C%22compare%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%2Ftest%2Fcompare%2Fdevelop%22%2C%22commits%22%3A%5B%5D%2C%22head_commit%22%3A%7B%22id%22%3A%22ad19aae5d9595e24968dfbc49ac375853c61675c%22%2C%22tree_id%22%3A%226dc597ccdbbc53c1b0430473fe6cc2b17f859dda%22%2C%22distinct%22%3Atrue%2C%22message%22%3A%222+commit%22%2C%22timestamp%22%3A%222017-06-27T21%3A15%3A46%2B05%3A30%22%2C%22url%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%2Ftest%2Fcommit%2Fad19aae5d9595e24968dfbc49ac375853c61675c%22%2C%22author%22%3A%7B%22name%22%3A%22rajneesh%22%2C%22email%22%3A%22rajneesh%40rajneeshs-MacBook-Pro.local%22%7D%2C%22committer%22%3A%7B%22name%22%3A%22rajneesh%22%2C%22email%22%3A%22rajneesh%40rajneeshs-MacBook-Pro.local%22%7D%2C%22added%22%3A%5B%5D%2C%22removed%22%3A%5B%5D%2C%22modified%22%3A%5B%22README.md%22%5D%7D%2C%22repository%22%3A%7B%22id%22%3A95572810%2C%22name%22%3A%22test%22%2C%22full_name%22%3A%22scriptburn%2Ftest%22%2C%22owner%22%3A%7B%22name%22%3A%22scriptburn%22%2C%22email%22%3A%22contact%40scriptburn.com%22%2C%22login%22%3A%22scriptburn%22%2C%22id%22%3A20643070%2C%22avatar_url%22%3A%22https%3A%2F%2Favatars0.githubusercontent.com%2Fu%2F20643070%3Fv%3D3%22%2C%22gravatar_id%22%3A%22%22%2C%22url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%22%2C%22html_url%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%22%2C%22followers_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Ffollowers%22%2C%22following_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Ffollowing%7B%2Fother_user%7D%22%2C%22gists_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fgists%7B%2Fgist_id%7D%22%2C%22starred_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fstarred%7B%2Fowner%7D%7B%2Frepo%7D%22%2C%22subscriptions_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fsubscriptions%22%2C%22organizations_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Forgs%22%2C%22repos_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Frepos%22%2C%22events_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fevents%7B%2Fprivacy%7D%22%2C%22received_events_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Freceived_events%22%2C%22type%22%3A%22User%22%2C%22site_admin%22%3Afalse%7D%2C%22private%22%3Afalse%2C%22html_url%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%2Ftest%22%2C%22description%22%3A%22just+for+testing+purpose+move+on+nothing+to+see+here%22%2C%22fork%22%3Afalse%2C%22url%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%2Ftest%22%2C%22forks_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fforks%22%2C%22keys_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fkeys%7B%2Fkey_id%7D%22%2C%22collaborators_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fcollaborators%7B%2Fcollaborator%7D%22%2C%22teams_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fteams%22%2C%22hooks_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fhooks%22%2C%22issue_events_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fissues%2Fevents%7B%2Fnumber%7D%22%2C%22events_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fevents%22%2C%22assignees_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fassignees%7B%2Fuser%7D%22%2C%22branches_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fbranches%7B%2Fbranch%7D%22%2C%22tags_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Ftags%22%2C%22blobs_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fgit%2Fblobs%7B%2Fsha%7D%22%2C%22git_tags_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fgit%2Ftags%7B%2Fsha%7D%22%2C%22git_refs_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fgit%2Frefs%7B%2Fsha%7D%22%2C%22trees_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fgit%2Ftrees%7B%2Fsha%7D%22%2C%22statuses_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fstatuses%2F%7Bsha%7D%22%2C%22languages_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Flanguages%22%2C%22stargazers_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fstargazers%22%2C%22contributors_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fcontributors%22%2C%22subscribers_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fsubscribers%22%2C%22subscription_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fsubscription%22%2C%22commits_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fcommits%7B%2Fsha%7D%22%2C%22git_commits_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fgit%2Fcommits%7B%2Fsha%7D%22%2C%22comments_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fcomments%7B%2Fnumber%7D%22%2C%22issue_comment_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fissues%2Fcomments%7B%2Fnumber%7D%22%2C%22contents_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fcontents%2F%7B%2Bpath%7D%22%2C%22compare_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fcompare%2F%7Bbase%7D...%7Bhead%7D%22%2C%22merges_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fmerges%22%2C%22archive_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2F%7Barchive_format%7D%7B%2Fref%7D%22%2C%22downloads_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fdownloads%22%2C%22issues_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fissues%7B%2Fnumber%7D%22%2C%22pulls_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fpulls%7B%2Fnumber%7D%22%2C%22milestones_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fmilestones%7B%2Fnumber%7D%22%2C%22notifications_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fnotifications%7B%3Fsince%2Call%2Cparticipating%7D%22%2C%22labels_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Flabels%7B%2Fname%7D%22%2C%22releases_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Freleases%7B%2Fid%7D%22%2C%22deployments_url%22%3A%22https%3A%2F%2Fapi.github.com%2Frepos%2Fscriptburn%2Ftest%2Fdeployments%22%2C%22created_at%22%3A1498577020%2C%22updated_at%22%3A%222017-06-27T15%3A23%3A40Z%22%2C%22pushed_at%22%3A1498637436%2C%22git_url%22%3A%22git%3A%2F%2Fgithub.com%2Fscriptburn%2Ftest.git%22%2C%22ssh_url%22%3A%22git%40github.com%3Ascriptburn%2Ftest.git%22%2C%22clone_url%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%2Ftest.git%22%2C%22svn_url%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%2Ftest%22%2C%22homepage%22%3Anull%2C%22size%22%3A0%2C%22stargazers_count%22%3A0%2C%22watchers_count%22%3A0%2C%22language%22%3Anull%2C%22has_issues%22%3Atrue%2C%22has_projects%22%3Atrue%2C%22has_downloads%22%3Atrue%2C%22has_wiki%22%3Atrue%2C%22has_pages%22%3Afalse%2C%22forks_count%22%3A0%2C%22mirror_url%22%3Anull%2C%22open_issues_count%22%3A0%2C%22forks%22%3A0%2C%22open_issues%22%3A0%2C%22watchers%22%3A0%2C%22default_branch%22%3A%22master%22%2C%22stargazers%22%3A0%2C%22master_branch%22%3A%22master%22%7D%2C%22pusher%22%3A%7B%22name%22%3A%22scriptburn%22%2C%22email%22%3A%22contact%40scriptburn.com%22%7D%2C%22sender%22%3A%7B%22login%22%3A%22scriptburn%22%2C%22id%22%3A20643070%2C%22avatar_url%22%3A%22https%3A%2F%2Favatars0.githubusercontent.com%2Fu%2F20643070%3Fv%3D3%22%2C%22gravatar_id%22%3A%22%22%2C%22url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%22%2C%22html_url%22%3A%22https%3A%2F%2Fgithub.com%2Fscriptburn%22%2C%22followers_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Ffollowers%22%2C%22following_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Ffollowing%7B%2Fother_user%7D%22%2C%22gists_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fgists%7B%2Fgist_id%7D%22%2C%22starred_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fstarred%7B%2Fowner%7D%7B%2Frepo%7D%22%2C%22subscriptions_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fsubscriptions%22%2C%22organizations_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Forgs%22%2C%22repos_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Frepos%22%2C%22events_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Fevents%7B%2Fprivacy%7D%22%2C%22received_events_url%22%3A%22https%3A%2F%2Fapi.github.com%2Fusers%2Fscriptburn%2Freceived_events%22%2C%22type%22%3A%22User%22%2C%22site_admin%22%3Afalse%7D%7D"}';
return isset($str[$branch]) ? json_decode($str[$branch], true) : [];
}
public function sampleDataBitBucket($branch)
{
$str['master'] = '{"get":[],"post":{"push":{"changes":[{"forced":false,"old":{"type":"branch","name":"master","links":{"commits":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commits\/master"},"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/refs\/branches\/master"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/branch\/master"}},"target":{"hash":"87338c2ee818b4f39e7e3fc2dab55561581f2456","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/87338c2ee818b4f39e7e3fc2dab55561581f2456"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/87338c2ee818b4f39e7e3fc2dab55561581f2456"}},"author":{"raw":"rajneesh ojha <rajneesh_ojha@yahoo.com>","type":"author","user":{"username":"rajneeshojha","type":"user","display_name":"rajneesh ojha","uuid":"{45c77d63-24e8-4406-ac9f-9b5691222ddc}","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/users\/rajneeshojha"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/"},"avatar":{"href":"https:\/\/bitbucket.org\/account\/rajneeshojha\/avatar\/32\/"}}}},"parents":[{"type":"commit","hash":"bdf36c0281e661288d47c9240718bd4110656453","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/bdf36c0281e661288d47c9240718bd4110656453"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/bdf36c0281e661288d47c9240718bd4110656453"}}}],"date":"2016-08-20T21:42:07+00:00","message":"eee\n","type":"commit"}},"links":{"commits":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commits?include=4193e7b68a0ace127213ad51919f0d7913482cb6&exclude=87338c2ee818b4f39e7e3fc2dab55561581f2456"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/branches\/compare\/4193e7b68a0ace127213ad51919f0d7913482cb6..87338c2ee818b4f39e7e3fc2dab55561581f2456"},"diff":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/diff\/4193e7b68a0ace127213ad51919f0d7913482cb6..87338c2ee818b4f39e7e3fc2dab55561581f2456"}},"truncated":false,"commits":[{"hash":"4193e7b68a0ace127213ad51919f0d7913482cb6","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6"},"comments":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\/comments"},"patch":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/patch\/4193e7b68a0ace127213ad51919f0d7913482cb6"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/4193e7b68a0ace127213ad51919f0d7913482cb6"},"diff":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/diff\/4193e7b68a0ace127213ad51919f0d7913482cb6"},"approve":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\/approve"},"statuses":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\/statuses"}},"author":{"raw":"rajneesh <rajneesh@rajneeshs-MacBook-Pro.local>","type":"author"},"parents":[{"type":"commit","hash":"87338c2ee818b4f39e7e3fc2dab55561581f2456","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/87338c2ee818b4f39e7e3fc2dab55561581f2456"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/87338c2ee818b4f39e7e3fc2dab55561581f2456"}}}],"date":"2017-06-28T05:57:44+00:00","message":"2 commit\n","type":"commit"}],"created":false,"closed":false,"new":{"type":"branch","name":"master","links":{"commits":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commits\/master"},"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/refs\/branches\/master"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/branch\/master"}},"target":{"hash":"4193e7b68a0ace127213ad51919f0d7913482cb6","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/4193e7b68a0ace127213ad51919f0d7913482cb6"}},"author":{"raw":"rajneesh <rajneesh@rajneeshs-MacBook-Pro.local>","type":"author"},"parents":[{"type":"commit","hash":"87338c2ee818b4f39e7e3fc2dab55561581f2456","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/87338c2ee818b4f39e7e3fc2dab55561581f2456"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/87338c2ee818b4f39e7e3fc2dab55561581f2456"}}}],"date":"2017-06-28T05:57:44+00:00","message":"2 commit\n","type":"commit"}}}]},"actor":{"username":"rajneeshojha","type":"user","display_name":"rajneesh ojha","uuid":"{45c77d63-24e8-4406-ac9f-9b5691222ddc}","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/users\/rajneeshojha"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/"},"avatar":{"href":"https:\/\/bitbucket.org\/account\/rajneeshojha\/avatar\/32\/"}}},"repository":{"scm":"git","website":"","name":"test","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test"},"avatar":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/avatar\/32\/"}},"full_name":"rajneeshojha\/test","owner":{"username":"rajneeshojha","type":"user","display_name":"rajneesh ojha","uuid":"{45c77d63-24e8-4406-ac9f-9b5691222ddc}","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/users\/rajneeshojha"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/"},"avatar":{"href":"https:\/\/bitbucket.org\/account\/rajneeshojha\/avatar\/32\/"}}},"type":"repository","is_private":true,"uuid":"{33caefc5-01a0-46ca-a264-3288e765ed53}"}},"args":[],"headers":{"Host":["deploy.tools2.com"],"HTTP_USER_AGENT":["Bitbucket-Webhooks\/2.0"],"CONTENT_LENGTH":["5903"],"HTTP_ACCEPT":["*\/*"],"HTTP_ACCEPT_ENCODING":["gzip, deflate"],"CONTENT_TYPE":["application\/json"],"HTTP_X_ATTEMPT_NUMBER":["2"],"HTTP_X_EVENT_KEY":["repo:push"],"HTTP_X_FORWARDED_FOR":["104.192.143.193"],"HTTP_X_FORWARDED_PROTO":["https"],"HTTP_X_HOOK_UUID":["11f0a719-7118-430c-8ecb-bef603874ae7"],"HTTP_X_ORIGINAL_HOST":["1ee7a1c9.ngrok.io"],"HTTP_X_REQUEST_UUID":["13c494ee-baa7-454a-8ffc-46a394955bfc"]},"body":"{\"push\": {\"changes\": [{\"forced\": false, \"old\": {\"type\": \"branch\", \"name\": \"master\", \"links\": {\"commits\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commits\/master\"}, \"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/refs\/branches\/master\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/branch\/master\"}}, \"target\": {\"hash\": \"87338c2ee818b4f39e7e3fc2dab55561581f2456\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/87338c2ee818b4f39e7e3fc2dab55561581f2456\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/87338c2ee818b4f39e7e3fc2dab55561581f2456\"}}, \"author\": {\"raw\": \"rajneesh ojha <rajneesh_ojha@yahoo.com>\", \"type\": \"author\", \"user\": {\"username\": \"rajneeshojha\", \"type\": \"user\", \"display_name\": \"rajneesh ojha\", \"uuid\": \"{45c77d63-24e8-4406-ac9f-9b5691222ddc}\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/users\/rajneeshojha\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/\"}, \"avatar\": {\"href\": \"https:\/\/bitbucket.org\/account\/rajneeshojha\/avatar\/32\/\"}}}}, \"parents\": [{\"type\": \"commit\", \"hash\": \"bdf36c0281e661288d47c9240718bd4110656453\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/bdf36c0281e661288d47c9240718bd4110656453\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/bdf36c0281e661288d47c9240718bd4110656453\"}}}], \"date\": \"2016-08-20T21:42:07+00:00\", \"message\": \"eee\\n\", \"type\": \"commit\"}}, \"links\": {\"commits\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commits?include=4193e7b68a0ace127213ad51919f0d7913482cb6&exclude=87338c2ee818b4f39e7e3fc2dab55561581f2456\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/branches\/compare\/4193e7b68a0ace127213ad51919f0d7913482cb6..87338c2ee818b4f39e7e3fc2dab55561581f2456\"}, \"diff\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/diff\/4193e7b68a0ace127213ad51919f0d7913482cb6..87338c2ee818b4f39e7e3fc2dab55561581f2456\"}}, \"truncated\": false, \"commits\": [{\"hash\": \"4193e7b68a0ace127213ad51919f0d7913482cb6\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\"}, \"comments\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\/comments\"}, \"patch\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/patch\/4193e7b68a0ace127213ad51919f0d7913482cb6\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/4193e7b68a0ace127213ad51919f0d7913482cb6\"}, \"diff\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/diff\/4193e7b68a0ace127213ad51919f0d7913482cb6\"}, \"approve\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\/approve\"}, \"statuses\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\/statuses\"}}, \"author\": {\"raw\": \"rajneesh <rajneesh@rajneeshs-MacBook-Pro.local>\", \"type\": \"author\"}, \"parents\": [{\"type\": \"commit\", \"hash\": \"87338c2ee818b4f39e7e3fc2dab55561581f2456\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/87338c2ee818b4f39e7e3fc2dab55561581f2456\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/87338c2ee818b4f39e7e3fc2dab55561581f2456\"}}}], \"date\": \"2017-06-28T05:57:44+00:00\", \"message\": \"2 commit\\n\", \"type\": \"commit\"}], \"created\": false, \"closed\": false, \"new\": {\"type\": \"branch\", \"name\": \"master\", \"links\": {\"commits\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commits\/master\"}, \"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/refs\/branches\/master\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/branch\/master\"}}, \"target\": {\"hash\": \"4193e7b68a0ace127213ad51919f0d7913482cb6\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/4193e7b68a0ace127213ad51919f0d7913482cb6\"}}, \"author\": {\"raw\": \"rajneesh <rajneesh@rajneeshs-MacBook-Pro.local>\", \"type\": \"author\"}, \"parents\": [{\"type\": \"commit\", \"hash\": \"87338c2ee818b4f39e7e3fc2dab55561581f2456\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/87338c2ee818b4f39e7e3fc2dab55561581f2456\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/87338c2ee818b4f39e7e3fc2dab55561581f2456\"}}}], \"date\": \"2017-06-28T05:57:44+00:00\", \"message\": \"2 commit\\n\", \"type\": \"commit\"}}}]}, \"actor\": {\"username\": \"rajneeshojha\", \"type\": \"user\", \"display_name\": \"rajneesh ojha\", \"uuid\": \"{45c77d63-24e8-4406-ac9f-9b5691222ddc}\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/users\/rajneeshojha\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/\"}, \"avatar\": {\"href\": \"https:\/\/bitbucket.org\/account\/rajneeshojha\/avatar\/32\/\"}}}, \"repository\": {\"scm\": \"git\", \"website\": \"\", \"name\": \"test\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\"}, \"avatar\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/avatar\/32\/\"}}, \"full_name\": \"rajneeshojha\/test\", \"owner\": {\"username\": \"rajneeshojha\", \"type\": \"user\", \"display_name\": \"rajneesh ojha\", \"uuid\": \"{45c77d63-24e8-4406-ac9f-9b5691222ddc}\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/users\/rajneeshojha\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/\"}, \"avatar\": {\"href\": \"https:\/\/bitbucket.org\/account\/rajneeshojha\/avatar\/32\/\"}}}, \"type\": \"repository\", \"is_private\": true, \"uuid\": \"{33caefc5-01a0-46ca-a264-3288e765ed53}\"}}"}';
$str['master'] = '{"get":[],"post":{"push":{"changes":[{"forced":false,"old":null,"links":{"commits":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commits?include=016d340f8d61f0d167132d62446d8058ac8c2e1b"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/alidb\/branch\/master"}},"truncated":false,"commits":[{"hash":"016d340f8d61f0d167132d62446d8058ac8c2e1b","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/016d340f8d61f0d167132d62446d8058ac8c2e1b"},"comments":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/016d340f8d61f0d167132d62446d8058ac8c2e1b\/comments"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/alidb\/commits\/016d340f8d61f0d167132d62446d8058ac8c2e1b"},"diff":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/diff\/016d340f8d61f0d167132d62446d8058ac8c2e1b"},"approve":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/016d340f8d61f0d167132d62446d8058ac8c2e1b\/approve"},"statuses":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/016d340f8d61f0d167132d62446d8058ac8c2e1b\/statuses"}},"author":{"raw":"rajneesh ","type":"author"},"parents":[{"type":"commit","hash":"79363f771b345970ad318307277711740095edc0","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/79363f771b345970ad318307277711740095edc0"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/alidb\/commits\/79363f771b345970ad318307277711740095edc0"}}},{"type":"commit","hash":"28c6510d8ecacc56997c8abf39c915877d51a8a1","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/28c6510d8ecacc56997c8abf39c915877d51a8a1"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/alidb\/commits\/28c6510d8ecacc56997c8abf39c915877d51a8a1"}}}],"date":"2017-07-01T21:29:51+00:00","message":"Merge branch release\/1.0.0\n","type":"commit"},{"hash":"28c6510d8ecacc56997c8abf39c915877d51a8a1","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/28c6510d8ecacc56997c8abf39c915877d51a8a1"},"comments":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/28c6510d8ecacc56997c8abf39c915877d51a8a1\/comments"},"patch":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/patch\/28c6510d8ecacc56997c8abf39c915877d51a8a1"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/alidb\/commits\/28c6510d8ecacc56997c8abf39c915877d51a8a1"},"diff":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/diff\/28c6510d8ecacc56997c8abf39c915877d51a8a1"},"approve":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/28c6510d8ecacc56997c8abf39c915877d51a8a1\/approve"},"statuses":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/28c6510d8ecacc56997c8abf39c915877d51a8a1\/statuses"}},"author":{"raw":"rajneesh ","type":"author"},"parents":[{"type":"commit","hash":"79363f771b345970ad318307277711740095edc0","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/79363f771b345970ad318307277711740095edc0"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/alidb\/commits\/79363f771b345970ad318307277711740095edc0"}}}],"date":"2017-07-01T21:29:36+00:00","message":"Initial commit\n","type":"commit"},{"hash":"79363f771b345970ad318307277711740095edc0","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/79363f771b345970ad318307277711740095edc0"},"comments":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/79363f771b345970ad318307277711740095edc0\/comments"},"patch":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/patch\/79363f771b345970ad318307277711740095edc0"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/alidb\/commits\/79363f771b345970ad318307277711740095edc0"},"diff":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/diff\/79363f771b345970ad318307277711740095edc0"},"approve":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/79363f771b345970ad318307277711740095edc0\/approve"},"statuses":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/79363f771b345970ad318307277711740095edc0\/statuses"}},"author":{"raw":"rajneesh ","type":"author"},"parents":[],"date":"2017-07-01T21:26:39+00:00","message":"Initial commit\n","type":"commit"}],"created":true,"closed":false,"new":{"type":"branch","name":"master","links":{"commits":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commits\/master"},"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/refs\/branches\/master"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/alidb\/branch\/master"}},"target":{"hash":"016d340f8d61f0d167132d62446d8058ac8c2e1b","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/016d340f8d61f0d167132d62446d8058ac8c2e1b"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/alidb\/commits\/016d340f8d61f0d167132d62446d8058ac8c2e1b"}},"author":{"raw":"rajneesh ","type":"author"},"parents":[{"type":"commit","hash":"79363f771b345970ad318307277711740095edc0","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/79363f771b345970ad318307277711740095edc0"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/alidb\/commits\/79363f771b345970ad318307277711740095edc0"}}},{"type":"commit","hash":"28c6510d8ecacc56997c8abf39c915877d51a8a1","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb\/commit\/28c6510d8ecacc56997c8abf39c915877d51a8a1"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/alidb\/commits\/28c6510d8ecacc56997c8abf39c915877d51a8a1"}}}],"date":"2017-07-01T21:29:51+00:00","message":"Merge branch release\/1.0.0\n","type":"commit"}}}]},"actor":{"username":"rajneeshojha","type":"user","display_name":"rajneesh ojha","uuid":"{45c77d63-24e8-4406-ac9f-9b5691222ddc}","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/users\/rajneeshojha"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/"},"avatar":{"href":"https:\/\/bitbucket.org\/account\/rajneeshojha\/avatar\/32\/"}}},"repository":{"scm":"git","website":"","name":"alidb","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/alidb"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/alidb"},"avatar":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/alidb\/avatar\/32\/"}},"full_name":"rajneeshojha\/alidb","owner":{"username":"rajneeshojha","type":"user","display_name":"rajneesh ojha","uuid":"{45c77d63-24e8-4406-ac9f-9b5691222ddc}","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/users\/rajneeshojha"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/"},"avatar":{"href":"https:\/\/bitbucket.org\/account\/rajneeshojha\/avatar\/32\/"}}},"type":"repository","is_private":true,"uuid":"{764f4bff-8102-4364-9761-dc4cb2f152b9}"}},"args":[],"headers":{"Host":["deploy.tools2.com"],"HTTP_USER_AGENT":["Bitbucket-Webhooks\/2.0"],"CONTENT_LENGTH":["5911"],"HTTP_ACCEPT":["*\/*"],"HTTP_ACCEPT_ENCODING":["gzip, deflate"],"CONTENT_TYPE":["application\/json"],"HTTP_X_ATTEMPT_NUMBER":["1"],"HTTP_X_EVENT_KEY":["repo:push"],"HTTP_X_FORWARDED_FOR":["104.192.143.194"],"HTTP_X_FORWARDED_PROTO":["https"],"HTTP_X_HOOK_UUID":["11f0a719-7118-430c-8ecb-bef603874ae7"],"HTTP_X_ORIGINAL_HOST":["1ee7a1c9.ngrok.io"],"HTTP_X_REQUEST_UUID":["403dff9a-782f-4c51-88e1-e4e7922bef5a"]},"body":"{\"push\":{\"changes\":[{\"forced\":false,\"old\":null,\"links\":{\"commits\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commits?include=016d340f8d61f0d167132d62446d8058ac8c2e1b\"},\"html\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/rajneeshojha\\\/alidb\\\/branch\\\/master\"}},\"truncated\":false,\"commits\":[{\"hash\":\"016d340f8d61f0d167132d62446d8058ac8c2e1b\",\"links\":{\"self\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/016d340f8d61f0d167132d62446d8058ac8c2e1b\"},\"comments\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/016d340f8d61f0d167132d62446d8058ac8c2e1b\\\/comments\"},\"html\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/rajneeshojha\\\/alidb\\\/commits\\\/016d340f8d61f0d167132d62446d8058ac8c2e1b\"},\"diff\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/diff\\\/016d340f8d61f0d167132d62446d8058ac8c2e1b\"},\"approve\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/016d340f8d61f0d167132d62446d8058ac8c2e1b\\\/approve\"},\"statuses\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/016d340f8d61f0d167132d62446d8058ac8c2e1b\\\/statuses\"}},\"author\":{\"raw\":\"rajneesh \",\"type\":\"author\"},\"parents\":[{\"type\":\"commit\",\"hash\":\"79363f771b345970ad318307277711740095edc0\",\"links\":{\"self\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/79363f771b345970ad318307277711740095edc0\"},\"html\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/rajneeshojha\\\/alidb\\\/commits\\\/79363f771b345970ad318307277711740095edc0\"}}},{\"type\":\"commit\",\"hash\":\"28c6510d8ecacc56997c8abf39c915877d51a8a1\",\"links\":{\"self\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/28c6510d8ecacc56997c8abf39c915877d51a8a1\"},\"html\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/rajneeshojha\\\/alidb\\\/commits\\\/28c6510d8ecacc56997c8abf39c915877d51a8a1\"}}}],\"date\":\"2017-07-01T21:29:51+00:00\",\"message\":\"Merge branch release\\\/1.0.0\\n\",\"type\":\"commit\"},{\"hash\":\"28c6510d8ecacc56997c8abf39c915877d51a8a1\",\"links\":{\"self\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/28c6510d8ecacc56997c8abf39c915877d51a8a1\"},\"comments\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/28c6510d8ecacc56997c8abf39c915877d51a8a1\\\/comments\"},\"patch\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/patch\\\/28c6510d8ecacc56997c8abf39c915877d51a8a1\"},\"html\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/rajneeshojha\\\/alidb\\\/commits\\\/28c6510d8ecacc56997c8abf39c915877d51a8a1\"},\"diff\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/diff\\\/28c6510d8ecacc56997c8abf39c915877d51a8a1\"},\"approve\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/28c6510d8ecacc56997c8abf39c915877d51a8a1\\\/approve\"},\"statuses\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/28c6510d8ecacc56997c8abf39c915877d51a8a1\\\/statuses\"}},\"author\":{\"raw\":\"rajneesh \",\"type\":\"author\"},\"parents\":[{\"type\":\"commit\",\"hash\":\"79363f771b345970ad318307277711740095edc0\",\"links\":{\"self\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/79363f771b345970ad318307277711740095edc0\"},\"html\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/rajneeshojha\\\/alidb\\\/commits\\\/79363f771b345970ad318307277711740095edc0\"}}}],\"date\":\"2017-07-01T21:29:36+00:00\",\"message\":\"Initial commit\\n\",\"type\":\"commit\"},{\"hash\":\"79363f771b345970ad318307277711740095edc0\",\"links\":{\"self\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/79363f771b345970ad318307277711740095edc0\"},\"comments\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/79363f771b345970ad318307277711740095edc0\\\/comments\"},\"patch\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/patch\\\/79363f771b345970ad318307277711740095edc0\"},\"html\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/rajneeshojha\\\/alidb\\\/commits\\\/79363f771b345970ad318307277711740095edc0\"},\"diff\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/diff\\\/79363f771b345970ad318307277711740095edc0\"},\"approve\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/79363f771b345970ad318307277711740095edc0\\\/approve\"},\"statuses\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/79363f771b345970ad318307277711740095edc0\\\/statuses\"}},\"author\":{\"raw\":\"rajneesh \",\"type\":\"author\"},\"parents\":[],\"date\":\"2017-07-01T21:26:39+00:00\",\"message\":\"Initial commit\\n\",\"type\":\"commit\"}],\"created\":true,\"closed\":false,\"new\":{\"type\":\"branch\",\"name\":\"master\",\"links\":{\"commits\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commits\\\/master\"},\"self\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/refs\\\/branches\\\/master\"},\"html\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/rajneeshojha\\\/alidb\\\/branch\\\/master\"}},\"target\":{\"hash\":\"016d340f8d61f0d167132d62446d8058ac8c2e1b\",\"links\":{\"self\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/016d340f8d61f0d167132d62446d8058ac8c2e1b\"},\"html\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/rajneeshojha\\\/alidb\\\/commits\\\/016d340f8d61f0d167132d62446d8058ac8c2e1b\"}},\"author\":{\"raw\":\"rajneesh \",\"type\":\"author\"},\"parents\":[{\"type\":\"commit\",\"hash\":\"79363f771b345970ad318307277711740095edc0\",\"links\":{\"self\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/79363f771b345970ad318307277711740095edc0\"},\"html\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/rajneeshojha\\\/alidb\\\/commits\\\/79363f771b345970ad318307277711740095edc0\"}}},{\"type\":\"commit\",\"hash\":\"28c6510d8ecacc56997c8abf39c915877d51a8a1\",\"links\":{\"self\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\\\/commit\\\/28c6510d8ecacc56997c8abf39c915877d51a8a1\"},\"html\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/rajneeshojha\\\/alidb\\\/commits\\\/28c6510d8ecacc56997c8abf39c915877d51a8a1\"}}}],\"date\":\"2017-07-01T21:29:51+00:00\",\"message\":\"Merge branch release\\\/1.0.0\\n\",\"type\":\"commit\"}}}]},\"actor\":{\"username\":\"rajneeshojha\",\"type\":\"user\",\"display_name\":\"rajneesh ojha\",\"uuid\":\"{45c77d63-24e8-4406-ac9f-9b5691222ddc}\",\"links\":{\"self\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/users\\\/rajneeshojha\"},\"html\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/rajneeshojha\\\/\"},\"avatar\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/account\\\/rajneeshojha\\\/avatar\\\/32\\\/\"}}},\"repository\":{\"scm\":\"git\",\"website\":\"\",\"name\":\"alidb\",\"links\":{\"self\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/repositories\\\/rajneeshojha\\\/alidb\"},\"html\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/rajneeshojha\\\/alidb\"},\"avatar\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/rajneeshojha\\\/alidb\\\/avatar\\\/32\\\/\"}},\"full_name\":\"rajneeshojha\\\/alidb\",\"owner\":{\"username\":\"rajneeshojha\",\"type\":\"user\",\"display_name\":\"rajneesh ojha\",\"uuid\":\"{45c77d63-24e8-4406-ac9f-9b5691222ddc}\",\"links\":{\"self\":{\"href\":\"https:\\\/\\\/api.bitbucket.org\\\/2.0\\\/users\\\/rajneeshojha\"},\"html\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/rajneeshojha\\\/\"},\"avatar\":{\"href\":\"https:\\\/\\\/bitbucket.org\\\/account\\\/rajneeshojha\\\/avatar\\\/32\\\/\"}}},\"type\":\"repository\",\"is_private\":true,\"uuid\":\"{764f4bff-8102-4364-9761-dc4cb2f152b9}\"}}"}';
$str['develop'] = '{"get":[],"post":{"push":{"changes":[{"forced":false,"old":{"type":"branch","name":"develop","links":{"commits":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commits\/develop"},"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/refs\/branches\/develop"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/branch\/develop"}},"target":{"hash":"87338c2ee818b4f39e7e3fc2dab55561581f2456","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/87338c2ee818b4f39e7e3fc2dab55561581f2456"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/87338c2ee818b4f39e7e3fc2dab55561581f2456"}},"author":{"raw":"rajneesh ojha <rajneesh_ojha@yahoo.com>","type":"author","user":{"username":"rajneeshojha","type":"user","display_name":"rajneesh ojha","uuid":"{45c77d63-24e8-4406-ac9f-9b5691222ddc}","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/users\/rajneeshojha"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/"},"avatar":{"href":"https:\/\/bitbucket.org\/account\/rajneeshojha\/avatar\/32\/"}}}},"parents":[{"type":"commit","hash":"bdf36c0281e661288d47c9240718bd4110656453","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/bdf36c0281e661288d47c9240718bd4110656453"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/bdf36c0281e661288d47c9240718bd4110656453"}}}],"date":"2016-08-20T21:42:07+00:00","message":"eee\n","type":"commit"}},"links":{"commits":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commits?include=4193e7b68a0ace127213ad51919f0d7913482cb6&exclude=87338c2ee818b4f39e7e3fc2dab55561581f2456"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/branches\/compare\/4193e7b68a0ace127213ad51919f0d7913482cb6..87338c2ee818b4f39e7e3fc2dab55561581f2456"},"diff":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/diff\/4193e7b68a0ace127213ad51919f0d7913482cb6..87338c2ee818b4f39e7e3fc2dab55561581f2456"}},"truncated":false,"commits":[{"hash":"4193e7b68a0ace127213ad51919f0d7913482cb6","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6"},"comments":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\/comments"},"patch":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/patch\/4193e7b68a0ace127213ad51919f0d7913482cb6"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/4193e7b68a0ace127213ad51919f0d7913482cb6"},"diff":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/diff\/4193e7b68a0ace127213ad51919f0d7913482cb6"},"approve":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\/approve"},"statuses":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\/statuses"}},"author":{"raw":"rajneesh <rajneesh@rajneeshs-MacBook-Pro.local>","type":"author"},"parents":[{"type":"commit","hash":"87338c2ee818b4f39e7e3fc2dab55561581f2456","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/87338c2ee818b4f39e7e3fc2dab55561581f2456"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/87338c2ee818b4f39e7e3fc2dab55561581f2456"}}}],"date":"2017-06-28T05:57:44+00:00","message":"2 commit\n","type":"commit"}],"created":false,"closed":false,"new":{"type":"branch","name":"develop","links":{"commits":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commits\/develop"},"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/refs\/branches\/develop"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/branch\/develop"}},"target":{"hash":"4193e7b68a0ace127213ad51919f0d7913482cb6","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/4193e7b68a0ace127213ad51919f0d7913482cb6"}},"author":{"raw":"rajneesh <rajneesh@rajneeshs-MacBook-Pro.local>","type":"author"},"parents":[{"type":"commit","hash":"87338c2ee818b4f39e7e3fc2dab55561581f2456","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/87338c2ee818b4f39e7e3fc2dab55561581f2456"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/87338c2ee818b4f39e7e3fc2dab55561581f2456"}}}],"date":"2017-06-28T05:57:44+00:00","message":"2 commit\n","type":"commit"}}}]},"actor":{"username":"rajneeshojha","type":"user","display_name":"rajneesh ojha","uuid":"{45c77d63-24e8-4406-ac9f-9b5691222ddc}","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/users\/rajneeshojha"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/"},"avatar":{"href":"https:\/\/bitbucket.org\/account\/rajneeshojha\/avatar\/32\/"}}},"repository":{"scm":"git","website":"","name":"test","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test"},"avatar":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/test\/avatar\/32\/"}},"full_name":"rajneeshojha\/test","owner":{"username":"rajneeshojha","type":"user","display_name":"rajneesh ojha","uuid":"{45c77d63-24e8-4406-ac9f-9b5691222ddc}","links":{"self":{"href":"https:\/\/api.bitbucket.org\/2.0\/users\/rajneeshojha"},"html":{"href":"https:\/\/bitbucket.org\/rajneeshojha\/"},"avatar":{"href":"https:\/\/bitbucket.org\/account\/rajneeshojha\/avatar\/32\/"}}},"type":"repository","is_private":true,"uuid":"{33caefc5-01a0-46ca-a264-3288e765ed53}"}},"args":[],"headers":{"Host":["deploy.tools2.com"],"HTTP_USER_AGENT":["Bitbucket-Webhooks\/2.0"],"CONTENT_LENGTH":["5911"],"HTTP_ACCEPT":["*\/*"],"HTTP_ACCEPT_ENCODING":["gzip, deflate"],"CONTENT_TYPE":["application\/json"],"HTTP_X_ATTEMPT_NUMBER":["1"],"HTTP_X_EVENT_KEY":["repo:push"],"HTTP_X_FORWARDED_FOR":["104.192.143.194"],"HTTP_X_FORWARDED_PROTO":["https"],"HTTP_X_HOOK_UUID":["11f0a719-7118-430c-8ecb-bef603874ae7"],"HTTP_X_ORIGINAL_HOST":["1ee7a1c9.ngrok.io"],"HTTP_X_REQUEST_UUID":["403dff9a-782f-4c51-88e1-e4e7922bef5a"]},"body":"{\"push\": {\"changes\": [{\"forced\": false, \"old\": {\"type\": \"branch\", \"name\": \"develop\", \"links\": {\"commits\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commits\/develop\"}, \"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/refs\/branches\/develop\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/branch\/develop\"}}, \"target\": {\"hash\": \"87338c2ee818b4f39e7e3fc2dab55561581f2456\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/87338c2ee818b4f39e7e3fc2dab55561581f2456\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/87338c2ee818b4f39e7e3fc2dab55561581f2456\"}}, \"author\": {\"raw\": \"rajneesh ojha <rajneesh_ojha@yahoo.com>\", \"type\": \"author\", \"user\": {\"username\": \"rajneeshojha\", \"type\": \"user\", \"display_name\": \"rajneesh ojha\", \"uuid\": \"{45c77d63-24e8-4406-ac9f-9b5691222ddc}\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/users\/rajneeshojha\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/\"}, \"avatar\": {\"href\": \"https:\/\/bitbucket.org\/account\/rajneeshojha\/avatar\/32\/\"}}}}, \"parents\": [{\"type\": \"commit\", \"hash\": \"bdf36c0281e661288d47c9240718bd4110656453\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/bdf36c0281e661288d47c9240718bd4110656453\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/bdf36c0281e661288d47c9240718bd4110656453\"}}}], \"date\": \"2016-08-20T21:42:07+00:00\", \"message\": \"eee\\n\", \"type\": \"commit\"}}, \"links\": {\"commits\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commits?include=4193e7b68a0ace127213ad51919f0d7913482cb6&exclude=87338c2ee818b4f39e7e3fc2dab55561581f2456\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/branches\/compare\/4193e7b68a0ace127213ad51919f0d7913482cb6..87338c2ee818b4f39e7e3fc2dab55561581f2456\"}, \"diff\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/diff\/4193e7b68a0ace127213ad51919f0d7913482cb6..87338c2ee818b4f39e7e3fc2dab55561581f2456\"}}, \"truncated\": false, \"commits\": [{\"hash\": \"4193e7b68a0ace127213ad51919f0d7913482cb6\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\"}, \"comments\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\/comments\"}, \"patch\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/patch\/4193e7b68a0ace127213ad51919f0d7913482cb6\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/4193e7b68a0ace127213ad51919f0d7913482cb6\"}, \"diff\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/diff\/4193e7b68a0ace127213ad51919f0d7913482cb6\"}, \"approve\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\/approve\"}, \"statuses\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\/statuses\"}}, \"author\": {\"raw\": \"rajneesh <rajneesh@rajneeshs-MacBook-Pro.local>\", \"type\": \"author\"}, \"parents\": [{\"type\": \"commit\", \"hash\": \"87338c2ee818b4f39e7e3fc2dab55561581f2456\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/87338c2ee818b4f39e7e3fc2dab55561581f2456\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/87338c2ee818b4f39e7e3fc2dab55561581f2456\"}}}], \"date\": \"2017-06-28T05:57:44+00:00\", \"message\": \"2 commit\\n\", \"type\": \"commit\"}], \"created\": false, \"closed\": false, \"new\": {\"type\": \"branch\", \"name\": \"develop\", \"links\": {\"commits\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commits\/develop\"}, \"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/refs\/branches\/develop\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/branch\/develop\"}}, \"target\": {\"hash\": \"4193e7b68a0ace127213ad51919f0d7913482cb6\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/4193e7b68a0ace127213ad51919f0d7913482cb6\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/4193e7b68a0ace127213ad51919f0d7913482cb6\"}}, \"author\": {\"raw\": \"rajneesh <rajneesh@rajneeshs-MacBook-Pro.local>\", \"type\": \"author\"}, \"parents\": [{\"type\": \"commit\", \"hash\": \"87338c2ee818b4f39e7e3fc2dab55561581f2456\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\/commit\/87338c2ee818b4f39e7e3fc2dab55561581f2456\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/commits\/87338c2ee818b4f39e7e3fc2dab55561581f2456\"}}}], \"date\": \"2017-06-28T05:57:44+00:00\", \"message\": \"2 commit\\n\", \"type\": \"commit\"}}}]}, \"actor\": {\"username\": \"rajneeshojha\", \"type\": \"user\", \"display_name\": \"rajneesh ojha\", \"uuid\": \"{45c77d63-24e8-4406-ac9f-9b5691222ddc}\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/users\/rajneeshojha\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/\"}, \"avatar\": {\"href\": \"https:\/\/bitbucket.org\/account\/rajneeshojha\/avatar\/32\/\"}}}, \"repository\": {\"scm\": \"git\", \"website\": \"\", \"name\": \"test\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/repositories\/rajneeshojha\/test\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\"}, \"avatar\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/test\/avatar\/32\/\"}}, \"full_name\": \"rajneeshojha\/test\", \"owner\": {\"username\": \"rajneeshojha\", \"type\": \"user\", \"display_name\": \"rajneesh ojha\", \"uuid\": \"{45c77d63-24e8-4406-ac9f-9b5691222ddc}\", \"links\": {\"self\": {\"href\": \"https:\/\/api.bitbucket.org\/2.0\/users\/rajneeshojha\"}, \"html\": {\"href\": \"https:\/\/bitbucket.org\/rajneeshojha\/\"}, \"avatar\": {\"href\": \"https:\/\/bitbucket.org\/account\/rajneeshojha\/avatar\/32\/\"}}}, \"type\": \"repository\", \"is_private\": true, \"uuid\": \"{33caefc5-01a0-46ca-a264-3288e765ed53}\"}}"}';
return isset($str[$branch]) ? json_decode($str[$branch], true) : [];
}
public function sampleDataGitLab($branch)
{
$str['master'] = '{"get":[],"post":{"object_kind":"push","event_name":"push","before":"e34708ce699ec17423abc61dc0bfa1966b433e05","after":"e34708ce699ec17423abc61dc0bfa1966b433e05","ref":"refs\/heads\/master","checkout_sha":"e34708ce699ec17423abc61dc0bfa1966b433e05","message":null,"user_id":1427190,"user_name":"Rajneesh","user_username":"scriptburn","user_email":"contact@scriptburn.com","user_avatar":"https:\/\/secure.gravatar.com\/avatar\/3c3bf4d416bdf2c4bf2ef2cc70f9e057?s=80&d=identicon","project_id":3596441,"project":{"name":"test","description":"","web_url":"https:\/\/gitlab.com\/scriptburn\/test","avatar_url":null,"git_ssh_url":"git@gitlab.com:scriptburn\/test.git","git_http_url":"https:\/\/gitlab.com\/scriptburn\/test.git","namespace":"scriptburn","visibility_level":20,"path_with_namespace":"scriptburn\/test","default_branch":"master","homepage":"https:\/\/gitlab.com\/scriptburn\/test","url":"git@gitlab.com:scriptburn\/test.git","ssh_url":"git@gitlab.com:scriptburn\/test.git","http_url":"https:\/\/gitlab.com\/scriptburn\/test.git"},"commits":[{"id":"e34708ce699ec17423abc61dc0bfa1966b433e05","message":"Add readme.md","timestamp":"2017-06-29T10:55:44+00:00","url":"https:\/\/gitlab.com\/scriptburn\/test\/commit\/e34708ce699ec17423abc61dc0bfa1966b433e05","author":{"name":"Rajneesh","email":"contact@scriptburn.com"},"added":["README.md"],"modified":[],"removed":[]}],"total_commits_count":1,"repository":{"name":"test","url":"git@gitlab.com:scriptburn\/test.git","description":"","homepage":"https:\/\/gitlab.com\/scriptburn\/test","git_http_url":"https:\/\/gitlab.com\/scriptburn\/test.git","git_ssh_url":"git@gitlab.com:scriptburn\/test.git","visibility_level":20}},"args":[],"headers":{"Host":["deploy.tools2.com"],"HTTP_USER_AGENT":["Go-http-client\/1.1"],"HTTP_CONNECTION":["close, close"],"CONTENT_LENGTH":["1617"],"CONTENT_TYPE":["application\/json"],"HTTP_X_FORWARDED_FOR":["52.225.134.213"],"HTTP_X_GITLAB_EVENT":["Push Hook"],"HTTP_X_GITLAB_TOKEN":["123456"],"HTTP_X_ORIGINAL_HOST":["843eb5a6.ngrok.io"]},"body":"{\"object_kind\":\"push\",\"event_name\":\"push\",\"before\":\"e34708ce699ec17423abc61dc0bfa1966b433e05\",\"after\":\"e34708ce699ec17423abc61dc0bfa1966b433e05\",\"ref\":\"refs\/heads\/master\",\"checkout_sha\":\"e34708ce699ec17423abc61dc0bfa1966b433e05\",\"message\":null,\"user_id\":1427190,\"user_name\":\"Rajneesh\",\"user_username\":\"scriptburn\",\"user_email\":\"contact@scriptburn.com\",\"user_avatar\":\"https:\/\/secure.gravatar.com\/avatar\/3c3bf4d416bdf2c4bf2ef2cc70f9e057?s=80\\u0026d=identicon\",\"project_id\":3596441,\"project\":{\"name\":\"test\",\"description\":\"\",\"web_url\":\"https:\/\/gitlab.com\/scriptburn\/test\",\"avatar_url\":null,\"git_ssh_url\":\"git@gitlab.com:scriptburn\/test.git\",\"git_http_url\":\"https:\/\/gitlab.com\/scriptburn\/test.git\",\"namespace\":\"scriptburn\",\"visibility_level\":20,\"path_with_namespace\":\"scriptburn\/test\",\"default_branch\":\"master\",\"homepage\":\"https:\/\/gitlab.com\/scriptburn\/test\",\"url\":\"git@gitlab.com:scriptburn\/test.git\",\"ssh_url\":\"git@gitlab.com:scriptburn\/test.git\",\"http_url\":\"https:\/\/gitlab.com\/scriptburn\/test.git\"},\"commits\":[{\"id\":\"e34708ce699ec17423abc61dc0bfa1966b433e05\",\"message\":\"Add readme.md\",\"timestamp\":\"2017-06-29T10:55:44+00:00\",\"url\":\"https:\/\/gitlab.com\/scriptburn\/test\/commit\/e34708ce699ec17423abc61dc0bfa1966b433e05\",\"author\":{\"name\":\"Rajneesh\",\"email\":\"contact@scriptburn.com\"},\"added\":[\"README.md\"],\"modified\":[],\"removed\":[]}],\"total_commits_count\":1,\"repository\":{\"name\":\"test\",\"url\":\"git@gitlab.com:scriptburn\/test.git\",\"description\":\"\",\"homepage\":\"https:\/\/gitlab.com\/scriptburn\/test\",\"git_http_url\":\"https:\/\/gitlab.com\/scriptburn\/test.git\",\"git_ssh_url\":\"git@gitlab.com:scriptburn\/test.git\",\"visibility_level\":20}}"}';
$str['develop'] = '{"get":[],"post":{"object_kind":"push","event_name":"push","before":"0000000000000000000000000000000000000000","after":"cbe45479720d018055e420ea2152a4c1f4e7ca56","ref":"refs\/heads\/develop","checkout_sha":"cbe45479720d018055e420ea2152a4c1f4e7ca56","message":null,"user_id":1427190,"user_name":"Rajneesh","user_username":"scriptburn","user_email":"contact@scriptburn.com","user_avatar":"https:\/\/secure.gravatar.com\/avatar\/3c3bf4d416bdf2c4bf2ef2cc70f9e057?s=80&d=identicon","project_id":3596441,"project":{"name":"test","description":"","web_url":"https:\/\/gitlab.com\/scriptburn\/test","avatar_url":null,"git_ssh_url":"git@gitlab.com:scriptburn\/test.git","git_http_url":"https:\/\/gitlab.com\/scriptburn\/test.git","namespace":"scriptburn","visibility_level":20,"path_with_namespace":"scriptburn\/test","default_branch":"master","homepage":"https:\/\/gitlab.com\/scriptburn\/test","url":"git@gitlab.com:scriptburn\/test.git","ssh_url":"git@gitlab.com:scriptburn\/test.git","http_url":"https:\/\/gitlab.com\/scriptburn\/test.git"},"commits":[{"id":"78071b4874f1e162a6a74f86b6a09a679e16d682","message":"xxxxxx\n","timestamp":"2017-06-29T16:48:17+05:30","url":"https:\/\/gitlab.com\/scriptburn\/test\/commit\/78071b4874f1e162a6a74f86b6a09a679e16d682","author":{"name":"rajneesh","email":"rajneesh@rajneeshs-MacBook-Pro.local"},"added":[".DS_Store"],"modified":[],"removed":[]},{"id":"cbe45479720d018055e420ea2152a4c1f4e7ca56","message":"xxxxxx\n","timestamp":"2017-06-29T16:49:29+05:30","url":"https:\/\/gitlab.com\/scriptburn\/test\/commit\/cbe45479720d018055e420ea2152a4c1f4e7ca56","author":{"name":"rajneesh","email":"rajneesh@rajneeshs-MacBook-Pro.local"},"added":[],"modified":["README.md"],"removed":[]}],"total_commits_count":2,"repository":{"name":"test","url":"git@gitlab.com:scriptburn\/test.git","description":"","homepage":"https:\/\/gitlab.com\/scriptburn\/test","git_http_url":"https:\/\/gitlab.com\/scriptburn\/test.git","git_ssh_url":"git@gitlab.com:scriptburn\/test.git","visibility_level":20}},"args":[],"headers":{"Host":["deploy.tools2.com"],"HTTP_USER_AGENT":["Go-http-client\/1.1"],"HTTP_CONNECTION":["close, close"],"CONTENT_LENGTH":["1954"],"CONTENT_TYPE":["application\/json"],"HTTP_X_FORWARDED_FOR":["13.68.95.41"],"HTTP_X_GITLAB_EVENT":["Push Hook"],"HTTP_X_GITLAB_TOKEN":["123456"],"HTTP_X_ORIGINAL_HOST":["843eb5a6.ngrok.io"]},"body":"{\"object_kind\":\"push\",\"event_name\":\"push\",\"before\":\"0000000000000000000000000000000000000000\",\"after\":\"cbe45479720d018055e420ea2152a4c1f4e7ca56\",\"ref\":\"refs\/heads\/develop\",\"checkout_sha\":\"cbe45479720d018055e420ea2152a4c1f4e7ca56\",\"message\":null,\"user_id\":1427190,\"user_name\":\"Rajneesh\",\"user_username\":\"scriptburn\",\"user_email\":\"contact@scriptburn.com\",\"user_avatar\":\"https:\/\/secure.gravatar.com\/avatar\/3c3bf4d416bdf2c4bf2ef2cc70f9e057?s=80\\u0026d=identicon\",\"project_id\":3596441,\"project\":{\"name\":\"test\",\"description\":\"\",\"web_url\":\"https:\/\/gitlab.com\/scriptburn\/test\",\"avatar_url\":null,\"git_ssh_url\":\"git@gitlab.com:scriptburn\/test.git\",\"git_http_url\":\"https:\/\/gitlab.com\/scriptburn\/test.git\",\"namespace\":\"scriptburn\",\"visibility_level\":20,\"path_with_namespace\":\"scriptburn\/test\",\"default_branch\":\"master\",\"homepage\":\"https:\/\/gitlab.com\/scriptburn\/test\",\"url\":\"git@gitlab.com:scriptburn\/test.git\",\"ssh_url\":\"git@gitlab.com:scriptburn\/test.git\",\"http_url\":\"https:\/\/gitlab.com\/scriptburn\/test.git\"},\"commits\":[{\"id\":\"78071b4874f1e162a6a74f86b6a09a679e16d682\",\"message\":\"xxxxxx\\n\",\"timestamp\":\"2017-06-29T16:48:17+05:30\",\"url\":\"https:\/\/gitlab.com\/scriptburn\/test\/commit\/78071b4874f1e162a6a74f86b6a09a679e16d682\",\"author\":{\"name\":\"rajneesh\",\"email\":\"rajneesh@rajneeshs-MacBook-Pro.local\"},\"added\":[\".DS_Store\"],\"modified\":[],\"removed\":[]},{\"id\":\"cbe45479720d018055e420ea2152a4c1f4e7ca56\",\"message\":\"xxxxxx\\n\",\"timestamp\":\"2017-06-29T16:49:29+05:30\",\"url\":\"https:\/\/gitlab.com\/scriptburn\/test\/commit\/cbe45479720d018055e420ea2152a4c1f4e7ca56\",\"author\":{\"name\":\"rajneesh\",\"email\":\"rajneesh@rajneeshs-MacBook-Pro.local\"},\"added\":[],\"modified\":[\"README.md\"],\"removed\":[]}],\"total_commits_count\":2,\"repository\":{\"name\":\"test\",\"url\":\"git@gitlab.com:scriptburn\/test.git\",\"description\":\"\",\"homepage\":\"https:\/\/gitlab.com\/scriptburn\/test\",\"git_http_url\":\"https:\/\/gitlab.com\/scriptburn\/test.git\",\"git_ssh_url\":\"git@gitlab.com:scriptburn\/test.git\",\"visibility_level\":20}}"}';
return isset($str[$branch]) ? json_decode($str[$branch], true) : [];
}
}
You can’t perform that action at this time.
