Last active
November 14, 2015 08:59
-
-
Save sonsongithub/1c6b87c74c272e3d8d08 to your computer and use it in GitHub Desktop.
octokit convert Issue list to wiki page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'octokit' | |
| client = Octokit::Client.new(:access_token => "") | |
| user = client.user | |
| puts user.login | |
| page = 1 | |
| issues = [] | |
| for i in 1..20 | |
| puts page | |
| array = client.list_issues("sonsongithub/reddift", {:page=>page}) | |
| issues = issues + array | |
| break if array.length == 0 | |
| page = page + 1 | |
| end | |
| categories = {} | |
| issues.each{|issue| | |
| item = { | |
| :title => issue.title, | |
| :body => issue.body, | |
| :label => issue.labels[0].name, | |
| :future => (issue.milestone.title == "Future") | |
| } | |
| begin | |
| categories[issue.labels[0].name].push(item) | |
| rescue | |
| categories[issue.labels[0].name] = [item] | |
| end | |
| } | |
| categories.each_pair{|key, value| | |
| puts "### #{key}" | |
| puts "Path | Info| Support " | |
| puts "----------|---------|---------" | |
| value.each{|item| | |
| support = item[:future] ? "No plan" : "ver 1.5" | |
| puts "#{item[:title]}|[reddit.com](#{item[:body]})|#{support}" | |
| } | |
| puts "" | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment