Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Associate email address with organization for author field on new commits #95

Closed
charlieok opened this issue Sep 9, 2013 · 95 comments
Closed

Comments

@charlieok
Copy link

I love the “custom routing” feature in https://github.com/settings/notifications , which allows me to configure notification email addresses depending on which organization owns a repository.

The problem I'm having is that this is restricted to outgoing notification emails. I'd like to take this association farther. Specifically, to the author email on commits generated via Github's browser interface.

Our workflow involves merging story branches into master (or other long-running branches) inside Github, when the merge button is green. If I do this however, the merge commit doesn't get my email address for that organization. Instead, it gets my primary email address. This affects other applications integrated with git/github. For example, it affects Travis CI, which sends build success or failure emails to my personal email address instead of my organization email address.

@briankereszturi

This comment has been minimized.

2 similar comments
@UrsaDK

This comment has been minimized.

@partydrone

This comment has been minimized.

@ghallberg
Copy link

I have exactly this issue, would be great to see this changed.

@kenwarner

This comment has been minimized.

17 similar comments
@eloraburns
Copy link

👍

@fstehle
Copy link

fstehle commented Jan 19, 2015

👍

@yoyko
Copy link

yoyko commented Feb 25, 2015

+1

@minterior
Copy link

+1

@dpcat237
Copy link

dpcat237 commented Feb 27, 2015

👍

@egcastro
Copy link

+1

@jonmoter
Copy link

jonmoter commented Mar 6, 2015

+1

@muniere
Copy link

muniere commented Mar 27, 2015

+1

@vitalii-c
Copy link

+1

@AlexOverbeck
Copy link

+1

@gnmerritt
Copy link

+1

@claudusd
Copy link

claudusd commented Jul 2, 2015

+1

@designedbyz
Copy link

+1

@rshk
Copy link

rshk commented Aug 13, 2015

👍

@rolebi
Copy link

rolebi commented Aug 26, 2015

👍

@dagezi
Copy link

dagezi commented Sep 2, 2015

+1

@delind
Copy link

delind commented Oct 12, 2015

👍

@navi7
Copy link

navi7 commented Nov 4, 2015

Any news on when (and if) this will be implemented?

@grundleborg

This comment has been minimized.

2 similar comments
@anmij
Copy link

anmij commented Dec 16, 2015

+1

@rhansen
Copy link

rhansen commented Jan 14, 2016

👍

@rhansen
Copy link

rhansen commented Jan 14, 2016

I emailed support@github.com about this. Here is their response:

Thanks so much for taking the time to write in with details on your use case for this, it does sound helpful, and I'll definitely pass that on to the team to consider.

@charlieok
Copy link
Author

wow, I wrote this request over two years ago. Thanks for the +1 collection everyone :-/

@k06a

This comment has been minimized.

1 similar comment
@faudebert
Copy link

👍

@joaoe
Copy link

joaoe commented Nov 6, 2018

This is a very serious issue for me, also because I'm part of two organizations and my personal email is being attached to stuff that is not even my property.

@EduardSergeev
Copy link

Our team has just invented workaround for this issue: https://github.com/ML-Works/webhook-proxy

Unfortunately it isn't possible to fix github commit with this approach, is it? Looks like you just replace the committer email before passing it to external system (like youtrack).

@YoavGaudin
Copy link

+1
Any news?
I tried using hub to create pull requests from the command line.
But unfortunately, those pull requests do not benefit from the template initial description.

@garretwilson
Copy link

We're considering using GitHub more than we do now because Bitbucket has a huge problem: they use an email for a login identifier, which ties the account to some company and causes all sorts of problems. GitHub seems to have a better approach: a single login ID, independent from any company, and I can add as many emails as I like. Great.

But now it seems that GitHub still ties me to a single address for many web-based commits, e.g. merging pull requests? I can't associate emails with organizations, so that when I merge a pull request for a particular organization, it always uses the correct email? That's a bummer, and suddenly puts me back in the same boat as Bitbucket.

Please let us associate web-based commit emails with different repositories and different organizations. Thank you.

@nycgavin
Copy link

nycgavin commented Feb 8, 2019

Facing the same exact issue with my team

@TPS
Copy link
Collaborator

TPS commented Mar 26, 2019

I think https://github.blog/changelog/2019-03-25-view-organization-members-email-addresses/ might be considered progress toward this, as it seems like work toward being part of the infrastructure necessary to implement it.

@gallexi
Copy link

gallexi commented Apr 24, 2019

Good News Everyone meme from Futurama

You can now specify your git commit email when merging a PR!!
See more: https://github.blog/changelog/2019-04-24-choose-your-merge-commit-email/

@garretwilson
Copy link

This is a great step, thanks!

