Repository navigation
fix(infra): read the default branch at origin, not the working tree - #5181
Merged
Merged
Conversation
devops infra onboard read the working tree of the local checkout. A checkout on an old branch gave rows for that branch: on dan-petty/homelab, row 9 reported host key checks off, while origin/main has them on. A shared reader, infra/repo_tree.py, fetches origin with the credential of the GitHub session, takes the commit of refs/remotes/origin/HEAD, exports it with git archive into a private folder and removes the folder after. Onboarding reads every file and runs each Ansible read in the export. It prints the default branch and the commit that it read, and one more line when the checkout is at another commit. status, plan and apply use the same reader. Closes #5162
Owner
Author
Fail-to-pass
Live run on dan-petty/homelab (2026-11-12)The checkout was on
|
dan-petty
marked this pull request as ready for review
November 12, 2026 18:10
dan-petty
pushed a commit
that referenced
this pull request
Nov 12, 2026
🤖 I have created a release *beep* *boop* --- ## [0.122.0](v0.121.1...v0.122.0) (2026-11-12) ### Features * **docs:** move the docs site to Zensical with a full nav and version ([#5183](#5183)) ([64b7199](64b7199)) * **infra:** show the hosts of an infra repo with node state ([#5188](#5188)) ([ed1d2e2](ed1d2e2)) * **roadmap:** eval grades prints the grade of each workflow ([#5189](#5189)) ([aeb33d6](aeb33d6)) ### Bug Fixes * **infra:** read the default branch at origin, not the working tree ([#5181](#5181)) ([6ef4336](6ef4336)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
devops infra onboardread the working tree of the local checkout. On dan-petty/homelab, a checkout on an old branch made row 9 report host key checks off, whileorigin/mainhas them on (homelab #24). The profile of a repo is read at its default branch, the trusted ref (#4627).A shared reader,
infra/repo_tree.py, fetchesoriginwith the credential of the GitHub session and no prompt, takes the commit ofrefs/remotes/origin/HEAD, exports it withgit archiveinto a private folder, unpacks it with thedatafilter oftarfile, and removes the folder after. It changes no file and no branch of the checkout. Onboarding runs every read in the export, prints the default branch and its commit, and adds one line when the checkout is at another commit.status,planandapplyuse the same reader.Closes #5162
Change:
openspec/changes/archive/2026-11-12-5162-read-the-default-branch-at-origin/