2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/gitmine/cli.rb', line 2
def self.run
case ARGV[0]
when "log"
list
when "branch", "br"
branch
when "checkout", "co"
checkout
when "delete", "del"
delete
when "for_deploy", "reviewed"
reviewed
when "open"
open
when "status"
status
else
puts <<-EOS
Usage:
gitmine branch BRANCH_NAME
Create a new branch, push to origin, add github links to gitmine ticket
Example: gitmine branch 1234-my-branch
gitmine checkout ISSUE_ID
Checkout remote/local branch starting with ISSUE_ID
Example: gitmine checkout 1234
gitmine reviewed ISSUE_ID
Merge the branch to master, delete remote branch, update redmine issue status
Example: gitmine reviewed 1234
gitmine delete ISSUE_ID
Delete remote branch starting with ISSUE_ID
Example: gitmine delete 1234
gitmine status
Show status of the current branch's issue
gitmine open
Open current branch's issue in web browser
gitmine log
Displays latest 10 commits and the status of their associated Redmine tickets
EOS
end
end
|