Class: Ghub::Endpoints::Pulls::Actions::Show

Inherits:
Object
  • Object
show all
Includes:
Pipeable
Defined in:
lib/ghub/endpoints/pulls/actions/show.rb

Overview

Handles a repository index action.

Instance Method Summary collapse

Instance Method Details

#call(owner, repository, id, **parameters) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/ghub/endpoints/pulls/actions/show.rb', line 15

def call owner, repository, id, **parameters
  pipe(
    api.get("repos/#{owner}/#{repository}/pulls/#{id}", **parameters),
    try(:parse, catch: JSON::ParserError),
    validate(response, as: :to_h),
    to(model, :for)
  )
end