Skip to content

Not working with <company>.ghe.com #457

Closed
@gustavkj

Description

@gustavkj

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:

  1. I updated the settings.json:
    {
      "github-actions.use-enterprise": true,
      "github-enterprise.uri": "https://<company>.ghe.com"
    }
  2. Signed into the Github Enterprise instance using the extension
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done 💤

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions