Skip to content
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

chore: update codeowners docs #178

Merged
merged 9 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .sauced.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ attribution:
- [email protected]
zeucapua:
- [email protected]

41 changes: 35 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div align="center">
<br>
<img alt="Open Sauced" src="https://i.ibb.co/7jPXt0Z/logo1-92f1a87f.png" width="300px">
<img alt="Open Sauced" src="https://github.com/open-sauced/assets/blob/main/logos/logo-on-dark.png">
BekahHW marked this conversation as resolved.
Show resolved Hide resolved
<h1>🍕 Pizza CLI 🍕</h1>
<strong>A command line interface and tool for all things OpenSauced!</strong>
<strong>A Go command line interface for managing code ownership and project insights with OpenSauced!</strong>
<br>
</div>
<br>
Expand Down Expand Up @@ -104,7 +104,7 @@ patches on the tip of the repository. Go and build with caution!

# ✨ Usage

### Codeowners generation
## Codeowners generation

Use the `codeowners` command to generate an `OWNERS` file or GitHub style `CODEOWNERS` file.
This can be used to granularly define what experts and entities have the
Expand All @@ -113,8 +113,6 @@ most context and knowledge on certain parts of a codebase.
```
❯ pizza generate codeowners -h

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.

Expand All @@ -140,7 +138,7 @@ Global Flags:
--tty-disable Disable log stylization. Suitable for CI/CD and automation
```

### Configuration
## Configuration

```yaml
# Configuration for attributing commits with emails to individual entities.
Expand Down Expand Up @@ -168,6 +166,37 @@ attribution:
- [email protected]
```

### 🚀 New in v1.4.0: Generate Config
BekahHW marked this conversation as resolved.
Show resolved Hide resolved

The `pizza generate config` command has been added to help you create configuration files for your projects. This command allows you to generate configuration files with various options:

```sh
pizza generate config [flags]
```

#### Flags:

- `-i, --interactive`: Enter interactive mode to attribute each email manually
- `-o, --output-path string`: Set the directory for the output file
- `-h, --help`: Display help for the command

#### Examples:

1. Generate a config file in the current directory:
```sh
pizza generate config
```

2. Generate a config file interactively:
```sh
pizza generate config -i
```

3. Generate a config file in a specific directory:
```sh
pizza generate config -o /path/to/directory
```

# 🚜 Development

### 🔨 Requirements
Expand Down
6 changes: 4 additions & 2 deletions cmd/generate/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ type Options struct {
ttyDisabled bool
}

const configLongDesc string = `Generates a ".sauced.yaml" configuration file. The attribution of emails to given entities
is based on the repository this command is ran in.`
const configLongDesc string = `Generates a ".sauced.yaml" configuration file for use with the Pizza CLI's codeowners command.

This command analyzes the git history of the current repository to create a mapping
of email addresses to GitHub usernames. `

func NewConfigCommand() *cobra.Command {
opts := &Options{}
Expand Down
38 changes: 35 additions & 3 deletions npm/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div align="center">
<br>
<img alt="Open Sauced" src="https://i.ibb.co/7jPXt0Z/logo1-92f1a87f.png" width="300px">
<img alt="Open Sauced" src="https://github.com/open-sauced/assets/blob/main/logos/logo-on-dark.png" >
<h1>🍕 Pizza CLI 🍕</h1>
<strong>A Go command line interface for all things OpenSauced!</strong>
<strong>A Go command line interface for managing code ownership and project insights with OpenSauced!</strong>
<br>
</div>
<br>
Expand Down Expand Up @@ -31,6 +31,7 @@ Usage:
pizza <command> <subcommand> [flags]

Available Commands:
generate Generate configurations and codeowner files
bake Use a pizza-oven to source git commits into OpenSauced
completion Generate the autocompletion script for the specified shell
help Help about any command
Expand Down Expand Up @@ -72,4 +73,35 @@ piped into `sh` for conveniently downloading the latest GitHub release of the
`pizza` CLI.

Once download is completed, you can move the binary to a convenient location in
your system's `$PATH`.
your system's `$PATH`.

### 🚀 New in v1.4.0: Generate Config

The `pizza generate config` command has been added to help you create configuration files for your projects. This command allows you to generate configuration files with various options:

```sh
pizza generate config [flags]
```

#### Flags:

- `-i, --interactive`: Enter interactive mode to attribute each email manually
- `-o, --output-path string`: Set the directory for the output file
- `-h, --help`: Display help for the command

#### Examples:

1. Generate a config file in the current directory:
```sh
pizza generate config
```

2. Generate a config file interactively:
```sh
pizza generate config -i
```

3. Generate a config file in a specific directory:
```sh
pizza generate config -o /path/to/directory
```
Loading