Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Add the resource to your pipeline's ~resource_types~ (requires Concourse 0.74.0+
|--------------+----------+-------------------------------------------------------------|
| repo | Yes | The GitHub repository in ~user/repo~ format |
| access_token | Yes | The access token to use with the GitHub API |
| api_endpoint | No | Base API URL of a GitHub Enterprise installation |
| web_endpoint | No | Base web URL of a GitHub Enterprise Installation |
|--------------+----------+-------------------------------------------------------------|

* Behaviour
Expand Down
2 changes: 2 additions & 0 deletions lib/github-status/support/github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ module GitHub

Contract None => Octokit::Client
def github
Octokit.api_endpoint = api_endpoint if api_endpoint
Octokit.web_endpoint = web_endpoint if web_endpoint
@github ||= Octokit::Client.new access_token: access_token
end

Expand Down
10 changes: 10 additions & 0 deletions lib/github-status/support/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ def repo
def branch
@branch ||= source.fetch('branch') { 'master' }
end

Contract None => String
def api_endpoint
@api_endpoint ||= source.fetch('api_endpoint') { nil }
end

Contract None => String
def web_endpoint
@web_endpoint ||= source.fetch('web_endpoint') { nil }
end
end
end
end