-
Notifications
You must be signed in to change notification settings - Fork 11
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
CFE-3813: Track changes done by cfbs commands in Git #103
Conversation
There shouldn't be multiple instances of the class manipulating with the same file. Plus we can use the single instance to store runtime configration options (no_interactive, dry_run?,...). Ticket: CFE-3813 Changelog: None
Instead of passing it to some of them and not having it implemented for others. Also remove the index_path argument from places where it is not used. Ticket: CFE-3813 Changelog: None
It's part of the configuration for the particular 'cfbs' run. And we can potentially make it part of the cfbs.json config in the future. Ticket: CFE-3813 Changelog: None
Instead of always checking the non_interactive flag, checking if the user entered valid input, setting the default on empty input,... Ticket: CFE-3813 Changelog: None
Instead of just writing the defaults to the config and asking them to edit it. Ticket: CFE-3813 Changelog: None
Some helper code to deal with the tricky bits of initializing git and making commits. Ticket: CFE-3813 Changelog: None
13f5b28
to
0de77da
Compare
It's always a good idea to track changes in policy and related files. So unless user explicitly disagrees, 'cfbs' commands now record changes in a Git repository. Also, 'clean' and 'update' commands were modified to have different return/exit codes when they make some and no changes. Ticket: CFE-3813 Changelog: cfbs commands now track changes they make in a Git repository
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good in general, thanks for working on this! 🚀 I am sure I will find some things we might want to change with the usability / prompts, but we can take that as we start using it :)
user_name = git_get_config("user.name") | ||
user_email = git_get_config("user.email") | ||
user_name = prompt_user("Please enter user name to use for git commits", | ||
default=user_name or "cfbs") | ||
|
||
node_name = os.uname().nodename | ||
user_email = prompt_user("Please enter user email to use for git commits", | ||
default=user_email or ("cfbs@%s" % node_name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really nice 👍
No description provided.