Skip to content

chore(): add rhdh-ai to ai-integrations codeownenrs #48

chore(): add rhdh-ai to ai-integrations codeownenrs

chore(): add rhdh-ai to ai-integrations codeownenrs #48

name: Validate CODEOWNERS
on:
workflow_dispatch:
pull_request_target:
paths:
- '.github/CODEOWNERS'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
validate-codeowners:
name: Validate CODEOWNERS members
if: github.repository == 'redhat-developer/rhdh-plugins'
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Get CODEOWNERS from PR
if: github.event_name == 'pull_request_target'
run: |
git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-head
git checkout pr-head -- .github/CODEOWNERS
- name: Generate GitHub App Token
id: generate-token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2
with:
app-id: ${{ secrets.RHDH_GH_APP_ID }}
private-key: ${{ secrets.RHDH_GH_APP_PRIVATE_KEY }}
owner: redhat-developer
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- name: Validate CODEOWNERS entries against team membership
run: node scripts/ci/validate-codeowners.js
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}