Skip to content

Get CODEOWNER coverage and enforce CODEOWNER usage.

License

Notifications You must be signed in to change notification settings

sibipro/codeowners-coverage

 
 

Repository files navigation

CODEOWNERS Coverage Action

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.

Usage

Create a workflow (eg: .github/workflows/seat-count.yml). See Creating a Workflow file.

Example

name: CODEOWNERS
on:
  workflow_dispatch:

jobs:
  run:
    name: Run Action
    runs-on: ubuntu-latest
    steps:
      - uses: sibipro/codeowners-coverage@v1

Example changed files in PR

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 }}

➡️ Inputs

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

Further help

To get more help on the Actions see documentation.

About

Get CODEOWNER coverage and enforce CODEOWNER usage.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%