diff --git a/lib/github/check.rb b/lib/github/check.rb index 19e0a2c..84120b6 100644 --- a/lib/github/check.rb +++ b/lib/github/check.rb @@ -63,7 +63,7 @@ def create(name) @check_suite.pull_request.repository, name, @check_suite.commit_sha_ref, - accept: 'application/vnd.github+json' + accept: 'application/vnd.github.antiope-preview+json' ) end @@ -92,14 +92,20 @@ def skipped(check_ref, output = {}) end def get_check_run(check_ref) - @app.check_run(@check_suite.pull_request.repository, check_ref).to_h + @app.check_run(@check_suite.pull_request.repository, + check_ref, + accept: 'application/vnd.github.antiope-preview+json').to_h end def fetch_check_runs return [] if @check_suite.nil? @app - .check_runs_for_ref(@check_suite.pull_request.repository, @check_suite.pull_request.branch_name) + .check_runs_for_ref( + @check_suite.pull_request.repository, + @check_suite.pull_request.branch_name, + accept: 'application/vnd.github.antiope-preview+json' + ) .to_h[:check_runs] .map do |check_run| check_run[:id] @@ -129,7 +135,7 @@ def fetch_username(username) def basic_status(check_ref, status, output) opts = { status: status, - accept: 'application/vnd.github+json' + accept: 'application/vnd.github.antiope-preview+json' } opts[:output] = output unless output.empty? diff --git a/spec/lib/github/check_spec.rb b/spec/lib/github/check_spec.rb index 6627ddc..a2ad915 100644 --- a/spec/lib/github/check_spec.rb +++ b/spec/lib/github/check_spec.rb @@ -90,7 +90,7 @@ before do allow(fake_client).to receive(:create_check_run) .with(check_suite.pull_request.repository, name, - check_suite.commit_sha_ref, accept: 'application/vnd.github+json') + check_suite.commit_sha_ref, accept: 'application/vnd.github.antiope-preview+json') .and_return(pr_info) end @@ -110,7 +110,7 @@ id, { status: status, - accept: 'application/vnd.github+json' + accept: 'application/vnd.github.antiope-preview+json' }) .and_return(pr_info) end @@ -133,7 +133,7 @@ { status: status, output: output, - accept: 'application/vnd.github+json' + accept: 'application/vnd.github.antiope-preview+json' }) .and_return(pr_info) end @@ -199,7 +199,7 @@ { status: status, conclusion: conclusion, - accept: 'application/vnd.github+json' + accept: 'application/vnd.github.antiope-preview+json' }) .and_return(true) end