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

fix: show revision in badge when param is true #10545

Merged
merged 7 commits into from Oct 7, 2022

Conversation

thijsvtol
Copy link
Contributor

@thijsvtol thijsvtol commented Sep 7, 2022

Signed-off-by: Thijs van Tol 43065692+thijsvtol@users.noreply.github.com

Description:
If I use the api for retrieving the badges, the revision will always be shown when the revision query param is present.
So for example if you call https://sample.com/api/badge?name=tomato-service?revision=false it will return the badge WITH the revision.

So this PR fixes that it will only show the revision if the value is true

Checklist:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>
Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>
Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Sep 7, 2022

Codecov Report

Base: 45.75% // Head: 45.75% // No change to project coverage 👍

Coverage data is based on head (6ba6941) compared to base (c05b1c2).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #10545   +/-   ##
=======================================
  Coverage   45.75%   45.75%           
=======================================
  Files         236      236           
  Lines       28527    28527           
=======================================
  Hits        13053    13053           
  Misses      13669    13669           
  Partials     1805     1805           
Impacted Files Coverage Δ
server/badge/badge.go 84.28% <100.00%> (ø)
util/settings/settings.go 51.36% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

server/badge/badge.go Outdated Show resolved Hide resolved
Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>
@thijsvtol
Copy link
Contributor Author

@crenshaw-dev please review and merge

Copy link
Collaborator

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @thijsvtol!

Out of an abundance of caution, I'm only going to cherry-pick this into 2.5. If folks desperately need this in prior versions, I'll consult with #argo-contributors in Slack before cherry-picking.

@crenshaw-dev crenshaw-dev merged commit 6df4a80 into argoproj:master Oct 7, 2022
crenshaw-dev pushed a commit that referenced this pull request Oct 7, 2022
* fix: show revision in badge when param is true

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>

* Update badge.go

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>

* Update badge.go

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>

* pr feedback

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>

Signed-off-by: Thijs van Tol <43065692+thijsvtol@users.noreply.github.com>
@crenshaw-dev
Copy link
Collaborator

Cherry-picked onto release-2.5 for 2.5.0-rc2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants