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

feat: Add quick start section #203

Merged
merged 3 commits into from
Sep 20, 2024
Merged
Changes from 1 commit
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
74 changes: 73 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</a>
</div>

# 📦 Install
# 📦 [Install](#-install)

#### Homebrew

Expand Down Expand Up @@ -149,6 +149,78 @@ jobs:
how to use the Pizza command line tool and how it works with the rest of the OpenSauced
ecosystem.

# 🚀 Quickstart

Get up and running with the Pizza CLI in minutes using `npx`:

1. **Ensure you have Node.js installed**

Pizza CLI can be run using `npx`, which comes with Node.js. If you don't have Node.js installed, download it from [nodejs.org](https://nodejs.org/).

> NOTE
> For other installation methods, see the [Install](#-Install) section.

2. **Generate a configuration file**

Navigate to your project directory and run:
```sh
npx pizza@latest generate config ./ -i
```
This will create a `.sauced.yaml` file, interactively prompting you to attribute commit emails to GitHub handles.

3. **Generate CODEOWNERS file**

In your project directory, run:
```sh
npx pizza@latest generate codeowners .
BekahHW marked this conversation as resolved.
Show resolved Hide resolved
```
This will create a `CODEOWNERS` file based on your project's git history and the `.sauced.yaml` configuration.

4. **Create OpenSauced [Contributor Insight](https://opensauced.pizza/docs/features/contributor-insights/)**

After generating the CODEOWNERS file, you can create an OpenSauced Contributor Insight:
```sh
npx pizza@latest generate insight .
```

5. **Explore repository insights**
Get metrics and insights for your repository:
```sh
npx pizza@latest insights repo your-username/your-repo
BekahHW marked this conversation as resolved.
Show resolved Hide resolved
```

6. **Set up automated CODEOWNERS updates (Optional)**
Add the [Pizza GitHub Action](https://github.com/open-sauced/pizza-action) to your repository to automate CODEOWNERS updates:
```yaml
# In .github/workflows/pizza-action.yml
name: OpenSauced Pizza Action
on:
schedule:
# Run once a week on Sunday at 00:00 UTC
- cron: "0 0 * * 0"
workflow_dispatch: # Allow manual triggering

jobs:
pizza-action:
runs-on: ubuntu-latest
steps:
- name: Pizza Action
uses: open-sauced/[email protected]
with:
# optional and default is "latest". Add this parameter if you want to use a specific version, e.g. v2.0.0
cli-version: "v2.2.0"
# optional and false by default. Set this to true if you want to have a pull request for the changes created automatically.
commit-and-pr: "true"
# optional
pr-title: "chore: update repository codeowners"

```

Now you're ready to leverage the Pizza CLI for managing code ownership and getting project insights with OpenSauced!

> Note
> Using `npx pizza@latest` ensures you're always running the most recent version of Pizza CLI. If you prefer to use a specific version, you can replace `@latest` with a version number, e.g., `npx [email protected]`.

# ✨ Usage

## Codeowners generation
Expand Down
Loading