Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create "Pull request" in Sourcetree for Gitlab

I tried to create pull request in Sourcetree, but it asked me to set Remote Project Configuration. To set remote configurations, I searched through internet, and found this. It said, it supports Stash, BitBucket and GitHub.

My question is, is there any possibility to create pull requests in Sourcetree for the remote, Gitlab? If Yes, how to do enable pull request for Gitlab in Sourcetree?

like image 787
Rajana Deepak Avatar asked Jun 04 '18 09:06

Rajana Deepak


People also ask

Can I Create a pull request in SourceTree?

appended so that SourceTree doesn't redirect you to a 404 page. Then, when you press "Create pull request...", it will open a browser window with gitlab's merge requests and if you have just pushed your branch, it will immediately allow you to create a pull request.

Can I use GitLab with SourceTree?

There does not seem to be a way to set up a GitLab account within SourceTree, but if you just clone a remote repo it will use your SSH key correctly. Edit: After SourceTree 3.0 it is possible to add various non-Atlassian git accounts, including GitLab.

What is pull request in SourceTree?

Pull requests are a feature that makes it easier for developers to collaborate using Bitbucket. They provide a user-friendly web interface for discussing proposed changes before integrating them into the official project.


2 Answers

You can find the relevant Jira in,

https://jira.atlassian.com/browse/SRCTREE-1845?page=com.atlassian.jira.plugin.system.issuetabpanels%3Aall-tabpanel

and you can create a Merge Request instead of PR by following,

https://docs.gitlab.com/ce/api/merge_requests.html#create-mr

https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html

like image 86
Hariprasath Avatar answered Oct 06 '22 05:10

Hariprasath


As a workaround, you can go to your gitlab web instance, where you would normally create a merge request, such as this:

https://gitlab.mydomain.com/web/nushopweb/merge_requests

Copy the url and set it as a Stash type host with # or ? appended so that SourceTree doesn't redirect you to a 404 page.

enter image description here

Then, when you press "Create pull request...", it will open a browser window with gitlab's merge requests and if you have just pushed your branch, it will immediately allow you to create a pull request.

The resulting URL might look like this, which is perfectly OK as the part after # is somewhat "ignored".

https://gitlab.mydomain.com/web/nushopweb/merge_requests#/projects/web/repos/nushopweb/pull-requests?create&sourceBranch=feature%2fq%2f77523_wishlist-page

like image 34
Qwerty Avatar answered Oct 06 '22 06:10

Qwerty