Skip to content

Commit

Permalink
Fix pull request URL
Browse files Browse the repository at this point in the history
  • Loading branch information
cookpete committed Oct 31, 2017
1 parent 3208c73 commit 3f6daaa
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/commits.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,5 @@ function getPullLink (id, origin) {
if (origin.hostname === 'gitlab.com') {
return `${origin.repoURL}/merge_requests/${id}`
}
return `${origin.repoURL}/pulls/${id}`
return `${origin.repoURL}/pull/${id}`
}
4 changes: 2 additions & 2 deletions test/commits.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('getMerge', () => {
expect(getMerge(message, origin.github)).to.deep.equal({
id: '3',
message: 'Pull request title',
href: 'https://github.com/user/repo/pulls/3'
href: 'https://github.com/user/repo/pull/3'
})
})

Expand All @@ -108,7 +108,7 @@ describe('getMerge', () => {
expect(getMerge(message, origin.github)).to.deep.equal({
id: '10',
message: 'Update dependencies to enable Greenkeeper 🌴',
href: 'https://github.com/user/repo/pulls/10'
href: 'https://github.com/user/repo/pull/10'
})
})

Expand Down
4 changes: 2 additions & 2 deletions test/data/commits.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default [
"merge": {
"id": "5",
"message": "Should not parse #4 in PR title",
"href": "https://github.com/user/repo/pulls/5"
"href": "https://github.com/user/repo/pull/5"
},
"href": "https://github.com/user/repo/commit/0e24bf427a51eac52133cc731b4b5d74a7e04672"
},
Expand Down Expand Up @@ -135,7 +135,7 @@ export default [
"merge": {
"id": "3",
"message": "Pull request title",
"href": "https://github.com/user/repo/pulls/3"
"href": "https://github.com/user/repo/pull/3"
},
"href": "https://github.com/user/repo/commit/31b7d3da24d64e32a0a7e558f254d01c348613f3"
},
Expand Down
4 changes: 2 additions & 2 deletions test/data/releases.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default [
{
"id": "5",
"message": "Should not parse #4 in PR title",
"href": "https://github.com/user/repo/pulls/5"
"href": "https://github.com/user/repo/pull/5"
}
],
"tag": "v0.0.2",
Expand Down Expand Up @@ -136,7 +136,7 @@ export default [
{
"id": "3",
"message": "Pull request title",
"href": "https://github.com/user/repo/pulls/3"
"href": "https://github.com/user/repo/pull/3"
}
],
"tag": "v0.0.1",
Expand Down
4 changes: 2 additions & 2 deletions test/data/template-compact.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ Generated by [auto-changelog](https://github.com/CookPete/auto-changelog).

#### [v0.0.2](https://github.com/user/repo/compare/v0.0.1...v0.0.2)
> 28 December 2015
- Should not parse #4 in PR title [`#5`](https://github.com/user/repo/pulls/5)
- Should not parse #4 in PR title [`#5`](https://github.com/user/repo/pull/5)
- Commit 4 fixes #4 in the subject [`#4`](https://github.com/user/repo/issues/4)

#### v0.0.1
> 15 December 2015
- Pull request title [`#3`](https://github.com/user/repo/pulls/3)
- Pull request title [`#3`](https://github.com/user/repo/pull/3)
- Second commit [`#1`](https://github.com/user/repo/issues/1) [`#2`](https://github.com/user/repo/issues/2)
- First commit [`158fdde`](https://github.com/user/repo/commit/158fdde54b6188c9f9ca3034e9cb5bcc3fe3ff69)

4 changes: 2 additions & 2 deletions test/data/template-json.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
{
"id": "5",
"message": "Should not parse #4 in PR title",
"href": "https://github.com/user/repo/pulls/5"
"href": "https://github.com/user/repo/pull/5"
}
],
"tag": "v0.0.2",
Expand Down Expand Up @@ -136,7 +136,7 @@
{
"id": "3",
"message": "Pull request title",
"href": "https://github.com/user/repo/pulls/3"
"href": "https://github.com/user/repo/pull/3"
}
],
"tag": "v0.0.1",
Expand Down
4 changes: 2 additions & 2 deletions test/data/template-keepachangelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ Generated by [auto-changelog](https://github.com/CookPete/auto-changelog).

## [v0.0.2](https://github.com/user/repo/compare/v0.0.1...v0.0.2) - 2015-12-28
### Merged
- Should not parse #4 in PR title [`#5`](https://github.com/user/repo/pulls/5)
- Should not parse #4 in PR title [`#5`](https://github.com/user/repo/pull/5)

### Fixed
- Commit 4 fixes #4 in the subject [`#4`](https://github.com/user/repo/issues/4)

## v0.0.1 - 2015-12-15
### Merged
- Pull request title [`#3`](https://github.com/user/repo/pulls/3)
- Pull request title [`#3`](https://github.com/user/repo/pull/3)

### Fixed
- Second commit [`#1`](https://github.com/user/repo/issues/1) [`#2`](https://github.com/user/repo/issues/2)
Expand Down

0 comments on commit 3f6daaa

Please sign in to comment.