jenkins_pivotal_release_notes 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/jenkins_pivotal_release_notes/agent.rb +16 -4
- data/lib/jenkins_pivotal_release_notes/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b95cdefa971f5b3e4647d4e185ef7d5283521b13
|
4
|
+
data.tar.gz: f48ef8b5e82ff7c1d03f6519d6c5063503914f2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f862a633ac33f33162c57dbd3dbc55cc880d7701b3e20e7aaea9467b929dc0c2c37ce5d182a516052116c43064dd42db66af855cc2496fe4bc4c1881f412c8ae
|
7
|
+
data.tar.gz: f8cc09c21d097843289cf7040bd09d1702aa0f8d7e1cd52b8422a96933a668e617132359f6192ddca607c9095c3f96fa8e0d41b513f691d2387cc82069e6610a
|
data/README.md
CHANGED
@@ -24,6 +24,9 @@ In Jenkins, add a post build step like:
|
|
24
24
|
|
25
25
|
```
|
26
26
|
jenkins_pivotal --token a1b2c3 --project 1234 --date 05/01/2015 --file /Users/username/release_notes.txt
|
27
|
+
|
28
|
+
The date parameter is optional. If the date is not present the date is taken from
|
29
|
+
the first line of the file. If the file is not present it gets all stories.
|
27
30
|
```
|
28
31
|
|
29
32
|
Help output is as follows.
|
@@ -12,12 +12,23 @@ module JenkinsPivotalReleaseNotes
|
|
12
12
|
end
|
13
13
|
|
14
14
|
def run!
|
15
|
-
|
16
|
-
|
15
|
+
tempDate = date
|
16
|
+
if tempDate.nil? || tempDate.empty?
|
17
|
+
# It's nil or empty so read date from file
|
18
|
+
begin
|
19
|
+
tempDate = File.open(file, &:readline)
|
20
|
+
rescue
|
21
|
+
#put some old date
|
22
|
+
tempDate = "11/11/1976"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
puts tempDate
|
26
|
+
|
17
27
|
output = ""
|
28
|
+
output.concat(Time.now.strftime("%m/%d/%Y") + "\n")
|
18
29
|
client = TrackerApi::Client.new(token: token)
|
19
30
|
currentProject = client.project(project)
|
20
|
-
featureStories = currentProject.stories(filter: 'accepted_since:' +
|
31
|
+
featureStories = currentProject.stories(filter: 'accepted_since:' + tempDate + ' type:Feature')
|
21
32
|
inProgressStories = currentProject.stories(filter: 'state:started state:finished state:delivered type:Feature')
|
22
33
|
bugStories = currentProject.stories(filter: '-state:delivered -state:accepted type:Bug')
|
23
34
|
output.concat(currentProject.name + " Release Notes\n\n")
|
@@ -30,15 +41,16 @@ module JenkinsPivotalReleaseNotes
|
|
30
41
|
end
|
31
42
|
|
32
43
|
if inProgressStories.size > 0
|
44
|
+
output.concat("\n")
|
33
45
|
output.concat("IN PROGRESS FEATURES\n")
|
34
46
|
output.concat("====================\n")
|
35
47
|
for story in inProgressStories
|
36
48
|
output.concat(story.name + "\n")
|
37
49
|
end
|
38
|
-
output.concat("\n")
|
39
50
|
end
|
40
51
|
|
41
52
|
if bugStories.size > 0
|
53
|
+
output.concat("\n")
|
42
54
|
output.concat("KNOWN BUGS\n")
|
43
55
|
output.concat("==========\n")
|
44
56
|
for story in bugStories
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jenkins_pivotal_release_notes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kenny Chapman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: slop
|