docs(forgejo_ci): use --branch in checkout snippet, not SHA-based fallback #146

Closed
mik-tf wants to merge 1 commit from development_mik into development
Owner

Follow-up to #145. The original snippet used ${{ github.event.pull_request.head.sha }} as a fallback after a default git clone, but that field appears to be empty under Forgejo's runner — so CI silently landed on the default branch.

Witnessed first-hand on hero_editor PR #4: the Cargo.lock migration was committed on dev_mik but CI kept seeing the old hash because checkout cloned development's HEAD instead.

Switch to --branch $GITHUB_HEAD_REF / $GITHUB_REF_NAME (same pattern hero_voice uses successfully).

Signed-off-by: mik-tf

Follow-up to #145. The original snippet used `${{ github.event.pull_request.head.sha }}` as a fallback after a default `git clone`, but that field appears to be empty under Forgejo's runner — so CI silently landed on the default branch. Witnessed first-hand on hero_editor PR #4: the Cargo.lock migration was committed on dev_mik but CI kept seeing the old hash because checkout cloned `development`'s HEAD instead. Switch to `--branch $GITHUB_HEAD_REF / $GITHUB_REF_NAME` (same pattern hero_voice uses successfully). Signed-off-by: mik-tf
docs(forgejo_ci): use --branch in checkout snippet, not SHA-based fallback
Some checks failed
Build and Publish Skills / build-and-publish (pull_request) Failing after 1s
d3dbca7cb1
The previous snippet ${{ github.event.pull_request.head.sha }}
appears to evaluate to empty under Forgejo's runner, so the SHA
fallback never fires and `git clone` lands on the default branch.
This silently makes CI test the wrong code (the original
development_mik commit was never seen).

Switch to the $GITHUB_HEAD_REF / $GITHUB_REF_NAME pattern that
hero_voice already uses successfully — same shape, but `--branch`
on `git clone` deterministically lands on the right commit.

Caught while debugging hero_editor PR #4: the Cargo.lock fix was
on dev_mik but CI kept seeing the old hash because checkout was
landing on `development`'s HEAD.

Signed-off-by: mik-tf
mik-tf closed this pull request 2026-04-28 03:41:06 +00:00
Some checks failed
Build and Publish Skills / build-and-publish (pull_request) Failing after 1s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_skills!146
No description provided.