Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to subscribe a slack channel to an individual github issue

Tags:

github

slack

I don't want to subscribe a slack channel to all issues on arbitrary third party repositories, just to the particular issues on which my team/organization is involved (contributing to / impacted by), so the usual github integration command /github subscribe thirdparty/arbitraryrepo issues does not suffice as it would cause a ton of unwanted noise in the channel. (and the existing label filtering would not cut it)

(Update: there is an open feature request for that https://github.com/integrations/slack/issues/1280)

I neither want to forward my personal github subscriptions to the slack channel as there are lots of projects I am individually involved that have nothing to do with my team's work. (e.g. my direct mentions)

Also, subscription should stay despite I leaved the team/company.

A per-issue public RSS/Atom feed would cut it but it does not exist.

Am I missing something obvious?

like image 817
N1ngu Avatar asked Nov 02 '25 09:11

N1ngu


1 Answers

As far as I know there is nothing that would suit your need completely at this moment, but have you considered labels?

#1 option You could use filtering based on label which seems to be the closest:

  • That would notify you about all issues, pulls, commits, releases, deployments that has a given label. Syntax example:
/github subscribe repo-owner/repo-name +label:"team-a"
  • Pros: a general filter based on a label name, e.g. team-a
  • Cons:
    • a single label filter only (AFAIK: multiple labels aren't supported but discussed: https://github.com/integrations/slack/issues/384)
    • this works only for a label given when issue/PR is created. Not during its existence ("change label" events are not triggered). Known bug (https://github.com/integrations/slack/issues/1594) and feature PR is open https://github.com/integrations/slack/issues/965

Note: a workaround to get info about label change in PR: to convert PR to a draft and back (https://github.com/integrations/slack/issues/965#issuecomment-1330884166)


#2 option Another thing that might be considered is that the account that is used within GitHub Slack app for connecting to Git server will be actually notified also about all its mentions, assignments & reviews! So if you don't use your personal account, you could get generated some related notifications to the whole team / other specific user etc.

EDIT:

Workaround steps to achieve partially what you want (but it can be in some conflict with your Slack / GitHub settings that I’m not aware of):

  • Use / create a shared account (or other special account) in GitHub
  • In Slack, use this special GitHub account for connecting Slack GitHub app to GitHub (this enables notifications by default for this account - mentions and assignments).
  • Then, when this GitHub account is assigned / mentioned, you’d automatically get notified (but again, then it would work not just for issues but hypothetically also in PRs etc.) to a dedicated channel where you'd have your GitHub integration set.
    • To auto-assign an issue, you'd have to use e.g. GitHub Actions.

Caveat: But as we discuss, there’s no simple way to achieve your goal completely. To at least get closer to something similar to what you describe and require, you’d need to accept some compromises and extra steps for workaround as it’s unfortunately not currently natively supported. 3rd hypothetical way is to create even more complex mechanisms of filtering & redirecting data which would increase a level of complexity + you'd also need to maintain it (unless you'd already have something similar existing in your infrastructure) and I wouldn't recommend it.

like image 92
David-kn Avatar answered Nov 04 '25 01:11

David-kn



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!