-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add Git Detail #1820
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
base: master
Are you sure you want to change the base?
Add Git Detail #1820
Conversation
| } | ||
|
|
||
| @CheckForNull | ||
| public GitRepositoryBrowser guessBrowser() { |
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.
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.
| class GitCommitDetailTest { | ||
|
|
||
| @Test | ||
| void testIsHiddenIfNoScm(JenkinsRule j) throws Exception { |
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.
I've got more tests locally but really struggling to get the right APIs =/
Will see how I get on
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