Skip to content

Commit

Permalink
chore: update codeowners docs (#178)
Browse files Browse the repository at this point in the history
* Clarify long description for config

* Add generate to readme commands

* Add config announcement to readme

* Remove proof of concept statement

* Add generate config instructions to readme

* Replace logo with current

* Update project description in the readme

* Add Demo video to readme

* Remove logo
  • Loading branch information
BekahHW authored Sep 12, 2024
1 parent 9eee553 commit 896b986
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 13 deletions.
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:
- nick@opensauced.pizza
zeucapua:
- coding@zeu.dev

47 changes: 40 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<div align="center">
<br>
<img alt="Open Sauced" src="https://i.ibb.co/7jPXt0Z/logo1-92f1a87f.png" width="300px">
<h1>🍕 Pizza CLI 🍕</h1>
<strong>A command line interface and tool for all things OpenSauced!</strong>
<br>
<strong>A Go command line interface for managing code ownership and project insights with OpenSauced!</strong>
<br/>
<a href="https://youtu.be/yINL-uIvhn0" target="_blank">
<img alt="CODEOWNERS demo" src="https://img.youtube.com/vi/yINL-uIvhn0/0.jpg" style="max-width:100%; cursor:pointer;margin-top: 20px;">
</a>


</div>
<br>

Expand Down Expand Up @@ -104,7 +108,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 +117,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 +142,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 +170,37 @@ attribution:
- john@opensauced.pizza
```
### 🚀 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
```

# 🚜 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
```

0 comments on commit 896b986

Please sign in to comment.