Skip to content

Commit

Permalink
#21 Add multiline commit support
Browse files Browse the repository at this point in the history
Multiline commit note support added as referenced in common
standards, and writing good commit notes. Previous commit was not
working as expected
  • Loading branch information
baygunm committed Sep 5, 2013
1 parent cad7d90 commit 6391f34
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 51 deletions.
94 changes: 49 additions & 45 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,74 +1,78 @@

#### [Current]
* [c9b0d1d](../../commit/c9b0d1d) __(Murat Kemal BAYGÜN)__ Multiline commit note support added as referenced in common
standards, and writing good commit notes
* [72053a5](../../commit/72053a5) __(Murat Kemal BAYGÜN)__ [#19](../../issues/19) Check if commit includes issue number before replacing with links
* [002a534](../../commit/002a534) __(Murat Kemal BAYGÜN)__ [#17](../../issues/17) Apply encoding before setting issue links
* [d1cdb61](../../commit/d1cdb61) __(Murat Kemal BAYGÜN)__ [#17](../../issues/17) Revert breaking code
* [0291a3f](../../commit/0291a3f) __(Murat Kemal BAYGÜN)__ [#17](../../issues/17) improve gsub usage, fix double quotes
* [3b25646](../../commit/3b25646) __(Murat Kemal BAYGÜN)__ Merge pull request [#18](../../issues/18) from rderoldan1/develop


#### 1.2.0
* [b509621](../../commit/b509621) - __(Murat Kemal BAYGÜN)__ Release 1.2.0
* [c9b0d1d](../../commit/c9b0d1d) - __(Murat Kemal BAYGÜN)__ Multiline commit note support added as referenced in common standards, and writing good commit notes
* [72053a5](../../commit/72053a5) - __(Murat Kemal BAYGÜN)__ [#19](../../issues/19) Check if commit includes issue number before replacing with links
* [002a534](../../commit/002a534) - __(Murat Kemal BAYGÜN)__ [#17](../../issues/17) Apply encoding before setting issue links
* [d1cdb61](../../commit/d1cdb61) - __(Murat Kemal BAYGÜN)__ [#17](../../issues/17) Revert breaking code
* [0291a3f](../../commit/0291a3f) - __(Murat Kemal BAYGÜN)__ [#17](../../issues/17) improve gsub usage, fix double quotes
* [3b25646](../../commit/3b25646) - __(Murat Kemal BAYGÜN)__ Merge pull request [#18](../../issues/18) from rderoldan1/develop

[#17](../../issues/17) Fix encoding bug
* [081a185](../../commit/081a185) __(Ruben Espinosa)__ Update katip binary
* [081a185](../../commit/081a185) - __(Ruben Espinosa)__ Update katip binary

encoding bug fixed

#### 1.1.0
* [2a9b75b](../../commit/2a9b75b) - __(Murat Kemal BAYGÜN)__ Release 1.1.0
* [7b5c1e2](../../commit/7b5c1e2) - __(Murat Kemal BAYGÜN)__ [#1](../../issues/1) Add links to issues in comments
* [3780df9](../../commit/3780df9) - __(Onur Özgür ÖZKAN)__ typo fixed.
* [2dbf361](../../commit/2dbf361) - __(Murat Kemal BAYGÜN)__ [#14](../../issues/14) fix video links image
* [0a11741](../../commit/0a11741) - __(Murat Kemal BAYGÜN)__ [#14](../../issues/14) add video link and translation
* [0d128bd](../../commit/0d128bd) - __(Murat Kemal BAYGÜN)__ [#16](../../issues/16) Add git repository check

* [2a9b75b](../../commit/2a9b75b) __(Murat Kemal BAYGÜN)__ Release 1.1.0
* [7b5c1e2](../../commit/7b5c1e2) __(Murat Kemal BAYGÜN)__ [#1](../../issues/1) Add links to issues in comments
* [3780df9](../../commit/3780df9) __(Onur Özgür ÖZKAN)__ typo fixed.
* [2dbf361](../../commit/2dbf361) __(Murat Kemal BAYGÜN)__ [#14](../../issues/14) fix video links image
* [0a11741](../../commit/0a11741) __(Murat Kemal BAYGÜN)__ [#14](../../issues/14) add video link and translation
* [0d128bd](../../commit/0d128bd) __(Murat Kemal BAYGÜN)__ [#16](../../issues/16) Add git repository check
katip was generating multiple lines of error, while running under
a directory which is not a git initiliazed directory. Control added
to check if directory is initialized as a git repostiory
* [8b22c6f](../../commit/8b22c6f) __(Murat Kemal BAYGÜN)__ Add latest change log
* [5fc6991](../../commit/5fc6991) __(Murat Kemal BAYGÜN)__ [#14](../../issues/14) Update readme, add sample output
* [3f7788c](../../commit/3f7788c) __(Onur Ozgur OZKAN)__ [#14](../../issues/14) update README.md

* [8b22c6f](../../commit/8b22c6f) - __(Murat Kemal BAYGÜN)__ Add latest change log
* [5fc6991](../../commit/5fc6991) - __(Murat Kemal BAYGÜN)__ [#14](../../issues/14) Update readme, add sample output
* [3f7788c](../../commit/3f7788c) - __(Onur Ozgur OZKAN)__ [#14](../../issues/14) update README.md

#### 1.0.2
* [664e012](../../commit/664e012) - __(Murat Kemal BAYGÜN)__ [#15](../../issues/15) Set version 1.0.2

* [664e012](../../commit/664e012) __(Murat Kemal BAYGÜN)__ [#15](../../issues/15) Set version 1.0.2
In hotfix vserion number is forgotten to set. Version number is
now set to 1.0.2

#### 1.0.1

* [35f0b39](../../commit/35f0b39) __(Murat Kemal BAYGÜN)__ [#15](../../issues/15) Fixes broken commit URL
In previous version commit URL was broken unexpectedly.Current
commit fixes broken URL and replaces it with the correct one
* [35f0b39](../../commit/35f0b39) - __(Murat Kemal BAYGÜN)__ [#15](../../issues/15) Fixes broken commit URL In previous version commit URL was broken unexpectedly.Current commit fixes broken URL and replaces it with the correct one

#### 1.0.0

* [cbec9c0](../../commit/cbec9c0) __(Murat Kemal BAYGÜN)__ release version 1.0.0
* [6b8cfe7](../../commit/6b8cfe7) __(Murat Kemal BAYGÜN)__ [#13](../../issues/13) Add custom file name support to rake
* [7b5be3d](../../commit/7b5be3d) __(Murat Kemal BAYGÜN)__ [#10](../../issues/10) add output file name as optional parameter
* [695646c](../../commit/695646c) __(Murat Kemal BAYGÜN)__ [#12](../../issues/12) Add and correct information on gemspec
* [f30a3b2](../../commit/f30a3b2) __(Murat Kemal BAYGÜN)__ [#9](../../issues/9) Update rake job to use installed executable
* [a7200f0](../../commit/a7200f0) __(Murat Kemal BAYGÜN)__ [#11](../../issues/11) Fix bug Current commits is not seen on log file
* [6385fff](../../commit/6385fff) __(Murat Kemal BAYGÜN)__ [#8](../../issues/8) Change executable file name to katip
* [cbec9c0](../../commit/cbec9c0) - __(Murat Kemal BAYGÜN)__ release version 1.0.0
* [6b8cfe7](../../commit/6b8cfe7) - __(Murat Kemal BAYGÜN)__ [#13](../../issues/13) Add custom file name support to rake
* [7b5be3d](../../commit/7b5be3d) - __(Murat Kemal BAYGÜN)__ [#10](../../issues/10) add output file name as optional parameter
* [695646c](../../commit/695646c) - __(Murat Kemal BAYGÜN)__ [#12](../../issues/12) Add and correct information on gemspec
* [f30a3b2](../../commit/f30a3b2) - __(Murat Kemal BAYGÜN)__ [#9](../../issues/9) Update rake job to use installed executable
* [a7200f0](../../commit/a7200f0) - __(Murat Kemal BAYGÜN)__ [#11](../../issues/11) Fix bug Current commits is not seen on log file
* [6385fff](../../commit/6385fff) - __(Murat Kemal BAYGÜN)__ [#8](../../issues/8) Change executable file name to katip

#### 0.2.0

* [61b2f06](../../commit/61b2f06) __(Murat Kemal BAYGÜN)__ Version 0.2.0
* [9bd7659](../../commit/9bd7659) __(Murat Kemal BAYGÜN)__ [#7](../../issues/7) Fix documentation
* [2abca18](../../commit/2abca18) __(Murat Kemal BAYGÜN)__ [#7](../../issues/7) Organize readme, add usage for daktilo
* [b939475](../../commit/b939475) __(Murat Kemal BAYGÜN)__ [#7](../../issues/7) Add output message to inform user
* [99d3b3f](../../commit/99d3b3f) __(Murat Kemal BAYGÜN)__ [#7](../../issues/7) Add executable ruby file to gem to generate default output CHANGELOG.md
* [7265622](../../commit/7265622) __(Murat Kemal BAYGÜN)__ [#4](../../issues/4) Add simple usage documentation on readme
* [61b2f06](../../commit/61b2f06) - __(Murat Kemal BAYGÜN)__ Version 0.2.0
* [9bd7659](../../commit/9bd7659) - __(Murat Kemal BAYGÜN)__ [#7](../../issues/7) Fix documentation
* [2abca18](../../commit/2abca18) - __(Murat Kemal BAYGÜN)__ [#7](../../issues/7) Organize readme, add usage for daktilo
* [b939475](../../commit/b939475) - __(Murat Kemal BAYGÜN)__ [#7](../../issues/7) Add output message to inform user
* [99d3b3f](../../commit/99d3b3f) - __(Murat Kemal BAYGÜN)__ [#7](../../issues/7) Add executable ruby file to gem to generate default output CHANGELOG.md
* [7265622](../../commit/7265622) - __(Murat Kemal BAYGÜN)__ [#4](../../issues/4) Add simple usage documentation on readme

#### 0.1.0
* [de3acfb](../../commit/de3acfb) - __(Onur Ozgur OZKAN)__ [#6](../../issues/6) Update gemspec
* [498c3d6](../../commit/498c3d6) - __(Onur Ozgur OZKAN)__ [#6](../../issues/6) Set gem
* [416e6c8](../../commit/416e6c8) - __(Onur Ozgur OZKAN)__ [#6](../../issues/6) Set gem
* [c820767](../../commit/c820767) - __(Murat Kemal BAYGÜN)__ [#4](../../issues/4) Add CHANGELOG.md file

* [de3acfb](../../commit/de3acfb) __(Onur Ozgur OZKAN)__ [#6](../../issues/6) Update gemspec
* [498c3d6](../../commit/498c3d6) __(Onur Ozgur OZKAN)__ [#6](../../issues/6) Set gem
* [416e6c8](../../commit/416e6c8) __(Onur Ozgur OZKAN)__ [#6](../../issues/6) Set gem
* [c820767](../../commit/c820767) __(Murat Kemal BAYGÜN)__ [#4](../../issues/4) Add CHANGELOG.md file
CHANGELOG.md file is generated by the logger daktilo
and added as current output
* [18fba8f](../../commit/18fba8f) __(Murat Kemal BAYGÜN)__ [#3](../../issues/3) Add logger file

* [18fba8f](../../commit/18fba8f) - __(Murat Kemal BAYGÜN)__ [#3](../../issues/3) Add logger file

Logger file is rewritten by adding a default output file setting
CHANGELOG.md. Who runs the logger file may override output file
by adding a parameter after the command
* [105af37](../../commit/105af37) __(Murat Kemal BAYGÜN)__ Update readme
* [bc56515](../../commit/bc56515) __(Murat Kemal BAYGÜN)__ Initial commit
* [1b1d477](../../commit/1b1d477) __(Murat Kemal BAYGÜN)__ Initial commit

* [105af37](../../commit/105af37) - __(Murat Kemal BAYGÜN)__ Update readme
* [bc56515](../../commit/bc56515) - __(Murat Kemal BAYGÜN)__ Initial commit
* [1b1d477](../../commit/1b1d477) - __(Murat Kemal BAYGÜN)__ Initial commit
9 changes: 3 additions & 6 deletions bin/katip
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,19 @@ def parse_change_log
output << "\n#### #{previous_tag}"
end

output << `git log --pretty=format:" * [%h](#{COMMIT_URL}%h) __(%an)__ %B" "#{current_tag}".."#{previous_tag}" | grep -v "Merge branch "`
output << `git log --pretty=format:" * [%h](#{COMMIT_URL}%h) - __(%an)__ %s%n%n%-b" "#{current_tag}".."#{previous_tag}" | grep -v "Merge branch "`

previous_tag = current_tag
end

output << "\n#### #{previous_tag}"
output << `git log --pretty=format:" * [%h](#{COMMIT_URL}%h) __(%an)__ %B" #{previous_tag} | grep -v "Merge branch "`

output << `git log --pretty=format:" * [%h](#{COMMIT_URL}%h) - __(%an)__ %s%n%n%-b" #{previous_tag} | grep -v "Merge branch "`

output.each do |line|

line.encode!('utf-8', invalid: :replace, undef: :replace, replace: '')

while line.index(/\n\n/)
line.gsub!(/\n\n/, "\n")
end

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

0 comments on commit 6391f34

Please # to comment.