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

Add automatic status to color mapping #68

Merged
merged 1 commit into from
Mar 4, 2021
Merged

Add automatic status to color mapping #68

merged 1 commit into from
Mar 4, 2021

Conversation

lukasz-mitka
Copy link
Contributor

No description provided.

@mrrobot47
Copy link
Member

Hey @lukaszmitka-aptiv, thanks for the PR!
I will be taking a look at this and testing it later this week.

Till this PR is tested and approved, you can use something similar to this as well:

        SLACK_COLOR: "${{ job.status == 'success' && 'good' || 'danger' }}"

@lukasz-mitka
Copy link
Contributor Author

Hey @mrrobot47, thanks.
I'm using

${{ job.status == 'success' && 'good' || job.status == 'cancelled' && '#808080' || 'danger' }}

but it's just horrible.

@mrrobot47
Copy link
Member

mrrobot47 commented Jan 13, 2021

I agree 😄
This is just till the time the PR is tested and approved.

I am running a little busy so will check this in the weekend mostly.

@prioux
Copy link

prioux commented Jan 19, 2021

Just want to say I like the PR's goal, but I think the documentation should still include an example where the color is explicitly specified. So maybe the sample YAML in the README.md could contain a comment:

    SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff'

Also, maybe the README could document the new color mapping: "success" => "good", "cancelled" => "#808080", "failure" => "danger". (There is a color called 'danger' btw?!)

@lukasz-mitka
Copy link
Contributor Author

Just want to say I like the PR's goal, but I think the documentation should still include an example where the color is explicitly specified. So maybe the sample YAML in the README.md could contain a comment:

    SLACK_COLOR: ${{ job.status }} # or a specific color like 'green' or '#ff00ff'

Also, maybe the README could document the new color mapping: "success" => "good", "cancelled" => "#808080", "failure" => "danger". (There is a color called 'danger' btw?!)

While I agree, I don't have time right now to do it.
Maybe you or someone else would like to do it in separate PR and get this one merged?

@mrrobot47
Copy link
Member

@lukaszmitka-aptiv I will update the readme. No need to worry about that.

@lukasz-mitka
Copy link
Contributor Author

@mrrobot47 @JuriBurakov are you guys going to merge this anytime soon?

@dhsathiya
Copy link
Member

Tested and LGTM 🎉

@mrrobot47 mrrobot47 merged commit 6a1a4c5 into rtCamp:master Mar 4, 2021
@mrrobot47
Copy link
Member

@lukasz-mitka This has been released in https://github.com/rtCamp/action-slack-notify/releases/tag/v2.1.3.
Please use uses: rtCamp/action-slack-notify@v2 (if you are not already using @v2 tag) for the latest changes.

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

Successfully merging this pull request may close these issues.

4 participants