I need to use two separate email addresses in Github for different purposes. In order to achieve this, I have added a secondary email to my account and I author my git commits with this exact same secondary email. The problem is that if I open some Pull Request which has my secondary email as the commits author, and then someone else approves the PR and makes a "Squash & Merge" or "Rebase & Merge" through the Github web interface, then the final merged commit author is overriden with my Github account's main email address.
I tried opening a new PR in which commits have my secondary email as author. If i merge the PR myself then I can select which email Github will use as author, but if someone else does the "Squash & Merge" or "Rebase & Merge" it then overrides the commit author with my Github account's main email address. I want it to use some secondary email address.
This seems to be a known (and outstanding) GitHub limitation when PRs are merged from the web interface using "squash & merge" or "rebase & merge".
Here is a GH issue discussing this same problem. As far as I can tell the issue is still present.
Here is also a feature request addressing the same issue; you may want to upvote it.