{"action":"created","comment":{"url":"https://api.github.com/repos/fabric8-services/fabric8-common/pulls/comments/227878378","pull_request_review_id":168019217,"id":227878378,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzg3ODM3OA==","diff_hunk":"@@ -0,0 +1,77 @@\n+#!/bin/bash\n+\n+function git_configure_and_clone() {\n+    git config --global user.name \"FABRIC8 CD autobot\"\n+    git config --global user.email fabric8cd@gmail.com\n+\n+    set +x\n+    echo git clone https://XXXX@github.com/${GHORG}/${GHREPO}.git --depth=1 /tmp/${GHREPO}\n+    git clone https://$(echo ${FABRIC8_HUB_TOKEN}|base64 --decode)@github.com/${GHORG}/${GHREPO}.git --depth=1 /tmp/${GHREPO}\n+    set -x\n+}\n+\n+function generate_client_and_create_pr() {\n+    make docker-generate-client\n+\n+    local newVersion=${LATEST_COMMIT}\n+    local message=\"chore: update client version to ${newVersion}\"\n+    local body=$(pr_body)\n+    local short_head=$(git rev-parse --short HEAD)\n+    local branch=\"client_update_${short_head}\"\n+\n+    cd /tmp/${GHREPO}\n+    git checkout -b ${branch}\n+    cd -\n+    cp -r cluster tool /tmp/${GHREPO}\n+    git rev-parse --short HEAD > /tmp/${GHREPO}/source_commit.txt\n+    cd /tmp/${GHREPO}\n+\n+    git commit cluster tool source_commit.txt -m \"${message}\"\n+    git push -u origin ${branch}\n+    rm -rf /tmp/${GHREPO}\n+\n+    set +x\n+    curl -s -X POST -L -H \"Authorization: token $(echo ${FABRIC8_HUB_TOKEN}|base64 --decode)\" \\\n+         -d \"{\\\"title\\\": \\\"${message}\\\", \\\"body\\\": \\\"${body}\\\", \\\"base\\\":\\\"master\\\", \\\"head\\\":\\\"${branch}\\\"}\" \\","path":".scripts/create_push_client.sh","position":35,"original_position":35,"commit_id":"3e00aa48c9122ed0680b8dc6004785d799eb59b0","original_commit_id":"3e00aa48c9122ed0680b8dc6004785d799eb59b0","user":{"login":"alexeykazakov","id":620087,"node_id":"MDQ6VXNlcjYyMDA4Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/620087?v=4","gravatar_id":"","url":"https://api.github.com/users/alexeykazakov","html_url":"https://github.com/alexeykazakov","followers_url":"https://api.github.com/users/alexeykazakov/followers","following_url":"https://api.github.com/users/alexeykazakov/following{/other_user}","gists_url":"https://api.github.com/users/alexeykazakov/gists{/gist_id}","starred_url":"https://api.github.com/users/alexeykazakov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexeykazakov/subscriptions","organizations_url":"https://api.github.com/users/alexeykazakov/orgs","repos_url":"https://api.github.com/users/alexeykazakov/repos","events_url":"https://api.github.com/users/alexeykazakov/events{/privacy}","received_events_url":"https://api.github.com/users/alexeykazakov/received_events","type":"User","site_admin":false},"body":"Can we also add a link to the original commit in the main repo to the PR?\r\nI would like to see what actually changed in the main repo which triggered that PR.","created_at":"2018-10-24T17:05:17Z","updated_at":"2018-10-24T17:06:21Z","html_url":"https://github.com/fabric8-services/fabric8-common/pull/36#discussion_r227878378","pull_request_url":"https://api.github.com/repos/fabric8-services/fabric8-common/pulls/36","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/fabric8-services/fabric8-common/pulls/comments/227878378"},"html":{"href":"https://github.com/fabric8-services/fabric8-common/pull/36#discussion_r227878378"},"pull_request":{"href":"https://api.github.com/repos/fabric8-services/fabric8-common/pulls/36"}}},"pull_request":{"url":"https://api.github.com/repos/fabric8-services/fabric8-common/pulls/36","id":225339017,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI1MzM5MDE3","html_url":"https://github.com/fabric8-services/fabric8-common/pull/36","diff_url":"https://github.com/fabric8-services/fabric8-common/pull/36.diff","patch_url":"https://github.com/fabric8-services/fabric8-common/pull/36.patch","issue_url":"https://api.github.com/repos/fabric8-services/fabric8-common/issues/36","number":36,"state":"open","locked":false,"title":"chore: add script to generate client and create pr","user":{"login":"dipak-pawar","id":7941617,"node_id":"MDQ6VXNlcjc5NDE2MTc=","avatar_url":"https://avatars3.githubusercontent.com/u/7941617?v=4","gravatar_id":"","url":"https://api.github.com/users/dipak-pawar","html_url":"https://github.com/dipak-pawar","followers_url":"https://api.github.com/users/dipak-pawar/followers","following_url":"https://api.github.com/users/dipak-pawar/following{/other_user}","gists_url":"https://api.github.com/users/dipak-pawar/gists{/gist_id}","starred_url":"https://api.github.com/users/dipak-pawar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dipak-pawar/subscriptions","organizations_url":"https://api.github.com/users/dipak-pawar/orgs","repos_url":"https://api.github.com/users/dipak-pawar/repos","events_url":"https://api.github.com/users/dipak-pawar/events{/privacy}","received_events_url":"https://api.github.com/users/dipak-pawar/received_events","type":"User","site_admin":false},"body":"Currently, we are separating client and services (fabric8-services/fabric8-cluster#12), for which we have `create_push_client.sh` which any service can use to generate client and create a PR to it's client repo in future.\r\n\r\nWe need to source it in all services(e.g. [fabric8-cluster,](https://github.com/fabric8-services/fabric8-cluster/pull/16/files#diff-66536a55e28a60c7e24d2d4a43a8b89cR4) fabric8-auth) `cico_setup.sh`, so that we can use `generate_client_setup $ORG $REPOSITORY` from that service.\r\n\r\nWhy here?\r\n* I believe it's same for all services.\r\n* Also as we'll be using it with the latest master even if we change/modify this script in future, there is no need to update revision it in all repositories (as we are using with the latest master), so less maintenance work.\r\n* I don't want to create a repo for a single script.\r\n\r\nSee fabric8-services/fabric8-cluster#16 for its usage","created_at":"2018-10-24T09:59:32Z","updated_at":"2018-10-24T17:06:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3e6f3b96dc8ff4650e4b292055364e67d5e54a17","assignee":null,"assignees":[],"requested_reviewers":[{"login":"xcoulon","id":178502,"node_id":"MDQ6VXNlcjE3ODUwMg==","avatar_url":"https://avatars2.githubusercontent.com/u/178502?v=4","gravatar_id":"","url":"https://api.github.com/users/xcoulon","html_url":"https://github.com/xcoulon","followers_url":"https://api.github.com/users/xcoulon/followers","following_url":"https://api.github.com/users/xcoulon/following{/other_user}","gists_url":"https://api.github.com/users/xcoulon/gists{/gist_id}","starred_url":"https://api.github.com/users/xcoulon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xcoulon/subscriptions","organizations_url":"https://api.github.com/users/xcoulon/orgs","repos_url":"https://api.github.com/users/xcoulon/repos","events_url":"https://api.github.com/users/xcoulon/events{/privacy}","received_events_url":"https://api.github.com/users/xcoulon/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/fabric8-services/fabric8-common/pulls/36/commits","review_comments_url":"https://api.github.com/repos/fabric8-services/fabric8-common/pulls/36/comments","review_comment_url":"https://api.github.com/repos/fabric8-services/fabric8-common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fabric8-services/fabric8-common/issues/36/comments","statuses_url":"https://api.github.com/repos/fabric8-services/fabric8-common/statuses/3e00aa48c9122ed0680b8dc6004785d799eb59b0","head":{"label":"dipak-pawar:script","ref":"script","sha":"3e00aa48c9122ed0680b8dc6004785d799eb59b0","user":{"login":"dipak-pawar","id":7941617,"node_id":"MDQ6VXNlcjc5NDE2MTc=","avatar_url":"https://avatars3.githubusercontent.com/u/7941617?v=4","gravatar_id":"","url":"https://api.github.com/users/dipak-pawar","html_url":"https://github.com/dipak-pawar","followers_url":"https://api.github.com/users/dipak-pawar/followers","following_url":"https://api.github.com/users/dipak-pawar/following{/other_user}","gists_url":"https://api.github.com/users/dipak-pawar/gists{/gist_id}","starred_url":"https://api.github.com/users/dipak-pawar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dipak-pawar/subscriptions","organizations_url":"https://api.github.com/users/dipak-pawar/orgs","repos_url":"https://api.github.com/users/dipak-pawar/repos","events_url":"https://api.github.com/users/dipak-pawar/events{/privacy}","received_events_url":"https://api.github.com/users/dipak-pawar/received_events","type":"User","site_admin":false},"repo":{"id":151697112,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE2OTcxMTI=","name":"fabric8-common","full_name":"dipak-pawar/fabric8-common","private":false,"owner":{"login":"dipak-pawar","id":7941617,"node_id":"MDQ6VXNlcjc5NDE2MTc=","avatar_url":"https://avatars3.githubusercontent.com/u/7941617?v=4","gravatar_id":"","url":"https://api.github.com/users/dipak-pawar","html_url":"https://github.com/dipak-pawar","followers_url":"https://api.github.com/users/dipak-pawar/followers","following_url":"https://api.github.com/users/dipak-pawar/following{/other_user}","gists_url":"https://api.github.com/users/dipak-pawar/gists{/gist_id}","starred_url":"https://api.github.com/users/dipak-pawar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dipak-pawar/subscriptions","organizations_url":"https://api.github.com/users/dipak-pawar/orgs","repos_url":"https://api.github.com/users/dipak-pawar/repos","events_url":"https://api.github.com/users/dipak-pawar/events{/privacy}","received_events_url":"https://api.github.com/users/dipak-pawar/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dipak-pawar/fabric8-common","description":"A repository for the common go packages of the Fabric8 services","fork":true,"url":"https://api.github.com/repos/dipak-pawar/fabric8-common","forks_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/forks","keys_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/teams","hooks_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/hooks","issue_events_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/issues/events{/number}","events_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/events","assignees_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/assignees{/user}","branches_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/branches{/branch}","tags_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/tags","blobs_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/statuses/{sha}","languages_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/languages","stargazers_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/stargazers","contributors_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/contributors","subscribers_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/subscribers","subscription_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/subscription","commits_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/contents/{+path}","compare_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/merges","archive_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/downloads","issues_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/issues{/number}","pulls_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/pulls{/number}","milestones_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/milestones{/number}","notifications_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/labels{/name}","releases_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/releases{/id}","deployments_url":"https://api.github.com/repos/dipak-pawar/fabric8-common/deployments","created_at":"2018-10-05T09:15:36Z","updated_at":"2018-10-05T09:15:38Z","pushed_at":"2018-10-24T09:48:19Z","git_url":"git://github.com/dipak-pawar/fabric8-common.git","ssh_url":"git@github.com:dipak-pawar/fabric8-common.git","clone_url":"https://github.com/dipak-pawar/fabric8-common.git","svn_url":"https://github.com/dipak-pawar/fabric8-common","homepage":"","size":260,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fabric8-services:master","ref":"master","sha":"7a49685a8135c385898dff8f46277a508eaf6cc5","user":{"login":"fabric8-services","id":29751612,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzUxNjEy","avatar_url":"https://avatars1.githubusercontent.com/u/29751612?v=4","gravatar_id":"","url":"https://api.github.com/users/fabric8-services","html_url":"https://github.com/fabric8-services","followers_url":"https://api.github.com/users/fabric8-services/followers","following_url":"https://api.github.com/users/fabric8-services/following{/other_user}","gists_url":"https://api.github.com/users/fabric8-services/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8-services/subscriptions","organizations_url":"https://api.github.com/users/fabric8-services/orgs","repos_url":"https://api.github.com/users/fabric8-services/repos","events_url":"https://api.github.com/users/fabric8-services/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8-services/received_events","type":"Organization","site_admin":false},"repo":{"id":139610958,"node_id":"MDEwOlJlcG9zaXRvcnkxMzk2MTA5NTg=","name":"fabric8-common","full_name":"fabric8-services/fabric8-common","private":false,"owner":{"login":"fabric8-services","id":29751612,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI5NzUxNjEy","avatar_url":"https://avatars1.githubusercontent.com/u/29751612?v=4","gravatar_id":"","url":"https://api.github.com/users/fabric8-services","html_url":"https://github.com/fabric8-services","followers_url":"https://api.github.com/users/fabric8-services/followers","following_url":"https://api.github.com/users/fabric8-services/following{/other_user}","gists_url":"https://api.github.com/users/fabric8-services/gists{/gist_id}","starred_url":"https://api.github.com/users/fabric8-services/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabric8-services/subscriptions","organizations_url":"https://api.github.com/users/fabric8-services/orgs","repos_url":"https://api.github.com/users/fabric8-services/repos","events_url":"https://api.github.com/users/fabric8-services/events{/privacy}","received_events_url":"https://api.github.com/users/fabric8-services/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/fabric8-services/fabric8-common","description":"A repository for the common go packages of the Fabric8 services","fork":false,"url":"https://api.github.com/repos/fabric8-services/fabric8-common","forks_url":"https://api.github.com/repos/fabric8-services/fabric8-common/forks","keys_url":"https://api.github.com/repos/fabric8-services/fabric8-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fabric8-services/fabric8-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fabric8-services/fabric8-common/teams","hooks_url":"https://api.github.com/repos/fabric8-services/fabric8-common/hooks","issue_events_url":"https://api.github.com/repos/fabric8-services/fabric8-common/issues/events{/number}","events_url":"https://api.github.com/repos/fabric8-services/fabric8-common/events","assignees_url":"https://api.github.com/repos/fabric8-services/fabric8-common/assignees{/user}","branches_url":"https://api.github.com/repos/fabric8-services/fabric8-common/branches{/branch}","tags_url":"https://api.github.com/repos/fabric8-services/fabric8-common/tags","blobs_url":"https://api.github.com/repos/fabric8-services/fabric8-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fabric8-services/fabric8-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fabric8-services/fabric8-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/fabric8-services/fabric8-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fabric8-services/fabric8-common/statuses/{sha}","languages_url":"https://api.github.com/repos/fabric8-services/fabric8-common/languages","stargazers_url":"https://api.github.com/repos/fabric8-services/fabric8-common/stargazers","contributors_url":"https://api.github.com/repos/fabric8-services/fabric8-common/contributors","subscribers_url":"https://api.github.com/repos/fabric8-services/fabric8-common/subscribers","subscription_url":"https://api.github.com/repos/fabric8-services/fabric8-common/subscription","commits_url":"https://api.github.com/repos/fabric8-services/fabric8-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/fabric8-services/fabric8-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/fabric8-services/fabric8-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/fabric8-services/fabric8-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/fabric8-services/fabric8-common/contents/{+path}","compare_url":"https://api.github.com/repos/fabric8-services/fabric8-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fabric8-services/fabric8-common/merges","archive_url":"https://api.github.com/repos/fabric8-services/fabric8-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fabric8-services/fabric8-common/downloads","issues_url":"https://api.github.com/repos/fabric8-services/fabric8-common/issues{/number}","pulls_url":"https://api.github.com/repos/fabric8-services/fabric8-common/pulls{/number}","milestones_url":"https://api.github.com/repos/fabric8-services/fabric8-common/milestones{/number}","notifications_url":"https://api.github.com/repos/fabric8-services/fabric8-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fabric8-services/fabric8-common/labels{/name}","releases_url":"https://api.github.com/repos/fabric8-services/fabric8-common/releases{/id}","deployments_url":"https://api.github.com/repos/fabric8-services/fabric8-common/deployments","created_at":"2018-07-03T16:36:03Z","updated_at":"2018-10-23T08:59:34Z","pushed_at":"2018-10-24T10:23:50Z","git_url":"git://github.com/fabric8-services/fabric8-common.git","ssh_url":"git@github.com:fabric8-services/fabric8-common.git","clone_url":"https://github.com/fabric8-services/fabric8-common.git","svn_url":"https://github.com/fabric8-services/fabric8-common","homepage":"","size":271,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":8,"license":null,"forks":7,"open_issues":8,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fabric8-services/fabric8-common/pulls/36"},"html":{"href":"https://github.com/fabric8-services/fabric8-common/pull/36"},"issue":{"href":"https://api.github.com/repos/fabric8-services/fabric8-common/issues/36"},"comments":{"href":"https://api.github.com/repos/fabric8-services/fabric8-common/issues/36/comments"},"review_comments":{"href":"https://api.github.com/repos/fabric8-services/fabric8-common/pulls/36/comments"},"review_comment":{"href":"https://api.github.com/repos/fabric8-services/fabric8-common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fabric8-services/fabric8-common/pulls/36/commits"},"statuses":{"href":"https://api.github.com/repos/fabric8-services/fabric8-common/statuses/3e00aa48c9122ed0680b8dc6004785d799eb59b0"}},"author_association":"NONE"}}
{"actor":{"display_login":"alexeykazakov"}}