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-45748 Wrong organization URL on PR build notifications #8
Conversation
Passing locally here but not on CI :/ |
@i386 I think that the failure may be related to a null org or something similar. I had this code for this problem but didn't have time to test it well https://github.com/alvarolobato/blueocean-display-url-plugin/tree/JENKINS-45748 I'll have a look at what is failing on your PR. |
Nevermind it seems to have been something related to git and the CI it is working for me locally too. |
@i386 I've been testing this and there seems to be something wrong. I've created a PR and the link goes to: instead of
Notice the Let me find where this is happening. |
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.
The url resolution when the organization is not on the root, doesn't seem to be working.
} | ||
|
||
private String getJobURL(BlueOrganization organization, Job<?, ?> job) { | ||
String jobPath = job.getParent() instanceof MultiBranchProject ? job.getParent().getFullName() : job.getFullName(); |
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.
So this is where I think the problem is. Instead of getFullName
it should be using:
Functions.getRelativeNameFrom(item, group);
where group is the org.getGroup
Like here:
|
||
return getRoot() + "organizations/jenkins/" + jobPath + "/"; | ||
private String getJobURL(BlueOrganization organization, MultiBranchProject<?, ?> project) { | ||
return String.format("%sorganizations/%s/%s/", getRoot(), Util.rawEncode(organization.getName()), Util.rawEncode(project.getFullName())); |
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.
The same happens here
Please review @alvarolobato @imeredith @amuniz