{"action":"created","issue":{"url":"https://api.github.com/repos/googleapis/artman/issues/50","repository_url":"https://api.github.com/repos/googleapis/artman","labels_url":"https://api.github.com/repos/googleapis/artman/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/googleapis/artman/issues/50/comments","events_url":"https://api.github.com/repos/googleapis/artman/issues/50/events","html_url":"https://github.com/googleapis/artman/pull/50","id":166640657,"number":50,"title":"add github push task, using util function in pipeline/utils. ","user":{"login":"mvashishtha","id":10712109,"avatar_url":"https://avatars.githubusercontent.com/u/10712109?v=3","gravatar_id":"","url":"https://api.github.com/users/mvashishtha","html_url":"https://github.com/mvashishtha","followers_url":"https://api.github.com/users/mvashishtha/followers","following_url":"https://api.github.com/users/mvashishtha/following{/other_user}","gists_url":"https://api.github.com/users/mvashishtha/gists{/gist_id}","starred_url":"https://api.github.com/users/mvashishtha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvashishtha/subscriptions","organizations_url":"https://api.github.com/users/mvashishtha/orgs","repos_url":"https://api.github.com/users/mvashishtha/repos","events_url":"https://api.github.com/users/mvashishtha/events{/privacy}","received_events_url":"https://api.github.com/users/mvashishtha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jmuk","id":816093,"avatar_url":"https://avatars.githubusercontent.com/u/816093?v=3","gravatar_id":"","url":"https://api.github.com/users/jmuk","html_url":"https://github.com/jmuk","followers_url":"https://api.github.com/users/jmuk/followers","following_url":"https://api.github.com/users/jmuk/following{/other_user}","gists_url":"https://api.github.com/users/jmuk/gists{/gist_id}","starred_url":"https://api.github.com/users/jmuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmuk/subscriptions","organizations_url":"https://api.github.com/users/jmuk/orgs","repos_url":"https://api.github.com/users/jmuk/repos","events_url":"https://api.github.com/users/jmuk/events{/privacy}","received_events_url":"https://api.github.com/users/jmuk/received_events","type":"User","site_admin":false},"assignees":[{"login":"jmuk","id":816093,"avatar_url":"https://avatars.githubusercontent.com/u/816093?v=3","gravatar_id":"","url":"https://api.github.com/users/jmuk","html_url":"https://github.com/jmuk","followers_url":"https://api.github.com/users/jmuk/followers","following_url":"https://api.github.com/users/jmuk/following{/other_user}","gists_url":"https://api.github.com/users/jmuk/gists{/gist_id}","starred_url":"https://api.github.com/users/jmuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmuk/subscriptions","organizations_url":"https://api.github.com/users/jmuk/orgs","repos_url":"https://api.github.com/users/jmuk/repos","events_url":"https://api.github.com/users/jmuk/events{/privacy}","received_events_url":"https://api.github.com/users/jmuk/received_events","type":"User","site_admin":false},{"login":"ethanbao","id":11670828,"avatar_url":"https://avatars.githubusercontent.com/u/11670828?v=3","gravatar_id":"","url":"https://api.github.com/users/ethanbao","html_url":"https://github.com/ethanbao","followers_url":"https://api.github.com/users/ethanbao/followers","following_url":"https://api.github.com/users/ethanbao/following{/other_user}","gists_url":"https://api.github.com/users/ethanbao/gists{/gist_id}","starred_url":"https://api.github.com/users/ethanbao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethanbao/subscriptions","organizations_url":"https://api.github.com/users/ethanbao/orgs","repos_url":"https://api.github.com/users/ethanbao/repos","events_url":"https://api.github.com/users/ethanbao/events{/privacy}","received_events_url":"https://api.github.com/users/ethanbao/received_events","type":"User","site_admin":false},{"login":"geigerj","id":14222439,"avatar_url":"https://avatars.githubusercontent.com/u/14222439?v=3","gravatar_id":"","url":"https://api.github.com/users/geigerj","html_url":"https://github.com/geigerj","followers_url":"https://api.github.com/users/geigerj/followers","following_url":"https://api.github.com/users/geigerj/following{/other_user}","gists_url":"https://api.github.com/users/geigerj/gists{/gist_id}","starred_url":"https://api.github.com/users/geigerj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geigerj/subscriptions","organizations_url":"https://api.github.com/users/geigerj/orgs","repos_url":"https://api.github.com/users/geigerj/repos","events_url":"https://api.github.com/users/geigerj/events{/privacy}","received_events_url":"https://api.github.com/users/geigerj/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-07-20T17:45:59Z","updated_at":"2016-07-20T18:32:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/googleapis/artman/pulls/50","html_url":"https://github.com/googleapis/artman/pull/50","diff_url":"https://github.com/googleapis/artman/pull/50.diff","patch_url":"https://github.com/googleapis/artman/pull/50.patch"},"body":"I also added a fake repository for testing in test/fake-repos.\r\n\r\nOnce we had extended the Python and Java GRPC client pipelines in artman to optionally publish generated code, we wanted to extend the Go pipeline to do the same. For Go the standard practice for publishing is simply to upload code to a GitHub repository. Since the task of uploading generated code to a GitHub repository might be useful for other languages as well, we want to add a task that will upload a folder to a GitHub repository (independent of the particular language). Code similar to this will also be used for publishing API protos from google3 to GitHub.  \r\n\r\nThis commit uses the GitHub API's JSON over HTTP methods to create and push the commit, because libraries that wrap the GitHub API did not provide the required methods.\r\n\r\nThe implementation follows these steps ([suggested on the API page](https://developer.github.com/v3/git/)), manipulating git internals to publish the output folder:\r\n1. get the current commit object\r\n2. retrieve the tree it points to\r\n3. retrieve the content of the blob object that tree has for that particular file path\r\n4. change the content somehow and post a new blob object with that new content, getting a blob SHA back\r\n5. post a new tree object with that file path pointer replaced with your new blob SHA getting a tree SHA back\r\n6. create a new commit object with the current commit SHA as the parent and the new tree SHA, getting a commit SHA back\r\n7. update the reference of your branch to point to the new commit SHA\r\n"},"comment":{"url":"https://api.github.com/repos/googleapis/artman/issues/comments/234039648","html_url":"https://github.com/googleapis/artman/pull/50#issuecomment-234039648","issue_url":"https://api.github.com/repos/googleapis/artman/issues/50","id":234039648,"user":{"login":"jmuk","id":816093,"avatar_url":"https://avatars.githubusercontent.com/u/816093?v=3","gravatar_id":"","url":"https://api.github.com/users/jmuk","html_url":"https://github.com/jmuk","followers_url":"https://api.github.com/users/jmuk/followers","following_url":"https://api.github.com/users/jmuk/following{/other_user}","gists_url":"https://api.github.com/users/jmuk/gists{/gist_id}","starred_url":"https://api.github.com/users/jmuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmuk/subscriptions","organizations_url":"https://api.github.com/users/jmuk/orgs","repos_url":"https://api.github.com/users/jmuk/repos","events_url":"https://api.github.com/users/jmuk/events{/privacy}","received_events_url":"https://api.github.com/users/jmuk/received_events","type":"User","site_admin":false},"created_at":"2016-07-20T18:32:55Z","updated_at":"2016-07-20T18:32:55Z","body":"Why don't we simply invoke git command instead of using github APIs?"}}
{"actor":{"display_login":"jmuk"}}