Describe the bug
I tried to configure the extension to work with my company's new Github instance, which is running on a subdomain of ghe.com.
I wonder if line 79 is correct here, I would expect the value from github-enterprise.uri to start with https:// and as such api. is prepended to the protocol 🤔 :
|
export function getGitHubApiUri(): string { |
|
if (!useEnterprise()) return DEFAULT_GITHUB_API; |
|
const base = getConfiguration().get<string>("github-enterprise.uri", DEFAULT_GITHUB_API).replace(/\/$/, ""); |
|
if (base === DEFAULT_GITHUB_API) { |
|
return base; |
|
} |
|
|
|
if (base.endsWith(".ghe.com")) { |
|
return `api.${base}`; |
|
} else { |
|
return `${base}/api/v3`; |
|
} |
|
} |
To Reproduce
Steps to reproduce the behavior:
- I updated the
settings.json:
{
"github-actions.use-enterprise": true,
"github-enterprise.uri": "https://<company>.ghe.com"
}
- Signed into the Github Enterprise instance using the extension
- All action references appear broken in the editor. In the output, I see:
Cannot fetch github context
Error: Cannot fetch github context
at Et (/home/<username>/.vscode-server/extensions/github.vscode-github-actions-0.27.1/dist/extension-node.js:2:1449407)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at /home/<username>/.vscode-server/extensions/github.vscode-github-actions-0.27.1/dist/extension-node.js:2:1630467
at kw.h (file:///home/<username>/.vscode-server/bin/ddc367ed5c8936efe395cffeec279b04ffd7db78/out/vs/workbench/api/node/extensionHostProcess.js:112:41551)
at /home/<username>/.vscode-server/extensions/github.vscode-github-actions-0.27.1/dist/extension-node.js:2:1629251
Expected behavior
That it would work with the Github Enterprise instance.
Screenshots
If applicable, add screenshots to help explain your problem.
Extension Version
v0.27.1
Additional context
Add any other context about the problem here.
Describe the bug
I tried to configure the extension to work with my company's new Github instance, which is running on a subdomain of
ghe.com.I wonder if line 79 is correct here, I would expect the value from
github-enterprise.urito start withhttps://and as suchapi.is prepended to the protocol 🤔 :vscode-github-actions/src/configuration/configuration.ts
Lines 71 to 83 in 0842e0d
To Reproduce
Steps to reproduce the behavior:
settings.json:{ "github-actions.use-enterprise": true, "github-enterprise.uri": "https://<company>.ghe.com" }Expected behavior
That it would work with the Github Enterprise instance.
Screenshots
If applicable, add screenshots to help explain your problem.
Extension Version
v0.27.1Additional context
Add any other context about the problem here.