generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the user to overwrite the default git committer name and email #58
Labels
Comments
josecelano
added
enhancement
New feature or request
good first issue
Good for newcomers
labels
Feb 21, 2022
josecelano
changed the title
Allow to overwrite committer name and email
Allow the user to overwrite the default git committer name and email
Feb 21, 2022
Hello Jose,
I trust that if you think that it is an easy and good feature, then go ahead and implement it. 👍
In our case, we only care about the author, as we rewrite the commiter automatically when we sign the commits from the main workflows.
😊
Cam.
Von meinem iPhone gesendet
… Am 21/2/2022 um 13:18 schrieb Jose Celano ***@***.***>:
The action is getting the committer info (name and email) from git configuration (commit command argument/env-var, local config, global config, system config). The same way Git does.
For testing, we are using a specific committer (A committer ***@***.***>). We do it using options when we build the SimpleGit instance:
export async function newSimpleGitWithCommitterIdentity(
gitRepoDir: GitRepoDir
): Promise<SimpleGit> {
const options: Partial<SimpleGitOptions> = {
baseDir: gitRepoDir.getDirPath(),
config: [
`user.name=${testConfiguration().git.user.name}`,
`user.email=${testConfiguration().git.user.email}`
]
}
const git = simpleGit(options)
return git
}
All you add to the config attribute will be passed to git commit command withe the option -c.
Should we allow the action user to overwrite the commit with a new input @yeraydavidrodriguez @da2ce7 ?
git_committer_name
git_committer_email
Right now it's possible to overwrite it by using environment variables which is the other what Git allows you to do it:
GIT_COMMITTER_NAME
GIT_COMMITTER_EMAIL
We are passing all process env vars to the child git process.
I think we can implement it. It's a very easy feature and it could be helpful in some cases.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.
|
I've just moved it to milestone 1.1.0 int the roadmap. Even if it's simple maybe it is not useful. I can't think now a workflow example where you might need to use a different committer in the same workflow. We can wait until we or someone else has the need. I also tagged it as |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The action is getting the committer info (name and email) from git configuration (commit command argument/env-var, local config, global config, system config). The same way Git does.
For testing, we are using a specific committer (
A committer <[email protected]>
). We do it using options when we build the SimpleGit instance:All you add to the
config
attribute will be passed to git commit command withe the option-c
.Should we allow the action user to overwrite the commit with a new input @yeraydavidrodriguez @da2ce7 ?
Right now it's possible to overwrite it by using environment variables which is the other what Git allows you to do it:
We are passing all process env vars to the child git process.
I think we can implement it. It's a very easy feature and it could be helpful in some cases.
The text was updated successfully, but these errors were encountered: