`origin/HEAD` Not Present
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 8.9k
- Forks
- 2.8k
- PR merge metrics
- No merged PRs in 30d
Description
origin/HEAD is a useful ref since it refers to the default branch, which varies between repos. origin/HEAD is normally present locally, so Git scripts, hooks, etc. that work locally sometimes rely on the presence of origin/HEAD and then break in GitHub Actions. I'm not aware of an input that allows one to ensure that this useful ref is present in a checkout. As a workaround, we run git remote set-head origin --auto manually, but it would be nice to have within the action since diagnosing the issue requires considerable familiarity with Git. In particular, I find the absence of origin/HEAD when passing fetch-depth: 0 counterintuitive.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the checkout action's handling of fetch-depth and remote refs, then reproduce the behavior in GitHub Actions with fetch-depth: 0. Done means the action reliably provides origin/HEAD for scripts and hooks without requiring a manual git remote set-head origin --auto.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, typescript
- Domain
- ci-cd, devops
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100