Skip to content

Commit

Permalink
Add merge commit to test data
Browse files Browse the repository at this point in the history
  • Loading branch information
cookpete committed Dec 21, 2017
1 parent 3323916 commit 4462118
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/commits.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe('parseCommits', () => {
it('supports startingCommit option', async () => {
const gitLog = await readFile(join(__dirname, 'data', 'git-log.txt'), 'utf-8')
const options = { startingCommit: '17fbef87e82889f01d8257900f7edc55b05918a2' }
expect(parseCommits(gitLog, origins.github, options)).to.have.length(9)
expect(parseCommits(gitLog, origins.github, options)).to.have.length(10)
})

it('invalid startingCommit throws an error', done => {
Expand Down
16 changes: 16 additions & 0 deletions test/data/commits.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,22 @@ export default [
},
"href": "https://github.com/user/repo/commit/0e24bf427a51eac52133cc731b4b5d74a7e04672"
},
{
"hash": "92839699a6aaea148dcd72ea897321e66cae0c18",
"shorthash": "9283969",
"author": "Pete Cook",
"email": "email@example.com",
"date": "2015-12-29T11:35:54+00:00",
"tag": null,
"subject": "Merge remote-tracking branch 'random-branch' into master",
"message": "Merge remote-tracking branch 'random-branch' into master",
"fixes": null,
"merge": null,
"href": "https://github.com/user/repo/commit/92839699a6aaea148dcd72ea897321e66cae0c18",
"files": 1,
"insertions": 1,
"deletions": 0
},
{
"hash": "17fbef87e82889f01d8257900f7edc55b05918a2",
"shorthash": "17fbef8",
Expand Down
9 changes: 9 additions & 0 deletions test/data/git-log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,15 @@ Merge pull request #5 from repo/branch

Should not parse #4 in PR title
__AUTO_CHANGELOG_MESSAGE_SEPARATOR__
__AUTO_CHANGELOG_COMMIT_SEPARATOR__92839699a6aaea148dcd72ea897321e66cae0c18

2015-12-29T11:35:54+00:00
Pete Cook
email@example.com
Merge remote-tracking branch 'random-branch' into master
__AUTO_CHANGELOG_MESSAGE_SEPARATOR__
1 file changed, 1 insertion(+)

__AUTO_CHANGELOG_COMMIT_SEPARATOR__17fbef87e82889f01d8257900f7edc55b05918a2

2015-12-28T11:35:54+00:00
Expand Down

0 comments on commit 4462118

Please sign in to comment.