Files
deepseek-harness/.github/workflows/weighted-approval.yml
T

38 lines
1.3 KiB
YAML

name: weighted-approval
on:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review, converted_to_draft]
workflow_run:
workflows: [weighted-approval-review-event]
types: [completed]
permissions:
contents: read
pull-requests: read
statuses: write
concurrency:
group: weighted-approval-${{ github.event.pull_request.number || github.event.workflow_run.head_sha }}
cancel-in-progress: false
jobs:
publish-status:
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
name: publish weighted approval status
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
# SECURITY: the status-writing job executes policy from the trusted default
# branch and reads pull-request reviews only as API data.
- name: Check out trusted approval policy
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
ref: ${{ github.event.repository.default_branch }}
persist-credentials: false
- name: Publish weighted approval status
env:
GITHUB_TOKEN: ${{ github.token }}
GITHUB_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: node .github/review-ownership/check-approval.mjs