From c65ca73ba8df2e78e923b442253dd4dcc25b16b6 Mon Sep 17 00:00:00 2001 From: Agent Date: Fri, 26 Jun 2026 02:10:53 +0200 Subject: [PATCH] fix(workflow): repair always-skipped 'Replace repo owner' step's if-syntax The condition was written as: if: ${{ github.event.repository.owner.login }} != marksverdhei This mixes ${{ }} pre-substitution with bare-text comparison. GHA evaluates the value as an expression after substitution, so the literal becomes ' != marksverdhei'. Both sides are unquoted identifiers that resolve to undefined context refs (null), and 'null != null' is false. Net effect: the step was *always skipped*, so every new repo created from this template kept its marksverdhei references unreplaced. Moves the comparison fully inside one expression scope: if: github.event.repository.owner.login != 'marksverdhei' The quoted literal and the property reference now share the same expression evaluator, and the step runs whenever the owner isn't marksverdhei (the intent expressed in the comment). --- .github/workflows/template-init.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/template-init.yml b/.github/workflows/template-init.yml index ae1710c..819a719 100644 --- a/.github/workflows/template-init.yml +++ b/.github/workflows/template-init.yml @@ -33,7 +33,13 @@ jobs: run: git switch -c template-init - name: Replace repo owner - if: ${{ github.event.repository.owner.login }} != marksverdhei + # The previous form `${{ ... }} != marksverdhei` pre-substituted only the + # left side, leaving GHA to evaluate ` != marksverdhei` as + # an expression — both unquoted identifiers resolved to null context + # refs, so `null != null` was always false and this step was *always + # skipped*. New repos kept marksverdhei references unreplaced. The + # comparison has to live entirely inside one expression scope. + if: github.event.repository.owner.login != 'marksverdhei' run: | repo_owner="${{ steps.names.outputs.repo_owner }}" # replace repo owner placeholder