{"action":"created","issue":{"url":"https://api.github.com/repos/integrations/slack/issues/391","repository_url":"https://api.github.com/repos/integrations/slack","labels_url":"https://api.github.com/repos/integrations/slack/issues/391/labels{/name}","comments_url":"https://api.github.com/repos/integrations/slack/issues/391/comments","events_url":"https://api.github.com/repos/integrations/slack/issues/391/events","html_url":"https://github.com/integrations/slack/issues/391","id":300678734,"node_id":"MDU6SXNzdWUzMDA2Nzg3MzQ=","number":391,"title":"Allow subscribing to an entire organization's collection of repos?","user":{"login":"rbonestell","id":3430352,"node_id":"MDQ6VXNlcjM0MzAzNTI=","avatar_url":"https://avatars3.githubusercontent.com/u/3430352?v=4","gravatar_id":"","url":"https://api.github.com/users/rbonestell","html_url":"https://github.com/rbonestell","followers_url":"https://api.github.com/users/rbonestell/followers","following_url":"https://api.github.com/users/rbonestell/following{/other_user}","gists_url":"https://api.github.com/users/rbonestell/gists{/gist_id}","starred_url":"https://api.github.com/users/rbonestell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbonestell/subscriptions","organizations_url":"https://api.github.com/users/rbonestell/orgs","repos_url":"https://api.github.com/users/rbonestell/repos","events_url":"https://api.github.com/users/rbonestell/events{/privacy}","received_events_url":"https://api.github.com/users/rbonestell/received_events","type":"User","site_admin":false},"labels":[{"id":850866245,"node_id":"MDU6TGFiZWw4NTA4NjYyNDU=","url":"https://api.github.com/repos/integrations/slack/labels/feature","name":"feature","color":"006b75","default":false},{"id":850895177,"node_id":"MDU6TGFiZWw4NTA4OTUxNzc=","url":"https://api.github.com/repos/integrations/slack/labels/feature:activity","name":"feature:activity","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":25,"created_at":"2018-02-27T15:34:38Z","updated_at":"2018-08-27T21:58:01Z","closed_at":null,"author_association":"NONE","body":"I have recently upgraded from the old GitHub slack plugin to the new one, and my organization has almost 80 repositories. I don't want to have to copy/paste the link and subscription type for each of my repositories into each channel I want the bot in. Additionally, consider auto-subscribing to new repos in an organization given a specific configuration?"},"comment":{"url":"https://api.github.com/repos/integrations/slack/issues/comments/416382587","html_url":"https://github.com/integrations/slack/issues/391#issuecomment-416382587","issue_url":"https://api.github.com/repos/integrations/slack/issues/391","id":416382587,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjM4MjU4Nw==","user":{"login":"walkafwalka","id":41709139,"node_id":"MDQ6VXNlcjQxNzA5MTM5","avatar_url":"https://avatars2.githubusercontent.com/u/41709139?v=4","gravatar_id":"","url":"https://api.github.com/users/walkafwalka","html_url":"https://github.com/walkafwalka","followers_url":"https://api.github.com/users/walkafwalka/followers","following_url":"https://api.github.com/users/walkafwalka/following{/other_user}","gists_url":"https://api.github.com/users/walkafwalka/gists{/gist_id}","starred_url":"https://api.github.com/users/walkafwalka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/walkafwalka/subscriptions","organizations_url":"https://api.github.com/users/walkafwalka/orgs","repos_url":"https://api.github.com/users/walkafwalka/repos","events_url":"https://api.github.com/users/walkafwalka/events{/privacy}","received_events_url":"https://api.github.com/users/walkafwalka/received_events","type":"User","site_admin":false},"created_at":"2018-08-27T21:58:01Z","updated_at":"2018-08-27T21:58:01Z","author_association":"NONE","body":"I was to impatient and created a script.\r\n1. Create a legacy token. See https://api.slack.com/custom-integrations/legacy-tokens.\r\n2. Install slack pip package. `pip install --user slacker`\r\n3. Run the following:\r\n```\r\n#!/usr/bin/env python\r\nrepos = [\r\n    \"User/Repo1\"\r\n    \"User/Repo2\"\r\n]\r\nfrom slacker import Slacker\r\nimport time\r\nslack = Slacker(\"YOUR_SLACK_TOKEN\")\r\nchannel_id = slack.channels.get_channel_id('YOUR_SLACK_CHANNEL_NO_HASHTAG')\r\nfor repo in repos:\r\n        call = slack.chat.command(\r\n                channel=channel_id,\r\n                command='/github',\r\n                text='subscribe ' + repo\r\n        )\r\n        print call\r\n        time.sleep(1)\r\n```\r\nI highly suggest not removing the sleep unless you want to get your account throttled or potentially banned."}}
{"actor":{"display_login":"walkafwalka"}}