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

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

This widget could not be displayed.

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

This widget could not be displayed.
Jason Hinch Atlassian Team Oct 07, 2013

Which version of Stash are you using?

This widget could not be displayed.

We are using 2.6.4.

This widget could not be displayed.

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.

This widget could not be displayed.

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.

This widget could not be displayed.

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.

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.

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,621 views 9 11
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you