Class: T1k::Commands::PullRequest
- Inherits:
-
Object
- Object
- T1k::Commands::PullRequest
- Defined in:
- lib/t1k/commands/pull_request.rb
Class Method Summary collapse
Class Method Details
.open_browser(pull) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/t1k/commands/pull_request.rb', line 13 def self.open_browser pull return 1 if pull.nil? match = pull.match( /(https:\/\/[a-zA-Z].*=1)/) if match uri = match[0] system "open #{uri}" end end |
.run ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/t1k/commands/pull_request.rb', line 5 def self.run T1k::Commands::Sink.run branch = T1k::Commands::Branch.actual_branch pull = `git push origin #{branch.strip}` self.open_browser pull end |