ruby-jira-cli 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/jira/commands/checkout.rb +10 -2
- data/lib/jira/constants.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d4cd31f822279859495374715a8f30ffe0e63bba
|
|
4
|
+
data.tar.gz: 731ea6817c6b0011b440e66fe2975a908b77d74d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57a492160899f07848d453d749b19dd9a28d602e84665d7fcbb902c1ffe36f1bc08e6e73f2ce441902ceedd32baaf3bbba1f6cee9e5c019505a80d1e4bf5a47c
|
|
7
|
+
data.tar.gz: 34edd4ffeeb4fa51af09168a1f9ed4cebc89092862f70965c9f9205ddb2e856d563dfe7aee93ef3dff4919468ce4a4982f13a761c525ace040c0e4293315cd0f
|
|
@@ -54,11 +54,11 @@ module Jira
|
|
|
54
54
|
end
|
|
55
55
|
|
|
56
56
|
def create_branch
|
|
57
|
-
`git branch #{
|
|
57
|
+
`git branch #{ticket_name} 2> /dev/null`
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
def checkout_branch
|
|
61
|
-
`git checkout #{
|
|
61
|
+
`git checkout #{ticket_name} 2> /dev/null`
|
|
62
62
|
end
|
|
63
63
|
|
|
64
64
|
def metadata
|
|
@@ -73,6 +73,14 @@ module Jira
|
|
|
73
73
|
@remotes ||= `git remote 2> /dev/null`.split(' ')
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
+
def summary
|
|
77
|
+
metadata['fields']['summary'].downcase.tr(" ", "_")
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
def ticket_name
|
|
81
|
+
"#{ticket}_#{summary}"
|
|
82
|
+
end
|
|
83
|
+
|
|
76
84
|
def remote?
|
|
77
85
|
return true if remotes.include?(remote)
|
|
78
86
|
false
|
data/lib/jira/constants.rb
CHANGED