ci: pair this PR head with the fork's renderer PR branch

CI on PR #157 was failing every typecheck with 35 TS2305 errors of the
form 'Module @nitrots/nitro-renderer has no exported member
Housekeeping*' because the workflow's PR fallback mapped to
duckietm/Nitro_Render_V3 @ Dev — and upstream Dev doesn't carry the HK
composers yet. They live on the fork's feat/housekeeping-packets
branch (renderer companion PR #77).

Detect the PR head ref and, when it's feat/housekeeping-panel,
override the default base-ref pairing and point at
simoleo89/Nitro_Render_V3 @ feat/housekeeping-packets so the typecheck
step can resolve the imports. Once the renderer PR lands on
duckietm:Dev this whole special-case block becomes dead code and can
be deleted.
This commit is contained in:
simoleo89
2026-05-24 17:19:09 +02:00
parent b8675b9dc3
commit 0ee53c24e3
+31 -9
View File
@@ -40,18 +40,27 @@ jobs:
path: Nitro-V3 path: Nitro-V3
# Pick the renderer ref dynamically based on the client context. # Pick the renderer ref dynamically based on the client context.
# Renderer repo is always upstream `duckietm/Nitro_Render_V3` — # The two repos must stay wire-aligned (composer/parser
# the two repos must stay wire-aligned (composer/parser
# signatures); pairing `main` with a stale branch is what # signatures); pairing `main` with a stale branch is what
# produced the "Expected 14-15 arguments, but got 16" failure on # produced the "Expected 14-15 arguments, but got 16" failure on
# the catalog edit composer. # the catalog edit composer.
# #
# This branch (`feat/housekeeping-panel`) references HK composers
# /events that live on the renderer PR branch
# (simoleo89/Nitro_Render_V3 @ feat/housekeeping-packets) — they
# haven't been merged upstream yet. Pair against the fork branch
# for this PR so the typecheck step can resolve the imports;
# once the renderer PR lands on duckietm:Dev this whole
# special-case block can be dropped.
#
# Mapping: # Mapping:
# client `main` → duckietm/Nitro_Render_V3 @ main # client `main` → duckietm/Nitro_Render_V3 @ main
# client `feat/**`duckietm/Nitro_Render_V3 @ Dev # client `feat/housekeeping-panel` simoleo89/Nitro_Render_V3 @ feat/housekeeping-packets
# PR base `main` → duckietm/Nitro_Render_V3 @ main # client `feat/**` (other) → duckietm/Nitro_Render_V3 @ Dev
# PR base `Dev` (upstream) → duckietm/Nitro_Render_V3 @ Dev # PR base `main` → duckietm/Nitro_Render_V3 @ main
# PR base `feat/**`duckietm/Nitro_Render_V3 @ Dev # PR head `feat/housekeeping-panel` simoleo89/Nitro_Render_V3 @ feat/housekeeping-packets
# PR base `Dev` (upstream) → duckietm/Nitro_Render_V3 @ Dev
# PR base `feat/**` → duckietm/Nitro_Render_V3 @ Dev
# #
# Override via workflow_dispatch inputs when you need an ad-hoc # Override via workflow_dispatch inputs when you need an ad-hoc
# pairing. # pairing.
@@ -62,21 +71,34 @@ jobs:
REF="${{ github.event.inputs.renderer_ref }}" REF="${{ github.event.inputs.renderer_ref }}"
if [ -z "$REPO" ] || [ -z "$REF" ]; then if [ -z "$REPO" ] || [ -z "$REF" ]; then
# For PRs we usually pair against the base ref, but the HK
# PR specifically needs to pair against its OWN head ref —
# the renderer companion PR is named identically
# (`feat/housekeeping-packets`) and lives on the same fork.
case "${GITHUB_EVENT_NAME}" in case "${GITHUB_EVENT_NAME}" in
pull_request) pull_request)
CTX="${GITHUB_BASE_REF}" if [ "${GITHUB_HEAD_REF}" = "feat/housekeeping-panel" ]; then
CTX="${GITHUB_HEAD_REF}"
else
CTX="${GITHUB_BASE_REF}"
fi
;; ;;
*) *)
CTX="${GITHUB_REF_NAME}" CTX="${GITHUB_REF_NAME}"
;; ;;
esac esac
AUTO_REPO="duckietm/Nitro_Render_V3"
case "$CTX" in case "$CTX" in
main) main)
AUTO_REPO="duckietm/Nitro_Render_V3"
AUTO_REF="main" AUTO_REF="main"
;; ;;
feat/housekeeping-panel)
AUTO_REPO="simoleo89/Nitro_Render_V3"
AUTO_REF="feat/housekeeping-packets"
;;
*) *)
AUTO_REPO="duckietm/Nitro_Render_V3"
AUTO_REF="Dev" AUTO_REF="Dev"
;; ;;
esac esac