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

What purpose of refs/pull-requests/123/merge-clean and other?

Alexey_Efimov
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.
March 4, 2013

Stash creates refs in Git for each Pull Request:

refs/notes/pull-requests/199/merge
refs/pull-requests/199/from
refs/pull-requests/199/merge
refs/pull-requests/199/merge-conflicted
refs/pull-requests/199/merge-clean
refs/pull-requests/199/to

Is there some documentation about thiese references? How i can use it in Continues Integration server?

2 answers

1 accepted

4 votes
Answer accepted
Alexey_Efimov
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.
March 4, 2013

I'm just researching this by myself. The answer is:

refs/notes/pull-requests/199/merge

Contains notes for refs/pull-requests/199/merge. Stash use git notes for this and put into notes list of conflicted files. I'm expect to find here comments, but no luck, comments are not stored in this note. This is used only for conflicts.

refs/pull-request/199/from
refs/pull-request/199/to

Actually point to 'from' and 'to' branches for pull request.

refs/pull-requests/199/merge
refs/pull-requests/199/merge-clean
refs/pull-requests/199/merge-conflicted

Reference 'merge' is a result of merging pull request. If it have conflicts, then symlink reference 'merge-conflicted' is created and point to the same hash. If pull request can be merged withoout conflicts, then symlink 'merge-clean' is created.

2 votes
seb
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 5, 2013

It is extremely important to note that these refs are for internal use only. You should never modify or create these refs yourself as you will invariably cause problems with your Stash instance. The pull request implementation detail is subject to change without warning at any point in time.

The only safe way to interact with the Git repositories hosted by Stash is through the vetted APIs and REST interfaces, which we ensure have backwards compatibility and adhere to our contracts.

Alexey_Efimov
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.
March 5, 2013

Thanks for minus :)

Are you seriously think what someone start to modify thiese references? My question is bout using thiese references for readonly access, as for example, from Continues Integrations server, such as Bamboo or TeamCity. Look into this post to take a little bit knowledge about world outside Atlassian :))

http://blogs.jetbrains.com/teamcity/2013/02/06/automatically-building-pull-requests-from-github-with-teamcity/

And a lot of stackoverflows like this one:

http://stackoverflow.com/questions/12634440/teamcity-building-git-github-pull-requests

Did you know the best solution to automatically track Pull Requests with success Automerge result?

Semyazz March 17, 2013

I completely agree with Alexey and I was looking for identical feature to connect Stash's pull requests to TeamCity

Alexey_Efimov
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.
March 17, 2013
Kris Nuttycombe July 10, 2013

Seb, is there any update on how to get at this information in a supported fashion? We're trying to set up a bamboo server to build in response to pull requests, using a fork-based collaboration model where there isn't a branch created on the central repo for the feature being PR'ed (only on the developer's fork) and we can't seem to find any hooks in the docs that we could code against to trigger Bamboo when a PR is created.

Thanks

cofarrell
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.
July 13, 2013

Regarding Bamboo there is a separate Answers thread started by Kris here. Ideally we want to support pull requests in Bamboo as a first-class citizen.

Baris Acar September 25, 2014

I'd like it to be supported in other build systems too, though - we use Teamcity. It's a shame to have to rely on internal implementation details - it's an important feature to be able to build the post-automerge code as opposed to just the source branch code. It's also worth pointing out that as of Stash 2.9.x, _merge-clean_ appears to have been renamed _merge_.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events