Top Level Namespace
Defined Under Namespace
Instance Method Summary collapse
Instance Method Details
#retrieve_from_gh_issues(user, project) ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/sleeping-wolf.rb', line 44 def retrieve_from_gh_issues(user, project) issues = [] repo = Octopi::Repository.find(:user => user, :name => project) repo.all_issues.each do |gh_issue| issue = Issue.new issue.id = gh_issue.number issue.title = gh_issue.title issue.labels = gh_issue.labels issue.date_opened = gh_issue.created_at issue.state = gh_issue.state comment = Comment.new comment.text = gh_issue.body issue.comments << comment issues << issue end return issues end |
#retrieve_from_ticgit(path) ⇒ Object
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/sleeping-wolf.rb', line 66 def retrieve_from_ticgit(path) issues = [] ticgit = TicGit.open(path) ticgit.ticket_list.each do |ti_issue| issue = Issue.new issue.id = ti_issue.ticket_id issue.title = ti_issue.title issue.labels = ti_issue. issue.date_opened = ti_issue.opened issue.state = ti_issue.state ti_issue.comments.each {|comment| issue.comments << Comment.new(comment)} issues << issue end return issues end |