From 8834e8ab2c966ef9f9c837b630c022b08ae5860c Mon Sep 17 00:00:00 2001 From: BekahHW Date: Thu, 12 Sep 2024 09:52:40 -0400 Subject: [PATCH 1/9] Clarify long description for config --- cmd/generate/config/config.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/generate/config/config.go b/cmd/generate/config/config.go index e5e3e19..1d52e77 100644 --- a/cmd/generate/config/config.go +++ b/cmd/generate/config/config.go @@ -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{} From 852060b0221a3130bc397e8a361667c61b1d360e Mon Sep 17 00:00:00 2001 From: BekahHW Date: Thu, 12 Sep 2024 09:54:56 -0400 Subject: [PATCH 2/9] Add generate to readme commands --- npm/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/npm/README.md b/npm/README.md index 2d1a8e9..5c97d19 100644 --- a/npm/README.md +++ b/npm/README.md @@ -31,6 +31,7 @@ Usage: pizza [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 From 312854053dc3f956909bd267c34d1160a0e35ca2 Mon Sep 17 00:00:00 2001 From: BekahHW Date: Thu, 12 Sep 2024 10:00:27 -0400 Subject: [PATCH 3/9] Add config announcement to readme --- npm/README.md | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/npm/README.md b/npm/README.md index 5c97d19..b09b1bb 100644 --- a/npm/README.md +++ b/npm/README.md @@ -73,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`. \ No newline at end of file +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 + ``` From 8e89f5c7d6bf71af85a8daa97f4278561aa532ac Mon Sep 17 00:00:00 2001 From: BekahHW Date: Thu, 12 Sep 2024 10:03:05 -0400 Subject: [PATCH 4/9] Remove proof of concept statement --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 9f4b80c..aa9cd8b 100644 --- a/README.md +++ b/README.md @@ -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. From 3ae33610c2baa09cd35f72373f03bb4a9a0c38b3 Mon Sep 17 00:00:00 2001 From: BekahHW Date: Thu, 12 Sep 2024 10:04:54 -0400 Subject: [PATCH 5/9] Add generate config instructions to readme --- README.md | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index aa9cd8b..e12bef0 100644 --- a/README.md +++ b/README.md @@ -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 @@ -138,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. @@ -166,6 +166,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 From 232472ce306557ee4c5282eacbaf4f14f9d6271a Mon Sep 17 00:00:00 2001 From: BekahHW Date: Thu, 12 Sep 2024 10:56:37 -0400 Subject: [PATCH 6/9] Replace logo with current --- .sauced.yaml | 1 - README.md | 2 +- npm/README.md | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.sauced.yaml b/.sauced.yaml index 4726374..946586d 100644 --- a/.sauced.yaml +++ b/.sauced.yaml @@ -14,4 +14,3 @@ attribution: - nick@opensauced.pizza zeucapua: - coding@zeu.dev - diff --git a/README.md b/README.md index e12bef0..8bfedf0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- Open Sauced + Open Sauced

🍕 Pizza CLI 🍕

A command line interface and tool for all things OpenSauced!
diff --git a/npm/README.md b/npm/README.md index b09b1bb..dec7e01 100644 --- a/npm/README.md +++ b/npm/README.md @@ -1,6 +1,6 @@

- Open Sauced + Open Sauced

🍕 Pizza CLI 🍕

A Go command line interface for all things OpenSauced!
From 88c9524488df910794c5803326a083564f03a12d Mon Sep 17 00:00:00 2001 From: BekahHW Date: Thu, 12 Sep 2024 10:58:18 -0400 Subject: [PATCH 7/9] Update project description in the readme --- README.md | 2 +- npm/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8bfedf0..8c62992 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@
Open Sauced

🍕 Pizza CLI 🍕

- A command line interface and tool for all things OpenSauced! + A Go command line interface for managing code ownership and project insights with OpenSauced!

diff --git a/npm/README.md b/npm/README.md index dec7e01..48777e0 100644 --- a/npm/README.md +++ b/npm/README.md @@ -2,7 +2,7 @@
Open Sauced

🍕 Pizza CLI 🍕

- A Go command line interface for all things OpenSauced! + A Go command line interface for managing code ownership and project insights with OpenSauced!

From 0df69d93d67273bf40cfdbb4e88dd0883544b93b Mon Sep 17 00:00:00 2001 From: BekahHW Date: Thu, 12 Sep 2024 15:03:22 -0400 Subject: [PATCH 8/9] Add Demo video to readme --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8c62992..f3d639a 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,12 @@ Open Sauced

🍕 Pizza CLI 🍕

A Go command line interface for managing code ownership and project insights with OpenSauced! -
+
+ + CODEOWNERS demo + + +
From 5f8449ac443b70d6dde41f5711e7ed6c34fc2d21 Mon Sep 17 00:00:00 2001 From: BekahHW Date: Thu, 12 Sep 2024 16:14:57 -0400 Subject: [PATCH 9/9] Remove logo --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index f3d639a..b342b0f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,5 @@

- Open Sauced

🍕 Pizza CLI 🍕

A Go command line interface for managing code ownership and project insights with OpenSauced!