Skip to content

Commit

Permalink
Fix GHE option
Browse files Browse the repository at this point in the history
  • Loading branch information
ssaunier committed Oct 21, 2022
1 parent 6a601c2 commit b666e44
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
ref: ${{ github.ref }}
check-name: 'Run tests'
repo-token: ${{ secrets.GITHUB_TOKEN }}
api-endpoint: https://{YOU_GHE_URL}/api/v3/
api-endpoint: YOUR_GHE_API_BASE_URL # Fed to https://octokit.github.io/octokit.rb/Octokit/Configurable.html#api_endpoint-instance_method
...
```
## Alternatives
Expand Down
5 changes: 3 additions & 2 deletions entrypoint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
verbose = ENV["VERBOSE"]
wait = ENV["WAIT_INTERVAL"]
workflow_name = ENV["RUNNING_WORKFLOW_NAME"]
api_endpoint = ENV.fetch("API_ENDPOINT", "https://api.github.com")
api_endpoint = ENV.fetch("API_ENDPOINT", "")

GithubChecksVerifier.configure do |config|
config.allowed_conclusions = allowed_conclusions.split(",").map(&:strip)
config.check_name = check_name
config.check_regexp = check_regexp
config.client = Octokit::Client.new(auto_paginate: true)
config.client.access_token = token unless token.empty?
config.client.api_endpoint = api_endpoint unless /\A[[:space:]]*\z/.match?(api_endpoint)
config.client.access_token = token
config.ref = ref
config.repo = ENV["GITHUB_REPOSITORY"]
config.verbose = verbose
Expand Down

0 comments on commit b666e44

Please sign in to comment.