Currently selectForgeType() in src/forge/index.ts only matches github.com:
function selectForgeType(remoteUrl: string): GetForgeState | undefined { if (remoteUrl.includes('github.com')) {
return getGithubForgeState; } return;
}
This means Forge (PRs/issues) silently does nothing for repos hosted on GitHub Enterprise Server / GHE.com domains (e.g. mycompany.ghe.com ), even with Forge-enabled on.
Request: Add a setting, e.g. magit.forgeCustomHosts , accepting a comma-separated list of additional GitHub hostnames. selectForgeType should also match these. getGithubForgeState would need to:
• derive owner/repo using the matched host instead of a hardcoded github.com string
• hit https://<host>/api/graphql instead of https://api.github.com/graphql for non-github.com hosts
• use GH CLI auth ( gh auth token ) for these hosts since vscode.authentication 's built-in GitHub provider won't cover custom hosts
Happy to submit a PR for this if that approach sounds reasonable, let me know if you'd want it structured differently.
Currently
selectForgeType()insrc/forge/index.tsonly matchesgithub.com:This means Forge (PRs/issues) silently does nothing for repos hosted on GitHub Enterprise Server / GHE.com domains (e.g. mycompany.ghe.com ), even with Forge-enabled on.
Request: Add a setting, e.g. magit.forgeCustomHosts , accepting a comma-separated list of additional GitHub hostnames. selectForgeType should also match these. getGithubForgeState would need to:
• derive owner/repo using the matched host instead of a hardcoded github.com string
• hit
https://<host>/api/graphqlinstead ofhttps://api.github.com/graphqlfor non-github.com hosts• use GH CLI auth ( gh auth token ) for these hosts since vscode.authentication 's built-in GitHub provider won't cover custom hosts
Happy to submit a PR for this if that approach sounds reasonable, let me know if you'd want it structured differently.