Class: Waff::LocalRepository

Inherits:
Object
  • Object
show all
Defined in:
lib/waff/local_repository.rb

Class Method Summary collapse

Class Method Details

.check_existence!Object



9
10
11
12
13
# File 'lib/waff/local_repository.rb', line 9

def check_existence!
  unless File.exist?('.git')
    raise 'No git repository found. Please move to the root of your project.'
  end
end

.current_issue_numberObject



4
5
6
7
# File 'lib/waff/local_repository.rb', line 4

def current_issue_number
  branch_name = `git rev-parse --abbrev-ref HEAD`
  branch_name[/^#?(\d+)-/, 1]
end