gplan 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/releasenotes.html +9 -0
- data/lib/github.rb +5 -2
- data/lib/printer.rb +1 -1
- metadata +3 -2
data/lib/github.rb
CHANGED
@@ -60,8 +60,9 @@ class Github
|
|
60
60
|
# used to extract blocks of information from a PR body
|
61
61
|
def extract_blocks(pr)
|
62
62
|
body = pr['body']
|
63
|
+
return pr if body.nil?
|
63
64
|
blocks = body.scan(/## ?((?:(?!##).)*)/m)
|
64
|
-
return if blocks.nil?
|
65
|
+
return pr if blocks.nil?
|
65
66
|
|
66
67
|
pr['blocks'] = []
|
67
68
|
blocks.each do |block|
|
@@ -73,9 +74,11 @@ class Github
|
|
73
74
|
# used to extract linked issues from the description follow githubs linking issue linking matchers
|
74
75
|
def extract_linked_issues(pr)
|
75
76
|
body = pr['body']
|
77
|
+
# UGH, this happens when a story doesn't have any description
|
78
|
+
return pr if body.nil?
|
76
79
|
regex = /(?:close|close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved|connect(?:s)?(?:ed)?\sto?)\s?+((\w*\/\w*)?#(\d+))/im
|
77
80
|
linked_issues = body.scan(regex)
|
78
|
-
return if linked_issues.nil?
|
81
|
+
return pr if linked_issues.nil?
|
79
82
|
|
80
83
|
pr['linked_issues'] = []
|
81
84
|
linked_issues.each do |linked_issue|
|
data/lib/printer.rb
CHANGED
@@ -42,7 +42,7 @@ module Printer
|
|
42
42
|
line = ""
|
43
43
|
story['linked_issues'].each do |issue|
|
44
44
|
line += ":ISSUE##{issue['number']}"
|
45
|
-
line +=":Milestone #{issue['milestone']['title']}" if issue['milestone']
|
45
|
+
line +=":Milestone #{issue['milestone']['title']}" if issue['milestone']
|
46
46
|
end
|
47
47
|
line
|
48
48
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gplan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-02-
|
12
|
+
date: 2015-02-14 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
@@ -35,6 +35,7 @@ extensions: []
|
|
35
35
|
extra_rdoc_files: []
|
36
36
|
files:
|
37
37
|
- bin/gplan
|
38
|
+
- bin/releasenotes.html
|
38
39
|
- lib/github.rb
|
39
40
|
- lib/planbox.rb
|
40
41
|
- lib/printer.rb
|