Skip to content
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

Why 'user.name' and/or 'user.email' must be configured ? #263

Closed
AlexTrotsenko opened this issue Oct 25, 2023 · 7 comments
Closed

Why 'user.name' and/or 'user.email' must be configured ? #263

AlexTrotsenko opened this issue Oct 25, 2023 · 7 comments

Comments

@AlexTrotsenko
Copy link

I run copybara on our CI and faced 'user.name' and/or 'user.email' are not configured issue.

As far as I see, currently the only way to avoid setting git config --global is to specify --git-committer-email command line option.

Why authoring = authoring.pass_thru("Copybara <copybara@example.com>"), in sky file is not enough?

@mikelalcon
Copy link
Collaborator

mikelalcon commented Oct 25, 2023 via email

@AlexTrotsenko
Copy link
Author

@mikelalcon thanks for the quick reply and information provided. Indeed it is absolutely makes sense.

I am wondered if you think it worth to also add the option to specify git committer in the sky file?
Or is it preferable to have committer set to the actual CI "technical user" instead of having it set statically to something like "Copybara <copybara@example.com>" ?

@mikelalcon
Copy link
Collaborator

We have --git-committer-email and --git-committer-name too. I think it is better to not set statically so that if you do a manual export it clearly says that you were the one exporting instead of an automated service, etc.

@AlexTrotsenko
Copy link
Author

AlexTrotsenko commented Oct 28, 2023

@mikelalcon thanks for the feedback and confirmation 👍

Since it also makes sense for you to keep it static - may I possibly ask you if you are happy to consider having this property in the sky file as well for simplicity?

@AlexTrotsenko
Copy link
Author

@mikelalcon just in case: if you find it helpful - I am happy to submit the PR.

@mikelalcon
Copy link
Collaborator

mikelalcon commented Oct 31, 2023

Sounds good! could you use an authoring object? (Receive string from starlark in the format of "foo <foo@example.com>" and then convert it to Author with Author.parse(String)

@AlexTrotsenko
Copy link
Author

Sounds good! could you use an authoring object? (Receive string from starlark in the format of "foo <foo@example.com>" and then convert it to Author with Author.parse(String)

Thanks for the confirmation and your suggestion about re-using Author. I was about to ask if it ok for you as well :)

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

No branches or pull requests

2 participants