Class: PrLog::ParsedChangelog

Inherits:
Object
  • Object
show all
Defined in:
lib/pr_log/parsed_changelog.rb

Overview

Get mentioned issues from a changelog

Instance Method Summary collapse

Constructor Details

#initialize(text, options = {}) ⇒ ParsedChangelog

Returns a new instance of ParsedChangelog.



4
5
6
7
# File 'lib/pr_log/parsed_changelog.rb', line 4

def initialize(text, options = {})
  @text = text
  @github_repository = options.fetch(:github_repository)
end

Instance Method Details

#mentioned_issue_numbersObject



9
10
11
# File 'lib/pr_log/parsed_changelog.rb', line 9

def mentioned_issue_numbers
  @text.scan(pull_request_urls_matcher).flatten.map(&:to_i)
end