I am a bit confused by how this integration is supposed to work with 3rd-party repos (= repos neither I or my organization own), so I hope to get some clarifications here!
As far as I understood it, I can subscribe (/github subscribe <user>/<repo>) to _any_ repo, as long as the owner/organization that owns that repo has the Slack app installed, is that correct?
For example, i took an educated guess and i tried /github subscribe github/opensource.guide and it worked. Then i tried /github subscribe lodash/lodash and it didn't, replying
Either the app isn't installed on your repository or the repository does not exist. Install it to proceed.
does that mean that if I wanted to get notifications from that repo, I should ping the lodash's owner and ask him to install the Slack app?
Another thing I'm not sure I understood is the permissions for github actions like opening/closing an issue, or closing a PR.
Am I supposed to be able to open/close an issue and close/reopen a pull request on _any_ repo I'm subscribed to, even if I don't own them, as long as the owner has accepted the "Read and write access to issues and pull requests" permission?
I tried to open an issue on a repo that I didn't own once and It worked, but then on subsequent tries i would simply get this error

or i would get this
Sorry, we had trouble with your request! If this is interfering with your work, please get in touch!
when trying to close/reopen a PR. So I don't know if this is the integration having an hiccup or not allowing me to do any of those actions because I'm not the owner (although i _did_ manage to open an issue once)
Thanks!
馃憢
As far as I understood it, I can subscribe (/github subscribe
/ ) to any repo, as long as the owner/organization that owns that repo has the Slack app installed, is that correct?
Yes, as long as the app is installed on the repo and as long as you (the person subscribing) can view the repo (ie. it's not a private repo that you don't have access to)
Am I supposed to be able to open/close an issue and close/reopen a pull request on any repo I'm subscribed to, even if I don't own them, as long as the owner has accepted the "Read and write access to issues and pull requests" permission?
No, these actions are carried out on behalf of your GitHub user, so if you as the GitHub user do not have permission to open/close/re-open issues on a specific repo, then it also won't work as part of the slack integration. On public repositories, you generally have the permission to open a new issue as well as the permission to close and re-open issues that you opened, but you don't have the permission to close or re-open issues that you didn't create.
Does that explanation help?
or i would get this
Sorry, we had trouble with your request! If this is interfering with your work, please get in touch!
when trying to close/reopen a PR. So I don't know if this is the integration having an hiccup or not allowing me to do any of those actions because I'm not the owner (although i did manage to open an issue once)
That "Sorry, we had trouble with your request! If this is interfering with your work, please get in touch!" message would indeed indicate some sort of hiccup or exception in the integration. If you get in touch with support via the link in that message, we'll be able to take a closer look :)
Hope this helps!
thanks @wilhelmklopp for the quick response!
I think I then figured out the reasons for the generic error messages:
Overall your reply clarifies my doubts, much appreciated! The error handling though I think could be a bit improved so that it doesn't leave people guessing what happened
Thanks again!
When I got "We had trouble connecting", it was apparently because that particular repo wasn't in the whitelist that the github user (who owned that repo) set up for the slack app
Ah gotcha! Yeah repo/org owners have the option to install the app either on all repos or only some repos.
The error handling though I think could be a bit improved so that it doesn't leave people guessing what happened
Agreed! Would you mind opening a separate issue for improvements to error handling on this repo?
@wilhelmklopp
Agreed! Would you mind opening a separate issue for improvements to error handling on this repo?
Yep, there you go! https://github.com/integrations/slack/issues/659
@wilhelmklopp one last thing: what if for whatever reason the owner/organization of the repo i need notifications from don't have the Slack app and can't/doesn't want to install it? Is there some other way to get notifications in that case?
@AkA84 unfortunately, there is not at the moment. The app needs to be installed on the repo you're subscribing to :/
This is due to the architecture of GitHub Apps. The integration only receives webhooks for repositories that it is installed on
got it, thanks you very much again @wilhelmklopp !
Most helpful comment
馃憢
Yes, as long as the app is installed on the repo and as long as you (the person subscribing) can view the repo (ie. it's not a private repo that you don't have access to)
No, these actions are carried out on behalf of your GitHub user, so if you as the GitHub user do not have permission to open/close/re-open issues on a specific repo, then it also won't work as part of the slack integration. On public repositories, you generally have the permission to open a new issue as well as the permission to close and re-open issues that you opened, but you don't have the permission to close or re-open issues that you didn't create.
Does that explanation help?
That "Sorry, we had trouble with your request! If this is interfering with your work, please get in touch!" message would indeed indicate some sort of hiccup or exception in the integration. If you get in touch with support via the link in that message, we'll be able to take a closer look :)
Hope this helps!