Skip to content

Respect author/committer if configured in git #132

@jasonkarns

Description

@jasonkarns

Is your feature request related to a problem? Please describe.

I'm attempting to use this action with this action: https://github.com/crazy-max/ghaction-import-gpg.
The gpg action imports gpg keys and configures git such that commits, tags, and pushes may be signed.
Because gpg signing must use the proper email address associated with the gpg key, it's important to ensure the git author/committer email address is correct.
To this end, the gpg action sets the git user information explicitly.
In other words, after the gpg action has run, git commit uses the properly configured author name and email.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I'm replacing my manual git operations with this auto-commit action.
However, the auto-commit action (by default), is not respecting the author and committer information as configured in git.

Describe the solution you'd like

It's quite possible to explicitly override the default author information using this actions' parameters.
However, I think that if author information is already configured in git, that it should take precedence over this action's defaults.
Desired order of precedence for deriving authorship info:

  1. action params
  2. git user.name/user.email
  3. action defaults (actor + "GitHub Actions")

Describe alternatives you've considered

It works to explicitly set the authorship info for the action. However, this is especially redundant as it needs to match the gpg configuration precisely. Any typo or misconfiguration of the email address and the gpg signing will fail to apply (since the key won't be found for that email address). Hence, it would be preferable (and "safer") to use the authorship information as configured in git itself if set.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions