Skip to content

Instantly share code, notes, and snippets.

View ls-brentsmith's full-sized avatar

Brent Smith ls-brentsmith

  • Freelance
View GitHub Profile
@ls-brentsmith
ls-brentsmith / update_github_status.rb
Last active August 10, 2018 16:05
Update problematic github commit statuses by context
require 'octokit'
repo = ENV['GITHUB_REPO']
context = ENV['STATUS_CONTEXT']
state = ENV['COMMIT_STATE'] || 'success'
description = ENV['COMMIT_STATUS_DESCRIPTION'] || 'moar success'
target_url = ENV['COMMIT_TARGET_URL']
client = Octokit::Client.new(
:access_token => ENV['GITHUB_OAUTH_TOKEN']
)