-
Notifications
You must be signed in to change notification settings - Fork 33
35 lines (28 loc) · 1016 Bytes
/
codeowner-approval.yaml
File metadata and controls
35 lines (28 loc) · 1016 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: CODEOWNERS Approval Check
"on":
pull_request:
types: [opened, reopened, synchronize]
pull_request_review:
types: [submitted, dismissed]
permissions:
contents: read
jobs:
codeowner-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.CODEOWNER_APP_ID }}
private-key: ${{ secrets.CODEOWNER_APP_PRIVATE_KEY }}
- uses: astral-sh/setup-uv@v7
- name: Check CODEOWNERS approval
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
REPO: ${{ github.repository }}
SHA: ${{ github.event.pull_request.head.sha }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: uv run .github/scripts/codeowner_check.py