Skip to content

Commit

Permalink
Merge pull request #25 from btnguyen2k/dev
Browse files Browse the repository at this point in the history
Fix: duplicated commit messages
  • Loading branch information
btnguyen2k authored Aug 11, 2023
2 parents 4f2317c + 51efbc7 commit f462bdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
1 change: 0 additions & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

### Fixed/Improvement

- Improvement: prevent duplicated commit messages
- Improvement: prevent duplicated commit messages

## 2023-08-11 - v2.0.0
Expand Down
8 changes: 3 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,9 @@ async function computeReleaseNotes(octokit) {
const commits = await utils.getAllCommits(octokit, {...filterCommits, sha: branch})
for (const commit of commits) {
const commitMsg = commit.commit.message.trim()
for (const msg of messages) {
if (msg === commitMsg) {
// prevent duplicated messages
continue
}
if (messages.some(msg => msg === commitMsg)) {
// prevent duplicated messages
continue
}
messages.push(commitMsg)
}
Expand Down

0 comments on commit f462bdd

Please sign in to comment.