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

[JENKINS-71355] Fix retrieval of Bitbucket Server tags head with special characters #714

Merged
merged 3 commits into from
Jun 2, 2023

Conversation

Dohbedoh
Copy link
Contributor

@Dohbedoh Dohbedoh commented Jun 2, 2023

JENKINS-71355: Fix the single tag retrieval for Bitbucket server. Borken by #708. Should fix #713.

Bitbucket Server /tags/{tagname} API is expecting some characters to be escaped and others not. Which make it difficult to find a suitable solution for possible git tag names.

Proposed fix:

  • using the /tags?filterText instead that is working well, and that we use for branches too
  • added tests for tags retrieval, including a tag named special-"$;><&#_=@\!|.,/test

I tested the following in Bitbucket Server and also Bitbucket Cloud:

  • branch specialbranch-"$;><&#_=@\!|.,/test and a PR from that branch
  • tag `special-"$;><&#_=@!|.,/test1
  • validated that branch/PR/tags scanning and building all works

Your checklist for this pull request

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or in Jenkins JIRA
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Did you provide a test-case? That demonstrates feature works or fixes the issue.

@Dohbedoh
Copy link
Contributor Author

Dohbedoh commented Jun 2, 2023

cc @lifeofguenter

@lifeofguenter
Copy link
Contributor

Awesome, thanks so much <3

@lifeofguenter lifeofguenter added bug java Pull requests that update Java code labels Jun 2, 2023
@lifeofguenter lifeofguenter merged commit 7f97d29 into jenkinsci:master Jun 2, 2023
14 checks passed
@Dohbedoh Dohbedoh deleted the JENKINS-71386 branch June 2, 2023 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

builds broken for tags containing '/'
2 participants