Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions .github/workflows/pr-review-fix-scheduler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ on:
default: ""
type: string
canonical_ref:
description: Ref of ContextualWisdomLab/.github to use for scheduler code
description: Deprecated compatibility input; the called workflow's immutable SHA is always used
required: false
default: "main"
default: ""
type: string
repository_dispatch:
types: [pr-review-fix-scheduler]
Expand Down Expand Up @@ -81,14 +81,27 @@ jobs:
MAX_PRS: ${{ github.event.client_payload.max_prs || inputs.max_prs || '50' }}
MAX_DISPATCHES: ${{ github.event.client_payload.max_dispatches || inputs.max_dispatches || '1' }}
RETRY_HOURS: ${{ github.event.client_payload.retry_hours || inputs.retry_hours || '24' }}
AUTOFIX_WORKFLOW: pr-review-autofix.yml
AUTOFIX_REPOSITORY: ContextualWisdomLab/.github
CANONICAL_REF: main
AUTOFIX_WORKFLOW: ${{ github.event.client_payload.autofix_workflow || inputs.autofix_workflow || 'pr-review-autofix.yml' }}
AUTOFIX_REPOSITORY: ${{ github.event.client_payload.autofix_repository || inputs.autofix_repository || 'ContextualWisdomLab/.github' }}
CANONICAL_REPOSITORY: ${{ job.workflow_repository }}
CANONICAL_REF: ${{ job.workflow_sha }}
steps:
- name: Require immutable canonical source
run: |
set -euo pipefail
if [ "$CANONICAL_REPOSITORY" != "ContextualWisdomLab/.github" ]; then
echo "::error::Canonical scheduler source resolved outside ContextualWisdomLab/.github."
exit 1
fi
if [[ ! "$CANONICAL_REF" =~ ^[0-9a-fA-F]{40}$ ]]; then
echo "::error::Canonical scheduler source must resolve to the immutable called-workflow commit SHA."
exit 1
fi

- name: Checkout canonical scheduler
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: ContextualWisdomLab/.github
repository: ${{ env.CANONICAL_REPOSITORY }}
ref: ${{ env.CANONICAL_REF }}
fetch-depth: 1
persist-credentials: false
Expand Down
Loading