| The guessBrowser() method is adequate for the current implementation but would need to be extended to fit with the idea that was suggested by Stephen Connolly. The guessBrowser() method is not part of an extension point, so other plugins cannot register their own implementations. Thus, the Gitea plugin (today) is not allowed to provide its own repository browser implementation which would appear with other repository browser choices. The guessBrowser() implementation could iterate over the implementations of an extension point, asking each implementation if it would like to provide a repository browser for the current repository URL. The Jenkins concept of an extension point allows one plugin (Git plugin in this case) to provide a location which other plugins may implement to provide a repository browser. |