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

Slack channel from configs doesn't work when using token #110

Open
rdeaconu opened this issue May 18, 2023 · 0 comments
Open

Slack channel from configs doesn't work when using token #110

rdeaconu opened this issue May 18, 2023 · 0 comments

Comments

@rdeaconu
Copy link

Hi, thanks for putting together this plugin!

I am trying to use a Slack token for this passed through env vars while specifying the Slack channel through the configs. However this doesn't seem to work, I am seeing this error message:

A Slack Channel must be created and set in the SLACK_CHANNEL environment variable on your CI environment.
Please make sure to set a Slack Channel in the SLACK_CHANNEL environment variable on your CI environment. Alternatively, provide slackChannel as a configuration option.

This is the configuration of my plugin:

[
    "semantic-release-slack-bot",
    {
        "notifyOnSuccess": false,
        "notifyOnFail": false,
        "markdownReleaseNotes": true,
        "slackChannel": "#alerts",
        "branchesConfig": [
            {
                "pattern": "dev",
                "notifyOnSuccess": true,
                "onSuccessTemplate": {
                    "blocks": [
                        {
                            "type": "section",
                            "text": {
                                "type": "mrkdwn",
                                "text": "A new version has been released to *development*! :rocket:"
                            }
                        },
                        {
                            "type": "divider"
                        },
                        {
                            "type": "section",
                            "text": {
                                "type": "mrkdwn",
                                "text": "$release_notes"
                            }
                        }
                    ]
                }
            }
        ]
    }
]

I would expect the configuration to work when passing the Slack token as env var, is that not the case?

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