Skip to content

Commit 2c3ced6

Browse files
authored
fix: Danger - recognize PR links based on full URL instead of just the PR number. (#68)
* fix: Danger - recognize PR links based on full URL instead of just the PR number. * fixup * fixup 2
1 parent 38b327b commit 2c3ced6

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Fixes
6+
7+
- Danger - recognize PR links based on full URL instead of just the PR number. ([#68](https://github.com/getsentry/github-workflows/pull/68))
8+
59
### Dependencies
610

711
- Bump `danger/danger-js` from v11.1.2 to v11.3.1 ([#59](https://github.com/getsentry/github-workflows/pull/59))

danger/dangerfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ async function checkChangelog() {
7979
changelogFile
8080
);
8181

82-
const changelogMatch = RegExp(`^(.*)\n[^\n]+#${danger.github.pr.number}\\b`, 's').exec(
82+
const changelogMatch = RegExp(`^(.*?)\n[^\n]+(\\(${danger.github.pr.html_url}\\)|#${danger.github.pr.number}\\b)`, 's').exec(
8383
changelogContents
8484
);
8585

0 commit comments

Comments
 (0)