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

Dana Cleveland
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.
September 15, 2013

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

1 vote
Answer accepted
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 16, 2013

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
TAGS
AUG Leaders

Atlassian Community Events