gh-issues icon indicating copy to clipboard operation
gh-issues copied to clipboard

Allow setting default account email per organization

Open willnorris opened this issue 9 years ago • 107 comments

You can set multiple email addresses on your GitHub account, and can route notifications on a per-org basis. However, when you create a commit through github.com (either through the web editor, or merge commits generated by the green merge button), the commit is always authored by the user's default email address (unless of course they have email privacy enabled).

I would like to be able to set the default email so that any changes made in a github.com/google repo always uses my @google.com email. (This is particularly important for us because we want employees to always use their work email address for Google repos)

willnorris avatar Jun 02 '16 21:06 willnorris

Would love this because it's broken a key workflow in our org. We're using Xcode server, and the "Big Screen" web view for CI Reports makes it look like we have more team members than we actually do, because some of our commits are from our local machines and some are merges done using the Web UI.

bpapa avatar Feb 22 '18 22:02 bpapa

Bump. Is there some progress with this? I dont want to have to maintain more than one GitHub profile if I can help it but without this I have to. Is there a solution for this?

adam-arold avatar Apr 18 '18 14:04 adam-arold

Hold tight, something is coming

clarkbw avatar Apr 18 '18 19:04 clarkbw

Any progress on this? This is a feature I'd really like to have.

damienjbyrne avatar Jul 16 '18 08:07 damienjbyrne

I would like to be able to set the default email so that any changes made in a github.com/google repo always uses my @google.com email.

Please excuse the lack of update while @clarkbw is away, but just discovered this issue, @willnorris and wanted to point you to https://blog.github.com/changelog/2018-05-03-choose-commit-email/.

As of May, you can choose the email used for web-based commits on the blob editor. It will default to the last email used to commit to the repo, and if you haven't committed before, your org-specific email.

Due to UI complexity and frequency of use, we scoped the feature to just blob edit commits, so merge commits are unaffected at this time and continue to be authored by your primary email.

benbalter avatar Jul 18 '18 19:07 benbalter

I think for most of us the main point of this feature is to have a separate email for merging pull requests. This is literally true for everyone who has a GitHub account for personal use and wants to use it at the workplace which also uses GitHub.

Having the ability to choose an e-mail for web-based commits is nice I guess, but completely useless for this scenario since I use the web interface both on personal and company projects.

I think the only solution for this problem is an org-based e-mail address separation.

adam-arold avatar Jul 19 '18 12:07 adam-arold

I just wanted to chime in and say that I've built a tool for my organization that is creating and merging PR's via the API, and we have the same issue. It's exacerbating our existing problem with people committing with personal emails from manually merging PR's.

So I hope that when someone takes a look at doing this for PR's, they keep the API in mind. (Or maybe do the API sooner because there isn't the same UI complexity? 😃)

jackowayed avatar Oct 26 '18 22:10 jackowayed

Hi, How can i change the content in the email on a timebank application? Is anyone able to help. Many thanks

dipla65 avatar Feb 05 '19 19:02 dipla65

@clarkbw can you elaborate on that something which is coming? @benbalter any ETA on the fix?

adam-arold avatar Feb 06 '19 10:02 adam-arold

@adam-arold I believe @clarkbw may have been referring to https://blog.github.com/changelog/2018-05-03-choose-commit-email/, which solved (I think) the problem @willnorris described initially, at least in terms of web edits.

Building on that, https://github.blog/changelog/2019-01-23-limit-organization-email-notifications-to-verified-domains/ further segments personal and corporate email.

The last remaining step, at least in terms of this thread, would be the ability to choose your merge commit email. While I can't promise a specific date, it's one of our top feature requests, and I'm optimistic it should be implemented in the coming months.

benbalter avatar Feb 06 '19 14:02 benbalter

Nice, thanks!

adam-arold avatar Feb 06 '19 15:02 adam-arold

@benbalter The feature you mentioned is about setting the commit email address per account, but the issue is about setting a default email address per organisation. This is especially important with GitHub Enterprise Cloud when you can use your account for private development (personal email) and professional work (company email).

ehartung avatar Feb 07 '19 09:02 ehartung

setting a default email address per organisation.

@ehartung are you able to elaborate? Are you concerned about personal emails being used for notifications? For web commits? For commits pushed via command line? Something else?

benbalter avatar Feb 07 '19 14:02 benbalter

@benbalter it's about having my personal email address for merge (web) commits (after PR) for private projects and my company email address for merge commits for business projects (in the GitHub-Org of the company I work for)

ehartung avatar Feb 07 '19 14:02 ehartung

... when I talk about "business projects" I mean, non-open-source projects in private repositories (GitHub Enterprise Cloud)

ehartung avatar Feb 07 '19 14:02 ehartung

it's about having my personal email address for merge (web) commits (after PR) for private projects and my company email address for merge commits for business projects (in the GitHub-Org of the company I work for)