I think ideally it would be nice to be able to set the email address on a per-project basis, so that the merge requests would automatically default to the correct email address. This is not an outlandish idea; we can already do the same thing locally on a per-repository basis using the following Git command (leaving off --global):

git config user.email "email@example.com"

But this new option is a great intermediate step. Thanks again for implementing it.

@benbalter
Copy link

@garretwilson the drop down will default to the last email you used to commit to the repo, defaulting to your organization notification email if this is your first commit, meaning ideally, it should default to the email you'd like to use for the repo, or will after your first use, without needing to manage an additional setting.

@adam-arold
Copy link

This is awesome!

@clarkbw
Copy link
Collaborator

clarkbw commented Apr 25, 2019

Thanks for the all the feedback! If you have concerns or find bugs leave them here and contact support. If there are followup features you'd like to see please open a new issue and tag this one.

🚢 https://github.blog/changelog/2019-04-24-choose-your-merge-commit-email/

@clarkbw clarkbw closed this as completed Apr 25, 2019
@nycgavin
Copy link

Thank you for doing this!

@DrLeh
Copy link

DrLeh commented May 2, 2019

@benbalter

the drop down will default to the last email you used to commit to the repo, defaulting to your organization notification email if this is your first commit, meaning ideally, it should default to the email you'd like to use for the repo, or will after your first use, without needing to manage an additional setting.

It seems to always be defaulting to my first email, I'm having to change it every time. If I push a commit directly (aka not through a PR), is it associating to my first email instead and resetting this? Would be nice if there was a way to just configure this for my repo and force a value to be the default

@garretwilson
Copy link

garretwilson commented May 2, 2019

I think ideally it would be nice to be able to set the email address on a per-project basis …

After I suggested that (noting that this is already available in Git locally), I realized that the more important thing would be to associated the email with the organization itself, or at least specify a default for each organization. And now I realize that this is exactly what this ticket originally requested! 😆 So good work, but let's not forget semantics. Thank you!

@Kaapelikala
Copy link

Thank you for this! Makes working for several different organisations much easier without the need to change global settings all the time.

@gallexi
Copy link

gallexi commented May 7, 2019

If I push a commit directly (aka not through a PR), is it associating to my first email instead and resetting this?

@DrLeh if you commit to a repository via any means (make a commit locally and push to the repo on GitHub, or make a commit through the online editor), the email used to make that commit will be the one that these features default to next time.

Hope this helps! If you're still experiencing this issue, please feel free to reach out to GitHub Support so we can investigate this further =]

@DrLeh
Copy link

DrLeh commented May 8, 2019

@gallexi yeah it's not working for me. I have two emails configured A and B

  1. Open PR 1, email dropdown is set to B.
  2. Change email dropdown to A, my desired email for this project
  3. Merge the code via a Squash and Merge
  4. Open PR 2, email dropdown is still set to B.

@benbalter
Copy link

@DrLeh Had a chance to dig into this a bit more and wanted to share two scenarios where I believe the drop down may not reflect the last email used in the drop down:

  1. When after merging, commits are pushed to any branch using a different email.
  2. When squash merging another user's pull request

The reason for both is that we look for the most recent commit, on any branch, that you authored.

If you've authored other commits since the last merge via the web interface using another email, those commits will override the preference.

Similarly, if you squash merge another user's pull request, the actor is set as the committer and the PR author is set as the commit author (for proper attribution), in which case the email you selected via the dropdown for that squash merge (of another user's pull request) would not be preserved and it would default to your most recent authored commit or your per-organization notification email, if set.

/cx todogroup/gh-issues#32 for a similar discussion.

@DrLeh
Copy link

DrLeh commented May 9, 2019

@benbalter I figured that might be the case. I tried doing a merge commit instead of a squash and that fixed it, I didn't get a chance to respond here yet. Thanks!

@glenpike
Copy link

Please can we have it default to the organisation's email for squash merges too?

I have a scenario where I'm the only committer of several commits in a PR and when I go to squash, it's still not defaulting to the correct default email for the organisation (even though this is the email used for each commit in the log).

@jlevon
Copy link

jlevon commented Jan 28, 2020

This doesn't work when doing a (squash) merge via the API

@StefanoFioravanzo
Copy link

I don't see the email dropdown anymore when trying yo squash or merge commit a PR! I am sure it was there a few weeks ago, but now I am not prompted with the drop down anymore. I am committing PRs that I have authored with my organisation address, but they now appear with my personal address when squashed.

@Sequoia
Copy link

Sequoia commented Mar 5, 2020

Will try to repro but I am fairly certain my github UI keeps defaulting back to my main (personal) email. At work I merge PRs 5-10 times/week, I have been doing no side-projects at all lately so I know I've never set it back to my personal email. I have definitely set it to my work email (upon clicking "squash and merge") several times and never set it back to my personal email. I keep getting personal email selected.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests