Skip to content

Instantly share code, notes, and snippets.

@ultrasaurus
Last active August 29, 2015 14:23
Show Gist options
  • Save ultrasaurus/9b12377a923afca8043f to your computer and use it in GitHub Desktop.
Save ultrasaurus/9b12377a923afca8043f to your computer and use it in GitHub Desktop.
Make GitHub Labels
gem install 'octokit'
irb
require 'octokit'
client = Octokit::Client.new login:'yourname',password:’XXXXXX'
nl = {"bug"=>"418516", "duplicate"=>"DCDCDC", "story"=>"AEDA93", "invalid"=>"959595", "wontfix"=>"4F4F4F",
"epic"=>"DDF0D2", "icebox"=>"F8F8F8", "task"=>"78C14B", "blocked"=>"F1948A", "p1"=>"1188FF", "p3"=>"A0CFFF",
"p2"=>"70B8FF", "p0"=>"0D66BF", "1-discovery"=>"F7D50B", "3-design"=>"A75D81", "4-develop"=>"ED8514",
"5-accept"=>"05B287", "attention"=>"E74C3C", "quick win"=>"5319e7", "independent"=>"fef2c0", "2-research"=>"d4c5f9"}
%w[p0 p1 p2 p3 1-discovery 2-research 3-design 4-develop 5-accept task icebox blocked].each { |name| client.post "https://api.github.com/repos/your-org/your-repo/labels", {name:name, color:nl[name], :headers => { "X-GitHub-OTP" => “2FAcode" } }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment