Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip package heading for single package repos #53

Merged
merged 4 commits into from
May 27, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Changelog: Use for-of loop to iterate over commits
Turbo87 committed May 27, 2017

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit 14e20e87c7b30314012244a0ccdc355c3b781bb5
7 changes: 4 additions & 3 deletions src/Changelog.js
Original file line number Diff line number Diff line change
@@ -71,9 +71,10 @@ export default class Changelog {

const headings = Object.keys(commitsByPackage);
for (const heading of headings) {
markdown += `\n${heading}`;
const commits = commitsByPackage[heading];

commitsByPackage[heading].forEach((commit) => {
markdown += `\n${heading}`;
for (const commit of commits) {
markdown += "\n * ";

if (commit.number) {
@@ -89,7 +90,7 @@ export default class Changelog {
}

markdown += `${commit.title}. ([@${commit.user.login}](${commit.user.html_url}))`;
});
}
}
}