Skip to content

Ask which forge a project uses when its remotes are on both - #9

Open
HugoHeneault wants to merge 5 commits into
HugoHeneault/gitlab-6-polishfrom
HugoHeneault/gitlab-7-forge-choice
Open

HugoHeneault wants to merge 5 commits into
HugoHeneault/gitlab-6-polishfrom
HugoHeneault/gitlab-7-forge-choice

Conversation

@HugoHeneault

@HugoHeneault HugoHeneault commented Oct 9, 2026 •

Copy link
Copy Markdown

🤖 Généré par Claude Opus 5.5

Step 7, on top of step 6. Part of the stack for GitLab support, issue 4 on spatie/bloom. Each PR targets the previous step, so its diff is this step alone.

A repository with a GitHub remote and a GitLab one (gitlab.com, or a host glab is signed in to) used to resolve to GitHub silently, so a GitLab project mirrored to GitHub had to be set by hand in its settings. When such a project is added with no git.forge declared and glab installed, Bloom now asks: GitLab, GitHub, or Not now. The message says GitHub is used until a forge is chosen.

  • The answer is written as git.forge to .bloom/settings.local.toml in the project's checkout, which ForgeResolver already reads for every workspace. Local rather than the shared file, because remotes are this machine's git config: a teammate with only the GitHub remote must not inherit it.
  • Not now writes nothing: detection stays in charge (GitHub) and asks again the next time the folder is added.
  • The check runs after the project is added, not before, so a glab probe to an unreachable host does not hold the add up.
  • Nothing changes for a GitHub-only project or a machine without glab: no question, no file written.

Tests: ForgeRoutingTests (hosts beside a GitHub remote, ask then remember, written to the local file only). swift build -Xswiftc -warnings-as-errors, make lint and make swiftlint pass locally; the suite runs on CI.

@HugoHeneault HugoHeneault self-assigned this Oct 9, 2026
The answer goes to .bloom/settings.local.toml in the project's checkout, which
every workspace already reads. Local because remotes are this machine's git
config: a teammate with only the GitHub remote must not inherit it.
A self-hosted GitLab project opened with the VPN down, or before glab was
signed in, was routed to GitHub until git's config or a settings file
changed. A GitHub decided by a glab refusal now lasts as long as the
refusal does.
…space_merge

Five strings and the merge tool's answer still said spatie#12, gh pr merge and
GitHub for a merge request, where spatie#12 is an issue. GitHub's wording is
unchanged.
@HugoHeneault
HugoHeneault force-pushed the HugoHeneault/gitlab-7-forge-choice branch from 489945d to d1a5032 Compare October 13, 2026 12:35
@HugoHeneault
HugoHeneault force-pushed the HugoHeneault/gitlab-6-polish branch from 7bb7807 to 7701225 Compare October 13, 2026 12:35
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.

1 participant