Route gh host qualification through runner options instead of argv sniff
Move GHES/GH_HOST resolution from parsing --hostname/--repo out of gh argv to an explicit options.host passed through ghExecFileAsync, since SSH-backed repos spawn gh with no cwd and argv sniffing couldn't reliably detect the target host. The runner now injects --hostname and qualifies --repo/-R at spawn time from options.host, and rate-limit scoping/guards use the same explicit host instead of inferring it. Also adds a shared githubRepoIdentityKey helper to keep cache/store keys consistent with the new host-aware repository identity.
This commit is contained in:
@@ -160,15 +160,13 @@ describe('issue source operations', () => {
|
||||
expect(ghExecFileAsyncMock).toHaveBeenCalledWith(
|
||||
[
|
||||
'api',
|
||||
'--hostname',
|
||||
'github.acme-corp.com',
|
||||
'-X',
|
||||
'POST',
|
||||
'repos/team/orca/issues/7/comments',
|
||||
'--raw-field',
|
||||
'body=Enterprise comment'
|
||||
],
|
||||
{}
|
||||
expect.objectContaining({ host: 'github.acme-corp.com' })
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user