I need to read .git folder having below git remote url within my groovy script using grgit APIs.
url = git@github.com:***/****.git
Can you please help
I need to read .git folder having below git remote url within my groovy script using grgit APIs.
url = git@github.com:***/****.git
Can you please help
I could do as below
import org.ajoberstar.grgit.Grgit
Grgit git = new Grgit()
def gitRoot = project.hasProperty('git.root') ? project.property('git.root') : project.rootProject.projectDir
git = Grgit.open(dir: gitRoot)
System.out.println("git.remote.list().url -->"+git.remote.list().url)