Javadocs example – gijFacade.getRepositories(String issueKey)
import com.onresolve.scriptrunner.runner.customisers.WithPlugin import com.onresolve.scriptrunner.runner.customisers.PluginModule @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.services.GIJFacade; @PluginModule GIJFacade gijFacade; gijFacade.getRepositories(“TST”);
Javadocs example – gijFacade.getRepositories()
import com.onresolve.scriptrunner.runner.customisers.WithPlugin import com.onresolve.scriptrunner.runner.customisers.PluginModule @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.services.GIJFacade; @PluginModule GIJFacade gijFacade; gijFacade.getRepositories();
Javadocs example – Get tags
import com.atlassian.jira.util.Function import com.onresolve.scriptrunner.runner.customisers.WithPlugin import com.onresolve.scriptrunner.runner.customisers.PluginModule @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.services.GIJFacade; @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.rest.publicmodels.Tag; import java.util.function.Function; import java.util.stream.Collectors; @PluginModule GIJFacade gijFacade; gijFacade.getTagsForIssue(“TST-2”) […]
Javadocs example – Get commits for an issue
import com.onresolve.scriptrunner.runner.customisers.WithPlugin import com.onresolve.scriptrunner.runner.customisers.PluginModule @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.services.GIJFacade; @PluginModule GIJFacade gijFacade; gijFacade.getCommitsForIssue(“TST-2”);
Javadocs example – Get branches associated with an issue
import com.onresolve.scriptrunner.runner.customisers.WithPlugin import com.onresolve.scriptrunner.runner.customisers.PluginModule @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.services.GIJFacade; @PluginModule GIJFacade gijFacade; gijFacade.getBranchesForIssue(“TST-3”);
Javadocs example – Deleting a branch
import com.onresolve.scriptrunner.runner.customisers.WithPlugin import com.onresolve.scriptrunner.runner.customisers.PluginModule @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.services.GIJFacade; @PluginModule GIJFacade gijFacade; int REPO_ID = 1; gijFacade.deleteBranch(REPO_ID, “someBranch”);
Javadocs example – Connect to a plain repository
import com.onresolve.scriptrunner.runner.customisers.WithPlugin import com.onresolve.scriptrunner.runner.customisers.PluginModule @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.services.GIJFacade; @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.rest.publicmodels.Repository; String PRIVATE_ORIGIN = “https://yourhost/yourorganization/yourPrivateRepo.git”; String USERNAME = “yourUsername”; String PAT […]
Javadocs example – Create a new pull/merge request
import com.onresolve.scriptrunner.runner.customisers.WithPlugin import com.onresolve.scriptrunner.runner.customisers.PluginModule @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.services.GIJFacade; @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.services.scriptrunner.models.PullRequest; @PluginModule GIJFacade gijFacade; int REPO_ID = 2; gijFacade.createPullRequest(REPO_ID, “TST-4-branch”, “main”, […]
Javadocs example – Connect to an integration
import com.onresolve.scriptrunner.runner.customisers.WithPlugin import com.onresolve.scriptrunner.runner.customisers.PluginModule @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.services.GIJFacade; @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.services.integration.IntegrationType; @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.rest.integration.IntegrationRequest; @PluginModule GIJFacade gijFacade; IntegrationRequest newIntegration = new […]
Javadocs example – Create/delete/reindex a repository
import com.onresolve.scriptrunner.runner.customisers.WithPlugin import com.onresolve.scriptrunner.runner.customisers.PluginModule @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.services.GIJFacade; @WithPlugin(“com.xiplink.jira.git.jira_git_plugin”) import com.bigbrassband.jira.git.rest.publicmodels.Repository; String SMALL_PUBLIC_REPO_HTTP_ORIGIN = “https://github.com/githubtraining/hellogitworld.git”; @PluginModule GIJFacade gijFacade; Repository newRepoParams = […]