github / github/app

[Bug] Wrong project images for repositories in GHE

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

描述

### Short summary

Incorrect project avatars displayed for repositories hosted on GitHub Enterprise (GHE).

### Affected version or release

v1.0.23

### Installation context

_No response_

### What happened?

Repositories cloned from a GitHub Enterprise (GHE) instance display an incorrect project or organisation avatar. Instead of fetching the avatar from the configured GHE server, the application appears to look up the organisation name on GitHub.com and displays the profile image of a user or organisation with the same name.
This results in repositories being shown with unrelated avatars that do not belong to the actual project or organisation in the enterprise environment.

### Steps to reproduce

1. Clone a repository hosted on a GitHub Enterprise (GHE) instance.
2. Ensure the repository belongs to an organisation with a name that also exists on GitHub.com.
3. Open the repository or project within the application.
4. Observe the displayed project/organisation avatar.
5. Notice that the avatar matches the profile image from github.com/ rather than the avatar configured in the GitHub Enterprise instance.

### Expected behavior

The application should retrieve and display the avatar associated with the repository owner (user or organisation) from the configured GitHub Enterprise server.

For example:
- Repository hosted on: https:///organisation-name/repository
- Displayed avatar: Organisation avatar from the GitHub Enterprise instance

### Actual behavior

The application retrieves or displays an avatar associated with the same owner name on GitHub.com, resulting in an incorrect project image being shown.

### Impact

- Projects are visually misidentified within the application.
- Users may believe repositories are linked to the wrong organisation or owner.
- Creates confusion in environments where organisation names overlap with accounts that exist on GitHub.com.
- Reduces trust in repository metadata displayed by the application.

### Additional context

The issue appears to be caused by avatar lookups being performed against GitHub.com instead of the configured GitHub Enterprise instance. Repository owner information may be resolved solely by name rather than by the repository's configured host, causing avatar collisions when the same organisation name exists in both environments.

贡献指南

打开贡献指南

调研方向

首先跟踪 GitHub Enterprise 上托管的仓库是如何查找仓库所有者头像的,并注意配置的主机是否会被保留。使用一个同时存在于 GitHub.com 上的 Enterprise 组织复现该问题,然后确认显示的头像来自 Enterprise 服务器,而不是 GitHub.com。

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

评估

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

把新 issue 发到你的邮箱

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