Skip to content

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

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

HugoHeneault wants to merge 3 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.

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.
@HugoHeneault HugoHeneault self-assigned this Oct 9, 2026
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