Skip to content

Commit

Permalink
Remove unique issue filter
Browse files Browse the repository at this point in the history
Broken since storing several issues per commit, so now causes more problems than it solves
  • Loading branch information
cookpete committed Jan 11, 2016
1 parent 07b2de5 commit 11acb7e
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 37 deletions.
2 changes: 0 additions & 2 deletions src/releases.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import semver from 'semver'

import { uniq } from './utils'
import { findFixes, findMerge } from './commits'

export function parseReleases (commits, packageVersion) {
Expand All @@ -23,7 +22,6 @@ function newRelease (tag, date = new Date().toISOString()) {

function commitReducer (releases, commit) {
if (commit.tag && semver.valid(commit.tag)) {
releases[0].fixes = uniq(releases[0].fixes, 'issue') // Remove duplicate fixes
releases.unshift(newRelease(commit.tag, commit.date))
}

Expand Down
14 changes: 0 additions & 14 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,3 @@ export function cmd (cmd, args = [], options = {}) {
child.on('error', reject)
})
}

export function uniq (array, property) {
let unique = {}
let distinct = []

array.forEach(x => {
if (!unique[x[property]]) {
distinct.push(x)
unique[x[property]] = true
}
})

return distinct
}
21 changes: 0 additions & 21 deletions test/utils.js

This file was deleted.

0 comments on commit 11acb7e

Please sign in to comment.