Skip to content

Commit

Permalink
feat: Show pull requests merged
Browse files Browse the repository at this point in the history
  • Loading branch information
rafinskipg committed May 8, 2016
1 parent b9edae3 commit 65f5504
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ __my name__
([2d252d89](https://github.com/rafinskipg/git-changelog/commit/2d252d89017a70008896497e36f03e9d2add2c97))


## Test

- Tests fixed
([b9edae3b](https://github.com/rafinskipg/git-changelog/commit/b9edae3bfc64f2a8c2320f6f27326225bd586cc7))


## Chore

- typos and grammar
Expand Down
28 changes: 28 additions & 0 deletions output/tag1.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ __Since tag 1 changelog__

## Bug Fixes

- Fix generation of logs
([cddb2408](https://github.com/rafinskipg/git-changelog/commit/cddb2408fa3017be704acac51dabbba9f477a547))
- correctly detect when running under grunt on Windows
([4205ea49](https://github.com/rafinskipg/git-changelog/commit/4205ea49a893e4d1807a39268739c13754d40cf2))
- fixed tests
([2e60172a](https://github.com/rafinskipg/git-changelog/commit/2e60172a4666c70d27e66d15dad297b89fff9583))
- Stream didn't close properly
([99f228cf](https://github.com/rafinskipg/git-changelog/commit/99f228cfa5cb26c46ef9e3b00171a5e3d38fd844))
- Github commit url
Expand All @@ -30,6 +34,30 @@ __Since tag 1 changelog__
([257119cf](https://github.com/rafinskipg/git-changelog/commit/257119cf2bb6d8f341a5d65a2f47bcf803dff205))


## Pull requests merged

- Merge pull request #46 from zoner14/master
([0485a1fd](https://github.com/rafinskipg/git-changelog/commit/0485a1fd4bf01662f50b93098c6b535eb7c527eb))
- Merge pull request #37 from richardthombs/fix-grunt-on-windows
([5f024339](https://github.com/rafinskipg/git-changelog/commit/5f02433963b5b603c5763bd5c1a37cf8ca9e3598))
- Merge pull request #33 from richardthombs/fix-typos
([2656d150](https://github.com/rafinskipg/git-changelog/commit/2656d150eb95c6ad9326e4265ba64edf8e49a11c))
- Merge pull request #30 from JohnnyEstilles/refactor/get-stream
([a52b1169](https://github.com/rafinskipg/git-changelog/commit/a52b1169a2510d83d6d4fd5113ce157f30c4d4d0))
- Merge pull request #25 from JohnnyEstilles/code-climate
([28053b92](https://github.com/rafinskipg/git-changelog/commit/28053b9292d3d61fb33a004f6088c244e653b76b))
- Merge pull request #23 from JohnnyEstilles/docs/readme-updates
([3079151a](https://github.com/rafinskipg/git-changelog/commit/3079151a8d5f90d0830aab4437a65dff4d837b2a))
- Merge pull request #20 from JohnnyEstilles/feature/code-refactoring
([be209f04](https://github.com/rafinskipg/git-changelog/commit/be209f04c22f1ce2cb82e6412c4ddf117897a9e7))
- Merge pull request #12 from jodybrewster/master
([219ea809](https://github.com/rafinskipg/git-changelog/commit/219ea8091ac81a55b0210c9a7fd41a7f0ee5660f))
- Merge pull request #7 from colegleason/fix-tags
([1d4f6043](https://github.com/rafinskipg/git-changelog/commit/1d4f604363094d4eee3b4d7b1ca01133edaad344))
- Merge pull request #6 from colegleason/add-q
([2a712b9c](https://github.com/rafinskipg/git-changelog/commit/2a712b9cfd912f36b6f7f70d16b336575881881a))



---
<sub><sup>*Generated with [git-changelog](https://github.com/rafinskipg/git-changelog). If you have any problems or suggestions, create an issue.* :) **Thanks** </sub></sup>
17 changes: 16 additions & 1 deletion tasks/lib/organize-commits.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,23 @@
var debug = require('debug')('changelog:organizeCommits');
var format = require('util').format;

function grepSection(sections, commit){
//TODO: MONKEY METHOD, please use the regexp greps

var keys = Object.keys(sections);

for (var i = 0; i < keys.length; i++){
if(commit.subject.indexOf(keys[i]) === 0){
return sections[keys[i]];
}
}

return null;
}

function organizeCommit(sections, commit) {
var section = sections[commit.type];
var section = commit.type ? sections[commit.type] : grepSection(sections, commit) ;

var component = commit.component || this.emptyComponent;

if (section) {
Expand Down
2 changes: 1 addition & 1 deletion tasks/lib/parse-raw-commit.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function parseRawCommit(raw) {
this.log('warn', 'Incorrect message:', msg.hash, msg.subject);
//return null;
}
msg.type = match ? match[1] : 'unknown';
msg.type = match ? match[1] : null;
msg.subject = match ? match[2] : msg.subject;

return msg;
Expand Down

0 comments on commit 65f5504

Please sign in to comment.