Skip to content
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ jobs:
- name: 'Checkout'
uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2
with:
ref: '${{ github.event.inputs.branch_ref || github.ref }}'
# Fetch refs/pull/N/head by ref name (not the merge ref or a raw SHA) so
# base-branch churn and replica lag can't fail this required checkout.
ref: "${{ github.event.pull_request.number && format('refs/pull/{0}/head', github.event.pull_request.number) || github.event.inputs.branch_ref || github.ref }}"
fetch-depth: 0

# Self-hosted reuses the machine's Node (nodejs.org unreachable via proxy); linters are pre-installed on PATH so scripts/lint.js skips downloading them.
Expand Down Expand Up @@ -214,6 +216,9 @@ jobs:
- name: 'Checkout'
if: "${{ needs.classify_pr.outputs.skip_ci != 'true' }}"
uses: 'actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd' # v6.0.2
with:
# See the Lint job's checkout: fetch refs/pull/N/head by ref name.
ref: "${{ github.event.pull_request.number && format('refs/pull/{0}/head', github.event.pull_request.number) || github.event.inputs.branch_ref || github.ref }}"

# Self-hosted can't reach nodejs.org reliably; reuse the machine's Node.
- name: 'Set up Node.js ${{ matrix.node-version }} (hosted)'
Expand Down Expand Up @@ -288,9 +293,10 @@ jobs:
needs:
- 'classify_pr'
- 'test'
# !cancelled() not always(): don't let a cancelled run hold the concurrency slot here.
if: |-
${{
always() &&
!cancelled() &&
needs.classify_pr.outputs.skip_ci != 'true' &&
github.event_name == 'pull_request' &&
github.event.pull_request.head.repo.full_name == github.repository
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/qwen-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ jobs:
startsWith(github.event.comment.body, '@qwen-code /triage'))) &&
needs.authorize.outputs.should_run == 'true')
}}
runs-on: 'ubuntu-latest'
# `/triage` comments queue behind CI on hosted runners at peak; route them to
# ECS instead. Safe: read-only, base-ref checkout (never PR-head). Same
# kill-switch as `authorize`, so a disabled pool falls back to hosted.
runs-on: "${{ (vars.MAINTAINER_ECS_RUNNER_DISABLED != 'true' && github.event_name == 'issue_comment') && fromJSON('[\"self-hosted\", \"linux\", \"x64\", \"ecs-qwen\"]') || fromJSON('[\"ubuntu-latest\"]') }}"
Comment thread
yiliang114 marked this conversation as resolved.
Resolved
# startsWith (not contains) prevents false triggers from comments that
# mention the phrase in quoted text or mid-sentence descriptions.
# always() so the job still evaluates when the upstream `authorize` job is
Expand Down
Loading