Skip to content

Parse commit author from git var GIT_AUTHOR_IDENT instead of config #57

@aboks

Description

@aboks

Right now, this action fetches the author from git config user.name and git config user.email. By doing so, it does not actually validate the commit author, just that git has been configured with a correct author. In particular, when git commit is called with --author=... or GIT_AUTHOR_NAME=... GIT_AUTHOR_EMAIL=... the validated author is not the author the new commit will get.

An alternative would be to parse the name and email from git var GIT_AUTHOR_IDENT; see https://git-scm.com/docs/git-var/2.43.0. The data from git var takes command line flags and environment variables into account and thus provides the actual author that would be attached to the commit.

Would it be an idea to base this action on the git var output? That would require an extra Var command wrapper in the https://github.com/sebastianfeldmann/git library, but I guess that @sebastianfeldmann would probably be open to such an addition.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions