mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 20:55:47 +00:00
feat: added commitizen support (due to cmd execution styles this will not be in the test suite)
Due to the way that the interactive cli call has to be made there is no good way to automate the tests for it without spending a long time trying to understand go pipes. since this is more of an extra feature anyways I am fine with leaving this somewhat untested especially since it is small isolated code
This commit is contained in:
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
// rootCmd represents the base command when called without any subcommands
|
||||
// func RootCmd() *cobra.Command {
|
||||
var rootCmD = &cobra.Command{
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: `cocommit <commit message> <co-author1> [co-author2] ... ||
|
||||
cocommit <commit message> <co-author1:email> [co-author2:email] ... ||
|
||||
cocommit <commit message> all ||
|
||||
@@ -91,7 +91,7 @@ func Execute() {
|
||||
// define users
|
||||
utils.Define_users(author_file)
|
||||
|
||||
err := rootCmD.Execute()
|
||||
err := rootCmd.Execute()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
@@ -99,8 +99,8 @@ func Execute() {
|
||||
|
||||
func init() {
|
||||
//rootCmD := RootCmd()
|
||||
rootCmD.Flags().BoolP("print", "p", false, "Prints the commit message to the console")
|
||||
rootCmD.Flags().BoolP("test_print", "t", false, "Prints the commit message to the console without running the git commit command")
|
||||
rootCmD.Flags().BoolP("message", "m", false, "Does nothing but allows for -m to be used in the command")
|
||||
rootCmD.Flags().BoolP("authors", "a", false, "Runs the author list TUI")
|
||||
rootCmd.Flags().BoolP("print", "p", false, "Prints the commit message to the console")
|
||||
rootCmd.Flags().BoolP("test_print", "t", false, "Prints the commit message to the console without running the git commit command")
|
||||
rootCmd.Flags().BoolP("message", "m", false, "Does nothing but allows for -m to be used in the command")
|
||||
rootCmd.Flags().BoolP("authors", "a", false, "Runs the author list TUI")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user