Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User wants to change slack notification message on QUEUED / RUNNING status #3254

Open
y-oksaku opened this issue Dec 17, 2024 · 1 comment
Open

Comments

@y-oksaku
Copy link
Contributor

What happened:

Uses can change slack notification messages by setting metadata of build.meta.notification.slack.<jobName>.message.
However, metadata is not available on QUEUED / RUNNING status since the builds are not executed yet.

For this reason, uses cannot change the message on QUEUED / RUNNING status now.

What you expected to happen:

Change slack massages on QUEUED / RUNNING status to mention a slack user.

@y-oksaku
Copy link
Contributor Author

I think that Proposal 1 is easy to use for uses.

Proposal 1

Add a message field into settings.slack as the following:

jobs:
  main:
    requires: [ ~commit, ~pr ]
    steps: ...
    settings:
      slack:
        channels: [ your-channel ]
        statuses: [ SUCCESS, FAILURE ]
+       message: "foo bar"

And use the message value as the default custom message.
This value is used if uses does not set the metadata of build.meta.notification.slack.<jobName>.message.
(i.e. This value is overwrote by the metadata.)

Proposal 2

Use specific build parameters parameters.slackMessage or annotations screwdriver.cd/slackMessage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant