Skip to content

Commit

Permalink
fix: filter out null values in issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianKuesters committed Mar 22, 2024
1 parent 6c8dd98 commit 5555e59
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29199,6 +29199,7 @@ class GitHubRepositoryUtils {
const referencedIssuesAndPrs = commits
.map((commit) => commit.commit.message.match(/#\d+/g))
.flat()
.filter((issue) => issue !== null)
.map((issue) => parseInt(issue.replace("#", "")));
// Remove duplicates
const numbers = Array.from(new Set(referencedIssuesAndPrs));
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/utils/GitHubRepositoryUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default class GitHubRepositoryUtils {
const referencedIssuesAndPrs = commits
.map((commit) => commit.commit.message.match(/#\d+/g))
.flat()
.filter((issue) => issue !== null)
.map((issue) => parseInt(issue.replace("#", "")));

// Remove duplicates
Expand Down

0 comments on commit 5555e59

Please sign in to comment.