I haven't found this feature in code or the READMEs, so I'm opening this proposal to add the ability to subscribe to releases.
There are multiple use-cases that would benefit from the feature:
Thanks for the suggestion @ffittschen. We don't have docs yet for adding new types of activity, but I'll add some pointers here in case someone wants to try adding it.
lib/messages to render the release with Slack's message formatting. For example, lib/messages/public.js might be a good example to follow. js
robot.on('release', route(release))
lib/activity/release.js that post the message to Slack when the release event is received.lib/models/subscription.js so subscriptions can enable it.Once this is all implemented, you will be able to subscribe to releases with /github subscribe owner/repo releases. Let me know if anyone has any questions or needs help getting this working.
Those pointers are awesome! I'll give it a try on the weekend
@ffittschen let me know if you can't get around to it, as this would also benefit my organization. I may be able to carve out some time for it.
@bkeepers I tried setting up the integration locally as described in CONTRIBUTING.md, after some back and forth with the scripts/bootstrap script I got that one running without errors. (The script installs postgres and redis using brew, but the docs don't mention anything about starting those services or configuring a user that has the same username as the logged in macOS user. This seems to work now though.)
But now I'm stuck at step 6 of Configuring a Slack App, where I shall _"[replace] YOUR-USERNAME with the value that shows up when the server starts."_
Running scripts/server, I only get the following output:
> @ start /Users/ffittschen/Development/GitHub/forks/slack
> probot run --webhook-path=/github/events ./lib
15:00:45.123Z INFO probot: Listening on http://localhost:3000
What output is expected to appear and where can I find YOUR-USERNAME?
Also, do I need to add WEBHOOK_PROXY_URL="https://DOMAIN" to the .env file, because only then the output of scripts/server states that it is connected to smee.io, but the requests don't seem to go through. Opening https://domain/ in my browser only displays the smee.io setup page, but not the same content as opening http://localhost:3000
And when entering https://domain/slack/events as request url for event subscriptions in the slack app it always says _"Your request URL gave us a 500 error. Update your URL to receive a new request and challenge value."_ without printing anything on the console.
UPDATE: The issue seems to be smee.io related. Using ngrok everything works fine
To test the local setup, I tried to call /github subscribe https://github.com/apple/swift which only returns
Either the app isn't installed on your repository or the repository does not exist. Install it to proceed.
Does this mean I'm only able to subscribe to events of repositories that have the GitHub App installed? This would totally destroy my second use-case 馃槥
Does this mean I'm only able to subscribe to events of repositories that have the GitHub App installed? This would totally destroy my second use-case 馃槥
Yeah, unfortunately that's the case. The app doesn't receive webhooks from the repository unless it is installed on the repository.
Very interested in this feature. New releases are the most important thing I want my slack channel to be notified of.
This was just shipped in https://github.com/integrations/slack/pull/550 (thanks @yacinehmito) and is enabled by default for all subscriptions.
The documentation here needs to be updated to mention this feature: https://slack.com/intl/en-gb/help/articles/232289568-github-for-slack
Anyone stubling upon this still looking for a way to get notified of releases of other organisations/repositories, there is a way.
Simply subscribe to the RSS feed of the github page you wish to be notified of with the Slack RSS feed app.
Example:
/feed subscribe https://github.com/bitcoin/bitcoin/releases.atom
Unfortunately RSS only works for public repos, not private ones.
Is there a way to disable notifications for pre-releases and get only notified about public releases?
Most helpful comment
Anyone stubling upon this still looking for a way to get notified of releases of other organisations/repositories, there is a way.
Simply subscribe to the RSS feed of the github page you wish to be notified of with the Slack RSS feed app.
Example:
/feed subscribe https://github.com/bitcoin/bitcoin/releases.atom