Slack: Branch-by-branch filtering

Created on 8 Mar 2018  ·  111Comments  ·  Source: integrations/slack

It would be great to be able to filter activity alerts based on a list of branches, similar to what's available in the legacy app (the setting was labeled: 'Branch | Optional branch (or comma-separated branches) to filter on.').

From the configuration notes it appears we can only do 'default branch', 'all', or 'none', effectively. If I'm misreading, I'd love to hear if this is possible. Many thanks.

subscription feature

Most helpful comment

A big +1 here as well. The existing syntax, as found at https://github.com/integrations/slack#configuration, could already accommodate filtering for at least one specific branch. Right now it's possible to do:

/github subscribe alice/some-repo commits:all

What follows the colon could be the name of any specific branch, e.g.

/github subscribe alice/some-repo commits:some-topic-branch

In any case, this is one more feature missing from the new app that was present in the old one. I'm loving the convenience of having a /github subscribe slash command (have wanted this for years!) but I'm afraid it's coming at a pretty steep cost. Thanks for considering.

All 111 comments

This was critical to my company's usage. We had separate channels for checkin notices (pushes to develop) vs. releases (pushes to master) so that managerial staff could be aware of production deployment.

Agreed, we're finding the integration unusable in our Slack #github channel without only specifying specific branches (e.g.: only master, dev, staging) and ignoring the rest. Becomes amazingly spammy otherwise. This was supported in the legacy app so it would be lovely to have it included here.

We are missing this in our organization as well.
Need the ability to subscribe to one or multiple branches in a repository.

Indeed, especially if you are following the git-flow model, this is highly needed.

yes, it's important to have separate notifications for separate branches. The only solution for now is using custom script to accept hooks from github and send messages to slack.

+1 for importance for us too. We have to uninstall this because we need notifications for multiple stable branches, but certainly not ALL branches in the repo.

Great suggestion - we can't migrate from the legacy app until this is implemented.

A big +1 here as well. The existing syntax, as found at https://github.com/integrations/slack#configuration, could already accommodate filtering for at least one specific branch. Right now it's possible to do:

/github subscribe alice/some-repo commits:all

What follows the colon could be the name of any specific branch, e.g.

/github subscribe alice/some-repo commits:some-topic-branch

In any case, this is one more feature missing from the new app that was present in the old one. I'm loving the convenience of having a /github subscribe slash command (have wanted this for years!) but I'm afraid it's coming at a pretty steep cost. Thanks for considering.

also would be nice if it supported wildcards, e.g.

/github subscribe alice/some-repo commits:release*

We create release branches for each release. These notifications would be nice for our product team that is very concerned with activity only related to release branch.

Along the same lines, being able to limit the type of activities that alert would be nice (in my case I only want to know when a PR is opened, nothing else).

+1

+1

Any timeline on this? Pretty essential in order to EOL the legacy app.

Yes. +1

Please! +1

+1

along the line, it would be nice to be able to filter deployments by branch, since we use feature branches for QA's

+1

::::Need to subscribe github-url for a specific feature branch::::

I am using Slack.
I have added GutHub App.
I have already subscribed my github project.
I am able to get all the commits info for master branch.

Requirement:
I want notifications regarding commits,etc. only for a specific feature branch.

Please help here.

+1

+1

+1

+1

+1. just posting to bring this up again.

I tried the above solution with commits: and it seems that functionality no longer works, no is it in the documentation.

@bvergara87
This
/github subscribe alice/some-repo commits:some-topic-branch
was just a suggestion.

The only two currently available commit subscribe options are:

Subscribe to default branch commits:
/github subscribe alice/some-repo commits

Subscribe to all branches commits:
/github subscribe alice/some-repo commits:all

Would love to:

Subscribe to named branch commits:
/github subscribe alice/some-repo commits:branch-name

I feel like this is pretty critical functionality as well! Otherwise this integration has a pretty narrow use case. +1

I am commenting as I would seriously appreciate/need this.

As a workaround I compare the hashes returned by git ls-remote and post a Message to Slack via the API if the hash changes.

@keckelt how is that implemented? locally?

@slamorte Yes. I utilized an old Raspberry Pi 1 to run a python script every few minutes.

simply commenting to say that this feature is essential to keeping this integration in our workflow

+1 to the above comment. GitLab's integration is very good, so you could "borrow" a few of their approaches!

I have nothing to add except "this."

This was the first thing I looked for after installing GitHub for Slack. So it was quite disappointing to find it didn't exist.

