{"action":"created","comment":{"url":"https://api.github.com/repos/kubernetes/contrib/pulls/comments/74838733","id":74838733,"diff_hunk":"@@ -0,0 +1,57 @@\n+#!/bin/bash\n+\n+# Copyright 2016 The Kubernetes Authors.\n+#\n+# Licensed under the Apache License, Version 2.0 (the \"License\");\n+# you may not use this file except in compliance with the License.\n+# You may obtain a copy of the License at\n+#\n+#     http://www.apache.org/licenses/LICENSE-2.0\n+#\n+# Unless required by applicable law or agreed to in writing, software\n+# distributed under the License is distributed on an \"AS IS\" BASIS,\n+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+# See the License for the specific language governing permissions and\n+# limitations under the License.\n+\n+set -o errexit\n+set -o nounset\n+set -o pipefail\n+\n+echo $@\n+if [ ! $# -eq 5 ]; then\n+    echo \"usage: publisher source_dir destination_dir source_url destination_url token\"\n+    exit 1\n+fi\n+SRC=\"${1}\"\n+DST=\"${2}\"\n+SRCURL=\"${3}\"\n+DSTURL=\"${4}\"\n+TOKEN=\"${5}\"\n+# set up github token\n+rm -f ~/.netrc\n+echo \"machine github.com login ${TOKEN}\" > ~/.netrc\n+# set up github user\n+git config --global user.email \"k8s-publish-robot@users.noreply.github.com\"\n+git config --global user.name \"Kubernetes Publisher\"\n+# get the latest commit hash of source\n+pushd \"${SRC}\" > /dev/null\n+commit_hash=$(git rev-parse HEAD)\n+popd > /dev/null\n+# set up the destination directory\n+rm -rf \"${DST}\"\n+mkdir -p \"${DST}\"\n+git clone \"${DSTURL}\" \"${DST}\"\n+pushd \"${DST}\" > /dev/null\n+rm -r ./*\n+cp -a \"${SRC}/.\" \"${DST}\"\n+git add --all\n+# check if there are new contents \n+if git diff --cached --exit-code &>/dev/null; then\n+    echo \"nothing has changed!\"\n+    exit 0\n+fi\n+git commit -m \"published by bot, copied from ${SRCURL}, last commit is ${commit_hash}\"\n+git push -f origin master","path":"mungegithub/mungers/publisher.sh","position":55,"original_position":55,"commit_id":"c00cff23ba64546d2e065bc469e220d134ec73d6","original_commit_id":"c00cff23ba64546d2e065bc469e220d134ec73d6","user":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"body":"Can we omit the -f? just in case someone else made changes. We don't want to actually rewrite history. I think it's OK if it fails, it'll just try again.","created_at":"2016-08-15T21:28:13Z","updated_at":"2016-08-15T21:28:13Z","html_url":"https://github.com/kubernetes/contrib/pull/1541#discussion_r74838733","pull_request_url":"https://api.github.com/repos/kubernetes/contrib/pulls/1541","_links":{"self":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/comments/74838733"},"html":{"href":"https://github.com/kubernetes/contrib/pull/1541#discussion_r74838733"},"pull_request":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/1541"}}},"pull_request":{"url":"https://api.github.com/repos/kubernetes/contrib/pulls/1541","id":81341613,"html_url":"https://github.com/kubernetes/contrib/pull/1541","diff_url":"https://github.com/kubernetes/contrib/pull/1541.diff","patch_url":"https://github.com/kubernetes/contrib/pull/1541.patch","issue_url":"https://api.github.com/repos/kubernetes/contrib/issues/1541","number":1541,"state":"open","locked":false,"title":"Add a publisher that publishes the staging client to its own repository daily","user":{"login":"caesarxuchao","id":2823529,"avatar_url":"https://avatars.githubusercontent.com/u/2823529?v=3","gravatar_id":"","url":"https://api.github.com/users/caesarxuchao","html_url":"https://github.com/caesarxuchao","followers_url":"https://api.github.com/users/caesarxuchao/followers","following_url":"https://api.github.com/users/caesarxuchao/following{/other_user}","gists_url":"https://api.github.com/users/caesarxuchao/gists{/gist_id}","starred_url":"https://api.github.com/users/caesarxuchao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caesarxuchao/subscriptions","organizations_url":"https://api.github.com/users/caesarxuchao/orgs","repos_url":"https://api.github.com/users/caesarxuchao/repos","events_url":"https://api.github.com/users/caesarxuchao/events{/privacy}","received_events_url":"https://api.github.com/users/caesarxuchao/received_events","type":"User","site_admin":false},"body":"You can see the sample commits here: https://github.com/caesarxuchao/client-go/commits/master (see last few commits)\r\n@lavalamp @foxish ","created_at":"2016-08-15T17:03:12Z","updated_at":"2016-08-15T21:28:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"adef21dfd2936abfa020791acb29ef52100dbe8a","assignee":{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},"assignees":[{"login":"lavalamp","id":647318,"avatar_url":"https://avatars.githubusercontent.com/u/647318?v=3","gravatar_id":"","url":"https://api.github.com/users/lavalamp","html_url":"https://github.com/lavalamp","followers_url":"https://api.github.com/users/lavalamp/followers","following_url":"https://api.github.com/users/lavalamp/following{/other_user}","gists_url":"https://api.github.com/users/lavalamp/gists{/gist_id}","starred_url":"https://api.github.com/users/lavalamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lavalamp/subscriptions","organizations_url":"https://api.github.com/users/lavalamp/orgs","repos_url":"https://api.github.com/users/lavalamp/repos","events_url":"https://api.github.com/users/lavalamp/events{/privacy}","received_events_url":"https://api.github.com/users/lavalamp/received_events","type":"User","site_admin":false},{"login":"foxish","id":906471,"avatar_url":"https://avatars.githubusercontent.com/u/906471?v=3","gravatar_id":"","url":"https://api.github.com/users/foxish","html_url":"https://github.com/foxish","followers_url":"https://api.github.com/users/foxish/followers","following_url":"https://api.github.com/users/foxish/following{/other_user}","gists_url":"https://api.github.com/users/foxish/gists{/gist_id}","starred_url":"https://api.github.com/users/foxish/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/foxish/subscriptions","organizations_url":"https://api.github.com/users/foxish/orgs","repos_url":"https://api.github.com/users/foxish/repos","events_url":"https://api.github.com/users/foxish/events{/privacy}","received_events_url":"https://api.github.com/users/foxish/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/kubernetes/contrib/pulls/1541/commits","review_comments_url":"https://api.github.com/repos/kubernetes/contrib/pulls/1541/comments","review_comment_url":"https://api.github.com/repos/kubernetes/contrib/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kubernetes/contrib/issues/1541/comments","statuses_url":"https://api.github.com/repos/kubernetes/contrib/statuses/c00cff23ba64546d2e065bc469e220d134ec73d6","head":{"label":"caesarxuchao:publisher","ref":"publisher","sha":"c00cff23ba64546d2e065bc469e220d134ec73d6","user":{"login":"caesarxuchao","id":2823529,"avatar_url":"https://avatars.githubusercontent.com/u/2823529?v=3","gravatar_id":"","url":"https://api.github.com/users/caesarxuchao","html_url":"https://github.com/caesarxuchao","followers_url":"https://api.github.com/users/caesarxuchao/followers","following_url":"https://api.github.com/users/caesarxuchao/following{/other_user}","gists_url":"https://api.github.com/users/caesarxuchao/gists{/gist_id}","starred_url":"https://api.github.com/users/caesarxuchao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caesarxuchao/subscriptions","organizations_url":"https://api.github.com/users/caesarxuchao/orgs","repos_url":"https://api.github.com/users/caesarxuchao/repos","events_url":"https://api.github.com/users/caesarxuchao/events{/privacy}","received_events_url":"https://api.github.com/users/caesarxuchao/received_events","type":"User","site_admin":false},"repo":{"id":53298818,"name":"contrib","full_name":"caesarxuchao/contrib","owner":{"login":"caesarxuchao","id":2823529,"avatar_url":"https://avatars.githubusercontent.com/u/2823529?v=3","gravatar_id":"","url":"https://api.github.com/users/caesarxuchao","html_url":"https://github.com/caesarxuchao","followers_url":"https://api.github.com/users/caesarxuchao/followers","following_url":"https://api.github.com/users/caesarxuchao/following{/other_user}","gists_url":"https://api.github.com/users/caesarxuchao/gists{/gist_id}","starred_url":"https://api.github.com/users/caesarxuchao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caesarxuchao/subscriptions","organizations_url":"https://api.github.com/users/caesarxuchao/orgs","repos_url":"https://api.github.com/users/caesarxuchao/repos","events_url":"https://api.github.com/users/caesarxuchao/events{/privacy}","received_events_url":"https://api.github.com/users/caesarxuchao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/caesarxuchao/contrib","description":"This is a place for various components in the Kubernetes ecosystem that aren't part of the Kubernetes core.","fork":true,"url":"https://api.github.com/repos/caesarxuchao/contrib","forks_url":"https://api.github.com/repos/caesarxuchao/contrib/forks","keys_url":"https://api.github.com/repos/caesarxuchao/contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caesarxuchao/contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caesarxuchao/contrib/teams","hooks_url":"https://api.github.com/repos/caesarxuchao/contrib/hooks","issue_events_url":"https://api.github.com/repos/caesarxuchao/contrib/issues/events{/number}","events_url":"https://api.github.com/repos/caesarxuchao/contrib/events","assignees_url":"https://api.github.com/repos/caesarxuchao/contrib/assignees{/user}","branches_url":"https://api.github.com/repos/caesarxuchao/contrib/branches{/branch}","tags_url":"https://api.github.com/repos/caesarxuchao/contrib/tags","blobs_url":"https://api.github.com/repos/caesarxuchao/contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caesarxuchao/contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caesarxuchao/contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/caesarxuchao/contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caesarxuchao/contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/caesarxuchao/contrib/languages","stargazers_url":"https://api.github.com/repos/caesarxuchao/contrib/stargazers","contributors_url":"https://api.github.com/repos/caesarxuchao/contrib/contributors","subscribers_url":"https://api.github.com/repos/caesarxuchao/contrib/subscribers","subscription_url":"https://api.github.com/repos/caesarxuchao/contrib/subscription","commits_url":"https://api.github.com/repos/caesarxuchao/contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/caesarxuchao/contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/caesarxuchao/contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/caesarxuchao/contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/caesarxuchao/contrib/contents/{+path}","compare_url":"https://api.github.com/repos/caesarxuchao/contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caesarxuchao/contrib/merges","archive_url":"https://api.github.com/repos/caesarxuchao/contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caesarxuchao/contrib/downloads","issues_url":"https://api.github.com/repos/caesarxuchao/contrib/issues{/number}","pulls_url":"https://api.github.com/repos/caesarxuchao/contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/caesarxuchao/contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/caesarxuchao/contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caesarxuchao/contrib/labels{/name}","releases_url":"https://api.github.com/repos/caesarxuchao/contrib/releases{/id}","deployments_url":"https://api.github.com/repos/caesarxuchao/contrib/deployments","created_at":"2016-03-07T05:41:32Z","updated_at":"2016-03-07T05:41:34Z","pushed_at":"2016-08-15T17:01:12Z","git_url":"git://github.com/caesarxuchao/contrib.git","ssh_url":"git@github.com:caesarxuchao/contrib.git","clone_url":"https://github.com/caesarxuchao/contrib.git","svn_url":"https://github.com/caesarxuchao/contrib","homepage":"","size":30176,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"kubernetes:master","ref":"master","sha":"bef4f4a5321e30d7f53ee8353b56e3a0e0912877","user":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"repo":{"id":40686014,"name":"contrib","full_name":"kubernetes/contrib","owner":{"login":"kubernetes","id":13629408,"avatar_url":"https://avatars.githubusercontent.com/u/13629408?v=3","gravatar_id":"","url":"https://api.github.com/users/kubernetes","html_url":"https://github.com/kubernetes","followers_url":"https://api.github.com/users/kubernetes/followers","following_url":"https://api.github.com/users/kubernetes/following{/other_user}","gists_url":"https://api.github.com/users/kubernetes/gists{/gist_id}","starred_url":"https://api.github.com/users/kubernetes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kubernetes/subscriptions","organizations_url":"https://api.github.com/users/kubernetes/orgs","repos_url":"https://api.github.com/users/kubernetes/repos","events_url":"https://api.github.com/users/kubernetes/events{/privacy}","received_events_url":"https://api.github.com/users/kubernetes/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/kubernetes/contrib","description":"This is a place for various components in the Kubernetes ecosystem that aren't part of the Kubernetes core. Consider creating a new repo instead.","fork":false,"url":"https://api.github.com/repos/kubernetes/contrib","forks_url":"https://api.github.com/repos/kubernetes/contrib/forks","keys_url":"https://api.github.com/repos/kubernetes/contrib/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kubernetes/contrib/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kubernetes/contrib/teams","hooks_url":"https://api.github.com/repos/kubernetes/contrib/hooks","issue_events_url":"https://api.github.com/repos/kubernetes/contrib/issues/events{/number}","events_url":"https://api.github.com/repos/kubernetes/contrib/events","assignees_url":"https://api.github.com/repos/kubernetes/contrib/assignees{/user}","branches_url":"https://api.github.com/repos/kubernetes/contrib/branches{/branch}","tags_url":"https://api.github.com/repos/kubernetes/contrib/tags","blobs_url":"https://api.github.com/repos/kubernetes/contrib/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kubernetes/contrib/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kubernetes/contrib/git/refs{/sha}","trees_url":"https://api.github.com/repos/kubernetes/contrib/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kubernetes/contrib/statuses/{sha}","languages_url":"https://api.github.com/repos/kubernetes/contrib/languages","stargazers_url":"https://api.github.com/repos/kubernetes/contrib/stargazers","contributors_url":"https://api.github.com/repos/kubernetes/contrib/contributors","subscribers_url":"https://api.github.com/repos/kubernetes/contrib/subscribers","subscription_url":"https://api.github.com/repos/kubernetes/contrib/subscription","commits_url":"https://api.github.com/repos/kubernetes/contrib/commits{/sha}","git_commits_url":"https://api.github.com/repos/kubernetes/contrib/git/commits{/sha}","comments_url":"https://api.github.com/repos/kubernetes/contrib/comments{/number}","issue_comment_url":"https://api.github.com/repos/kubernetes/contrib/issues/comments{/number}","contents_url":"https://api.github.com/repos/kubernetes/contrib/contents/{+path}","compare_url":"https://api.github.com/repos/kubernetes/contrib/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kubernetes/contrib/merges","archive_url":"https://api.github.com/repos/kubernetes/contrib/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kubernetes/contrib/downloads","issues_url":"https://api.github.com/repos/kubernetes/contrib/issues{/number}","pulls_url":"https://api.github.com/repos/kubernetes/contrib/pulls{/number}","milestones_url":"https://api.github.com/repos/kubernetes/contrib/milestones{/number}","notifications_url":"https://api.github.com/repos/kubernetes/contrib/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kubernetes/contrib/labels{/name}","releases_url":"https://api.github.com/repos/kubernetes/contrib/releases{/id}","deployments_url":"https://api.github.com/repos/kubernetes/contrib/deployments","created_at":"2015-08-13T23:18:26Z","updated_at":"2016-08-15T10:24:22Z","pushed_at":"2016-08-15T17:03:13Z","git_url":"git://github.com/kubernetes/contrib.git","ssh_url":"git@github.com:kubernetes/contrib.git","clone_url":"https://github.com/kubernetes/contrib.git","svn_url":"https://github.com/kubernetes/contrib","homepage":"","size":69315,"stargazers_count":426,"watchers_count":426,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":412,"mirror_url":null,"open_issues_count":271,"forks":412,"open_issues":271,"watchers":426,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/1541"},"html":{"href":"https://github.com/kubernetes/contrib/pull/1541"},"issue":{"href":"https://api.github.com/repos/kubernetes/contrib/issues/1541"},"comments":{"href":"https://api.github.com/repos/kubernetes/contrib/issues/1541/comments"},"review_comments":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/1541/comments"},"review_comment":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kubernetes/contrib/pulls/1541/commits"},"statuses":{"href":"https://api.github.com/repos/kubernetes/contrib/statuses/c00cff23ba64546d2e065bc469e220d134ec73d6"}}}}
{"actor":{"display_login":"lavalamp"}}