Skip to content

fix: restore PR head branch detection lost in #172 merge#173

Merged
scottschreckengaust merged 1 commit intomainfrom
fix/restore-pr-branch-detection
Apr 2, 2026
Merged

fix: restore PR head branch detection lost in #172 merge#173
scottschreckengaust merged 1 commit intomainfrom
fix/restore-pr-branch-detection

Conversation

@Kalindi-Dev
Copy link
Copy Markdown
Contributor

Summary

Re-apply the GH_HEAD_REF fix from #168 which was accidentally overwritten when #172 was merged. Without this, every PR-triggered CodeBuild run fails at Stage 1 because CURRENT_BRANCH resolves to 155/merge instead of the actual PR source branch.

Changes

  • Re-add GH_HEAD_REF: ${{ github.head_ref }} to the buildspec env variables
  • Restore the fallback chain: ${GH_HEAD_REF:-${GH_REF_NAME:-}}

Checklist

  • I have reviewed the contributing guidelines
  • I have performed a self-review of this change
  • Changes have been tested
  • Changes are documented

Test Plan

  • Trigger a CodeBuild run from a PR and verify CURRENT_BRANCH resolves to the PR head branch

Acknowledgment

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

Re-apply the GH_HEAD_REF fix from #168 which was overwritten when
#172 was merged. Without this, PR-triggered CodeBuild runs fail
because CURRENT_BRANCH resolves to '155/merge' instead of the
actual PR source branch.
Copy link
Copy Markdown
Member

@scottschreckengaust scottschreckengaust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

@harmjeff harmjeff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@scottschreckengaust scottschreckengaust added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit 7bea27b Apr 2, 2026
9 checks passed
@scottschreckengaust scottschreckengaust deleted the fix/restore-pr-branch-detection branch April 2, 2026 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants