Created
December 17, 2012 23:22
-
-
Save jeffmccune/4323403 to your computer and use it in GitHub Desktop.
Simple script to process recent activity in redmine, e.g. the data listed at http://projects.puppetlabs.com/issues?query_id=304
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 'rubygems' | |
| require 'thor' | |
| require 'csv' | |
| class ActivityApp < Thor | |
| desc "list FILE", "report on activity given a CSV file from redmine" | |
| # e.g. the report at http://projects.puppetlabs.com/issues?query_id=304 | |
| def list(file) | |
| # Issue ID, Project, Tracker, Status, Subject, Target version, Updated | |
| rows = Array.new | |
| CSV.foreach(file) { |row| rows << row } | |
| header = rows.shift | |
| list = rows.collect do |field| | |
| (id, project, tracker, status, subject, target_version, updated) = field | |
| puts "[#{project} #{tracker} ##{id}] #{target_version} (#{status}) #{subject}" | |
| end | |
| end | |
| end | |
| # vim:ft=ruby |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment