Is it possible to store approved pull requests in Stash as userid, and not displayname of the user

Somes users prefer to configure their .gitconfig name to be that of a username vs full name, so when the commit is stored it is that of the username. When a Stash Pull request is commited, it is stored on the git repo as the Last, Name (based on ldap pulled/populated information i assume).

So if a person would run reports on the on 'git log' results, it would show both usernames and "Last, Name" entries, which could be the same person. Basically the logic of the report would have to do lookups to match users.

1 answer

1 accepted

This widget could not be displayed.

Hi Dana,

Stash uses the 'display name' and the email address as configured in your user directory (LDAP in your case) as the committer of the pull request merge commit. There is no setting in Stash to override this behavior, but there is a way to map both versions of the name to the same canonical name.

You can create a .mailmap file in the root of your repository and map the username to the display name (or vice versa). If there is a .mailmap file on your default branch (typically master, but configurable in repository settings), Stash will use it and display the mapped names. On the command-line, you can use the --use-mailmap flag to get git log to do the same.

git log --use-mailmap

Documentation on how to set up a .mailmap file can be found in the git shortlog man page.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 10, 2018 in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

271 views 14 2
Join discussion

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