-
Notifications
You must be signed in to change notification settings - Fork 42
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
Backwards compatibility for color references #200
Backwards compatibility for color references #200
Conversation
a9893c7
to
c819518
Compare
Looking at the code I’m having a hard time to follow what is actually improved here. Would you be able to give some examples of before and after this change? |
I have loads of pipelines that use color references from the jenkins palette or semantic names which used to be mapped properly to jenkins color classes. addBadge(icon: 'symbol-star plugin-ionicons-api', color: 'yellow')
addBadge(icon: 'symbol-rocket plugin-ionicons-api', color: 'success') The translation code fails to properly convert these colors to the variable reference so the colors look off or are not found in the case of 'success'. |
Thanks for the clarification. I was indeed unaware of this incompatibility but I guess it’s reasonable to keep the original behavior. I’ll take a closer look at the code to get this merged soon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
improve test coverage, everthink else LGTM
src/main/java/com/jenkinsci/plugins/badge/action/AbstractBadgeAction.java
Outdated
Show resolved
Hide resolved
src/main/java/com/jenkinsci/plugins/badge/action/AbstractBadgeAction.java
Show resolved
Hide resolved
src/test/java/com/jenkinsci/plugins/badge/dsl/LegacyPipelineTest.java
Outdated
Show resolved
Hide resolved
This change improves the backwards compatibility for legacy badge color references that are not jenkins color classes. Colors that reference defined jenkins palette or semantic names are converted to their respective css variable references.
c819518
to
cb1afcc
Compare
This change improves the backwards compatibility for legacy badge color references that are not jenkins color classes. Colors that reference defined jenkins palette or semantic names are converted to their respective css variable references.
Submitter checklist