Skip to content

Commit 221ebb9

Browse files
authored
Fix PR number detection in existing change entries (#83)
The `update` command will filter out any commits that are the result of PRs that have been referenced already in the changelog. Unfortunately this PR number detection only looked at the beginning of the entry. This was because prior to #66, that's where it would be by default (though this was always a poor decision, because it was always possible to update the change entry and reference the PR anywhere). This is especially broken since #66. We now look for things that look like PR numbers anywhere in the change description.
1 parent d88826a commit 221ebb9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/update-changelog.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function getAllLoggedPrNumbers(changelog: Changelog) {
8888
const prNumbersWithChangelogEntries = [];
8989
for (const description of changeDescriptions) {
9090
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
91-
const matchResults = description!.match(/^\[#(\d+)\]/u);
91+
const matchResults = description!.match(/\[#(\d+)\]/u);
9292
if (matchResults === null) {
9393
continue;
9494
}

0 commit comments

Comments
 (0)