Module: StashCoreAPI::PullRequests

Includes:
Utils
Included in:
StashCoreAPI
Defined in:
lib/stash_core_api/pull_requests.rb

Overview

Interfaces with pull requests endpoints of Stash CoreAPI API

Instance Method Summary collapse

Instance Method Details

#can_merge?(pull_request_id) ⇒ Boolean

TODO:

@raise [StashCoreAPI::Error::Unauthorized] Error raised when supplied user credentials are not valid

Returns true if PR can be merged, false if not.



19
20
21
# File 'lib/stash_core_api/pull_requests.rb', line 19

def can_merge?(pull_request_id)
  perform_get("/pull-requests/#{pull_request_id}/merge")['canMerge']
end

#info(pull_request_id) ⇒ Object

TODO:

@raise [StashCoreAPI::Error::Unauthorized] Error raised when supplied user credentials are not valid



32
33
34
# File 'lib/stash_core_api/pull_requests.rb', line 32

def info(pull_request_id)
  perform_get("/pull-requests/#{pull_request_id}")
end