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

Resolve incorrect badge examples when opened directly from URL #290

Merged
merged 2 commits into from
Apr 13, 2024

Conversation

sridamul
Copy link
Member

@sridamul sridamul commented Feb 15, 2024

Closes #278

Approach:

Replaced the getReferer() method with getRequestURL() (I am not sure if it is the optimal way to do it, but it fixes the issue without any flaws). Also modified the test cases to use getRequestURL() with and without badge/ at the end of the URL.

Testing done

Before:
before

Now:

wdyt.mp4

Submitter checklist

Preview Give feedback

@sridamul sridamul requested a review from a team as a code owner February 15, 2024 06:59
@github-actions github-actions bot added the tests Automated test addition or improvement label Feb 15, 2024
@sridamul sridamul changed the title Resolved incorrect badge examples when opened directly from URL Resolve incorrect badge examples when opened directly from URL Feb 15, 2024
@sridamul
Copy link
Member Author

@MarkEWaite If possible Can you review this?

@MarkEWaite
Copy link
Contributor

@MarkEWaite If possible Can you review this?

Thanks for the ping @sridamul . I have several other things that need my attention before I leave next week for several weeks of vacation. I'm not sure that I'll have time to review this before mid March.

@sridamul
Copy link
Member Author

Hey @MarkEWaite, Can you review this now?

@MarkEWaite
Copy link
Contributor

Not yet @sridamul . Other things are needing my attention this week. I may be able to review it next week

@sridamul
Copy link
Member Author

sridamul commented Apr 1, 2024

Hey @MarkEWaite Just a reminder ping to review this PR.

@MarkEWaite
Copy link
Contributor

Thanks very much for the fix. I introduced the bug when I added a copy button for the link examples and transitioned from defining the pages with groovy to defining them with jelly. Jelly is more widely used for page definition in Jenkins than groovy and has better support for the most recent user interface updates. The pull request that created the issue was:

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

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

Thanks very much for the fix!

@MarkEWaite MarkEWaite merged commit a0ef04c into jenkinsci:master Apr 13, 2024
17 checks passed
@MarkEWaite MarkEWaite added bug Incorrect or flawed behavior and removed tests Automated test addition or improvement labels Apr 13, 2024
@sridamul sridamul deleted the fix/issue-278 branch April 13, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect or flawed behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Badge examples incorrect for some jobs if opened directly from URL
2 participants