Skip to content

Commit 5d297c0

Browse files
authored
Update README.md
1 parent 1af7316 commit 5d297c0

File tree

1 file changed

+29
-7
lines changed

1 file changed

+29
-7
lines changed

README.md

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
![CODEOWNER Coverage](https://badgen.net/badge/CODEOWNER%20Coverage/80%/blue?icon=github)
1+
# CODEOWNERS Coverage Action
22

3-
# Action
4-
5-
An [Action](https://docs.github.com/en/actions).
3+
An [Action](https://docs.github.com/en/actions) that checks if files are covered by the [CODEOWNERS](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners) file.
64

75
## Usage
86
Create a workflow (eg: `.github/workflows/seat-count.yml`). See [Creating a Workflow file](https://help.github.com/en/articles/configuring-a-workflow#creating-a-workflow-file).
@@ -20,7 +18,7 @@ If your organization has SAML enabled you must authorize the PAT, see [Authorizi
2018

2119
#### Example
2220
```yml
23-
name: TypeScript Action Workflow
21+
name: CODEOWNERS
2422
on:
2523
workflow_dispatch:
2624

@@ -29,7 +27,29 @@ jobs:
2927
name: Run Action
3028
runs-on: ubuntu-latest
3129
steps:
32-
- uses: austenstone/action-typescript@main
30+
- uses: austenstone/codeowners-coverage@main
31+
```
32+
33+
#### Example changed files in PR
34+
Pass the files in to check only specific files. Combine with [tj-actions/changed-files](https://github.com/tj-actions/changed-files) to check only files changed.
35+
```yml
36+
name: CODEOWNERS
37+
on:
38+
push:
39+
pull_request:
40+
41+
jobs:
42+
run:
43+
name: Check Coverage
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v3
47+
- id: changed-files
48+
uses: tj-actions/[email protected]
49+
- uses: ./
50+
with:
51+
ignore-default: 'true'
52+
files: ${{ steps.changed-files.outputs.all_changed_files }}
3353
```
3454
3555
## ➡️ Inputs
@@ -38,7 +58,9 @@ Various inputs are defined in [`action.yml`](action.yml):
3858
| Name | Description | Default |
3959
| --- | - | - |
4060
| github‑token | Token to use to authorize. | ${{ github.token }} |
41-
61+
| include-gitignore | Weither to filter our files in .gitignore | true |
62+
| ignore-default | Weither to ignore the default rule `*` in CODEOWNERS file | false |
63+
| files | Filter check to only specific files | N/A
4264
<!--
4365
## ⬅️ Outputs
4466
| Name | Description |

0 commit comments

Comments
 (0)