Skip to content

Choose visible GitHub author email address if possible #2551

Closed as not planned
@ketang

Description

@ketang

When authenticating with GitHub, we are not very intelligent about which email address we use. I think it's always the primary email address, but that may not be one the user wants publicly visible. If they have privacy protection on, they may not be able to push commits until they go through the hassle of fiddling with their setup and commit authorship to switch to a publicly visible email address. In particular the parts that we directly control are the environment variables:

GIT_AUTHOR_EMAIL
GIT_AUTHOR_NAME
GIT_COMMITTER_EMAIL
GIT_COMMITTER_NAME

Perhaps we can do this when the user authenticates:

  1. See if the primary email address is publicly visible. If so, use it
  2. Iterate through the non-primary email addresses and pick one that is publicly visible
  3. If none are publicly visible, only then use the primary

Perhaps we can warn about that when it happens? Right now there's no interstitial when authenticating with GitHub, though, so we'd have to find a way to wedge that in. Probably not worth it for this band-aid. We can address this more robustly later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions