integrations / slack

Bring your code to the conversations you care about with GitHub's integration for Slack
https://slack.github.com/
MIT License
3.1k stars 489 forks source link

Add support for filtering commit notifications when they're from a PR merge #1399

Open jerek opened 2 years ago

jerek commented 2 years ago

The Current Problem

TLDR: Notifications about commits cannot be filtered for non-PR commits only, so commit notifications are too spammy when you're already getting notifications about PRs being merged.

Details: For almost all changes we require PRs. As a result, in most of our Slack channels we don't include commit notifications. However, we allow commits directly to main for certain processes (e.g. regenerating our static localization files) or emergency fixes (we run a website, so sometimes every second counts). Because of this, developers need to know when things are pushed directly to main, but we don't want to be spammed with notifications about the commits from PRs being merged. Currently there is no way to filter commits.

The Solution We'd Like

Ideally we'd like a simple option to indicate that commit notifications shouldn't include merge commits from PRs. Merge commits not from PRs would be manual, and therefore we'd still want to be notified for those.

A backup workable option would be the capability to create a custom filter of some sort that applies to commits.

Alternatives We've Considered

We've looked into all the options, and GitHub's Slack integration appears to have no way to do this. We've considered writing our own integration webhook, so that we can customize what commits we get notified about, but we're a small team and are hesitant about taking the time to go that far to reduce chat spam.

ashokirla commented 2 years ago

@jerek Thanks for the feedback. We will definitely work on this support.

wpomazanka commented 1 year ago

@ashokirla Any plans for this feature?