Last active
October 8, 2018 14:50
-
-
Save pbuyle/7197390 to your computer and use it in GitHub Desktop.
Groovy script to get a list of Git branches for a GitLab managed repository, usable with Jenkins Extensible Choice plugin.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project_id = 1 | |
private_token = "XXXXXXXXXXXXXXXXXXXX" | |
return new groovy.json.JsonSlurper().parseText(new URL("https://git.pheromone.ca/api/v3/projects/"+project_id+"/repository/branches?private_token="+private_token).text).name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment