* ci: run the merge checks on release branches too All three `Policy` workflows filtered on `master`, so a pull request into `release/dsh-*` got no `Master Change` and no `Pre-Merge Check`, and its review check only refreshed when somebody submitted a review. The checks already take their base branch from the event, so the filters now name the release branches as well. * ci: limit the release branch filter to x.y.z `release/dsh-*` also matched prerelease branches such as `release/dsh-0.1.2-alpha.4`; the filter now spells the version digits, so only `release/dsh-x.y.z` counts. * test(snapshot): carry the subagent identity section into the ptc-script-imports scenario The runtime context gained a `subagent:identity` section and every session fixture but this one was regenerated, so replay failed with a mismatch on the added section. (cherry picked from commit c7a4119965cb26c69fd8fccbfd703c7d73351742) --------- Co-authored-by: imccyu <[email protected]>
63 lines
2.3 KiB
YAML
63 lines
2.3 KiB
YAML
name: Policy
|
|
on:
|
|
pull_request_target:
|
|
branches: [master, 'release/dsh-[0-9]+.[0-9]+.[0-9]+']
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
pull_request_review:
|
|
types: [submitted, dismissed]
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
concurrency:
|
|
group: pr-check-after-approve-${{ github.event.pull_request.number }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
approve:
|
|
name: Approve Check
|
|
# Skipped while MERGE_POLICY_HEAD_DIFF is empty or `off`; otherwise the job fails by that mode and publishes
|
|
# `Policy / Reviewer Check` whatever that mode says.
|
|
if: ${{ vars.MERGE_POLICY_HEAD_DIFF != '' && vars.MERGE_POLICY_HEAD_DIFF != 'off' }}
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
# The check posts the review verdict as a check run of its own.
|
|
checks: write
|
|
steps:
|
|
# The head checkout is only the Git repository the check fetches into; it needs no files and runs no code.
|
|
- uses: actions/[email protected]
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
fetch-depth: 1
|
|
filter: blob:none
|
|
sparse-checkout: README.md
|
|
sparse-checkout-cone-mode: false
|
|
|
|
- uses: actions/[email protected]
|
|
with:
|
|
node-version: '24'
|
|
package-manager-cache: false
|
|
|
|
# The check app's token makes the review check run its own row instead of joining this workflow's suite.
|
|
- id: token
|
|
continue-on-error: true
|
|
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1
|
|
with:
|
|
client-id: ${{ vars.DSH_APPROVAL_APP_CLIENT_ID }}
|
|
private-key: ${{ secrets.DSH_APPROVAL_APP_PRIVATE_KEY }}
|
|
owner: deepseek-harness
|
|
repositories: deepseek-harness
|
|
permission-checks: write
|
|
|
|
- uses: deepseek-harness/deepseek-harness-check@master
|
|
env:
|
|
CHECK_MODE: ${{ vars.MERGE_POLICY_HEAD_DIFF }}
|
|
CHECK_TOKEN: ${{ steps.token.outputs.token }}
|
|
with:
|
|
check: review
|
|
base-branch: ${{ github.event.pull_request.base.ref }}
|
|
head-sha: ${{ github.event.pull_request.head.sha }}
|
|
pr-number: ${{ github.event.pull_request.number }}
|
|
pr-author: ${{ github.event.pull_request.user.login }}
|