Note to peeps who want this - please add a +1 reaction to the initial post at the top of this issue. Adding additional ‘me too’ and +1 comments that don’t add additional information just clutter up the thread, and make more noise both for those who might be able to implement this and those who are subscribed for updates. Thanks!

Hey, any update on this feature?

wow. this is wish for all users

Still waiting this features

Any updates?

Is there any plan to implement this feature ?

+1

yes, please, this would be so appreciated

Hey everybody.
We noticed, that the demand for this feature and put it onto our list for future enhancements.
We don't have a concrete timeline for this, but I wanted to quickly let everybody know, that we are aware of this feature request.

+1

After going through this thread again, I have a few concrete questions to understand the details of the most requested subset of features.

Feedback

+1 to the above comment. GitLab's integration is very good, so you could "borrow" a few of their approaches!

@thejoshsmith could be more specific? Is there a specific feature you are referring? If that is the case it would be great, if you opened an issue for the most desired feature, so that we can see if there is an easy way to implement it, depending on the existing demand.

Feature request summary

Single branch

It would be easiest to allow any custom branch name like suggested above:
/github subscribe org/repo commits:dev. And this would only subscribe to that branch.

But I doubt that this would really satisfy the described use case. (what do you think @campaignupgrade, @cbeams ? since you suggested that syntax)

Multiple branches

To me, it sounds, as if this feature requires "multiple" OR combined branches.
The example that @nickbouton gave above: "master, dev, staging"

Wildards

Right now, I think wildcards are an independent feature request. I really like the idea, but I think we have to consider that in a separate issue.
@jaywclark if you (or anybody else) still considers wildcard (branch-)filters something they would use in their production setup today, please feel free to open an issue to start getting feedback and input.

Opinions

Please vote this issue with 🚀 if you think shipping a single-branch subscription (instead of master). Otherwise, I will assume, that my assumption, that multiple branches are a required minimal feature-set is correct.

cc @integrations/integrations-reviewers

I agree that multiple branches is preferred, at least for our use cases (we have multiple integration branches that it's nice to see commits for, but don't want commit notifications on feature branches). Thanks @scepticulous.

We would see benefit in our specific use cases in being able to subscribe to a specific branch (including a feature branch) within a given channel. i.e.: those focused on a specific project/feature implementation.

Wildcards/allowing multiple branches for a given channel subscription would satisfy other use cases - i.e.: teams/resources looking for notification on commits or pulls on specific items/branches they are assigned to.

/github subscribe github-account/repo pulls:master ?

This is required. Looking forward to this improvement. Following .....

Thanks

Is there any eta for this feature been added ?

Is there any eta for this feature been added?

No, there is no ETA yet. I need to wrap up some other tasks first, but this issue is one of the top priorities for improving subscriptions. I will follow up when I have more details.

@scepticulous Hows things. Any progress with this feature.

Daniel

@scepticulous , hi , Dennis, any updates? would love to have it

Thank you,
Oleksandr

I know this is available via Github enterprise server plugin on slack

@dennissivia : was thinking about your post earlier. The problem with using branch as the 2nd half of the keyword directive, commits:[branch] is that the subscription is only added for that one feature.

Someone would have to explicitly name all features:

/github subscribe org/repo commits:[branch_name]
/github subscribe org/repo issues:[branch_name]
/github subscribe org/repo pulls:[branch_name]
/github subscribe org/repo statuses:[branch_name]
/github subscribe org/repo deployments:[branch_name]

From a usability perspective, a user adding a subscription for a branch would likely expect all default subscription "features" (issues, pulls, commits, etc.), as if they had specified the default branch, i.e. /github subscribe org/repo.

From a syntax standpoint, this might be equivalent to any of the following:

/github subscribe org/repo branch:[branch_name]
/github subscribe org/repo:[branch_name]

And with a specific feature, either syntax:

/github subscribe org/repo branch:[branch_name] commits
/github subscribe org/repo commits:[branch_name]

The explicit branch:[branch_name] keyword might work better for following reasons:

  • easy to test whether branch: is provided
  • is clear with intent (documentation and command help output)
  • output from /github subscribe list would be obvious with intent for notes or copy/paste

👋 Hi folks! A couple updates here.

Priorities have shifted a bit and progress on this work stream has slowed down. Sorry for the delay in responses. We will update as we pick up steam again. Thanks for the follow ups on the feedback requests, we are considering all of this as we re-prioritize.

