{"action":"created","comment":{"url":"https://api.github.com/repos/acidprime/r10k/pulls/comments/33184034","id":33184034,"diff_hunk":"@@ -108,7 +114,13 @@ class Server < Sinatra::Base\n     data = JSON.parse(decoded, :quirks_mode => true)\n \n     # github sends a 'ref', stash sends an array in 'refChanges'\n-    branch = ( data['ref'] || data['refChanges'][0]['refId'] ).sub('refs/heads/', '')\n+    if $config['git_provider'] == 'github'\n+      branch = ( data['ref'] || data['refChanges'][0]['refId'] ).sub('refs/heads/', '')","path":"templates/webhook.bin.erb","position":21,"original_position":21,"commit_id":"63f9f24b68cd4fc63fc1e5d5632525a5ae99ca3c","original_commit_id":"63f9f24b68cd4fc63fc1e5d5632525a5ae99ca3c","user":{"login":"ayohrling","id":5257964,"avatar_url":"https://avatars.githubusercontent.com/u/5257964?v=3","gravatar_id":"","url":"https://api.github.com/users/ayohrling","html_url":"https://github.com/ayohrling","followers_url":"https://api.github.com/users/ayohrling/followers","following_url":"https://api.github.com/users/ayohrling/following{/other_user}","gists_url":"https://api.github.com/users/ayohrling/gists{/gist_id}","starred_url":"https://api.github.com/users/ayohrling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayohrling/subscriptions","organizations_url":"https://api.github.com/users/ayohrling/orgs","repos_url":"https://api.github.com/users/ayohrling/repos","events_url":"https://api.github.com/users/ayohrling/events{/privacy}","received_events_url":"https://api.github.com/users/ayohrling/received_events","type":"User","site_admin":false},"body":"Yeah I gathered that when I looked at my Gitlab environment, I needed a variable name to standardize on, so I chose GitHub as in \"GitHub compliant,\" figured githublabstash would be too messy :) I am certainly open to suggestions of change.","created_at":"2015-06-24T19:09:21Z","updated_at":"2015-06-24T19:09:21Z","html_url":"https://github.com/acidprime/r10k/pull/193#discussion_r33184034","pull_request_url":"https://api.github.com/repos/acidprime/r10k/pulls/193","_links":{"self":{"href":"https://api.github.com/repos/acidprime/r10k/pulls/comments/33184034"},"html":{"href":"https://github.com/acidprime/r10k/pull/193#discussion_r33184034"},"pull_request":{"href":"https://api.github.com/repos/acidprime/r10k/pulls/193"}}},"pull_request":{"url":"https://api.github.com/repos/acidprime/r10k/pulls/193","id":38104787,"html_url":"https://github.com/acidprime/r10k/pull/193","diff_url":"https://github.com/acidprime/r10k/pull/193.diff","patch_url":"https://github.com/acidprime/r10k/pull/193.patch","issue_url":"https://api.github.com/repos/acidprime/r10k/issues/193","number":193,"state":"open","locked":false,"title":"Added support for BitBucket merge hooks","user":{"login":"ayohrling","id":5257964,"avatar_url":"https://avatars.githubusercontent.com/u/5257964?v=3","gravatar_id":"","url":"https://api.github.com/users/ayohrling","html_url":"https://github.com/ayohrling","followers_url":"https://api.github.com/users/ayohrling/followers","following_url":"https://api.github.com/users/ayohrling/following{/other_user}","gists_url":"https://api.github.com/users/ayohrling/gists{/gist_id}","starred_url":"https://api.github.com/users/ayohrling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayohrling/subscriptions","organizations_url":"https://api.github.com/users/ayohrling/orgs","repos_url":"https://api.github.com/users/ayohrling/repos","events_url":"https://api.github.com/users/ayohrling/events{/privacy}","received_events_url":"https://api.github.com/users/ayohrling/received_events","type":"User","site_admin":false},"body":"Added support for git_provider configuration setting for the webhook to allow additional payload formats for the module and payload webhook endpoints. Defaulted to the current GitHub standard.","created_at":"2015-06-19T12:57:28Z","updated_at":"2015-06-24T19:09:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0498fc892bdeeb712ef86f8c2c6d2cacacd51aff","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/acidprime/r10k/pulls/193/commits","review_comments_url":"https://api.github.com/repos/acidprime/r10k/pulls/193/comments","review_comment_url":"https://api.github.com/repos/acidprime/r10k/pulls/comments{/number}","comments_url":"https://api.github.com/repos/acidprime/r10k/issues/193/comments","statuses_url":"https://api.github.com/repos/acidprime/r10k/statuses/63f9f24b68cd4fc63fc1e5d5632525a5ae99ca3c","head":{"label":"ayohrling:feature/master/support_bitbucket_pullmerge","ref":"feature/master/support_bitbucket_pullmerge","sha":"63f9f24b68cd4fc63fc1e5d5632525a5ae99ca3c","user":{"login":"ayohrling","id":5257964,"avatar_url":"https://avatars.githubusercontent.com/u/5257964?v=3","gravatar_id":"","url":"https://api.github.com/users/ayohrling","html_url":"https://github.com/ayohrling","followers_url":"https://api.github.com/users/ayohrling/followers","following_url":"https://api.github.com/users/ayohrling/following{/other_user}","gists_url":"https://api.github.com/users/ayohrling/gists{/gist_id}","starred_url":"https://api.github.com/users/ayohrling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayohrling/subscriptions","organizations_url":"https://api.github.com/users/ayohrling/orgs","repos_url":"https://api.github.com/users/ayohrling/repos","events_url":"https://api.github.com/users/ayohrling/events{/privacy}","received_events_url":"https://api.github.com/users/ayohrling/received_events","type":"User","site_admin":false},"repo":{"id":37719714,"name":"r10k","full_name":"ayohrling/r10k","owner":{"login":"ayohrling","id":5257964,"avatar_url":"https://avatars.githubusercontent.com/u/5257964?v=3","gravatar_id":"","url":"https://api.github.com/users/ayohrling","html_url":"https://github.com/ayohrling","followers_url":"https://api.github.com/users/ayohrling/followers","following_url":"https://api.github.com/users/ayohrling/following{/other_user}","gists_url":"https://api.github.com/users/ayohrling/gists{/gist_id}","starred_url":"https://api.github.com/users/ayohrling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayohrling/subscriptions","organizations_url":"https://api.github.com/users/ayohrling/orgs","repos_url":"https://api.github.com/users/ayohrling/repos","events_url":"https://api.github.com/users/ayohrling/events{/privacy}","received_events_url":"https://api.github.com/users/ayohrling/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ayohrling/r10k","description":"Setup and configure r10k for use with git based environments in puppet","fork":true,"url":"https://api.github.com/repos/ayohrling/r10k","forks_url":"https://api.github.com/repos/ayohrling/r10k/forks","keys_url":"https://api.github.com/repos/ayohrling/r10k/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ayohrling/r10k/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ayohrling/r10k/teams","hooks_url":"https://api.github.com/repos/ayohrling/r10k/hooks","issue_events_url":"https://api.github.com/repos/ayohrling/r10k/issues/events{/number}","events_url":"https://api.github.com/repos/ayohrling/r10k/events","assignees_url":"https://api.github.com/repos/ayohrling/r10k/assignees{/user}","branches_url":"https://api.github.com/repos/ayohrling/r10k/branches{/branch}","tags_url":"https://api.github.com/repos/ayohrling/r10k/tags","blobs_url":"https://api.github.com/repos/ayohrling/r10k/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ayohrling/r10k/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ayohrling/r10k/git/refs{/sha}","trees_url":"https://api.github.com/repos/ayohrling/r10k/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ayohrling/r10k/statuses/{sha}","languages_url":"https://api.github.com/repos/ayohrling/r10k/languages","stargazers_url":"https://api.github.com/repos/ayohrling/r10k/stargazers","contributors_url":"https://api.github.com/repos/ayohrling/r10k/contributors","subscribers_url":"https://api.github.com/repos/ayohrling/r10k/subscribers","subscription_url":"https://api.github.com/repos/ayohrling/r10k/subscription","commits_url":"https://api.github.com/repos/ayohrling/r10k/commits{/sha}","git_commits_url":"https://api.github.com/repos/ayohrling/r10k/git/commits{/sha}","comments_url":"https://api.github.com/repos/ayohrling/r10k/comments{/number}","issue_comment_url":"https://api.github.com/repos/ayohrling/r10k/issues/comments{/number}","contents_url":"https://api.github.com/repos/ayohrling/r10k/contents/{+path}","compare_url":"https://api.github.com/repos/ayohrling/r10k/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ayohrling/r10k/merges","archive_url":"https://api.github.com/repos/ayohrling/r10k/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ayohrling/r10k/downloads","issues_url":"https://api.github.com/repos/ayohrling/r10k/issues{/number}","pulls_url":"https://api.github.com/repos/ayohrling/r10k/pulls{/number}","milestones_url":"https://api.github.com/repos/ayohrling/r10k/milestones{/number}","notifications_url":"https://api.github.com/repos/ayohrling/r10k/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ayohrling/r10k/labels{/name}","releases_url":"https://api.github.com/repos/ayohrling/r10k/releases{/id}","created_at":"2015-06-19T12:09:01Z","updated_at":"2015-06-19T12:09:01Z","pushed_at":"2015-06-19T19:30:29Z","git_url":"git://github.com/ayohrling/r10k.git","ssh_url":"git@github.com:ayohrling/r10k.git","clone_url":"https://github.com/ayohrling/r10k.git","svn_url":"https://github.com/ayohrling/r10k","homepage":"","size":690,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"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"}},"base":{"label":"acidprime:master","ref":"master","sha":"f51a220396d08c5362e329dd704de792788a94ca","user":{"login":"acidprime","id":1173142,"avatar_url":"https://avatars.githubusercontent.com/u/1173142?v=3","gravatar_id":"","url":"https://api.github.com/users/acidprime","html_url":"https://github.com/acidprime","followers_url":"https://api.github.com/users/acidprime/followers","following_url":"https://api.github.com/users/acidprime/following{/other_user}","gists_url":"https://api.github.com/users/acidprime/gists{/gist_id}","starred_url":"https://api.github.com/users/acidprime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acidprime/subscriptions","organizations_url":"https://api.github.com/users/acidprime/orgs","repos_url":"https://api.github.com/users/acidprime/repos","events_url":"https://api.github.com/users/acidprime/events{/privacy}","received_events_url":"https://api.github.com/users/acidprime/received_events","type":"User","site_admin":false},"repo":{"id":9922918,"name":"r10k","full_name":"acidprime/r10k","owner":{"login":"acidprime","id":1173142,"avatar_url":"https://avatars.githubusercontent.com/u/1173142?v=3","gravatar_id":"","url":"https://api.github.com/users/acidprime","html_url":"https://github.com/acidprime","followers_url":"https://api.github.com/users/acidprime/followers","following_url":"https://api.github.com/users/acidprime/following{/other_user}","gists_url":"https://api.github.com/users/acidprime/gists{/gist_id}","starred_url":"https://api.github.com/users/acidprime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acidprime/subscriptions","organizations_url":"https://api.github.com/users/acidprime/orgs","repos_url":"https://api.github.com/users/acidprime/repos","events_url":"https://api.github.com/users/acidprime/events{/privacy}","received_events_url":"https://api.github.com/users/acidprime/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/acidprime/r10k","description":"Setup and configure r10k for use with git based environments in puppet","fork":false,"url":"https://api.github.com/repos/acidprime/r10k","forks_url":"https://api.github.com/repos/acidprime/r10k/forks","keys_url":"https://api.github.com/repos/acidprime/r10k/keys{/key_id}","collaborators_url":"https://api.github.com/repos/acidprime/r10k/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/acidprime/r10k/teams","hooks_url":"https://api.github.com/repos/acidprime/r10k/hooks","issue_events_url":"https://api.github.com/repos/acidprime/r10k/issues/events{/number}","events_url":"https://api.github.com/repos/acidprime/r10k/events","assignees_url":"https://api.github.com/repos/acidprime/r10k/assignees{/user}","branches_url":"https://api.github.com/repos/acidprime/r10k/branches{/branch}","tags_url":"https://api.github.com/repos/acidprime/r10k/tags","blobs_url":"https://api.github.com/repos/acidprime/r10k/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/acidprime/r10k/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/acidprime/r10k/git/refs{/sha}","trees_url":"https://api.github.com/repos/acidprime/r10k/git/trees{/sha}","statuses_url":"https://api.github.com/repos/acidprime/r10k/statuses/{sha}","languages_url":"https://api.github.com/repos/acidprime/r10k/languages","stargazers_url":"https://api.github.com/repos/acidprime/r10k/stargazers","contributors_url":"https://api.github.com/repos/acidprime/r10k/contributors","subscribers_url":"https://api.github.com/repos/acidprime/r10k/subscribers","subscription_url":"https://api.github.com/repos/acidprime/r10k/subscription","commits_url":"https://api.github.com/repos/acidprime/r10k/commits{/sha}","git_commits_url":"https://api.github.com/repos/acidprime/r10k/git/commits{/sha}","comments_url":"https://api.github.com/repos/acidprime/r10k/comments{/number}","issue_comment_url":"https://api.github.com/repos/acidprime/r10k/issues/comments{/number}","contents_url":"https://api.github.com/repos/acidprime/r10k/contents/{+path}","compare_url":"https://api.github.com/repos/acidprime/r10k/compare/{base}...{head}","merges_url":"https://api.github.com/repos/acidprime/r10k/merges","archive_url":"https://api.github.com/repos/acidprime/r10k/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/acidprime/r10k/downloads","issues_url":"https://api.github.com/repos/acidprime/r10k/issues{/number}","pulls_url":"https://api.github.com/repos/acidprime/r10k/pulls{/number}","milestones_url":"https://api.github.com/repos/acidprime/r10k/milestones{/number}","notifications_url":"https://api.github.com/repos/acidprime/r10k/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/acidprime/r10k/labels{/name}","releases_url":"https://api.github.com/repos/acidprime/r10k/releases{/id}","created_at":"2013-05-07T22:18:04Z","updated_at":"2015-06-24T16:27:58Z","pushed_at":"2015-06-24T18:58:45Z","git_url":"git://github.com/acidprime/r10k.git","ssh_url":"git@github.com:acidprime/r10k.git","clone_url":"https://github.com/acidprime/r10k.git","svn_url":"https://github.com/acidprime/r10k","homepage":"","size":2429,"stargazers_count":57,"watchers_count":57,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":14,"forks":75,"open_issues":14,"watchers":57,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/acidprime/r10k/pulls/193"},"html":{"href":"https://github.com/acidprime/r10k/pull/193"},"issue":{"href":"https://api.github.com/repos/acidprime/r10k/issues/193"},"comments":{"href":"https://api.github.com/repos/acidprime/r10k/issues/193/comments"},"review_comments":{"href":"https://api.github.com/repos/acidprime/r10k/pulls/193/comments"},"review_comment":{"href":"https://api.github.com/repos/acidprime/r10k/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/acidprime/r10k/pulls/193/commits"},"statuses":{"href":"https://api.github.com/repos/acidprime/r10k/statuses/63f9f24b68cd4fc63fc1e5d5632525a5ae99ca3c"}}}}