feat(bootstrap): GitLab-aware forge tools/auth - #1
Closed
CodeFunta wants to merge 1 commit into
Closed
Conversation
Derive forge tools and auth checks from registered project remotes so GitLab-only homes do not require GitHub tooling. Keep unknown hosts fail-closed and scope self-managed GitLab through FM_GITLAB_HOSTS. Refs: kunchenguid#695
Owner
Author
|
Superseded by the correctly-targeted upstream PR: kunchenguid#1560 |
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.
Summary
Add a thin Firstmate-local forge provider boundary so GitLab-only homes no longer fail bootstrap on unconditional
gh/gh-axi/gh auth statuschecks.This is a narrow Phase 0–2 slice of GitLab support (bootstrap tool + auth requirements), not full merge/teardown/review parity.
Related: kunchenguid#695
Motivation
On a registry that only contains GitLab projects,
fm-bootstrap.shcurrently always requires GitHub tooling andgh auth status. That blocks legitimate GitLab-only setups even whenglabis installed and authenticated.no-mistakesalready owns MR create/update/CI for GitLab viaglab. Firstmate only needs to stop assuming GitHub at bootstrap.Changes
New
bin/fm-forge-lib.shfm_forge_detect_provider— classify checkout remotes asgithub|gitlab|local|unknown(unknown hosts fail closed)fm_forge_resolve_host— resolve SSH aliases / URLs to a hostnamefm_forge_require_cli/fm_forge_check_auth— provider-scoped CLI + auth checksfm_forge_scan_registered_projects— union of providers/hosts under$PROJECTSFM_GITLAB_HOSTS(comma-separated; defaults togitlab.com)bin/fm-bootstrap.shfm-forge-lib.shCOMMON_TOOLSforge CLIs from detected providers:gh+gh-axiglabgh auth statuswith per(provider, host)auth checksNon-goals (intentionally out of scope)
no-mistakesorgh-axipr=fieldsThose remain with existing paths (
no-mistakes+ rawglabwhere already used for watch/poll).Test plan
main; apply patch cleanly$PROJECTSregistry:MISSING: gh/MISSING: gh-axiNEEDS_GH_AUTHwhen only GitLab is presentglabmissing → reports glab requirementglabpresent but unauthenticated for host →NEEDS_GLAB_AUTHgh/gh-axi/ gh authunknown/local projects do not force a forge CLIfm-forge-lib.sh+fm-bootstrap.shNotes for reviewers
mainat the time the kit was exported; ifCOMMON_TOOLS/gh auth statuslines moved, re-apply using the anchor notes in the kit README.FM_GITLAB_HOSTS; unknown hosts fail closed asunknown.