-
Notifications
You must be signed in to change notification settings - Fork 7
Add flag to enable quiet mode (run without PR comments) #19
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
Changes from 15 commits
77eec28
b2ff62f
31f8e05
389739d
3732b4d
aa3f5d2
2e2e131
eafd96e
3115a3c
c8f65ce
28f4de3
455933c
3d8bf6a
c3ee6ea
e10388b
f7d5705
d44bc64
15f02ca
5e08463
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ Code Ownership & Review Assignment Tool - GitHub CODEOWNERS but better | |
|
|
||
| [](https://goreportcard.com/report/github.com/multimediallc/codeowners-plus?kill_cache=1) | ||
| [](https://github.com/multimediallc/codeowners-plus/actions/workflows/go.yml) | ||
|  | ||
|  | ||
| [](https://opensource.org/licenses/BSD-3-Clause) | ||
| [](CODE_OF_CONDUCT.md) | ||
|
|
||
|
|
@@ -70,9 +70,9 @@ jobs: | |
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: 'Codeowners Plus' | ||
| uses: multimediallc/[email protected].0 | ||
| uses: multimediallc/[email protected].2 | ||
zbedforrest marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| with: | ||
| github-token: '${{ secrets.GITHUB_TOKEN }}' | ||
| pr: '${{ github.event.pull_request.number }}' | ||
|
|
@@ -121,7 +121,7 @@ By default, each file will resolve to a single reviewer. See [priority section] | |
|
|
||
| To instead require an owner as an additional reviewer (`AND` rule), put an `&` at the start of the line: | ||
| ``` | ||
| # this rule will add `@task-auditor` as a required review in addition to the file owner's required review | ||
| # this rule will add `@task-auditor` as a required review in addition to the file owner's required review | ||
| & **/task.go @task-auditor | ||
| ``` | ||
|
|
||
|
|
@@ -219,7 +219,7 @@ If you want to allow PR authors to bypass some reviews when there are a large nu | |
|
|
||
| `codeowners.toml` | ||
| ```toml | ||
| # | ||
| # | ||
| # `max_reviews` (default nil) allows you to skip some reviewers if the number of reviewers is greater than the max_reviewers | ||
| max_reviews = 2 | ||
| ``` | ||
|
|
@@ -254,13 +254,45 @@ high_priority_labels = ["high-priority", "urgent"] | |
|
|
||
| When a PR has any of these labels, the comment will look like this: | ||
| ``` | ||
| ❗High Prio❗ | ||
| ❗High Prio❗ | ||
|
|
||
| Codeowners approval required for this PR: | ||
| - @user1 | ||
| - @user2 | ||
| ``` | ||
|
|
||
| ### Quiet Mode | ||
|
||
|
|
||
| You can run Codeowners Plus in a "quiet" mode using the `quiet` input in the GitHub Action or the `-quiet=true` flag in the CLI. | ||
|
||
|
|
||
| **When Quiet Mode is Enabled:** | ||
|
||
|
|
||
| * **No Comments:** The action will **not** post the review status comment (listing required/unapproved reviewers) or the optional reviewer "cc" comment to the Pull Request. | ||
| * **No Review Requests:** The action will **not** automatically request reviews from required owners who have not yet approved via the GitHub API. | ||
|
|
||
| **Behavior:** | ||
|
|
||
| Even in quiet mode, the tool still performs all its internal calculations: determining required/optional owners based on file changes, checking existing approvals, and determining if the ownership rules are satisfied. The primary outcome is still the success or failure status of the associated status check (unless you've configured `enforcement.fail_check = false`). | ||
|
|
||
| **Use Cases:** | ||
|
|
||
| * **Draft Pull Requests:** This is a common use case. You might want the Codeowners Plus logic to run and report a status (e.g., pending or failed) on draft PRs, but without notifying reviewers prematurely by adding comments or requesting reviews until the PR is marked "Ready for review". | ||
| * **Custom Notification Workflows:** You might prefer to handle notifications or review requests through a different mechanism and only use Codeowners Plus for the status check enforcement. | ||
|
|
||
| **Activation:** | ||
|
|
||
| * **GitHub Action:** Set the `quiet` input to `'true'`. | ||
| ```yaml | ||
| - name: 'Codeowners Plus (Quiet)' | ||
| uses: multimediallc/[email protected] | ||
| with: | ||
| # ... other inputs ... | ||
| quiet: 'true' | ||
| ``` | ||
| * **CLI:** Use the flag `-quiet=true`. | ||
|
|
||
| **Default:** Quiet mode is **disabled** (`false`) by default. | ||
|
|
||
| ## CLI Tool | ||
|
|
||
| A CLI tool is available which provides some utilities for working with `.codeowners` files. | ||
|
|
@@ -276,7 +308,10 @@ Available commands are: | |
| * `owner` to check who owns a specific file | ||
| * `verify` to check for typos in a `.codeowners` file | ||
|
|
||
| ## Contributing | ||
|
|
||
| See [CONTRIBUTING.md](https://github.com/multimediallc/codeowners-plus/blob/main/CONTRIBUTING.md) | ||
|
|
||
| ## Future Features | ||
|
|
||
| * Inline ownership comments for having owners for specific functions, classes, etc. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.