Class: ReleaseMergeReport
- Inherits:
-
Object
- Object
- ReleaseMergeReport
- Defined in:
- lib/github_repo_statistics/release_merge_report.rb
Instance Method Summary collapse
-
#initialize(token:, repo:, branch_prefix:) ⇒ ReleaseMergeReport
constructor
A new instance of ReleaseMergeReport.
- #report ⇒ Object
Constructor Details
#initialize(token:, repo:, branch_prefix:) ⇒ ReleaseMergeReport
Returns a new instance of ReleaseMergeReport.
8 9 10 11 12 |
# File 'lib/github_repo_statistics/release_merge_report.rb', line 8 def initialize(token:, repo:, branch_prefix:) @token = token @repo = repo @branch_prefix = branch_prefix end |
Instance Method Details
#report ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/github_repo_statistics/release_merge_report.rb', line 14 def report branch_counts = count_merged_pull_requests_per_branch grouped_branch_counts = group_branch_counts(branch_counts) # require 'pry' # binding.pry # Print the grouped branch counts puts 'Branches with Merged Pull Requests:' grouped_branch_counts.each do |branch, count| puts "#{branch}: #{count}" end ENV['BQ_CREDENTIALS'] = `cat /Users/serghei.moret/.config/gcloud/application_default_credentials.json` export_to_bigquery(grouped_branch_counts) if ENV['BQ_CREDENTIALS'] grouped_branch_counts end |