Looking through the JGit API for a way to create a Merge Request in GItlab. Is there a way to get it done?
Asked
Active
Viewed 722 times
1 Answers
3
Merge request or Pull Request is not a GIT specific feature, so its natural there is no available way to create one using JGit.
What you can do however is use the Rest API from Github to create a pull request from your Java code. I am not sure whether you are using Github though, but popular Git repositories do have such an API which you can utilize to create a merge request.

Shababb Karim
- 3,614
- 1
- 22
- 35
-
Thanks for the help! I am using GitLabee. – code-geek Mar 27 '20 at 07:31
-
Gitlab also has a public api for [Merge requests](https://docs.gitlab.com/ee/api/merge_requests.html) – Shababb Karim Mar 27 '20 at 07:32
-
Can you please share some sample code to get a Quick Start? – code-geek Mar 27 '20 at 08:05
-
You can use this [library](https://github.com/gitlab4j/gitlab4j-api) for interfacing with gitlab. There's this class named MergeRequestApi which may fit your use case. – Shababb Karim Mar 27 '20 at 08:08