Skip to content

Use the local author name and e-mail address for merging #5892

Closed

Description

@jeltsch

Problem

When merging a pull request via gh pr merge --merge, the generated merge commit uses the e-mail address configured as the primary e-mail of the respective GitHub account. This may not be what the user wants. For example, if a user (like me) uses different e-mail addresses for business and private repositories, it becomes necessary to change the primary e-mail address setting of the GitHub account when switching between business and private work. This is not only cumbersome, but also makes it very easy to accidentally produce commits with the wrong e-mail address.

Proposed solution

I propose that gh pr merge uses the e-mail address and, for the sake of consistency, also the author’s name that are configured locally. This way, gh pr merge would produce merge commits with the same author information as git commit. An even better solution might be to make the author name and e-mail address configurable via an option to gh pr merge and use the data that git commit would use as the default.

Additional context

None.

Activity

  1. added
    enhancement
    on Jul 5, 2022
  2. added
    needs-triage
    on Jul 5, 2022
  3. samcoe commented on Jul 11, 2022

    @samcoe
    Contributor

    @jeltsch Appreciate the detailed issue, we have an open issue for this feature #1450 and seems like there is already a PR addressing it it, so hopefully it will be in soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions