Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update template_server.rb #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

1 participant