Bug Description
The GitHub API URL is hardcoded to api.github.com in GitHubApiTransportImpl.java, which prevents git.github_pr_origin and git.github_pr_destination from working with GitHub Enterprise instances.
Source: GitHubApiTransportImpl.java
private static final String API_URL = "https://api.github.com";
Problem
The github_host_name parameter only affects URL parsing and validation — it does not change the actual API endpoint used for GitHub API calls. All API requests are always sent to https://api.github.com, regardless of the configured github_host_name.
This means:
git.github_pr_origin does not support GitHub Enterprise.
git.github_pr_destination does not support GitHub Enterprise.
- The
github_host_name parameter is misleading — it validates URLs but doesn't change where API calls are routed.
Expected Behavior
When github_host_name is set to a GitHub Enterprise host (e.g., mycompany.ghe.com), the API URL should be dynamically constructed to point to the correct GitHub Enterprise API endpoint (e.g., https://mycompany.ghe.com/api/v3) instead of the hardcoded https://api.github.com.
Suggested Fix
The API_URL constant should be replaced with a dynamically resolved URL based on the github_host_name parameter. For example:
- If
github_host_name is github.com (default), use https://api.github.com.
- If
github_host_name is a GitHub Enterprise host, use https://<github_host_name>/api/v3.
This would align with GitHub's own documentation on GitHub Enterprise API endpoints.
Bug Description
The GitHub API URL is hardcoded to
api.github.cominGitHubApiTransportImpl.java, which preventsgit.github_pr_originandgit.github_pr_destinationfrom working with GitHub Enterprise instances.Source:
GitHubApiTransportImpl.javaProblem
The
github_host_nameparameter only affects URL parsing and validation — it does not change the actual API endpoint used for GitHub API calls. All API requests are always sent tohttps://api.github.com, regardless of the configuredgithub_host_name.This means:
git.github_pr_origindoes not support GitHub Enterprise.git.github_pr_destinationdoes not support GitHub Enterprise.github_host_nameparameter is misleading — it validates URLs but doesn't change where API calls are routed.Expected Behavior
When
github_host_nameis set to a GitHub Enterprise host (e.g.,mycompany.ghe.com), the API URL should be dynamically constructed to point to the correct GitHub Enterprise API endpoint (e.g.,https://mycompany.ghe.com/api/v3) instead of the hardcodedhttps://api.github.com.Suggested Fix
The
API_URLconstant should be replaced with a dynamically resolved URL based on thegithub_host_nameparameter. For example:github_host_nameisgithub.com(default), usehttps://api.github.com.github_host_nameis a GitHub Enterprise host, usehttps://<github_host_name>/api/v3.This would align with GitHub's own documentation on GitHub Enterprise API endpoints.