mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-11 08:06:25 -04:00
The branches-panel PR icons only worked for github.com remotes. There was no
fundamental reason — the auth library we already vendor (cli/go-gh) supports
enterprise tokens out of the box (GH_ENTERPRISE_TOKEN, gh auth's keyring),
and the user-facing 'services' config has long been the documented way to
tell lazygit "this domain is a github service" for the View-PR-URL feature.
The fetcher just hardcoded github.com in three places:
- a substring check on the remote URL to decide we're "in a github repo",
- the GraphQL endpoint (always api.github.com/graphql), and
- the auth lookup (always against the default host).
Plumb the resolved web domain through instead. Detection now goes through
the hosting_service ("is this remote's provider 'github'?"), which means a
user with services: { 'git.acme.com': 'github:git.acme.com' } configured
gets PR icons on their GHE remotes too.
Replacing the substring check with a provider check also tightens a latent
bug in getGithubRemotes: it previously accepted any remote whose URL parsed
with the default regex, including gitlab and bitbucket — masked today only
by the InGithubRepo gate, but exposed once the gate goes away.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| helpers | ||
| attach.go | ||
| base_controller.go | ||
| basic_commits_controller.go | ||
| bisect_controller.go | ||
| branches_controller.go | ||
| command_log_controller.go | ||
| commit_description_controller.go | ||
| commit_message_controller.go | ||
| commits_files_controller.go | ||
| common.go | ||
| confirmation_controller.go | ||
| context_lines_controller.go | ||
| custom_patch_options_menu_action.go | ||
| diffing_menu_action.go | ||
| files_controller.go | ||
| filter_controller.go | ||
| filtering_menu_action.go | ||
| git_flow_controller.go | ||
| global_controller.go | ||
| jump_to_side_window_controller.go | ||
| list_controller.go | ||
| list_controller_trait.go | ||
| local_commits_controller.go | ||
| local_commits_controller_test.go | ||
| main_view_controller.go | ||
| menu_controller.go | ||
| merge_conflicts_controller.go | ||
| options_menu_action.go | ||
| patch_building_controller.go | ||
| patch_explorer_controller.go | ||
| patch_explorer_controller_test.go | ||
| prompt_controller.go | ||
| quit_actions.go | ||
| reflog_commits_controller.go | ||
| remote_branches_controller.go | ||
| remotes_controller.go | ||
| remotes_controller_test.go | ||
| rename_similarity_threshold_controller.go | ||
| screen_mode_actions.go | ||
| scroll_off_margin.go | ||
| scroll_off_margin_test.go | ||
| search_controller.go | ||
| search_prompt_controller.go | ||
| shell_command_action.go | ||
| side_window_controller.go | ||
| snake_controller.go | ||
| staging_controller.go | ||
| stash_controller.go | ||
| status_controller.go | ||
| sub_commits_controller.go | ||
| submodules_controller.go | ||
| suggestions_controller.go | ||
| switch_to_diff_files_controller.go | ||
| switch_to_focused_main_view_controller.go | ||
| switch_to_sub_commits_controller.go | ||
| sync_controller.go | ||
| tags_controller.go | ||
| toggle_whitespace_action.go | ||
| undo_controller.go | ||
| vertical_scroll_controller.go | ||
| view_selection_controller.go | ||
| workspace_reset_controller.go | ||
| worktree_options_controller.go | ||
| worktrees_controller.go | ||