Class: Lita::Handlers::GitBranchSwitcher
- Inherits:
-
Handler
- Object
- Handler
- Lita::Handlers::GitBranchSwitcher
- Defined in:
- lib/lita/handlers/git_branch_switcher.rb
Instance Method Summary collapse
Instance Method Details
#current_branch ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/lita/handlers/git_branch_switcher.rb', line 12 def current_branch g = Git.open(config.repository_path) log = g.log.first "[%{branch}] %{date} %{author} %{message}" % { branch: g.current_branch, date: log..date, author: log..name, message: log..lines.first, } end |