diff --git a/docs/pizza.md b/docs/pizza.md index 16f72ba..58ea659 100644 --- a/docs/pizza.md +++ b/docs/pizza.md @@ -13,7 +13,7 @@ pizza [flags] ### Options ``` - -c, --config string The codeowners config (default ".sauced.yaml") + -c, --config string The codeowners config (default "~/.sauced.yaml") --disable-telemetry Disable sending telemetry data to OpenSauced -h, --help help for pizza -l, --log-level string The logging level. Options: error, warn, info, debug (default "info") diff --git a/docs/pizza_completion.md b/docs/pizza_completion.md index 242f5e5..1506e1b 100644 --- a/docs/pizza_completion.md +++ b/docs/pizza_completion.md @@ -17,7 +17,7 @@ See each sub-command's help for details on how to use the generated script. ### Options inherited from parent commands ``` - -c, --config string The codeowners config (default ".sauced.yaml") + -c, --config string The codeowners config (default "~/.sauced.yaml") --disable-telemetry Disable sending telemetry data to OpenSauced -l, --log-level string The logging level. Options: error, warn, info, debug (default "info") --tty-disable Disable log stylization. Suitable for CI/CD and automation diff --git a/docs/pizza_completion_bash.md b/docs/pizza_completion_bash.md index cabb559..3a32c97 100644 --- a/docs/pizza_completion_bash.md +++ b/docs/pizza_completion_bash.md @@ -40,7 +40,7 @@ pizza completion bash ### Options inherited from parent commands ``` - -c, --config string The codeowners config (default ".sauced.yaml") + -c, --config string The codeowners config (default "~/.sauced.yaml") --disable-telemetry Disable sending telemetry data to OpenSauced -l, --log-level string The logging level. Options: error, warn, info, debug (default "info") --tty-disable Disable log stylization. Suitable for CI/CD and automation diff --git a/docs/pizza_completion_fish.md b/docs/pizza_completion_fish.md index d58cc2b..734d1e0 100644 --- a/docs/pizza_completion_fish.md +++ b/docs/pizza_completion_fish.md @@ -31,7 +31,7 @@ pizza completion fish [flags] ### Options inherited from parent commands ``` - -c, --config string The codeowners config (default ".sauced.yaml") + -c, --config string The codeowners config (default "~/.sauced.yaml") --disable-telemetry Disable sending telemetry data to OpenSauced -l, --log-level string The logging level. Options: error, warn, info, debug (default "info") --tty-disable Disable log stylization. Suitable for CI/CD and automation diff --git a/docs/pizza_completion_powershell.md b/docs/pizza_completion_powershell.md index 2256317..06b2036 100644 --- a/docs/pizza_completion_powershell.md +++ b/docs/pizza_completion_powershell.md @@ -28,7 +28,7 @@ pizza completion powershell [flags] ### Options inherited from parent commands ``` - -c, --config string The codeowners config (default ".sauced.yaml") + -c, --config string The codeowners config (default "~/.sauced.yaml") --disable-telemetry Disable sending telemetry data to OpenSauced -l, --log-level string The logging level. Options: error, warn, info, debug (default "info") --tty-disable Disable log stylization. Suitable for CI/CD and automation diff --git a/docs/pizza_completion_zsh.md b/docs/pizza_completion_zsh.md index 0b8d87e..5e45162 100644 --- a/docs/pizza_completion_zsh.md +++ b/docs/pizza_completion_zsh.md @@ -42,7 +42,7 @@ pizza completion zsh [flags] ### Options inherited from parent commands ``` - -c, --config string The codeowners config (default ".sauced.yaml") + -c, --config string The codeowners config (default "~/.sauced.yaml") --disable-telemetry Disable sending telemetry data to OpenSauced -l, --log-level string The logging level. Options: error, warn, info, debug (default "info") --tty-disable Disable log stylization. Suitable for CI/CD and automation diff --git a/docs/pizza_generate.md b/docs/pizza_generate.md index 74f6ae5..5cb89e4 100644 --- a/docs/pizza_generate.md +++ b/docs/pizza_generate.md @@ -6,11 +6,6 @@ Generates documentation and insights from your codebase The 'generate' command provides tools to automate the creation of important project documentation and derive insights from your codebase. -Currently, it supports generating CODEOWNERS files. - -Available subcommands: - - codeowners: Generate a more granular GitHub-style CODEOWNERS file based on git history. - ``` pizza generate [subcommand] [flags] ``` @@ -24,7 +19,7 @@ pizza generate [subcommand] [flags] ### Options inherited from parent commands ``` - -c, --config string The codeowners config (default ".sauced.yaml") + -c, --config string The codeowners config (default "~/.sauced.yaml") --disable-telemetry Disable sending telemetry data to OpenSauced -l, --log-level string The logging level. Options: error, warn, info, debug (default "info") --tty-disable Disable log stylization. Suitable for CI/CD and automation diff --git a/docs/pizza_generate_codeowners.md b/docs/pizza_generate_codeowners.md index 8b476dc..dcbbfd0 100644 --- a/docs/pizza_generate_codeowners.md +++ b/docs/pizza_generate_codeowners.md @@ -4,9 +4,17 @@ Generate a CODEOWNERS file for a GitHub repository using a "~/.sauced.yaml" conf ### Synopsis -Generates a CODEOWNERS file for a given git repository. This uses a ~/.sauced.yaml configuration to attribute emails with given entities. +Generates a CODEOWNERS file for a given git repository. The generated file specifies up to 3 owners for EVERY file in the git tree based on the number of lines touched in that specific file over the specified range of time. -The generated file specifies up to 3 owners for EVERY file in the git tree based on the number of lines touched in that specific file over the specified range of time. +Configuration: +The command requires a .sauced.yaml file for accurate attribution. This file maps +commit email addresses to GitHub usernames. The command looks for this file in two locations: + +1. In the root of the specified repository path +2. In the user's home directory (~/.sauced.yaml) if not found in the repository + +If you run the command on a specific path, it will first look for .sauced.yaml in that +path. If not found, it will fall back to ~/.sauced.yaml. ``` pizza generate codeowners path/to/repo [flags] @@ -16,20 +24,20 @@ pizza generate codeowners path/to/repo [flags] ``` - # Generate CODEOWNERS file for the current directory - pizza generate codeowners . +# Generate CODEOWNERS file for the current directory +pizza generate codeowners . - # Generate CODEOWNERS file for a specific repository - pizza generate codeowners /path/to/your/repo +# Generate CODEOWNERS file for a specific repository +pizza generate codeowners /path/to/your/repo - # Generate CODEOWNERS file analyzing the last 180 days - pizza generate codeowners . --range 180 +# Generate CODEOWNERS file analyzing the last 180 days +pizza generate codeowners . --range 180 - # Generate an OWNERS style file instead of CODEOWNERS - pizza generate codeowners . --owners-style-file +# Generate an OWNERS style file instead of CODEOWNERS +pizza generate codeowners . --owners-style-file - # Specify a custom location for the .sauced.yaml file - pizza generate codeowners . --config /path/to/.sauced.yaml +# Specify a custom location for the .sauced.yaml file +pizza generate codeowners . --config /path/to/.sauced.yaml ``` @@ -44,7 +52,7 @@ pizza generate codeowners path/to/repo [flags] ### Options inherited from parent commands ``` - -c, --config string The codeowners config (default ".sauced.yaml") + -c, --config string The codeowners config (default "~/.sauced.yaml") --disable-telemetry Disable sending telemetry data to OpenSauced -l, --log-level string The logging level. Options: error, warn, info, debug (default "info") --tty-disable Disable log stylization. Suitable for CI/CD and automation diff --git a/docs/pizza_insights.md b/docs/pizza_insights.md index b71a3a7..7933480 100644 --- a/docs/pizza_insights.md +++ b/docs/pizza_insights.md @@ -20,7 +20,7 @@ pizza insights [flags] ### Options inherited from parent commands ``` - -c, --config string The codeowners config (default ".sauced.yaml") + -c, --config string The codeowners config (default "~/.sauced.yaml") --disable-telemetry Disable sending telemetry data to OpenSauced -l, --log-level string The logging level. Options: error, warn, info, debug (default "info") --tty-disable Disable log stylization. Suitable for CI/CD and automation diff --git a/docs/pizza_insights_contributors.md b/docs/pizza_insights_contributors.md index 499ed2e..6c9d868 100644 --- a/docs/pizza_insights_contributors.md +++ b/docs/pizza_insights_contributors.md @@ -21,7 +21,7 @@ pizza insights contributors url... [flags] ### Options inherited from parent commands ``` - -c, --config string The codeowners config (default ".sauced.yaml") + -c, --config string The codeowners config (default "~/.sauced.yaml") --disable-telemetry Disable sending telemetry data to OpenSauced -l, --log-level string The logging level. Options: error, warn, info, debug (default "info") -o, --output string The formatting for command output. One of: (table, yaml, csv, json) (default "table") diff --git a/docs/pizza_insights_repositories.md b/docs/pizza_insights_repositories.md index b46c2a1..9754648 100644 --- a/docs/pizza_insights_repositories.md +++ b/docs/pizza_insights_repositories.md @@ -21,7 +21,7 @@ pizza insights repositories url... [flags] ### Options inherited from parent commands ``` - -c, --config string The codeowners config (default ".sauced.yaml") + -c, --config string The codeowners config (default "~/.sauced.yaml") --disable-telemetry Disable sending telemetry data to OpenSauced -l, --log-level string The logging level. Options: error, warn, info, debug (default "info") -o, --output string The formatting for command output. One of: (table, yaml, csv, json) (default "table") diff --git a/docs/pizza_insights_user-contributions.md b/docs/pizza_insights_user-contributions.md index d59b71e..8f07c9d 100644 --- a/docs/pizza_insights_user-contributions.md +++ b/docs/pizza_insights_user-contributions.md @@ -23,7 +23,7 @@ pizza insights user-contributions url... [flags] ### Options inherited from parent commands ``` - -c, --config string The codeowners config (default ".sauced.yaml") + -c, --config string The codeowners config (default "~/.sauced.yaml") --disable-telemetry Disable sending telemetry data to OpenSauced -l, --log-level string The logging level. Options: error, warn, info, debug (default "info") -o, --output string The formatting for command output. One of: (table, yaml, csv, json) (default "table") diff --git a/docs/pizza_login.md b/docs/pizza_login.md index 8859efd..54ead8f 100644 --- a/docs/pizza_login.md +++ b/docs/pizza_login.md @@ -22,7 +22,7 @@ pizza login [flags] ### Options inherited from parent commands ``` - -c, --config string The codeowners config (default ".sauced.yaml") + -c, --config string The codeowners config (default "~/.sauced.yaml") --disable-telemetry Disable sending telemetry data to OpenSauced -l, --log-level string The logging level. Options: error, warn, info, debug (default "info") --tty-disable Disable log stylization. Suitable for CI/CD and automation diff --git a/docs/pizza_version.md b/docs/pizza_version.md index a19188b..ce6c725 100644 --- a/docs/pizza_version.md +++ b/docs/pizza_version.md @@ -15,7 +15,7 @@ pizza version [flags] ### Options inherited from parent commands ``` - -c, --config string The codeowners config (default ".sauced.yaml") + -c, --config string The codeowners config (default "~/.sauced.yaml") --disable-telemetry Disable sending telemetry data to OpenSauced -l, --log-level string The logging level. Options: error, warn, info, debug (default "info") --tty-disable Disable log stylization. Suitable for CI/CD and automation