Skip to content

CODEOWNERS coverage checker

Actions
Checks if all files in the repository are covered by the CODEOWNERS file
v1.0.1
Latest
Star (1)

CODEOWNERS coverage check

GitHub Super-Linter CI Check dist/ CodeQL Coverage

This action can:

  • Check if all files are covered by a CODEOWNERS Rule
  • Check if all modified files are covered by a CODEOWNERS Rule. (PR)
  • Check if all CODEOWNER rules are used.

Examples

Check all files

steps:
  - uses: actions/checkout@v4
  - name: CODEOWNERS Check
    id: test-action
    uses: joelharkes/gh-action-codeowner-coverage@v1
    with:
      includeGitignore: 'false'
      ignoreDefault: 'false'
      allRulesMustHit: 'true' # Action will fail if there is a rule that is not used.

PR Check modifield files

name: CODEOWNERS Check on modified files

on:
  pull_request:
    branches:
      - main

permissions:
  contents: read

jobs:
  codeowners:
    runs-on: ubuntu-latest
    name: Test changed-files
    steps:
      - uses: actions/checkout@v4
      - name: Get changed files
        id: changed-files
        uses: tj-actions/changed-files@v45

      - name: CODEOWNERS Check
        id: test-action
        uses: joelharkes/gh-action-codeowner-coverage@v1
        with:
          files: ${{ steps.changed-files.outputs.all_changed_files }}
          includeGitignore: 'false'
          ignoreDefault: 'false'

Outputs example

steps:
  - uses: actions/checkout@v4
  - name: CODEOWNERS Check
    id: codeowners
    uses: joelharkes/gh-action-codeowner-coverage@v1
    with:
      milliseconds: 1000

  - name: Print Output
    id: output
    run: echo "${{ steps.codeowners.outputs.missedFiles }}"

Contributing

See: typescript-action template on how to run, test and contribute to GitHub Actions.

CODEOWNERS coverage checker is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Checks if all files in the repository are covered by the CODEOWNERS file
v1.0.1
Latest

CODEOWNERS coverage checker is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.