mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-13 04:03:30 +00:00
Merge pull request #3783 from deepseek-harness/turtle/weighted-approval
feat: enforce weighted pull request approvals
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
name: weighted-approval-review-event
|
||||
run-name: weighted-approval-review-event:${{ github.event.pull_request.number }}
|
||||
|
||||
on:
|
||||
pull_request_review:
|
||||
types: [submitted, edited, dismissed]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
record-review-event:
|
||||
name: record weighted approval review event
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 2
|
||||
steps:
|
||||
- name: Record review event
|
||||
run: |
|
||||
echo 'This is by automated Angry Turtle Cyborg, not a human'
|
||||
echo 'Recorded a weighted approval review event.'
|
||||
@@ -0,0 +1,37 @@
|
||||
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
|
||||
Reference in New Issue
Block a user