jira4nix 0.0.1 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/bin/jira +22 -5
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.1.0
data/bin/jira CHANGED
@@ -47,11 +47,11 @@ def login
47
47
  $jira.instance_variable_set("@token", $config["token"])
48
48
  end
49
49
 
50
- def create_ticket(summary, description, user, group, component, reviewboard = nil, git_repo = nil, branch = nil)
50
+ def create_ticket(type, summary, description, user, group, component, reviewboard = nil, git_repo = nil, branch = nil)
51
51
  issue = Jira4R::V2::RemoteIssue.new
52
52
  issue.summary = summary
53
53
  issue.description = description
54
- issue.type = 2
54
+ issue.type = type
55
55
  issue.assignee = user
56
56
  issue.reporter = user
57
57
  issue.project = group
@@ -127,12 +127,29 @@ PlainOptionParser.new do
127
127
 
128
128
  # summary, description, reviewboard, git_repo, branch, user, group
129
129
 
130
- cmd "new feature" do
130
+ def new_issue(type)
131
131
  login
132
132
  title = ask("Title")
133
133
  description = ask("Description")
134
- create_ticket(title, description, $config["user"], $config["project"], $config["component"])
135
- # (summary, description, user, group, reviewboard = nil, git_repo = nil, branch = nil)
134
+ create_ticket(type, title, description, $config["user"], $config["project"], $config["component"])
135
+ end
136
+
137
+ {
138
+ 1 => "bug",
139
+ 2 => "feature",
140
+ 3 => "task",
141
+ 12 => "idea",
142
+ 11 => "incident",
143
+ 4 => "improvement",
144
+ 8 => "question",
145
+ 13 => "experiment",
146
+ 14 => "triage",
147
+ 10 => "eng"
148
+ }.each do |k, v|
149
+ desc "create a new #{v} issue"
150
+ cmd "new #{v}" do
151
+ new_issue(k)
152
+ end
136
153
  end
137
154
 
138
155
  end.start(ARGV)
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 0
8
7
  - 1
9
- version: 0.0.1
8
+ - 0
9
+ version: 0.1.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Kyle Maxwell
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-02-18 00:00:00 -08:00
17
+ date: 2011-02-23 00:00:00 -08:00
18
18
  default_executable: jira
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency