Commits don't appear in the source tab until after pull request is merged

Garrett Hodgson October 6, 2013

My company is investigating adding Stash to our existing Jira implementation. We would like for some teams to be able to use the forking workflow, as it is close to our home-grown workflow. However, in experimenting with the workflow it seems that the commit details do not show up in the source tab until after a pull request has been merged.

Does the source tab only aware of commits in the "upstream" repos, and not the repos forked through the Stash interface? Stash is able to see the commits when I do the pull request (as long as I've pushed my commit or branch to my origin).

Is there a way to make it work so that the commit information is visible in the source tab prior to the pull request being merged?

6 answers

1 accepted

0 votes
Answer accepted
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.
November 30, 2013

Hi Garrett,

I have some bad news - unfortunately seeing commits from forks is not currently supported. While this isn't going to make you feel any better, I'd like to take a minute to explain why it doesn't work and hopefully explain that it's not trivial to fix.

So for the most part Stash relies on Git to store information, rather than duplicating it in the database. In the case of JIRA issues we do index them against commits for performance. However things get tricky when it comes to forks. If you have a large repository where every commit mentions an issue, and 10 people fork that repository, how do you keep track of where the commit 'originated' from? You don't really want to see 11 duplicate commits in the source tab (and we don't want to store 11 rows in the database for _every_ commit). So we could easily store a new commit when you first push to your fork, but what do we do it gets merged to the parent? More annoyingly, what do you do if it is then deleted in the parent repository but not some/all of the forks, should it 'perculate' down?

All that said, this is definitely on our radar and we have some ideas about how to address some (but definitely not all) of those questions.

Cheers,

Charles

0 votes
Jobin Kuruvilla [Adaptavist]
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 28, 2013

A commit appears in the source tab as long as it has the JIRA key in the commit message. Are you adding it in the commit message when you check in to the forks?

Pull request adds it if your branch name has the JIRA key in it and it will automatically appear under source tab. Maybe that is why you are just seeing the pull requests.

marcospassos November 28, 2013

It does not work. I've an issue ABC-1. I've forked a branch with name bugfix/ABC-1-test, then I added some commits referencing the issue both in title and description and then I opened a pull request. Nothing is showed under source tab.

Jobin Kuruvilla [Adaptavist]
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 29, 2013

If nothing is shown, that is probably because the application links are not configured correctly.

0 votes
marcospassos November 28, 2013

Same problem here. It's fundamental for our workflow once we use PR's to review the code. Does anyone find a solution? I'm using 2.9.4.

0 votes
marcospassos November 28, 2013

Same problem here. It's fundamental for our workflow once we use PR's to review the code. Does anyone find a solution? I'm using 2.9.4.

0 votes
Garrett Hodgson October 7, 2013

We are using 2.6.4.

0 votes
jhinch _Atlassian_
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 7, 2013

Which version of Stash are you using?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events