Skip to content

Commit ce6d571

Browse files
authored
Merge pull request #183 from Fryguy/allow_other_github_endpoints
Allow for other GitHub endpoints, such as GitHub Enterprise
2 parents 7fba690 + 4a97d0f commit ce6d571

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lib/manageiq/release.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,14 @@ def self.github
138138
@github ||= begin
139139
raise "Missing GitHub API Token" if github_api_token.nil?
140140

141-
require 'octokit'
142-
Octokit::Client.new(
141+
params = {
143142
:access_token => github_api_token,
144143
:auto_paginate => true
145-
)
144+
}
145+
params[:api_endpoint] = ENV["GITHUB_API_ENDPOINT"] if ENV["GITHUB_API_ENDPOINT"]
146+
147+
require 'octokit'
148+
Octokit::Client.new(params)
146149
end
147150
end
148151

0 commit comments

Comments
 (0)