Class: PrLog::Project

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

Overview

Parse files from the local project directory

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#configObject

Returns the value of attribute config

Returns:

  • (Object)

    the current value of config



3
4
5
# File 'lib/pr_log/project.rb', line 3

def config
  @config
end

Instance Method Details

#github_repository_nameObject



12
13
14
15
16
17
18
19
20
21
# File 'lib/pr_log/project.rb', line 12

def github_repository_name
  config.github_repository || gemspec.github_repository

rescue GemspecNotFound
  raise(GithubRepositoryRequired,
        'Could not derive github repository from gemspec.')
rescue NonGithubHomepage
  raise(GithubRepositoryRequired,
        'Homepage attribute in gemspec is not a GitHub URL.')
end

#issue_numbers_mentioned_in_changelogObject



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

def issue_numbers_mentioned_in_changelog
  parsed_changelog.mentioned_issue_numbers
end

#milestoneObject



8
9
10
# File 'lib/pr_log/project.rb', line 8

def milestone
  config.milestone || gemspec.version_milestone
end

#pull_requests_for_current_milestoneObject



23
24
25
# File 'lib/pr_log/project.rb', line 23

def pull_requests_for_current_milestone
  github_repository.pull_requests_with_milestone(milestone)
end