Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » How to create Pull request directly using Jgit(How to create Pull request directly using Jgit)
How to create Pull request directly using Jgit [message #1833981] Thu, 29 October 2020 13:08 Go to next message
Pankaj chand is currently offline Pankaj chandFriend
Messages: 1
Registered: October 2020
Junior Member
Hi, I am using JGIT for one of my project . I am able to push the change but not finding any direct way to raise pull request using JGIT directly.
Can you help with the same?
Re: How to create Pull request directly using Jgit [message #1833985 is a reply to message #1833981] Thu, 29 October 2020 14:02 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
JGit is the Java implementation of git but not a github client.

AFAIK github pull requests can only be created using the github REST API.
Push the commits you want to create a pull request for to your fork of the upstream repository
(or to a branch in the upstream repository if you have write permissions) and then
call the REST API to create the pull request.

You can use org.eclipse.egit.github.core.service.PullRequestService#createPullRequest [1]
of org.eclipse.egit.github.core to create a pull request.

See org.eclipse.egit.github.core.tests.live.PullRequestTest [2] for examples.

Find binaries here [3].

[1] https://git.eclipse.org/r/plugins/gitiles/egit/egit-github/+/refs/heads/master/org.eclipse.egit.github.core/src/org/eclipse/egit/github/core/service/PullRequestService.java#118
[2] https://git.eclipse.org/r/plugins/gitiles/egit/egit-github/+/refs/heads/master/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/PullRequestTest.java
[3] https://repo.eclipse.org/content/groups/releases/org/eclipse/mylyn/github/
Previous Topic:Different credentials for different repositories
Next Topic:Getting started with LFS in JGit
Goto Forum:
  


Current Time: Wed Apr 24 19:21:41 GMT 2024

Powered by FUDForum. Page generated in 0.03417 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top