Skip to content

Instantly share code, notes, and snippets.

@shijinyu2011
shijinyu2011 / AssignIssueToComponentOwnerListener.groovy
Created November 27, 2018 02:03 — forked from KenDUemura/AssignIssueToComponentOwnerListener.groovy
Set this in Scriptrunner's Script Listeners, listen to issue update event to automatically re-assign issue to the Component Owner when Component changed.
/**
* On Issue Update Event
* If Component is changed and only one component is assigned
* then re-assigns the issue to the Component Lead
*/
import com.atlassian.crowd.embedded.api.User
import com.atlassian.jira.bc.project.component.ProjectComponent
import com.atlassian.jira.component.ComponentAccessor
@shijinyu2011
shijinyu2011 / gist:d52feb206bdbb68ae914653bc8596154
Created November 27, 2018 02:03 — forked from KenDUemura/gist:48856cc1e9cd1aedf041b602ce89bf15
Jenkins Pipeline, Get current Job's Folder Name
def getFolderName() {
def array = pwd().split("/")
return array[array.length - 2];
}
node(){
stage 'Get Folder Name'
def foldername = getFolderName()
print "${foldername}"
@shijinyu2011
shijinyu2011 / README.md
Created November 26, 2018 02:53 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.