Exception: GitHub::PullRequest::NotFoundError
- Inherits:
-
StandardError
- Object
- StandardError
- GitHub::PullRequest::NotFoundError
- Defined in:
- lib/git-process/github_pull_request.rb
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#head ⇒ Object
readonly
Returns the value of attribute head.
-
#repo ⇒ Object
readonly
Returns the value of attribute repo.
Instance Method Summary collapse
-
#initialize(base, head, repo, pull_requests_json) ⇒ NotFoundError
constructor
A new instance of NotFoundError.
- #pull_requests ⇒ Object
Constructor Details
#initialize(base, head, repo, pull_requests_json) ⇒ NotFoundError
Returns a new instance of NotFoundError.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/git-process/github_pull_request.rb', line 124 def initialize(base, head, repo, pull_requests_json) @base = base @head = head @repo = repo @pull_requests = pull_requests_json.map do |p| {:head => p[:head][:ref], :base => p[:base][:ref]} end msg = "Could not find a pull request for '#{head}' to be merged with '#{base}' on #{repo}." msg += "\n\nExisting Pull Requests:" msg = pull_requests.inject(msg) { |a, v| "#{a}\n #{v[:head]} -> #{v[:base]}" } super(msg) end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
121 122 123 |
# File 'lib/git-process/github_pull_request.rb', line 121 def base @base end |
#head ⇒ Object (readonly)
Returns the value of attribute head.
121 122 123 |
# File 'lib/git-process/github_pull_request.rb', line 121 def head @head end |
#repo ⇒ Object (readonly)
Returns the value of attribute repo.
121 122 123 |
# File 'lib/git-process/github_pull_request.rb', line 121 def repo @repo end |
Instance Method Details
#pull_requests ⇒ Object
141 142 143 |
# File 'lib/git-process/github_pull_request.rb', line 141 def pull_requests @pull_requests end |