Repository navigation
fix(forgejo): support new fj macos key path - #11545
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughForgejo token discovery now checks the current macOS configuration path before the legacy path. The implementation uses first-existing-file selection, adds an ordering test, and updates both documentation locations. ChangesForgejo token path handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryAdds support for the current
Confidence Score: 5/5The PR appears safe to merge with no actionable defects identified. The path-selection helper preserves the prior XDG-first and nonexistent-XDG fallback behavior, adds the current macOS location ahead of the retained legacy location, and uses compatible platform guards. Important Files Changed
Reviews (1): Last reviewed commit: "fix(forgejo): support new fj macos key p..." | Re-trigger Greptile |
Instruction counts
No instruction-count regression above 1%. Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run. Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.
|
Summary
fjmacOS key locationCyborus.forgejo-clipath as a fallbackRoot cause
forgejo-cli changed its macOS project directory from
Cyborus.forgejo-clitoforgejo-cli.forgejo-cli. mise only checked the old location, so currentfjcredentials were not discovered.This addresses discussion #11540.
Validation
cargo test forgejo::tests::test_fj_macos_keys_paths_prefers_current_pathmise run test:e2e e2e/cli/test_token_forgejomise run lint-fixAI-assisted — Tool: Codex; model: openai/gpt-5; version: unavailable.
Note
Low Risk
Narrow change to optional
fjCLI token fallback on macOS; Linux behavior unchanged and the old path remains as fallback.Overview
Forgejo
fjCLI token discovery on macOS now looks forkeys.jsonat the current forgejo-cli location (~/Library/Application Support/forgejo-cli.forgejo-cli/keys.json) before the legacyCyborus.forgejo-clipath, so mise picks up tokens from recentfjinstalls again.Path resolution is refactored to walk XDG plus macOS candidates through
tokens::first_existing_file, matching the pattern used for other forge CLIs. Docs (forgejo.md,forgejo.fj_cli_tokensinsettings.toml) describe the ordered lookup. A unit test locks in macOS path priority.Reviewed by Cursor Bugbot for commit dcf2bd7. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
Bug Fixes
Documentation
Tests