github / github/app

[Bug] Wrong project images for repositories in GHE

Open
#2,028 0 comments 1 reaction 0 assignees View on GitHub
Bugs
Dominant language
No language data
Stars
2.1k
Forks
153
PR merge metrics
No merged PRs in 30d

Description

### 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.

Contributor guide

Open the contributing guide

Research direction

Start by tracing how repository-owner avatars are looked up for repositories hosted on GitHub Enterprise, paying attention to whether the configured host is retained. Reproduce the issue with an enterprise organisation that also exists on GitHub.com, then verify that the displayed avatar comes from the enterprise server rather than GitHub.com.

Written by the indexing model from the issue text.

Assessment

Tech stack
github
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.