gitjira 0.1.1 → 0.2.0
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/Gemfile.lock +1 -1
- data/README.md +23 -0
- data/bin/git-jira +13 -5
- data/lib/gitjira/information_fetching.rb +4 -2
- data/lib/gitjira/version.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: 6df10c782e1e083a1e4b765f5ba5151e6487ea25
|
4
|
+
data.tar.gz: dba31206fe7605e1c7987c87faccc03bcf52f85f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2071da8a3b4178f6f2ea18aa201f4ee8913a976314de85fd5671821c92eda4efdbd06913d2f37b5983c0e0840b2f8ac9697a4ca42a4da33325990e987d02635f
|
7
|
+
data.tar.gz: 8094dc7d078a3c692e9744ca1d4340e8f904b02f511128d71cf55e8dadbf82b604351f2b5d3d094f0a4fe6324c7ec314ee111fb73515ecf1eb491da2bc51dab2
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -64,6 +64,29 @@ update directly the .git/config file or via the following command:
|
|
64
64
|
|
65
65
|
Add a page that lists all features.
|
66
66
|
|
67
|
+
## Exampel Scenario #3 - Get information about a specific issue
|
68
|
+
|
69
|
+
Get information about a specific issue that must not be available as branch.
|
70
|
+
|
71
|
+
$ git-jira describe -i 123 # or git-jira describe -i PROJ-123
|
72
|
+
=> Add /features page <=
|
73
|
+
|
74
|
+
Issue Key...........: PROJ-123
|
75
|
+
Type................: New Feature
|
76
|
+
Status..............: Resolved
|
77
|
+
Progress............: 42.0 %
|
78
|
+
Estimated Work......: 1d
|
79
|
+
Remaining Work......: 4h 35m
|
80
|
+
Resolution..........: Fixed
|
81
|
+
Priority............: Major
|
82
|
+
Assignee............: Me
|
83
|
+
Reporter............: Me
|
84
|
+
Created At..........: 2013-05-26 13:09:17 +0200
|
85
|
+
Updated At..........: 2013-06-20 23:21:18 +0200
|
86
|
+
Fix Version.........: v1.2.0 (2013-06-30),
|
87
|
+
|
88
|
+
Add a page that lists all features.
|
89
|
+
|
67
90
|
## Tips & Tricks
|
68
91
|
|
69
92
|
Use aliases to be even more efficient:
|
data/bin/git-jira
CHANGED
@@ -20,9 +20,9 @@ opt_parser = OptionParser.new do |opt|
|
|
20
20
|
opt.banner = "Usage: git-jira [COMMANDS] [OPTIONS]"
|
21
21
|
opt.separator ""
|
22
22
|
opt.separator "Commands"
|
23
|
-
opt.separator " init:
|
24
|
-
opt.separator " list:
|
25
|
-
opt.separator " describe:
|
23
|
+
opt.separator " init [-f | --force]: setup the current repository to be able to connect to a JIRA project"
|
24
|
+
opt.separator " list: returns a list of branches with related issue information"
|
25
|
+
opt.separator " describe [-i | --issue]: verbose issue information related to the current branch or specified issue"
|
26
26
|
opt.separator ""
|
27
27
|
|
28
28
|
opt.on("-h", "--help", "help") do
|
@@ -38,6 +38,10 @@ opt_parser = OptionParser.new do |opt|
|
|
38
38
|
opt.on("-f", "--force", "force overwrite of .git/config [gitjira] block") do
|
39
39
|
options[:force] = true
|
40
40
|
end
|
41
|
+
|
42
|
+
opt.on("-i", "--issue [ISSUE]", "specify an issue number, e.g. PROJ-123 or 123") do |i|
|
43
|
+
options[:issue] = i if i
|
44
|
+
end
|
41
45
|
end
|
42
46
|
|
43
47
|
opt_parser.parse!
|
@@ -53,10 +57,14 @@ when "list"
|
|
53
57
|
begin
|
54
58
|
Gitjira::InformationFetching.branches
|
55
59
|
rescue => e
|
56
|
-
STDERR.puts "[ERROR] Not able to fetch
|
60
|
+
STDERR.puts "[ERROR] Not able to fetch issue information from JIRA, through exception: #{e}"
|
57
61
|
end
|
58
62
|
when "describe"
|
59
|
-
|
63
|
+
begin
|
64
|
+
Gitjira::InformationFetching.describe(options[:issue])
|
65
|
+
rescue => e
|
66
|
+
STDERR.puts "[ERROR] Not able to fetch issue information from JIRA, through exception: #{e}"
|
67
|
+
end
|
60
68
|
else
|
61
69
|
STDOUT.puts opt_parser
|
62
70
|
end
|
@@ -33,8 +33,10 @@ class Gitjira::InformationFetching
|
|
33
33
|
return nil
|
34
34
|
end
|
35
35
|
|
36
|
-
def self.describe
|
37
|
-
issue = self.
|
36
|
+
def self.describe(issue = nil)
|
37
|
+
issue = "#{self.project_key}-#{issue}" if issue and not issue.start_with?(self.project_key)
|
38
|
+
issue = self.extract_issue unless issue
|
39
|
+
|
38
40
|
if issue
|
39
41
|
issue_info = self.fetch_issue_json(issue)
|
40
42
|
if issue_info
|
data/lib/gitjira/version.rb
CHANGED