fix(ci): use merge parents HEAD^1..HEAD^2 to detect Go file changes #359
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/steeper!359
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/358-ci-go-changes"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Fix the CI
go-changesstep that was skipping Go tooling even when.gofiles were modified.Root cause:
git diff origin/main...HEADon a merge commit finds no diff because the merge already includes base changes. Fix: usegit diff HEAD^1..HEAD^2which compares the base branch parent against the PR branch parent of the merge commit.Testing
go testpasses.gofile change → Go steps run (verify in CI after merge)Closes #358
Review
Result: Approved — no blocking issues. Closes #358.
Summary: Fixes CI
go-changesdiff detection. Replacedgit diff origin/main...HEAD(broken on merge commits — no diff shown) withgit diff HEAD^1..HEAD^2(compares merge parents directly). Removes now-unnecessarygit fetchstep.Note:
HEAD^1..HEAD^2assumes a merge commit context (Forgejo PR merge events). For non-merge push events, the parents may not align. A more robust alternative would begit diff ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }}using the event payload SHAs directly. Not blocking — current fix addresses the immediate issue.Checklist: