auto-discover org containers in code() launcher (redo of #13) #16

Merged
bryan merged 1 commit from code-fn-auto-discover-org-containers-retry into main 2026-04-23 15:57:48 +00:00
Owner

Summary

Re-do of #13. Forgejo's merge API returned HTTP 200 with merged=true for #13 but main wasn't actually advanced — parallel squash-merge race with #15 meant only #15 landed on main. Same content, cherry-picked fresh onto current main.

Details

Replaces the hardcoded HHS/ / department-of-veterans-affairs/ fallback in the code() zsh launcher with a scan of ~/code/*/ for any directory matching the argument. Skips containers that are themselves git repos so a top-level project with a same-named subdir isn't mistaken for a container. Warns on ambiguity and suggests the explicit container/project form.

Test plan

  • Cherry-pick applied cleanly onto current main (no conflicts).
  • Previously reviewed/approved by repo owner in #13.

Follow-up

The stale remote branch code-fn-auto-discover-org-containers (from #13) is still on origin. Safe to delete after this merges.

## Summary Re-do of #13. Forgejo's merge API returned `HTTP 200` with `merged=true` for #13 but main wasn't actually advanced — parallel squash-merge race with #15 meant only #15 landed on main. Same content, cherry-picked fresh onto current main. ## Details Replaces the hardcoded `HHS/` / `department-of-veterans-affairs/` fallback in the `code()` zsh launcher with a scan of `~/code/*/` for any directory matching the argument. Skips containers that are themselves git repos so a top-level project with a same-named subdir isn't mistaken for a container. Warns on ambiguity and suggests the explicit `container/project` form. ## Test plan - [x] Cherry-pick applied cleanly onto current main (no conflicts). - [x] Previously reviewed/approved by repo owner in #13. ## Follow-up The stale remote branch `code-fn-auto-discover-org-containers` (from #13) is still on origin. Safe to delete after this merges.
The code function hardcoded HHS/ and department-of-veterans-affairs/ as the
only container dirs to search under ~/code. department-of-veterans-affairs/
is gone, and new containers (common-grants/, games/) weren't reachable.

Replace the hardcoded fallback with a scan of ~/code/*/ for any directory
matching the argument. Skip containers that are themselves git repos so a
top-level project with a same-named subdir isn't mistaken for a container.
Warn on ambiguity and suggest the explicit container/project form (which
already resolves via the direct ~/code/$1 path).
bryan merged commit c3c78cb9d2 into main 2026-04-23 15:57:48 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bryan/dotfiles!16
No description provided.