Skip to content

Commit

Permalink
#19 Check if commit includes issue number before replacing with links
Browse files Browse the repository at this point in the history
  • Loading branch information
baygunm committed Sep 3, 2013
1 parent 002a534 commit 72053a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

#### [Current]
* [002a534](../../commit/002a534) [#17](../../issues/17) Apply encoding before setting issue links __(Murat Kemal BAYGÜN)__
* [d1cdb61](../../commit/d1cdb61) [#17](../../issues/17) Revert breaking code __(Murat Kemal BAYGÜN)__
* [0291a3f](../../commit/0291a3f) [#17](../../issues/17) improve gsub usage, fix double quotes __(Murat Kemal BAYGÜN)__
* [3b25646](../../commit/3b25646) Merge pull request [#18](../../issues/18) from rderoldan1/develop __(Murat Kemal BAYGÜN)__
Expand Down
4 changes: 3 additions & 1 deletion bin/katip
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ def parse_change_log
output.each do |line|
line.encode!('utf-8', invalid: :replace, undef: :replace, replace: '')

line.gsub!(/#[1-9][0-9]*/) {|s| "[#{s}](#{ISSUE_URL}#{s[-(s.length-1)..-1]})"}
if line.index(/#[1-9][0-9]*/)
line.gsub!(/#[1-9][0-9]*/) {|s| "[#{s}](#{ISSUE_URL}#{s[-(s.length-1)..-1]})"}
end
end

output
Expand Down

0 comments on commit 72053a5

Please sign in to comment.