GithubHelp home page GithubHelp logo

Comments (5)

devinci avatar devinci commented on May 29, 2024 1

Sorry for the delay in response, busy week.

@BeyondEvil In my original post I did mentioned that I attempted that, which resulted in the CLI output in the first image, and then when I defined the "slackWebhook" as seen in that chunk I outlined (which didn't have it in before), the CLI output was the second image.

I am able to reference the same environment variable using another library via ${{ secrets.SLACK_WEBHOOK_URL }} so I've resorted to using that library that for now.

Appreciate the help though.

from semantic-release-slack-bot.

hannesrabo avatar hannesrabo commented on May 29, 2024

I'm not sure if I completely understand your question, but I will try to answer it anyways. Please add some more description otherwise.

If you want to add the SLACK_WEBHOOK the easy way, you just add this into your environment as you normally do to expose things in your CI environment.

Something like

[export] SLACK_WEBHOOK="https://the-link-you-have"

If you already have a variable that contains this webhook link you can change where it is read from.

Just add the variable slackWebhookEnVar to the plugin config just as the example in the documentation here: https://github.com/juliuscc/semantic-release-slack-bot#function shows it for notifyOnSuccess

You can set it to something like:

{
    slackWebhookEnVar: "ALREADY_EXISTING_ENV_VAR",
    ...
}

from semantic-release-slack-bot.

devinci avatar devinci commented on May 29, 2024

I already have a webhook declared.

{
slackWebhookEnVar: "ALREADY_EXISTING_ENV_VAR",
...
}

I did attempt to do that, however the build output when overwriting the env resulting in it requiring the declaration for the slackWebhook:
image

After I declared the slackWebhook the to same env var it resulted in a request for a package name declaration, which should just use the npm package as far as the instructions outline?
image

This was my yml chuck for this at the time:

["semantic-release-slack-bot", {
        "notifyOnSuccess": true,
        "notifyOnFail": true,
        "slackWebhookEnVar": "SLACK_WEBHOOK_URL",
        "slackWebhook": "SLACK_WEBHOOK_URL"
    }],

from semantic-release-slack-bot.

BeyondEvil avatar BeyondEvil commented on May 29, 2024

"slackWebhook": "SLACK_WEBHOOK_URL"

If I'm not mistaken, if you remove the above line from your yaml config-file, it should work.

Given there exists a environment variable called SLACK_WEBHOOK_URL that contains the Slack webhook URL.

from semantic-release-slack-bot.

juliuscc avatar juliuscc commented on May 29, 2024

I agree with BeyondEvil's proposed solution. This seems solved to me so I will close it, but feel free to open it if you still have problems 😁

from semantic-release-slack-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.