Skip to content

Conversation

Gardenia05
Copy link

Create a new check run with the status queued

def create_check_run

# At the time of writing, Octokit does not support the Checks API yet, but

it does provide generic HTTP methods you can use:

/rest/reference/checks#create-a-check-run

check_run = @installation_client.post(
"repos/#{@payload['repository']['full_name']}/check-runs",
{
accept: 'application/vnd.github.v3+json',
# The name of your check run.
name: 'Octo RuboCop',
# The payload structure differs depending on whether a check run or a check suite event occurred.
head_sha: @payload['check_run'].nil? ? @payload['check_suite']['head_sha'] : @payload['check_run']['head_sha']
}
)
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant