nemccarthy / stash-pullrequest-builder-plugin

A Jenkins plugin for Building Stash Pull Requests
https://wiki.jenkins-ci.org/display/JENKINS/Stash+pullrequest+builder+plugin
Other
64 stars 130 forks source link

Feature request: among the variables passed to caller, pass the repo clone URL #129

Open jimklimov opened 7 years ago

jimklimov commented 7 years ago

It is tedious to type git@example.com things, especially into code snippets copied all around and maybe to different deployments of Jenkins and Stash.

The Stash REST API does return http and ssh cloning URLs (assuming both transports are enabled), so the plugin is in position to forward these values in a variable or two... or four, if we pass the URL prefix for the two transports, and the full URL to repository.

The HTTP(S) cloning URL pattern is: http://stash.hostname.com/scm/${destinationRepositoryOwner}/${destinationRepositoryName}.git, where the project names are "as is" (but lowercased), and user names are prefixed with a tilde character.

More details here: https://issues.jenkins-ci.org/browse/JENKINS-46605