diff --git a/docs/pizza.md b/docs/pizza.md index 49abe05..d7db457 100644 --- a/docs/pizza.md +++ b/docs/pizza.md @@ -4,7 +4,7 @@ OpenSauced CLI ### Synopsis -A command line utility for insights, metrics, and all things OpenSauced +A command line utility for insights, metrics, and generating CODEOWNERS documentation for your open source projects ``` pizza [flags] @@ -23,7 +23,7 @@ pizza [flags] ### SEE ALSO * [pizza completion](pizza_completion.md) - Generate the autocompletion script for the specified shell -* [pizza generate](pizza_generate.md) - Generates something +* [pizza generate](pizza_generate.md) - Generates documentation and insights from your codebase * [pizza insights](pizza_insights.md) - Gather insights about git contributors, repositories, users and pull requests * [pizza login](pizza_login.md) - Log into the CLI via GitHub * [pizza version](pizza_version.md) - Displays the build version of the CLI diff --git a/docs/pizza_generate.md b/docs/pizza_generate.md new file mode 100644 index 0000000..5125c89 --- /dev/null +++ b/docs/pizza_generate.md @@ -0,0 +1,37 @@ +## pizza generate + +Generates documentation and insights from your codebase + +### Synopsis + +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] +``` + +### Options + +``` + -h, --help help for generate +``` + +### Options inherited from parent commands + +``` + -c, --config string The saucectl 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 +``` + +### SEE ALSO + +* [pizza](pizza.md) - OpenSauced CLI +* [pizza generate codeowners](pizza_generate_codeowners.md) - Generate a CODEOWNERS file for a GitHub repository using a "~/.sauced.yaml" config + diff --git a/docs/pizza_generate_codeowners.md b/docs/pizza_generate_codeowners.md new file mode 100644 index 0000000..4e7e9a0 --- /dev/null +++ b/docs/pizza_generate_codeowners.md @@ -0,0 +1,58 @@ +## pizza generate codeowners + +Generate a CODEOWNERS file for a GitHub repository using a "~/.sauced.yaml" config + +### Synopsis + +WARNING: Proof of concept feature. + +Generates a CODEOWNERS file for a given git repository. This uses a ~/.sauced.yaml configuration to attribute emails with given entities. + +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. + +``` +pizza generate codeowners path/to/repo [flags] +``` + +### Examples + +``` + + # 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 analyzing the last 180 days + pizza generate codeowners . --range 180 + + # 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 + +``` + +### Options + +``` + -h, --help help for codeowners + --owners-style-file Generate an agnostic OWNERS style file instead of CODEOWNERS. + -r, --range int The number of days to analyze commit history (default 90) (default 90) +``` + +### Options inherited from parent commands + +``` + -c, --config string The saucectl 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 +``` + +### SEE ALSO + +* [pizza generate](pizza_generate.md) - Generates documentation and insights from your codebase +