jenkinsci / jenkinsci/git-plugin

[JENKINS-48822] Make git plugin browser URL guessing clearer and easier to understand

Open
#3,250 20 comments 0 reactions 0 assignees View on GitHub
component:git-plugin enhancement imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
694
Forks
1.1k
Avg merge
1h 29m
Merged PRs (30d)
3

Description

Git plugin versions prior to git plugin 3.7.0 will infer the browser URL if the repository URL is a github.com URL. Git plugin 3.7.0 added browser URL inference for bitbucket.org and gitlab.com URL's.

Stephen Connolly suggested that it would be clearer if the inference were made apparent to the user, rather than being hidden inside the plugin logic. He suggested:


  1. For regular SCM in old-style jobs... if you see the url as well-known, and the user has not configured a browser, then replace their no-browser with the well-known one in the constructor

  2. We don't need to do anything for SCMSource impls as they have their own pre-configured subclasses that do the right thing

  3. For the `git` pipeline step, have it do the inference and log the inference to the build log

  4. Make the inference logic an ExtensionPoint

---
Originally reported by markewaite, imported from: Make git plugin browser URL guessing clearer and easier to understand


  • status: Open
  • priority: Minor
  • component(s): git-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 5
  • imported: 2025-12-02

Raw content of original issue

Git plugin versions prior to git plugin 3.7.0 will infer the browser URL if the repository URL is a github.com URL. Git plugin 3.7.0 added browser URL inference for bitbucket.org and gitlab.com URL's.

Stephen Connolly suggested that it would be clearer if the inference were made apparent to the user, rather than being hidden inside the plugin logic. He suggested:


  1. For regular SCM in old-style jobs... if you see the url as well-known, and the user has not configured a browser, then replace their no-browser with the well-known one in the constructor

  2. We don't need to do anything for SCMSource impls as they have their own pre-configured subclasses that do the right thing

  3. For the `git` pipeline step, have it do the inference and log the inference to the build log

  4. Make the inference logic an ExtensionPoint


Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.