An Action that checks if files are covered by the CODEOWNERS file.
Forked because the upstream repo hasn't been updated in a couple years.
Create a workflow (eg: .github/workflows/seat-count.yml
). See Creating a Workflow file.
name: CODEOWNERS
on:
workflow_dispatch:
jobs:
run:
name: Run Action
runs-on: ubuntu-latest
steps:
- uses: sibipro/codeowners-coverage@v1
Pass the files in to check only specific files. Combine with tj-actions/changed-files to check only files changed.
name: CODEOWNERS
on:
push:
pull_request:
jobs:
run:
name: Check Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: changed-files
uses: tj-actions/[email protected]
- uses: sibipro/codeowners-coverage@v1
with:
ignore-default: 'true'
files: ${{ steps.changed-files.outputs.all_changed_files }}
Various inputs are defined in action.yml
:
Name | Description | Default |
---|---|---|
github‑token | Token to use to authorize. | ${{ github.token }} |
include-gitignore | Whether to filter our files in .gitignore | true |
ignore-default | Whether to ignore the default rule * in CODEOWNERS file |
false |
files | Filter check to only specific files | N/A |
To get more help on the Actions see documentation.