Skip to content

joelharkes/gh-action-codeowner-coverage

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Github action for codeowner coverage check

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 64.6%
  • Shell 21.2%
  • JavaScript 14.2%