Skip to content

Instantly share code, notes, and snippets.

@jshawl
Created September 12, 2014 01:29
Show Gist options
  • Select an option

  • Save jshawl/6c8d51159a3e9b68d34d to your computer and use it in GitHub Desktop.

Select an option

Save jshawl/6c8d51159a3e9b68d34d to your computer and use it in GitHub Desktop.
require 'date'
require 'octokit'
require './env.rb' if File.exists? './env.rb'
class Contribart
attr_accessor :dates
def initialize
@client = Octokit::Client.new(:access_token => GH_TOKEN )
@issues = Octokit.list_issues 'jshawl/contribart'
@today = Date.today.to_s
@dates = [
"2014-07-22", "2014-07-23" ,"2014-07-24" ,"2014-07-26",
"2014-07-29", "2014-07-31" ,"2014-08-02",
"2014-08-05", "2014-08-06", "2014-08-07", "2014-08-08",
"2014-08-19", "2014-08-21", "2014-08-22", "2014-08-23",
"2014-09-03",
"2014-09-09", "2014-09-10", "2014-09-11", "2014-09-12", "2014-09-13",
"2014-09-17",
"2014-10-04",
"2014-10-14", "2014-10-15", "2014-10-16", "2014-10-18",
"2014-10-21", "2014-10-23", "2014-10-25",
"2014-10-28", "2014-10-29", "2014-10-30", "2014-10-31",
"2014-11-13", "2014-11-14", "2014-11-15",
"2014-11-20", "2014-11-22",
"2014-11-25", "2014-11-26", "2014-11-27", "2014-11-28"
]
if @dates.include?( @today )
create_issues( 40 )
else
create_issues( 1 )
end
end
def create_issues count
1.upto(count) do | c |
title = @today + " - " +c.to_s
@client.create_issue("jshawl/contribart", title, '')
end
end
end
c = Contribart.new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment