Skip to content

Instantly share code, notes, and snippets.

@kenchan kenchan/yatteru.rb
Created Jun 30, 2018

Embed
What would you like to do?
require 'octokit'
require 'faraday-http-cache'
Octokit.auto_paginate = true
Octokit.middleware = Faraday::RackBuilder.new do |builder|
builder.use Faraday::HttpCache, serializer: Marshal, shared_cache: false
builder.use Octokit::Response::RaiseError
builder.adapter Faraday.default_adapter
end
query = "involves:kenchan updated:>2018-01-01T00:00:00"
ym = "0000-00"
puts "## Issues\n"
Octokit.search_issues(query, order: 'asc', sort: 'created').items.each do |i|
if ym != i.created_at.strftime("%Y-%m")
ym = i.created_at.strftime("%Y-%m")
puts "\n## #{ym}\n\n"
end
puts "- #{i.rels[:repository].get.data.full_name}: [#{i.title}](#{i.html_url})"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.