Add Source Branch Filter Option for Pull Request Notifications to Slack

XMLWordPrintable

    • 1

      The current Slack “Chats” integration allows configuring pull request notifications with a Branch filter. For PR events, this filter is applied only to the destination (target) branch.

      In many setups:

      • Team or stream identity is encoded in the source branch name, e.g.:
        • feature/teamA/...
        • feature/teamB/...
      • Multiple teams merge into shared target branches, such as:
        • develop, main, or other long‑lived branches.

      Because the integration filters only on the target branch for PR events:

      • It is not possible to route PR notifications by source branch pattern (e.g. feature/teamA/* → team A channel).
      • Notifications for multiple teams that share the same target branch must go to the same Slack channel or be routed using very coarse rules.
      • This leads to noisy, mixed‑team channels and makes it harder for developers to follow only their team’s PRs.

      Current behavior:
      For PR events, the integration’s Branch filter is applied only to the destination (target) branch, not the source branch.

      Impact:
      We cannot route PR notifications by team based on the source branch pattern, so all PRs into develop/main end up in the same channel or require very coarse routing. This creates noisy, mixed‑team channels and doesn’t fit common multi‑team workflows.

      Requested Enhancement

      For pull request events, we’d like the integration to support filtering by source branch, in addition to the current target‑branch behavior.

      Concretely:

      1. Allow the Branch field to be applied to:
        • The source branch (primary ask), and/or
        • The destination branch (retain current behavior).
      2. Support simple glob or prefix‑style patterns on the source branch name, for example:
        • feature/teamA/* → send to a specific Slack channel
        • feature/teamB/* → send to another Slack channel

      Optionally, a UI control such as:

      Apply branch pattern to:
      ○ Source branch
      ○ Destination branch

      This would let the customers map teams to Slack channels using existing source branch naming conventions, without changing branching models.

              Assignee:
              Unassigned
              Reporter:
              Abhay Gupta
              Votes:
              43 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated: