jenkins-x-plugins / jx-slack

A Jenkins X plugin for receiving Slack notifications about pipeline events
Apache License 2.0
11 stars 16 forks source link

Ideas for expanding Slack app functionality #1

Open ethangj opened 4 years ago

ethangj commented 4 years ago

Overview of some ideas for improving Slack app functionality (most of which are fairly validated by other CI/CD tools)

Rule-based The Slack app should be rule-based, meaning users can write a more or less unlimited amount of rules to trigger notifications to different channels and in different scenarios. There should be no one global behavior.

Project-based Users should configure notification rules on a per-project basis so that some projects on the cluster can have different notification rules than other projects.

Branch-based All rules should have the option to either apply to all branches, to specific branches (via either an explicit string or a regex pattern) or to all branches except (i.e. blacklist some branches)

Triggers Let users trigger what events send a Slack message, i.e.

Personal The one exception to global rules should be on a per-user basis, where users can configure Slack DMs to be sent to them on their builds if they want. This should default to no and be opt-in, most likely.

Summary Examples

pmuir commented 4 years ago

Rule-based The Slack app should be rule-based, meaning users can write a more or less unlimited amount of rules to trigger notifications to different channels and in different scenarios. There should be no one global behavior.

There are currently two behaviors:

1) post a message to a channel (can be configured per "rule") 2) DM a message (only to the user that created the PR or triggered the build)

and two triggers:

1) A pipeline activity changes 2) A PR changes state

and two filters:

1) Repo 2) Org

The user is able to configure any combination of the behaviors, triggers and filters using an unlimited number of rules.

Project-based Users should configure notification rules on a per-project basis so that some projects on the cluster can have different notification rules than other projects.

See above, but it can be configured using either repos or orgs today.

Branch-based All rules should have the option to either apply to all branches, to specific branches (via either an explicit string or a regex pattern) or to all branches except (i.e. blacklist some branches)

This functionality is missing.

Triggers Let users trigger what events send a Slack message, i.e. Only failures or only successes Only on merging vs all PR events vs all commits When new preview environments go live

This functionality is missing.

Personal The one exception to global rules should be on a per-user basis, where users can configure Slack DMs to be sent to them on their builds if they want. This should default to no and be opt-in, most likely.

This functionality is missing - either DMs for builds are on for a repo/org, or off for a repo/org

jenkins-x-bot commented 4 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Provide feedback via https://jenkins-x.io/community. /lifecycle stale

rawlingsj commented 3 years ago

/remove-lifecycle stale

jenkins-x-bot commented 3 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Provide feedback via https://jenkins-x.io/community. /lifecycle stale

jenkins-x-bot commented 3 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close. Provide feedback via https://jenkins-x.io/community. /lifecycle rotten