Skip to content

Resolve fork repository from push remote#61

Merged
adampoit merged 1 commit into
mainfrom
fix/fork-repository-resolution
Jul 19, 2026
Merged

Resolve fork repository from push remote#61
adampoit merged 1 commit into
mainfrom
fix/fork-repository-resolution

Conversation

@adampoit

Copy link
Copy Markdown
Owner

Summary

  • resolve the fork repository from the configured Git push target instead of gh's local default
  • use the resolved repository consistently for bootstrap CI lookup/watch, authentication verification, and notifications
  • add --repository and --origin-remote-name overrides plus multi-remote coverage

Testing

  • npm test
  • npm run format:check

Closes #57

@not-adam

not-adam Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Mira PR Walkthrough

This PR replaces the previous implicit dependency on gh's locally-configured default repository with explicit resolution of the fork repository from the Git push remote URL. A new github-repository.ts module centralizes repository resolution (CLI override → push remote → GITHUB_REPOSITORY environment fallback) and is adopted consistently across bootstrap, verify-auth, and notify commands. CLI overrides --repository and --origin-remote-name are added to relevant commands, along with thorough test coverage.

graph LR
    cli["src/cli.ts"]
    bootstrap["src/bootstrap.ts"]
    verify_auth["src/verify-auth.ts"]
    notify["src/notify.ts"]
    gh_repo["src/github-repository.ts"]
    cli --> bootstrap
    cli --> verify_auth
    bootstrap --> gh_repo
    verify_auth --> gh_repo
    notify --> gh_repo
Loading
Confidence: 4/5   ◉◉◉◉○   Safe with minor fixes
  • The refactoring is clean and well-tested, but the new error path in notify.ts now throws via resolveForkRepository (could break non-interactive CI if remote is misconfigured), which may warrant a broader recovery strategy.

Blast Radius — 2 dependent repositories, 3 total references

adampoit/mira — 1 reference
adampoit/wezterm — 2 references

9 files reviewed


Comment @not-adam help to get the list of available commands and usage tips.

@adampoit
adampoit merged commit 76fae47 into main Jul 19, 2026
2 checks passed
@adampoit
adampoit deleted the fix/fork-repository-resolution branch July 19, 2026 01:45
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.

Resolve the fork repository independently of gh's local default

1 participant