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

Added a new feature to allow a color range #11

Merged
merged 9 commits into from Apr 18, 2022
Merged

Added a new feature to allow a color range #11

merged 9 commits into from Apr 18, 2022

Conversation

LucasWolfgang
Copy link
Contributor

Hi,
I added a feature in this fork that allows the user to define a range and provide a value using 3 new arguments, 'min', 'max' and 'value'. I felt the need of having such feature when running workflows that provided a score and not just a pass/fail response, such as pylint.
The new section in the index.json file makes sure the value provided is within the range and calculate a color betwen green and red, providing a HSL value to shield.io, besides also formating the resulting message.
One last parameter was added, which allows the user to invert the range, making the smaller value green, and a bigger one, red. This is useful for tests that return number of error, such as flake 8

Now the Range can be inverted and doesn't use the message anymore
Fixed by adding back 'console.' which was removed for testing
Copy link
Owner

@Schneegans Schneegans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there! Thanks a lot for this awesome contribution! That's a really nice idea! I added some minor remarks to your code. Once it is merged, I'll add a corresponding example to the README and push a new tag.

index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
LucasWolfgang and others added 3 commits Apr 16, 2022
Co-authored-by: Simon Schneegans <code@simonschneegans.de>
Removed automatically set message.

Co-authored-by: Simon Schneegans <code@simonschneegans.de>
Reduce the lightness from 50% to 40%.
Copy link
Contributor Author

@LucasWolfgang LucasWolfgang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding saturation and lightness parameters for the Color Range feature

index.js Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
🎉 Added saturation and lightness parameters to ColorRange feature
action.yml Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
🎉 Added saturation and lightness parameters to ColorRange feature
@Schneegans
Copy link
Owner

I'll do some minor formatting stuff and write some documentation after this is merged. Thanks again! I'm looking forward to your future contributions 😉

@Schneegans Schneegans merged commit 9bce11b into Schneegans:master Apr 18, 2022
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.

None yet

2 participants