Questions tagged [grgit]

Grgit is a wrapper over JGit that provides a fluent API for interacting with Git repositories in Groovy-based tooling.

About

Grgit is a wrapper over that provides a fluent API for interacting with repositories in Groovy-based tooling.

With the tooling focus, "porcelain" commands are the primary scope of what is included. Features that require more user interaction (such as resolving merge conflicts) are intentionally excluded.

Links

32 questions
0
votes
0 answers

AbstractMethodError in Receiver class org.ajoberstar.grgit.operation.OpenOp while trying to build springfox using gradle

After cloning the https://github.com/springfox/springfox springfix repo , when i try to build the project using ./gradlew clean build -i command, i always get AbstractMethodError. * What went wrong: Receiver class…
Sash_KP
  • 5,551
  • 2
  • 25
  • 34
0
votes
1 answer

Gradle Grgit : push to a specific remote branch

I am trying to push the local changes on the master branch to the remote master branch using this library for gradle https://ajoberstar.org/grgit/main/grgit-push.html: grgit.push(remote:"master",tag:true) It complains and i get this exception…
0
votes
1 answer

how to fetch git remote url using grgit APIs

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
0
votes
1 answer

grgit log to get equivalent of git log --name-status --reverse --pretty=format:'%H'

How can I use grgit to obtain changed paths for a commit? In the code below I get a grgit Commit object which has metadata about the commit but not the list of files modified. I want to get the equivalent of git log --name-status --reverse…
Peter Kahn
  • 12,364
  • 20
  • 77
  • 135
0
votes
1 answer

I am trying to get commit body from Grgit log is it possible?

Grgit.open(dir: repoDir).log { range 'origin/develop', branch maxCommits: num } Can I add some argument to get commit body?
Neha
  • 73
  • 1
  • 4
0
votes
1 answer

Run a task from a different git repo in Jenkinsfile

In my projects Jenkinsfile, I need to clone another github repo, and run a specific task. This is what I was trying: stage ('mystage') { dir('foo') { git url: 'https://github.com/something.git' } sh('cd foo') sh('gradle…
Ufder
  • 527
  • 4
  • 20
0
votes
0 answers

Gradle-Git plugin Grgit type unknown

I am having issues with grgit plugin for gradle. This is what I have in my build.gradle file: plugins { id "org.ajoberstar.grgit" version "3.0.0-beta.1" id 'java-gradle-plugin' } apply from: 'path/to/my/otherFile.gradle Now in my…
Loshmeey
  • 341
  • 1
  • 5
  • 18
0
votes
0 answers

Android Studio - Gradle task gives StackOverflowError when bound to preBuild

I have a task on my Android build.gradle that is supposed to download the source code from a git repository of mine to a specific directory if it is not present there, and checkout to a specific branch after cloning (if the repo is already cloned,…
Thurler
  • 1
  • 1
0
votes
1 answer

Adding commit from one branch to another in a gradle task

My requirement is to add the last commit of branch 'A' to branch 'B'. I did some research and found out 'cherry picking' can be a good solution to this.I want to write a gradle task which will be doing this operation. So, I do something like…
sver
  • 866
  • 1
  • 19
  • 44
0
votes
0 answers

Use merge operation in gradle (using grgit)

I want to merge a branch into another branch in git using gradle git (grgit) plugin. The branch to be merged is first branch and branch into which the first branch is to be merged is second branch. So, I do a merge operation like this: def grgit =…
sver
  • 866
  • 1
  • 19
  • 44
0
votes
2 answers

No commit found for revision string:

I want to add the changes of one branch to other branch in the same repo. I am not sure if that means merging the first branch into second.So, I tried this def grgit = org.ajoberstar.grgit.Grgit.open(dir: project.parent.projectDir) …
sver
  • 866
  • 1
  • 19
  • 44
0
votes
1 answer

Is it possible to create a Tag while committing and pushing the change

Is it possible to create a Tag in git while committing and pushing the change using the grgit plugin ...?? This is my code to push my changes to git .. task pushChangestoGit() { def grgit = org.ajoberstar.grgit.Grgit.open(dir: '.') …
Spencer Bharath
  • 507
  • 2
  • 7
  • 21
0
votes
0 answers

Adding changes from a local to remote branch in gradle

I want to add files that are being edited from one branch to other. The repository is same. How can this be done using gradle grgit. Below is some code that I wrote def grgit = org.ajoberstar.grgit.Grgit.open(dir: "source_dir") …
sver
  • 866
  • 1
  • 19
  • 44
0
votes
1 answer

Problems pushing to remote :org.ajoberstar.grgit.exception.GrgitException:

I have a task to push tag to the repository : task tagRepo << { def gitTagName = 'a11' def gitTagMessage = 'This s a new tag' def gitUserName = 'uname' def gitPassword = 'password' def credentials = new…
sver
  • 866
  • 1
  • 19
  • 44
0
votes
0 answers

The authenticity of the host bitbucket cant be established

I have a gradle task : task tagRepo << { def gitTagName = 'a4' def gitTagMessage = 'This s a new tag' def gitUserName = 'uname' def gitPassword = 'password' def credentials = new org.ajoberstar.grgit.Credentials(gitUserName, gitPassword) def grgit…
sver
  • 866
  • 1
  • 19
  • 44