-
Notifications
You must be signed in to change notification settings - Fork 143
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-60082] Show pull request title in name column #476
Changes from 6 commits
0ef8d9b
13cedc4
a37b5d3
c3620a4
9de361d
315ce8d
02109d5
8718f94
c6198ed
4a3ebec
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,14 @@ | |
return rawName; | ||
} | ||
|
||
return format("%s - %s", rawName, displayName); | ||
// The raw name provided here in the context of pull requests is the pull request ID | ||
// We tidy up the ID so that they display consistently between SCMs | ||
String cleanedUpBranchName = rawName; | ||
if (cleanedUpBranchName.startsWith("MR-") || cleanedUpBranchName.startsWith("PR-")) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. may need a regex that it's PR-\d+ so its less likely to hit an actual branch name There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. a branch name won't be hit here because the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this would appear to be putting SCM specifics into an SCM agnostic piece of code? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this a blocker, and if so would this mean an API likely needs to be created where the SCMs set their prefix? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So initially I was not thinking it was a blocker, but something that should be addressed (in the future as a follow up) But now I am thinking is this just confusing? we use in other words could a user expect that by clicking that link below they get taken to build #7 of the job? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
cleanedUpBranchName = "#" + cleanedUpBranchName.substring(3); | ||
} | ||
|
||
return format("%s (%s)", displayName, cleanedUpBranchName); | ||
} | ||
}, | ||
; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,26 +25,28 @@ THE SOFTWARE. | |
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" | ||
xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt"> | ||
<td style="${indenter.getCss(job)}"> | ||
<d:taglib uri="local"> | ||
<d:tag name="link"> | ||
<a href="${jobBaseUrl}${job.shortUrl}" class='model-link jenkins-table__link'> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. extracts the same code into one place and makes minor changes to the classes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why |
||
<l:breakable value="${h.getRelativeDisplayNameFrom(job, itemGroup)}"/> | ||
</a> | ||
</d:tag> | ||
</d:taglib> | ||
|
||
<td style="${indenter.getCss(job)}" xmlns:local="local"> | ||
<j:choose> | ||
<j:when test="${it.isOrphaned(job)}"> | ||
<s> | ||
<a href="${jobBaseUrl}${job.shortUrl}" class='model-link inside jenkins-table_link' title="${it.getTitle(job)}"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @janfaracik Why did you remove the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It doesn't do anything from what I've seen from core. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It controlled whether the context menu dropdown chevron was considered part of the area of the 2.332.x otherwise (ugly but this hover effect was fairly short-lived): |
||
<l:breakable value="${h.getRelativeDisplayNameFrom(job, itemGroup)}"/> | ||
</a> | ||
<local:link /> | ||
</s> | ||
</j:when> | ||
<j:when test="${it.isPrimary(job)}"> | ||
<strong> | ||
<a href="${jobBaseUrl}${job.shortUrl}" class='model-link inside jenkins-table_link' title="${it.getTitle(job)}"> | ||
<l:breakable value="${h.getRelativeDisplayNameFrom(job, itemGroup)}"/> | ||
</a> | ||
<local:link /> | ||
</strong> | ||
</j:when> | ||
<j:otherwise> | ||
<a href="${jobBaseUrl}${job.shortUrl}" class='model-link inside jenkins-table_link' title="${it.getTitle(job)}"> | ||
<l:breakable value="${h.getRelativeDisplayNameFrom(job, itemGroup)}"/> | ||
</a> | ||
<local:link /> | ||
</j:otherwise> | ||
</j:choose> | ||
</td> | ||
|
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.
Removing an old public method signature.