Describe the bug
When notifications for branches are turned on, they report all refs created and deleted, not just branches. For example, if /refs/reviewable/pr216/r6 is deleted, the integration will post a notification that branch "pr216/r6 was deleted". However, only refs under /refs/heads are branches. (It's not clear if this affects both branch creations and deletions, or just deletions.)
To Reproduce
Subscribe to branch notifications in Slack.
Create a ref /refs/foo/bar in the repo.
Delete the ref.
A notification for "bar was deleted" is posted.
Expected behavior
The integration should ignore ref mutations outside of /refs/heads (and possibly /refs/tags, if desired).
Screenshots
Additional context
Reviewable (https://reviewable.io) creates custom refs to pin certain commits in the repo, then deletes once they're no longer needed. This can make for a lot of noise in Slack if branch notifications are turned on.
There's a related feature request for filtering notifications by branch name that would also allow a workaround for this issue.
Describe the bug When notifications for
branches
are turned on, they report all refs created and deleted, not just branches. For example, if/refs/reviewable/pr216/r6
is deleted, the integration will post a notification that branch "pr216/r6 was deleted". However, only refs under/refs/heads
are branches. (It's not clear if this affects both branch creations and deletions, or just deletions.)To Reproduce
/refs/foo/bar
in the repo.Expected behavior The integration should ignore ref mutations outside of
/refs/heads
(and possibly/refs/tags
, if desired).Screenshots![image](https://github.com/integrations/slack/assets/1646896/cbfdc110-95fc-4e37-9bd4-999d276ad20f)
Additional context Reviewable (https://reviewable.io) creates custom refs to pin certain commits in the repo, then deletes once they're no longer needed. This can make for a lot of noise in Slack if branch notifications are turned on.
There's a related feature request for filtering notifications by branch name that would also allow a workaround for this issue.