Skip to content

Commit 9e110a8

Browse files
committed
Initial commit
0 parents  commit 9e110a8

File tree

8 files changed

+673
-0
lines changed

8 files changed

+673
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Request Codeowner Reviews
2+
3+
A GitHub Action that automatically requests reviews from codeowners for changed files in a pull request.
4+
5+
## Usage
6+
7+
### Basic Setup
8+
9+
Create a workflow file (e.g., `.github/workflows/request-codeowner-reviews.yml`):
10+
11+
```yaml
12+
name: Request Codeowner Reviews
13+
14+
on:
15+
pull_request_target:
16+
types: [opened]
17+
18+
jobs:
19+
request-reviews:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- name: Request Codeowner Reviews
26+
uses: avivkeller/request-codeowner-review@v1
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
```
30+
31+
## Inputs
32+
33+
| Input | Description | Required | Default |
34+
| ------- | ------------------------------------------------ | -------- | --------------------- |
35+
| `token` | GitHub token with pull request write permissions | Yes | `${{ github.token }}` |
36+
37+
## CODEOWNERS File Format
38+
39+
This action supports the standard GitHub `CODEOWNERS` file format. Place your `CODEOWNERS` file in one of these locations:
40+
41+
- `.github/CODEOWNERS`
42+
- `docs/CODEOWNERS`
43+
- `CODEOWNERS` (repository root)

action.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: 'Request Codeowner Reviews'
2+
description: 'Automatically request reviews from codeowners for changed files in a pull request'
3+
inputs:
4+
token:
5+
description: 'GitHub token with pull request write permissions'
6+
required: true
7+
default: ${{ github.token }}
8+
runs:
9+
using: 'node20'
10+
main: 'dist/index.js'

dist/index.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)