Draft
Conversation
timja
commented
Oct 16, 2025
| } | ||
|
|
||
| @CheckForNull | ||
| public GitRepositoryBrowser guessBrowser() { |
Member
Author
There was a problem hiding this comment.
I'm not sure about this, I couldn't find any way to get to the Repository Browser from a SCMSource.
The existing getBrowser() in this class just returns null.
Javadoc says it should then fallback to the auto browser, which seems to no longer exist / is disabled by default.
I've copied the guess implementation from GitSCM as I can't see a way to go from a SCMSource to an SCM.
WorkflowRun does have a getSCMs method and its possible to get there that way.
timja
commented
Oct 16, 2025
| class GitCommitDetailTest { | ||
|
|
||
| @Test | ||
| void testIsHiddenIfNoScm(JenkinsRule j) throws Exception { |
Member
Author
There was a problem hiding this comment.
I've got more tests locally but really struggling to get the right APIs =/
Will see how I get on
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a commit link to the build page with experimental UI - relates to jenkinsci/github-branch-source-plugin#826
Testing done
Enabled experimental flag for build redesign on latest weekly.
Setup two pipelines with a pipeline hosted on GitHub.
One using GitHub SCM and one with GitSCM.
GitSCM now has a commit detail whereas before it had nothing.
GitHub branch jobs have a duplicate detail as github-branch-source is adding GitSCM details but that can be removed
GitHub Pull request jobs don't have a duplicate as the pull request scm fails an instanceof check and the git plugin doesn't add another details entry
Untested but non github based jobs should either have no link, or use the configured repository browser / the plugin will use the pre-existing guess method too
I can add some integration tests but want to check the direction so far
Submitter checklist