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

Add codeowners-validator similar to grafana/grafana #163

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Changes from all 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
38 changes: 38 additions & 0 deletions .github/workflows/codeowners-validator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Codeowners Validator"

on:
pull_request:
branches: [ main ]

jobs:
codeowners-validator:
runs-on: ubuntu-latest
steps:
# Checks-out your repository, which is validated in the next step
- uses: actions/checkout@v2
- name: GitHub CODEOWNERS Validator
uses: mszostok/[email protected]
# input parameters
with:
# ==== GitHub Auth ====

# "The list of checks that will be executed. By default, all checks are executed. Possible values: files,owners,duppatterns,syntax"
checks: "files,duppatterns,syntax"

# "The comma-separated list of experimental checks that should be executed. By default, all experimental checks are turned off. Possible values: notowned,avoid-shadowing"
experimental_checks: "notowned,avoid-shadowing"

# The repository path in which CODEOWNERS file should be validated."
repository_path: "."

# Defines the level on which the application should treat check issues as failures. Defaults to warning, which treats both errors and warnings as failures, and exits with error code 3. Possible values are error and warning. Default: warning"
check_failure_level: "error"

# The comma-separated list of patterns that should be ignored by not-owned-checker. For example, you can specify * and as a result, the * pattern from the CODEOWNERS file will be ignored and files owned by this pattern will be reported as unowned unless a later specific pattern will match that path. It's useful because often we have default owners entry at the begging of the CODOEWNERS file, e.g. * @global-owner1 @global-owner2"
not_owned_checker_skip_patterns: ""

# Specifies whether CODEOWNERS may have unowned files. For example, `/infra/oncall-rotator/oncall-config.yml` doesn't have owner and this is not reported.
owner_checker_allow_unowned_patterns: "false"

# Specifies whether only teams are allowed as owners of files.
owner_checker_owners_must_be_teams: "false"
Loading