Skip to content

Derive author from git var GIT_AUTHOR_IDENT#58

Merged
shochdoerfer merged 1 commit intobitExpert:masterfrom
aboks:issue57
Apr 5, 2025
Merged

Derive author from git var GIT_AUTHOR_IDENT#58
shochdoerfer merged 1 commit intobitExpert:masterfrom
aboks:issue57

Conversation

@aboks
Copy link
Contributor

@aboks aboks commented Mar 31, 2025

This is more accurate than retrieving the name and email using git config, as that does not take environment variables and command line flags into account.

Fixes #57

This is more accurate than retrieving the name
and email using `git config`, as that does not
take environment variables and command line
flags into account.

Fixes bitExpert#57
@shochdoerfer
Copy link
Member

Just wondering, do you think it makes sense to keep the old behaviour in a separate action, as it may break existing setups?

@aboks
Copy link
Contributor Author

aboks commented Apr 1, 2025

Hmm 🤔 In my personal opinion that would not be necessary:

  • git var has been around for ages (it existed at least in git 2.0.5, which was released back in 2014), so it seems unlikely that people are using a git version that does not support the var subcommand.
  • It seems unlikely that people actually relied on the behavior that the action did not take command line flags and environment variables into account. It might be that the new version of the action rejects commits that would have been accepted previously, but in that case I think the user expects those commits to be rejected. Users probably use the action to validate the author metadata of their actual commits, not their git configuration.
  • The package is still pre-1.0.0, so I would consider (minor) BC breaks like this to be acceptable. In the unlikely case users have trouble with the new version they can pin their current version and file an issue.

@shochdoerfer
Copy link
Member

Thought the same but was not sure if I missed something.

@shochdoerfer shochdoerfer merged commit c117590 into bitExpert:master Apr 5, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parse commit author from git var GIT_AUTHOR_IDENT instead of config

2 participants