Method: Octokit::Client::Checks#create_check_run

Defined in:
lib/octokit/client/checks.rb

#create_check_run(repo, name, head_sha, options = {}) ⇒ Sawyer::Resource

Create a check run

Examples:

Create a check run

check_run = @client.create_check_run("octocat/Hello-World", "my-check", "7638417db6d59f3c431d3e1f261cc637155684cd")
check_run.name # => "my-check"
check_run.head_sha # => "7638417db6d59f3c431d3e1f261cc637155684cd"
check_run.status # => "queued"

Parameters:

  • repo (Integer, String, Hash, Repository)

    A GitHub repository

  • name (String)

    The name of the check

  • head_sha (String)

    The SHA of the commit to check

Returns:

  • (Sawyer::Resource)

    A hash representing the new check run

See Also:


25
26
27
28
29
30
# File 'lib/octokit/client/checks.rb', line 25

def create_check_run(repo, name, head_sha, options = {})
  options[:name] = name
  options[:head_sha] = head_sha

  post "#{Repository.path repo}/check-runs", options
end