SHARE
TWEET
Untitled
a guest
Mar 13th, 2017
102
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- static def makeScmEditable(scm, env) {
- Integer i
- def branches = []
- for (i = 0; i < scm.branches.size(); i++) {
- def it = scm.branches.get(i)
- branches.add([name: it.getName()])
- }
- def userRemoteConfigs = []
- for (i = 0; i < scm.userRemoteConfigs.size(); i++) {
- def it = scm.userRemoteConfigs.get(i)
- userRemoteConfigs.add([
- name: it.getName(),
- url: it.getUrl(),
- credentialsId: it.getCredentialsId(),
- refspec: it.getRefspec()
- ])
- }
- return [ $class: 'GitSCM', extensions: [], branches: branches, userRemoteConfigs: userRemoteConfigs ]
- }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.

