Class: Geet::Services::OpenPr
- Inherits:
-
Object
- Object
- Geet::Services::OpenPr
- Includes:
- Helpers::OsHelper, Helpers::ServicesWorkflowHelper
- Defined in:
- lib/geet/services/open_pr.rb
Overview
Open in the browser the PR for the current branch.
Constant Summary collapse
Instance Method Summary collapse
- #execute(delete_branch: false) ⇒ Object
-
#initialize(repository, out: $stdout, git_client: DEFAULT_GIT_CLIENT) ⇒ OpenPr
constructor
A new instance of OpenPr.
Methods included from Helpers::ServicesWorkflowHelper
Methods included from Helpers::OsHelper
#execute_command, #open_file_with_default_application
Constructor Details
#initialize(repository, out: $stdout, git_client: DEFAULT_GIT_CLIENT) ⇒ OpenPr
Returns a new instance of OpenPr.
16 17 18 19 20 |
# File 'lib/geet/services/open_pr.rb', line 16 def initialize(repository, out: $stdout, git_client: DEFAULT_GIT_CLIENT) @repository = repository @out = out @git_client = git_client end |
Instance Method Details
#execute(delete_branch: false) ⇒ Object
22 23 24 25 26 |
# File 'lib/geet/services/open_pr.rb', line 22 def execute(delete_branch: false, **) pr = checked_find_branch_pr open_file_with_default_application(pr.link) pr end |