github / github/app

[Bug] Links open Github.com instead of Github Enterprise

未关闭
#2,027 0 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
Bugs
主要语言
没有语言数据
星标
2.1k
派生
153
PR 合并指标
30 天内没有已合并 PR

描述

### Short summary

Links to repositories hosted on GitHub Enterprise (GHE) incorrectly open on GitHub.com instead of the configured GitHub Enterprise instance.

### Affected version or release

v1.0.23

### Installation context

_No response_

### What happened?

When viewing a project that is hosted on a GitHub Enterprise (GHE) server, the application's "Open in GitHub" link generates a URL pointing to github.com rather than the configured GitHub Enterprise domain.
As a result, users are redirected to GitHub.com, where the repository does not exist, instead of being taken to the correct repository location in their enterprise environment.

### Steps to reproduce

1. Open Settings.
2. Select a project hosted on a GitHub Enterprise (GHE) instance.
3. Locate and click the Open in GitHub link.
4. Observe that the browser opens a URL on github.com instead of the configured GitHub Enterprise server.
5. The resulting page either returns a 404 error or points to an incorrect repository location.

### Expected behavior

The Open in GitHub link should use the repository's configured GitHub Enterprise base URL and open the repository on the correct GHE instance.

For example:
- Actual: https://github.com/company/project
- Expected: https:///company/project

### Actual behavior

The application always constructs links using the GitHub.com domain, even when the selected project is hosted on GitHub Enterprise.
Impact

Users are unable to navigate directly to repositories hosted on GitHub Enterprise.
Repository links result in broken pages or incorrect destinations.
Creates confusion for organisations that exclusively use GitHub Enterprise.

### Additional context

The issue appears to affect projects configured to use GitHub Enterprise and may indicate that the repository host URL is not being read from the project configuration when generating external repository links.

贡献指南

打开贡献指南

调研方向

从选择项目并生成 "Open in GitHub" 链接的 Settings 流程开始。使用托管在 GitHub Enterprise 上的项目进行复现,并跟踪 repository URL 的形成方式;当链接使用项目配置的 Enterprise 基础 URL 而不是 github.com,并打开正确的 repository 时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
github
领域
desktop
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
冷清
描述清晰度
基本清楚
新手友好度
65/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。