-
Notifications
You must be signed in to change notification settings - Fork 4
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
feat: support init-templatedir #101
Conversation
src/cli/mod.rs
Outdated
#[derive(Debug, Args)] | ||
pub(crate) struct InitTemplateDirArgs { | ||
/// The directory in which to write the hook script. | ||
pub(crate) directory: String, |
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.
pub(crate) directory: String, | |
pub(crate) directory: PathBuf, |
src/cli/mod.rs
Outdated
pub(crate) directory: String, | ||
|
||
/// Assume cloned repos should have a `pre-commit` config. | ||
#[arg(long, default_value_t = false)] |
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.
#[arg(long, default_value_t = false)] | |
#[arg(long)] |
src/cli/mod.rs
Outdated
#[arg(long, short = 't', default_value_t = HookType::PreCommit)] | ||
pub(crate) hook_type: HookType, |
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.
#[arg(long, short = 't', default_value_t = HookType::PreCommit)] | |
pub(crate) hook_type: HookType, | |
#[arg(short = 't', long = "hook-type", value_name = "HOOK_TYPE", value_enum)] | |
pub(crate) hook_types: Vec<HookType>, |
Thanks! Could you add a test case too? |
Thanks for the review, will add it later. |
Should |
We don’t need to use mocks in integration tests. You can refer to other tests in the |
I made some tweaks and added a test, thanks for your contribution! |
Closed #32