[Solved] Username when merging


#1

Hi @all,

is it possible to alter the username of the merge commit to the rc username? If one merges using rc, it uses the full name of the author in the merge commit instead of the username.

For example:
Michael Miller’s username in rc is MMI. In the .hgrc or .gitconfig the username is also set to MMI. MMI now merges a pullrequest using the webinterface. Rc will set the username to Michael Miller .
But I want it to be MMI (Mailaddress is optional)

Best regards


#2

Hi,

This is hardcoded as i just checked. Exactly here: https://code.rhodecode.com/rhodecode-enterprise-ce/files/fd4b2bf5348f1def66ac9495be06eac1e60f8fae/rhodecode/model/pull_request.py#L641

If that would be changed to user.username it would use that for merge. I wonder if we should make this somehow configurable.


#3

Ok, thank you. Is it editable in rhodecode ee without recompiling?


#4

Yes, This is a part of CE code-base. If you’d edit the enterprise-1/profile/etc/rhodecode_enterprise_ce_source and find this part linked in previous comments you can edit it. After restart it should be changed, please be aware any modifications are removed on upgrades via rccontrol.


#5

Thanks Marcin, it works like a charm.
Best regards
Christopher