Skip to content

Detect branch name in detached HEAD state during deployment#1946

Merged
shangyian merged 1 commit intoDataJunction:mainfrom
shangyian:branch-detection-deployment
Apr 1, 2026
Merged

Detect branch name in detached HEAD state during deployment#1946
shangyian merged 1 commit intoDataJunction:mainfrom
shangyian:branch-detection-deployment

Conversation

@shangyian
Copy link
Copy Markdown
Collaborator

@shangyian shangyian commented Apr 1, 2026

Summary

When deploying from CI, git rev-parse --abbrev-ref HEAD returns "HEAD" rather than a branch name. The client now falls back to git branch -r --points-at HEAD to recover the branch from remote tracking refs, so that the namespace auto-detection works correctly in pipelines that check out a detached HEAD.

Test Plan

  • PR has an associated issue: #
  • make check passes
  • make test shows 100% unit test coverage

Deployment Plan

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 1, 2026

Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit 71f961d
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/69cd7c9f99fc760007f628d7

@shangyian shangyian force-pushed the branch-detection-deployment branch from a1f33a9 to 75b9f60 Compare April 1, 2026 20:13
@shangyian shangyian force-pushed the branch-detection-deployment branch from 75b9f60 to 71f961d Compare April 1, 2026 20:14
@shangyian shangyian changed the title Detect branch info during deployment Detect branch name in detached HEAD state during deployment Apr 1, 2026
@shangyian shangyian marked this pull request as ready for review April 1, 2026 20:15
@shangyian shangyian merged commit cf60a2c into DataJunction:main Apr 1, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant