Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to receive pull request in sourcetree

Sylvain CLEMENT November 5, 2013

Here is my problem (I'm quite new to bitbucket and sourcetree).

I have a private repo for a project and have invited a friend with read permissions to this repo (let's call this friend john).

John created a private branch from my repo, made some modifications in the files and then create a pull request.

I received a notification email for this pull request. I have managed to see this pull request in the bitbucket interface (with possibility to make some changes, comments etc... and the possibility to merg/decline).

But, is there a way to receive a notification in sourcetree (for the pull request) then review it in sourcetree and eventually merge it (all from source tree) (as it is possible form the bitbucket web interface).

Thanks in advance for any help

Sylvain

4 answers

3 votes
Arlo Belshee August 18, 2016

GitHub pull requests are just branches. So you can get at least them by just adding them to your fetch spec. See https://gist.github.com/piscisaureus/3342247 .

Basically, PRs are at `refs/pull/*/head`, while the branches you're used to working with are at `refs/head/*`. Fetch both and you can treat PRs just like any other branch.

Atlassian folks: you could auto-add that to SourceTree pretty easily. When I manually add the fetch to the .git/config, SourceTreee gives me a reasonable UX. They are just branches. So don't really need any code change.

skyway9 September 26, 2016

But then how can I resolve conflicts in the pull request from within SourceTree ?

1 vote
Sylvain CLEMENT November 20, 2013

Thanks for the answer but this doesn't explain I cannot see the pull request appear in source tree. If I don't connect to the bitbucket "web site" I'm not informed that a push request have been received !

0 votes
KieranA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 20, 2013

Hey,

Currently we don't support in-app pull request features. Currently you just click on the link from either the e-mail (not sure if they're in there) or the Bitbucket interface which usually works out as people tend to review in Bitbucket first.

You can always log a feature request at jira.atlassian.com (project SRCTREE for Mac or SRCTREEWIN for Windows).

Cheers

Dani_Avni November 20, 2013

Kieran,

I will log a feature request but besides that i do not understand the full flow of things:

I am using stash. i have read/write and my colleague has only read on stash. my colleague creates a new feature that needs to get merged to the develop branch. so she goes to sourcetree and creates a new pull request.

now what happens in terms of branches and where thay go? is the new branch uploaded from her machine to stash? do the branch gets pulled by me directly from her machine?

to keep things simple we prefer not to go into stash at all (except for creating repositories and permissions) so any improvement on source tree in that direction would be greatly appriciated

Like Mohammad_Asim likes this
KieranA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 20, 2013

Her branch must be pushed to create a pull request, so when your colleague creates a pull request it's merely informing you that the feature should be tested by you and then merged in. Usually you checkout the feature branch before merging it in. A pull request is just that, to 'pull' those changes in. The branch must be in Stash in order for you to see it, which I think is a side-effect of the pull request anyway.

Understandable you want to keep things purely in SourceTree, many people tend to do this, but Stash/Bitbucket do provide extra things that SourceTree most likely won't do, i.e. commenting on diffs and diff lines and other collaboration features.

0 votes
Dani_Avni November 20, 2013

I have the same question. not sure how a read only employee would send me the pull request, how do i see it, how do i pull the changes, merge them and then the whole branch deleted. a demo video/ tutorial from atlassian would be greatly appriciated.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events