Skip to content

Commit

Permalink
Add generate docs
Browse files Browse the repository at this point in the history
  • Loading branch information
BekahHW committed Sep 9, 2024
1 parent dbafc59 commit eb15b6f
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/pizza.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <command> <subcommand> [flags]
Expand All @@ -23,7 +23,7 @@ pizza <command> <subcommand> [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
Expand Down
37 changes: 37 additions & 0 deletions docs/pizza_generate.md
Original file line number Diff line number Diff line change
@@ -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

58 changes: 58 additions & 0 deletions docs/pizza_generate_codeowners.md
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit eb15b6f

Please sign in to comment.