Created
January 7, 2013 06:41
-
-
Save clstokes/4472989 to your computer and use it in GitHub Desktop.
Groovy script for the Jenkins Script Console to GitHub repositories. Will throw exceptions for builds with other trigger types.
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
import hudson.model.* | |
import hudson.triggers.* | |
import com.cloudbees.jenkins.GitHubTrigger | |
for(item in Hudson.instance.items) { | |
println item.name | |
item.triggers.each{ k,v -> | |
((GitHubTrigger)v).getGitHubRepositories().each{ | |
println it | |
} | |
} | |
println '' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment