Obeya decides from a pull request's address whether it talks to GitHub (through gh) or to Forgejo/Gitea. Each case below compares Obeya's answer before and after this change, computed by running the real code of both versions.
An address stored by an older version could carry text that makes it look like github.com while actually pointing somewhere else.
attacker.example, together with any GitHub Enterprise token in the environment.A team on *.ghe.com may give gh only a GH_TOKEN and no stored login.
…/pulls/4 and read through the Forgejo API, which fails.acme.ghe.com. Repositories there now land through pull requests by default, too.An Enterprise PR reported before gh was logged into that server was recorded with Forgejo's /pulls/. After gh auth login, it counts as GitHub.
gh pr view https://github.example.com/team/app/pulls/7, which gh rejects.gh pr view https://github.example.com/team/app/pull/7The same PR before gh is logged into the server: the Forgejo API there answers 404.
Not Found (GET repos/team/app/pulls/7)Not Found; if github.example.com is a GitHub Enterprise server, log gh in there: gh auth login --hostname github.example.comA card's PR was stored as written, e.g. with a trailing slash or the host in capitals.
Each case has a test. Each of those tests fails on the previous version and passes now.