Class: ReleaseCeremony::PullRequestFinder
- Inherits:
-
Object
- Object
- ReleaseCeremony::PullRequestFinder
- Defined in:
- lib/release_ceremony/pull_request_finder.rb
Overview
Finds the single merged pull request for the release branch and extracts its merge commit, refusing ambiguous or malformed data.
Defined Under Namespace
Classes: PullRequest
Constant Summary collapse
- PR_LIMIT =
'100'
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(version:, runner:, project:) ⇒ PullRequestFinder
constructor
A new instance of PullRequestFinder.
Constructor Details
#initialize(version:, runner:, project:) ⇒ PullRequestFinder
Returns a new instance of PullRequestFinder.
12 13 14 15 16 |
# File 'lib/release_ceremony/pull_request_finder.rb', line 12 def initialize(version:, runner:, project:) @version = version @runner = runner @project = project end |
Instance Method Details
#call ⇒ Object
18 19 20 21 22 |
# File 'lib/release_ceremony/pull_request_finder.rb', line 18 def call pull_requests = parse_json(runner.capture(*command)) ensure_one_pull_request!(pull_requests) extract_pull_request(pull_requests.first) end |