Forked from jechlin/GetGHConfiguredProjects.groovy
Last active
September 12, 2015 07:06
-
-
Save thomasbergernz/87f33c97fa95423efcc4 to your computer and use it in GitHub Desktop.
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
package examples.docs | |
import com.atlassian.jira.component.ComponentAccessor | |
import com.onresolve.scriptrunner.runner.customisers.JiraAgileBean | |
import com.onresolve.scriptrunner.runner.customisers.WithPlugin | |
import com.pyxis.greenhopper.GreenHopper | |
@WithPlugin("com.pyxis.greenhopper.jira") | |
@JiraAgileBean | |
GreenHopper greenHopper | |
def grantedProjects = greenHopper.getGHConfiguration().getGrantedProjects() | |
def projectManager = ComponentAccessor.getProjectManager() | |
if (grantedProjects.isEmpty()) { | |
log.info ("All projects enabled") | |
} | |
else { | |
log.info("The following projects are enabled: " + grantedProjects.collect {projectManager.getProjectObj(it).name}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment