Class: Durt::GithubBugTracker

Inherits:
BugTracker show all
Defined in:
lib/durt/github_bug_tracker.rb

Instance Attribute Summary collapse

Attributes inherited from BugTracker

#project

Instance Method Summary collapse

Methods inherited from BugTracker

#active?, #fetch_statuses, #initialize, #issues, #source_name, #statuses

Constructor Details

This class inherits a constructor from Durt::BugTracker

Instance Attribute Details

#clientObject

Returns the value of attribute client.



8
9
10
# File 'lib/durt/github_bug_tracker.rb', line 8

def client
  @client
end

Instance Method Details

#after_initializeObject



10
11
12
13
# File 'lib/durt/github_bug_tracker.rb', line 10

def after_initialize
  @client = Octokit::Client.new(@config)
  @client.auto_paginate = true
end

#fetch_issuesObject



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/durt/github_bug_tracker.rb', line 15

def fetch_issues
  fetched_issues = client.issues(fetch_issues_query)

  fetched_issues.map do |issue|
    {
      key: issue.number,
      summary: issue.title,
      source: source_name,
      project: project
    }
  end
end