Skip to content

feat: Add re-request to same team when only 1 team is required, but we need multiple #207

feat: Add re-request to same team when only 1 team is required, but we need multiple

feat: Add re-request to same team when only 1 team is required, but we need multiple #207

Workflow file for this run

name: 'Code Owners'
concurrency:
group: codeowners-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
branches: [main]
types: [opened, reopened, synchronize, ready_for_review, labeled, unlabeled]
permissions:
contents: read # required for @actions/checkout
issues: write # required to create comments
pull-requests: write # required to request reviewers
checks: write # required to export data to check run
jobs:
codeowners:
name: 'Run Codeowners Plus'
runs-on: ubuntu-latest
steps:
- name: 'Checkout Code Repository'
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: 'Update action.yml to build locally'
run: |
sed -i "s/image: .*/image: 'Dockerfile'/" action.yml
cat action.yml
- name: 'Codeowners Plus'
id: codeowners-plus
uses: ./
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
pr: '${{ github.event.pull_request.number }}'
verbose: true
quiet: ${{ github.event.pull_request.draft }}
- name: Create Check Run with JSON Output
if: always()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
JSON_PAYLOAD='{
"name": "Codeowners Plus Report",
"head_sha": "${{ github.event.pull_request.head.sha }}",
"status": "completed",
"conclusion": "success",
"output": {
"title": "Codeowners Plus Report",
"summary": "Codeowners Plus analysis JSON data including file owners and results",
"text": ${{ toJSON(steps.codeowners-plus.outputs.data) }}
}
}'
# Use the 'gh' CLI to interact with the GitHub API
echo "$JSON_PAYLOAD" | gh api --method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/repos/${{ github.repository }}/check-runs" \
--input -