@ehartung thanks for clarifying. Please see my comment above:

The last remaining step, at least in terms of this thread, would be the ability to choose your merge commit email. While I can't promise a specific date, it's one of our top feature requests, and I'm optimistic it should be implemented in the coming months.

As a first pass, we'll allow users to choose any verified email to use for merge commits (as we do for web edits), defaulting to the last email used in the repository, or the organization-specific notification email, if one is set. For most cases, this would default to the corporate email in business projects and their person email in personal projects. The next step would be to allow organization admins to enforce that the corporate email is used for merge commits, which is on our roadmap as a subsequent follow up after the ability to choose the merge commit email.

benbalter avatar Feb 07 '19 14:02 benbalter

@benbalter Thanks! Having the ability to choose the email address for merge commits would be great.

ehartung avatar Feb 07 '19 14:02 ehartung

I believe https://github.com/isaacs/github/issues/95 is asking for the very same feature.

timoreimann avatar Feb 18 '19 16:02 timoreimann

Ping. Please can you update us on the ETA, @benbalter ?

ishepherd avatar Apr 10 '19 04:04 ishepherd

Will the ability to specify a default account per-organization be something that only applies to the Enterprise cloud, meaning that it's yet another reason not to host an open-source project on github.com, or will it be something that is available for regular github.com organizations?

numbsafari avatar Apr 10 '19 14:04 numbsafari

Please can you update us on the ETA

I can't promise an exact timeline for general availability, but for those that are members of the Maintainer's Early Access Program, you should expect access to a private beta within the coming week.

Will the ability to specify a default account per-organization be something that only applies to the Enterprise cloud

Per my comment above, as we do with commits from web edits today, if you have multiple verified emails, you will be presented with the option to choose your merge commit email (on all repos). We'll try to anticipate the email you'd like to use (the default in the dropdown, which you can change), based on your prior commits to the repo, or if this is your first commit, your notification email for the organization, if one is set. This will similarly be available on all repositories.

Building on that, down the line, we might offer organization admins the ability to restrict which emails can be used for merge commits (e.g., requiring an email in the organization's verified domain be used, and only listing those email in the dropdown). That's a bit further down the line, as we wanted to get the ability to choose your merge commit email out first and in your hands, along with several other improvements, and haven't yet decided if the ability to restrict merge commit emails will be limited to organizations on the Enterprise Cloud plan.

benbalter avatar Apr 10 '19 15:04 benbalter

for those that are members of the Maintainer's Early Access Program, you should expect access to a private beta within the coming week.

If you are a member of the maintainer's early access program, please see https://github.com/maintainers/early-access-feedback/issues/235.

benbalter avatar Apr 10 '19 19:04 benbalter

Thank you all for your thoughtful feedback. You can now choose the author email for commits created when merging pull requests via the web. For more information, see https://github.blog/changelog/2019-04-24-choose-your-merge-commit-email/.

benbalter avatar Apr 24 '19 18:04 benbalter

@benbalter Is there a way to set the organization default email so that I don't have to select from the dropdown every time? Thanks.

LilyMGoh avatar May 01 '19 16:05 LilyMGoh

Is there a way to set the organization default email so that I don't have to select from the dropdown every time?

@LilyMGoh 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.

benbalter avatar May 01 '19 17:05 benbalter

@benbalter It's a bug then.

LilyMGoh avatar May 01 '19 17:05 LilyMGoh

@benbalter It's a bug then.

I agree. Would be nice to be able to set the organization's default email for every repo under such org.

ghost avatar May 02 '19 18:05 ghost

The drop down does not remember the last setting I used for the organization. It always resets to my default github email account.

tylerstillwater avatar May 07 '19 20:05 tylerstillwater

@tylerb are you able to share the steps you take to see that? I just tried to reproduce it and wasn't able to under the following conditions:

  1. As a user with two verified emails, A and B
  2. Set primary email to email A
  3. In an org owned repo, edit a file via the web editor
  4. See that it defaults to email A
  5. Select to commit with email B and commit
  6. Edit the file again
  7. See that it defaults to email B
  8. Create a pull request
  9. See that the merge box defaults to email B

Are you doing something differently? Would love to better understand what's going on so that we can fix it. Thanks!

benbalter avatar May 07 '19 20:05 benbalter

Certainly:

  1. As a user with two verified emails, A and B
  2. Set primary email to email A
  3. Create a local branch
  4. Commit some code
  5. Push to a new, remote branch
  6. Open a PR
  7. Click "Squash and Merge"
  8. See that the dropdown shows email A
  9. Choose email B
  10. Complete the merge
  11. Run steps 3 through 7
  12. See that the dropdown still shows email A

tylerstillwater avatar May 07 '19 21:05 tylerstillwater