{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/issues/716","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/issues/716/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/issues/716/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/issues/716/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-ruby/pull/716","id":157304393,"number":716,"title":"Add Pub/Sub Policy","user":{"login":"quartzmo","id":205445,"avatar_url":"https://avatars.githubusercontent.com/u/205445?v=3","gravatar_id":"","url":"https://api.github.com/users/quartzmo","html_url":"https://github.com/quartzmo","followers_url":"https://api.github.com/users/quartzmo/followers","following_url":"https://api.github.com/users/quartzmo/following{/other_user}","gists_url":"https://api.github.com/users/quartzmo/gists{/gist_id}","starred_url":"https://api.github.com/users/quartzmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/quartzmo/subscriptions","organizations_url":"https://api.github.com/users/quartzmo/orgs","repos_url":"https://api.github.com/users/quartzmo/repos","events_url":"https://api.github.com/users/quartzmo/events{/privacy}","received_events_url":"https://api.github.com/users/quartzmo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/labels/cla:%20yes","name":"cla: yes","color":"009800"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/labels/grpc","name":"grpc","color":"207de5"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/labels/iam","name":"iam","color":"fbca04"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/labels/pubsub","name":"pubsub","color":"fef2c0"}],"state":"open","locked":false,"assignee":{"login":"blowmage","id":730,"avatar_url":"https://avatars.githubusercontent.com/u/730?v=3","gravatar_id":"","url":"https://api.github.com/users/blowmage","html_url":"https://github.com/blowmage","followers_url":"https://api.github.com/users/blowmage/followers","following_url":"https://api.github.com/users/blowmage/following{/other_user}","gists_url":"https://api.github.com/users/blowmage/gists{/gist_id}","starred_url":"https://api.github.com/users/blowmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blowmage/subscriptions","organizations_url":"https://api.github.com/users/blowmage/orgs","repos_url":"https://api.github.com/users/blowmage/repos","events_url":"https://api.github.com/users/blowmage/events{/privacy}","received_events_url":"https://api.github.com/users/blowmage/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-05-27T22:59:14Z","updated_at":"2016-06-02T00:20:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/pulls/716","html_url":"https://github.com/GoogleCloudPlatform/gcloud-ruby/pull/716","diff_url":"https://github.com/GoogleCloudPlatform/gcloud-ruby/pull/716.diff","patch_url":"https://github.com/GoogleCloudPlatform/gcloud-ruby/pull/716.patch"},"body":"This PR adds an object, Policy, that holds the `etag` value for use in updates.\r\n\r\n[closes #587, closes #593]"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/issues/comments/223163235","html_url":"https://github.com/GoogleCloudPlatform/gcloud-ruby/pull/716#issuecomment-223163235","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-ruby/issues/716","id":223163235,"user":{"login":"blowmage","id":730,"avatar_url":"https://avatars.githubusercontent.com/u/730?v=3","gravatar_id":"","url":"https://api.github.com/users/blowmage","html_url":"https://github.com/blowmage","followers_url":"https://api.github.com/users/blowmage/followers","following_url":"https://api.github.com/users/blowmage/following{/other_user}","gists_url":"https://api.github.com/users/blowmage/gists{/gist_id}","starred_url":"https://api.github.com/users/blowmage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blowmage/subscriptions","organizations_url":"https://api.github.com/users/blowmage/orgs","repos_url":"https://api.github.com/users/blowmage/repos","events_url":"https://api.github.com/users/blowmage/events{/privacy}","received_events_url":"https://api.github.com/users/blowmage/received_events","type":"User","site_admin":false},"created_at":"2016-06-02T00:20:14Z","updated_at":"2016-06-02T00:20:14Z","body":"I don't think this is ready. To close #587 and #593 I would like to see the policy object yielded to the method's block so users can make minor changes in a declarative way. This should also use the latest etag to ensure that only the changes made in the block are made.\r\n\r\n```ruby\r\nrequire \"gcloud\"\r\n\r\ngcloud = Gcloud.new\r\npubsub = gcloud.pubsub\r\ntopic = pubsub.topic \"my-topic\"\r\n\r\npolicy = topic.policy do |p|\r\n  p.add \"roles/owner\", \"user:newowner@example.com\"\r\nend\r\n```\r\n\r\nI also think while we are making these changes in Pub/Sub we should also make the same changes in Resource Manager. Use the same Policy API in both services."}}
{"actor":{"display_login":"blowmage"}}