changelogerator 0.0.9 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/changelogerator.rb +8 -6
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d7e604fe48a69c44b84032971ca11723132e4570f558fb501205947f31e5b26
4
- data.tar.gz: fd9f8601e21a0d927e00cb4887656664b40f2d7b22ef48af9e93bbcada39d29e
3
+ metadata.gz: 15c0df34a0b84def4982a8245b7d2fea66d52092941ecfcf761b5c55173670d8
4
+ data.tar.gz: c196735034e5aedbbff42ef8b8d822c434baed96c518ad6bedc8f6f61f864fbd
5
5
  SHA512:
6
- metadata.gz: dcf89c2dbf2dc1ad2d43664a97b54a802f65b92056643f2ae6fb4ae5c5224470783faf26b268acc2d3db748691d241ca7ac46a8c35c6d69933645a33c8765a41
7
- data.tar.gz: d9d256e73a61f8de59d077f390715522ea4a944f97f595b24a30be713aca77278a3c298f86dbfe5a6dd7bd01f99a4291fbe78b46551dfa83a87eec604d77f773
6
+ metadata.gz: bb8aaaa63b3cea0adc294b6f02a8a21cffdd7dc52e9ef0c3cf4ee46ea06e30535229c8b9a738b03369fb8b87775169c29c4bf46580b97ceba786483849711ded
7
+ data.tar.gz: 35952f39e680721b3405aed8d7ce30947c6fc92e41d86942a6fc580a3d856af4ee8682aa8d6b56f7a9d903693346ecfd71e086f59fd7f360730a89a1aba15504
@@ -16,22 +16,22 @@ class Changelog
16
16
  @priorities = [
17
17
  {
18
18
  priority: 1,
19
- label: 'C1-low',
19
+ label: 'C1-low 📌',
20
20
  text: 'Upgrade priority: **Low** (upgrade at your convenience)'
21
21
  },
22
22
  {
23
23
  priority: 3,
24
- label: 'C3-medium',
24
+ label: 'C3-medium 📣',
25
25
  text: 'Upgrade priority: **Medium** (timely upgrade recommended)'
26
26
  },
27
27
  {
28
28
  priority: 7,
29
- label: 'C7-high',
29
+ label: 'C7-high ❗️',
30
30
  text: 'Upgrade priority:❗ **HIGH** ❗ Please upgrade your node as soon as possible'
31
31
  },
32
32
  {
33
33
  priority: 9,
34
- label: 'C9-critical',
34
+ label: 'C9-critical ‼️',
35
35
  text: 'Upgrade priority: ❗❗ **URGENT** ❗❗ PLEASE UPGRADE IMMEDIATELY'
36
36
  }
37
37
  ]
@@ -95,12 +95,12 @@ class Changelog
95
95
  end
96
96
 
97
97
  def add(change)
98
- changes.prepend(apply_priority_to_change(change))
98
+ changes.prepend(prettify_title(apply_priority_to_change(change)))
99
99
  end
100
100
 
101
101
  def add_from_id(id)
102
102
  pull = @gh.pull_request(@repo, id)
103
- add(prettify_title(pull))
103
+ add pull
104
104
  end
105
105
 
106
106
  private
@@ -109,6 +109,8 @@ class Changelog
109
109
  @priorities.each do |p|
110
110
  change[:priority] = p if change[:labels].any? { |l| l[:name] == p[:label] }
111
111
  end
112
+ # Failsafe: add lowest priority if none detected
113
+ change[:priority] ||= @priorities[0]
112
114
  change
113
115
  end
114
116
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: changelogerator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Pugh
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  - !ruby/object:Gem::Version
65
65
  version: '0'
66
66
  requirements: []
67
- rubygems_version: 3.0.3
67
+ rubygems_version: 3.1.2
68
68
  signing_key:
69
69
  specification_version: 4
70
70
  summary: Changelog generation/management