In addition, @dennissivia is no longer working on this project. Feel free to ping me moving forward. 🙇

Latecomer to the party here... We would also love to be able to say something along the lines of:

/github subscribe org/repo commits:all-*/wip/*

to exclude user/wip/thingy branches that are not yet worthy of wider-scoped notifications for all.

+1

Would love to have this feature as we use branches that are connected to environments: production, acceptation, etc.

This feature is very handy, Would make our workflow a lot easier.

on another note Zapier does the job.
Screen Shot 2020-01-21 at 2 34 52 PM

Would love this feature as well, it's quite critical for this plugin to be really useful

@MarwanAlGalaly, do you know if you can set up a zap in zapier with wildcard mathcing? i.e. prd-*

Hey there! Just another up for this important feature. The issue has been opened more than 2 years ago, any progress here? Being able to use any of the current feature on a specific branch would be very interesting for our projects. Otherwise, it makes the integration not really useful as you either have to cut down on a lot of notifications, or you're overwhelmed :/

This would be much appreciated, for many use cases--one in particular is git flow, which means you rarely push to the master. What's the point of the integration in that case?

+1

+1

+1

+1

Is it possible to filter so my channel only gets notifications from a given repository but only for specific users?
My team works on a an open-source repository and we want to receive Slack notifications in our team Slack channel but only for PR raised by one of the team members (not the whole world!).

+1

Hey everyone! Is there any updates on this issue?

It's been over 2 years since this issue was opened and there's a clear desire for the feature from the user base. It would be nice to hear _some_ sort of update from the team 😃
@dennissivia @IAmHughes @gimenete @wilhelmklopp

+1

+1 Any news about this issue?

+1

+1

Sorry, but after 2 years still no update?

We would also love this feature!

+1

+1

+1

+1 .. guessing no progress though?

+1 Seems like a basic requirement, also handled by the API, but its been more than 2 years

plz add this, much needed :)

+1 for the feature.

+1

+1

+1 ... I would love to see this being implemented

+1

Was baffled when enabling the GitHub integration in slack that this wasn't possible.

Why this feature is not there yet. Are you even using GitHub slack integration in your org at all?

+1

+1 It's already been 2+ years since ticket was oppedn

This ticket has been open for 2 years now? is this that complicated a task?

Adding my name to the ever-growing list of people who would really appreciate this feature.

Adding my name to the ever-growing list of people who would really appreciate this feature.

And my axe!

Give it to us, this precious feature please!

giphy

Plus One

Bring it back please.

+1

This feature will greatly help the Linux Foundation Public Health Landscape: https://landscape.lfph.io
There is a very strong request from people to be notified when the Landscape is updated.
The Landscape is deployed to Netlify on commit.
The broader public should be notified only on merge into master,
not on build of working branches during the preparation of the updates.
T. E. Shaw, t.e.[email protected]

+1

+1

Please do a 👍 on the initial comment. No need to +1.

Screen Shot 2020-10-13 at 12 03 15 PM

I understand this project is sort of in maintanence mode now, but lots of people including myself would love to see this feature added. If no one is working on this feature, I would like to try and implement it and submit a PR. I'm thinking of adding an additional field in the subscription settings. Something like:

+branch:"branch_name1" +branch:"branch_name2"

This should work similarly to how label-based filtering is working now. This would also make it easy to filter notifications for other types of events based on branches, as @Saayaman suggested earlier in this thread.

along the line, it would be nice to be able to filter deployments by branch, since we use feature branches for QA's

I want to hear from the project owners if they hopefully approve of this.

I'm not sure if it's appropriate to post an alternative solution here, but we built a tool for this exact use case of filtering Slack notifications by branch. Our tool (1) lets you create filtered views of your GitHub events (e.g., by branch) and (2) connect those views to Slack channels. Check out this 3-min demo video to understand how it works. If you go to our homepage and "Request early access", I'll hook you up. We'd love your feedback as we're iterating rapidly.

This feature requests is from 2018 and it seems that at least 470 people would like it...

GitHub ? Any news ?

This feature requests is from 2018 and it seems that at least 470 people would like it...

Make that 479 people.

github belongs to microsoft, now...
and microsoft has teams...
sooo... I guess there won't be much effort on slack integration

Such a shame a piece of software used by many not getting tended at all. I wish they just announce that this project will not be maintained anymore. I don't want to keep receiving notification mails on this thread.

this is now /github subscribe alice/some-repo commits:*

Was this page helpful?
0 / 5 - 0 ratings