Skip to content

Commit a19a445

Browse files
committed
Match token name with entrypoint
1 parent a6e722e commit a19a445

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

app/services/github_checks_verifier.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class GithubChecksVerifier < ApplicationService
1717
config_accessor :client, :repo
1818

1919
# Required inputs
20-
config_accessor :ref, :repo_token
20+
config_accessor :ref, :token
2121

2222
config_accessor(:allowed_conclusions) { %w[success skipped] }
2323
config_accessor(:check_name) { '' }
@@ -40,7 +40,7 @@ def call
4040

4141
def validate_inputs
4242
raise RequiredInputError, 'ref' if ref.blank?
43-
raise RequiredInputError, 'repo-token' if repo_token.blank?
43+
raise RequiredInputError, 'repo-token' if token.blank?
4444
end
4545

4646
def query_check_status

spec/services/github_checks_verifier_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
it 'raises an error when the repo-token input is empty' do
2424
service.config.ref = '_'
25-
service.config.repo_token = ''
25+
service.config.token = ''
2626
expected_msg = 'The repo-token parameter is required but was not provided.'
2727
expect { service.call }.to raise_error(SystemExit).and output(/#{expected_msg}/).to_stdout
2828
end
@@ -33,7 +33,7 @@
3333

3434
it 'exit with status false if wait_for_checks fails' do
3535
service.config.ref = '_'
36-
service.config.repo_token = '_'
36+
service.config.token = '_'
3737
expected_msg = 'The requested check was never run against this ref, exiting...'
3838
expect { service.call }.to raise_error(SystemExit).and output(/#{expected_msg}/).to_stdout
3939
end

0 commit comments

Comments
 (0)