Class: Octopolo::Scripts::ViewPr

Inherits:
Object
  • Object
show all
Includes:
CLIWrapper
Defined in:
lib/octopolo/scripts/view_pr.rb

Instance Attribute Summary

Attributes included from CLIWrapper

#cli

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.executeObject



9
10
11
# File 'lib/octopolo/scripts/view_pr.rb', line 9

def self.execute
  new.execute
end

Instance Method Details

#executeObject

Public: Perform the script



14
15
16
17
18
19
20
21
# File 'lib/octopolo/scripts/view_pr.rb', line 14

def execute
  current = GitHub::PullRequest.current

  if current
    cli.say "Opening Pull Request #{current.number}"
    cli.open current.pull_request.html_url
  end
end