Skip to content

Commit

Permalink
deps: dedupe updates list
Browse files Browse the repository at this point in the history
  • Loading branch information
mmkal committed Aug 19, 2024
1 parent 1e37116 commit 49f21ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ jobs:
.filter(Boolean)
.map(match => match[1])
const depsSummary = updatedDeps
const depsSummary = [...new Set(updatedDeps)]
.slice(0, 4)
.map((dep, i, {length}) => {
if (i === 3 && updatedDeps.length > 4) return `and ${updatedDeps.length - 3} more`
if (i > 0 && i === length - 1) return `and ${dep}`
return dep
})
.join(', ').replace(', and', ' and')
const prTitle = `renovate: update ${updatedDeps.length === 1 ? 'dependency' : 'dependencies'} ${depsSummary} 🌲`
const prTitle = `renovate: update ${depsSummary} 🌲`
console.log({prTitle, updateCommits})
const prBody = [
Expand Down

0 comments on commit 49f21ff

Please sign in to comment.