lib/herodot/commands.rb in herodot-0.1.9 vs lib/herodot/commands.rb in herodot-0.1.10
- old
+ new
@@ -35,10 +35,11 @@
path = '.' if path.nil?
choose do |menu|
menu.prompt = 'What tracker do you want to link to?'
menu.choice(:jira) { link_jira(path) }
menu.choice(:github) { link_github(path) }
+ menu.choice(:gitlab) { link_gitlab(path) }
menu.choices(:other) { link_other(path) }
menu.default = :other
end
end
@@ -49,9 +50,14 @@
end
def self.link_github(path)
handle = ask('Github handle (something/something for https://github.com/something/something)?')
Herodot::ProjectLink.link(path, "https://github.com/#{handle}/issues/", '\\d+')
+ end
+
+ def self.link_gitlab(path)
+ handle = ask('GitLab handle (something/something for https://gitlab.com/something/something)?')
+ Herodot::ProjectLink.link(path, "https://gitlab.com/#{handle}/issues/", '\\d+')
end
def self.link_other(path)
url = ask('URL to issue tracker:')
pattern = ask('Ticket regex pattern (ruby):')