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-67482 changed from using job name to resolving SCM Head when … #340

Merged
merged 2 commits into from Apr 4, 2022

Conversation

mhenschke-atl
Copy link

Key change here is moving from resolving SCMHead directly instead of using the job name- which happens to, but doesn't need to be the same as the branch name. Resolving the head gives us the git branch name, which is more correct and resolves the double-encoding incidentally.
Providers added for the SCMHead and SCMSource for testing

@mhenschke-atl mhenschke-atl self-assigned this Mar 28, 2022
@@ -117,15 +127,6 @@ public void testCreateMultibranchSource() {
assertThat(externalLink.getUrlName(), equalTo(BASE_URL + "/projects/PROJ/repos/repo/compare/commits?sourceBranch=refs%2Fheads%2Fbranch2"));
}

@Test
Copy link
Author

Choose a reason for hiding this comment

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

Did a manual test and verified that by using the head directly (which every job upon resolution has), we don't need to differentiate whether or not a pipeline step or checking out from the workflow job SCM. That relationship is no longer necessary, so this test is now covered by testCreateMultibranchSource.

@mhenschke-atl mhenschke-atl merged commit 8d1bde9 into master Apr 4, 2022
@mhenschke-atl mhenschke-atl deleted the JENKINS-67482-bitbucket-link-double-encoded branch April 4, 2022 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants