Skip to content

Commit

Permalink
feat(template): add scope to breaking changes
Browse files Browse the repository at this point in the history
Without scope you lose the context, and you cannot easily find out if the breaking change affects you.

Fixes #93
  • Loading branch information
stevemao committed Sep 30, 2015
1 parent 514c4e2 commit d2fdd44
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion templates/angular/footer.hbs
Expand Up @@ -4,7 +4,7 @@
### {{title}}

{{#each notes}}
* {{text}}
* {{#if commit.scope}}{{commit.scope}}: {{/if}}{{text}}
{{/each}}
{{/each}}

Expand Down
2 changes: 1 addition & 1 deletion templates/jshint/footer.hbs
Expand Up @@ -4,7 +4,7 @@
### {{title}}

{{#each notes}}
* {{text}}
* {{#if commit.scope}}{{commit.scope}}: {{/if}}{{text}}
{{/each}}
{{/each}}

Expand Down
19 changes: 11 additions & 8 deletions test/angular.js
Expand Up @@ -17,15 +17,16 @@ describe('presets', function() {
// fix this until https://github.com/arturadib/shelljs/issues/175 is solved
child.exec('git add --all && git commit -m"feat: amazing new module\n\nBREAKING CHANGE: Not backward compatible."', function() {
writeFileSync('test3', '');
shell.exec('git add --all && git commit -m"fix($compile): avoid a bug"');
writeFileSync('test4', '');
shell.exec('git add --all && git commit -m"perf(ngOptions): make it faster"');
writeFileSync('test5', '');
shell.exec('git add --all && git commit -m"revert(ngOptions): make it faster"');
writeFileSync('test6', '');
shell.exec('git add --all && git commit -m"fix(*): oops"');
child.exec('git add --all && git commit -m"fix(compile): avoid a bug\n\nBREAKING CHANGE: The Change is huge."', function() {
writeFileSync('test4', '');
shell.exec('git add --all && git commit -m"perf(ngOptions): make it faster"');
writeFileSync('test5', '');
shell.exec('git add --all && git commit -m"revert(ngOptions): make it faster"');
writeFileSync('test6', '');
shell.exec('git add --all && git commit -m"fix(*): oops"');

done();
done();
});
});
});

Expand All @@ -44,6 +45,7 @@ describe('presets', function() {
expect(chunk).to.include('avoid a bug');
expect(chunk).to.include('make it faster');
expect(chunk).to.include('Not backward compatible.');
expect(chunk).to.include('compile: The Change is huge.');
expect(chunk).to.include('Features');
expect(chunk).to.include('Bug Fixes');
expect(chunk).to.include('Performance Improvements');
Expand All @@ -56,6 +58,7 @@ describe('presets', function() {
expect(chunk).to.not.include('perf');
expect(chunk).to.not.include('revert');
expect(chunk).to.not.include('***:**');
expect(chunk).to.not.include(': Not backward compatible.');

done();
}));
Expand Down

0 comments on commit d2fdd44

Please sign in to comment.