Permalink
Browse files

issues から wiki page 生成するスクリプトのモック追加

  • Loading branch information...
1 parent ffb2f8a commit a1b91a5b4a072f0c3201e2b99908c9bfd2ac2e3c @mizzy committed Jul 18, 2012
Showing with 36 additions and 0 deletions.
  1. +36 −0 issues2wiki.rb
View
@@ -0,0 +1,36 @@
+#!/usr/bin/env ruby
+# -*- encoding: utf-8 -*-
+
+require 'octokit'
+require 'pit'
+
+conf = Pit.get('github', :require => {
+ 'username' => 'Your user name of GitHub',
+ 'password' => 'Your password of GitHub',
+ })
+
+
+client = Octokit::Client.new(:login => conf['username'],
+ :password => conf['password'])
+
+milestones = {}
+
+issues = client.list_issues('paperboy-sqale/sqale-app', { per_page: 1000 })
+issues.each do |issue|
+ milestone = issue.milestone
+ milestone = milestone ? milestone.title : "マイルストーンなし"
+ milestones[milestone] = [] unless milestones[milestone]
+ milestones[milestone] << issue
+end
+
+milestones.each_key do |milestone|
+ puts "## #{milestone}\n"
+ puts "Title|Assignee"
+ puts "------------- | -------------"
+ milestones[milestone].each do |issue|
+ assignee = issue.assignee
+ assignee = assignee ? assignee.login : "アサインなし"
+ puts "#{issue.title} | #{assignee}"
+ end
+ puts "\n\n----\n\n"
+end

0 comments on commit a1b91a5

Please sign in to comment.