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.
Right now, this action fetches the author from
git config user.nameandgit 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, whengit commitis called with--author=...orGIT_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 fromgit vartakes 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 varoutput? That would require an extraVarcommand wrapper in the https://github.com/sebastianfeldmann/git library, but I guess that @sebastianfeldmann would probably be open to such an addition.