knife-changelog 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/chef/knife/changelog.rb +8 -3
- data/lib/knife/changelog/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: 401d0e3f69454195f5582dbdc6084318c3a0c6a6
|
4
|
+
data.tar.gz: 6f02bcdf5f2e417af90a6beb11ff66ac67201603
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b53bf27f344bc3d7f59812be5e4b7ba7936636b917d8c040bd09f69e3382256e8b2709077030c27cd87e2b0394ed41884c485b77f117f3bb79544767c9ed67f
|
7
|
+
data.tar.gz: 63388ad26b299b9d913ee76a87b8f2096838ce02d549252a20d40aafbbb881441cf030ba0058011e716d88795d25478cbd1e0fbf5afdcce15318c6f40783fd2a
|
data/lib/chef/knife/changelog.rb
CHANGED
@@ -144,9 +144,14 @@ class Chef
|
|
144
144
|
end
|
145
145
|
|
146
146
|
def linkify(url, changelog)
|
147
|
-
changelog.map
|
148
|
-
|
149
|
-
|
147
|
+
changelog.map do |line|
|
148
|
+
case url
|
149
|
+
when /gitlab[\w\.-]+\/([\w-]+\/[\w-]+)(\.git)?/
|
150
|
+
line.gsub(/^([a-f0-9]+) /, '%s@\1 ' % [$1])
|
151
|
+
else
|
152
|
+
line.gsub(/^([a-f0-9]+) /, '[\1](%s/commit/\1) ' % [url])
|
153
|
+
end
|
154
|
+
end
|
150
155
|
end
|
151
156
|
|
152
157
|
def https_url(location)
|