Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to Use Data From Github & Gitlab with Adaptavist ScriptRunner

Jigit - Jira GitHub, GitLab, Gerrit integration works with the Adaptavist ScriptRunner - a powerful scripting tool that allows you to extend the functionality of Atlassian products like Jira, Confluence, and Bitbucket.

Here’s a quick demo video on integrating Jigit - Jigit - Jira Gitlab Github integration demo.

By using Jigit data in Adaptavist ScriptRunner, you can automate and customize your workflows and processes. Jigit collects valuable data about GitHub and GitLab pull requests, commits and feature branches to display them on the Jira issue view. With Adaptavist ScriptRunner, you can access this data and write scripts to trigger actions or modify behaviour based on specific conditions.

Below is an example of the usage of Jigit with the Adaptavist ScriptRunner.

import com.onresolve.scriptrunner.runner.customisrs.WithPlugin
import com.onresolve.scriptrunner.runner.customisers.PluginModule
import jigit.service.JigitFacade;
import jigit.model.RepositoryBranches.Branch;
import jigit.model.reder.CommitData;
import jigit.model.render.PullRequestData;
import java.util.function.Consumer;

JigitFacade jigitFacade;

jigitFacade.getCommits("TEST-10").stream.forEach(new Consumer<CommitData>(){
public void accept(CommitData commit) {
log.warn("commit " + commit.getCommitSha1())
log.warn("\t number of files changed - " + commit.getCommitDiffs().size())

jigitFacade.getPullRequests("TEST-10").stream.forEach(new Consumer<PullRquestData>(){
public void accept(PullRquestData pullRequest) {
log.warn("pull request " + pullRequest.getPrNumber())
log.warn("\t title - " + pullRequest.getTitle())

jigitFacade.getBranches("TEST-10").stream.forEach(new Consumer<BranchData>(){
public void accept(BranchData branch) {
log.warn("branch " + branch.getName())
log.warn("\t url - " + branch.getUrl())

Looking to get started with Jigit? Your first 1 month is on us Start Here

1 comment


Log in or Sign up to comment
Michael Kyrpychenko July 4, 2023


AUG Leaders

Atlassian Community Events