Class: GithubPrScatterplot
- Inherits:
-
CycletimeScatterplot
- Object
- ChartBase
- CycletimeScatterplot
- GithubPrScatterplot
- Defined in:
- lib/jirametrics/github_pr_scatterplot.rb
Instance Attribute Summary
Attributes inherited from CycletimeScatterplot
Attributes inherited from ChartBase
#aggregated_project, #all_boards, #atlassian_document_format, #board_id, #canvas_height, #canvas_width, #data_quality, #date_range, #file_system, #holiday_dates, #issues, #settings, #time_range, #timezone_offset
Instance Method Summary collapse
- #all_items ⇒ Object
-
#initialize(block) ⇒ GithubPrScatterplot
constructor
A new instance of GithubPrScatterplot.
- #title_value(entry) ⇒ Object
- #x_value(entry) ⇒ Object
- #y_axis_heading ⇒ Object
- #y_value(entry) ⇒ Object
Methods inherited from CycletimeScatterplot
#calculate_percent_line, #create_datasets, #data_for_issue, #run, #show_trend_lines, #trend_line_data_set
Methods included from GroupableIssueChart
#group_issues, #grouping_rules, #init_configuration_block
Methods inherited from ChartBase
#aggregated_project?, #before_run, #call_before_run, #canvas, #canvas_responsive?, #chart_format, #collapsible_issues_panel, #color_block, #color_for, #completed_issues_in_range, #current_board, #cycletime, #cycletime_for_issue, #daily_chart_dataset, #describe_non_working_days, #description_text, #format_integer, #format_status, #header_text, #holidays, #html_directory, #icon_span, #label_days, #label_issues, #link_to_issue, #next_id, #random_color, #render, #render_top_text, #status_category_color, #working_days_annotation, #wrap_and_render
Constructor Details
#initialize(block) ⇒ GithubPrScatterplot
Returns a new instance of GithubPrScatterplot.
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/jirametrics/github_pr_scatterplot.rb', line 21 def initialize block super header_text 'PR Scatterplot' description_text <<-HTML <div class="p"> PR's </div> #{describe_non_working_days} HTML grouping_rules do |entry, rule| rule.label = entry.repo # rule.color = 'green' end end |
Instance Method Details
#all_items ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/jirametrics/github_pr_scatterplot.rb', line 38 def all_items all = [] CSV.foreach('GitHub_PR_Review_Report_ALL_REPOS_20260209_1557.csv', headers: true) do |row| all << PrEntry.new(row) end min, max = all.minmax_by(&:closed_at).collect(&:closed_at) min = Time.parse('2025-11-01') @time_range = min..max @date_range = (min.to_date - 1)..(max.to_date + 1) all end |
#title_value(entry) ⇒ Object
59 60 61 |
# File 'lib/jirametrics/github_pr_scatterplot.rb', line 59 def title_value entry "#{entry.pr_number}: #{entry.title}, first_review: #{entry.hours_to_first_review} hours, total_days: #{entry.days} days" end |
#x_value(entry) ⇒ Object
51 52 53 |
# File 'lib/jirametrics/github_pr_scatterplot.rb', line 51 def x_value entry entry.closed_at end |
#y_axis_heading ⇒ Object
63 64 65 |
# File 'lib/jirametrics/github_pr_scatterplot.rb', line 63 def y_axis_heading 'Days' end |
#y_value(entry) ⇒ Object
55 56 57 |
# File 'lib/jirametrics/github_pr_scatterplot.rb', line 55 def y_value entry entry.days end |