Skip to content

Commit

Permalink
feat(github-event/push): add greenkeeper.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Realtin authored and hulkoba committed Mar 26, 2018
1 parent d94ac1a commit e06daab
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions jobs/github-event/push.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ module.exports = async function (data) {
'package.json',
'package-lock.json',
'npm-shrinkwrap.json',
'yarn.lock'
'yarn.lock',
'greenkeeper.json'
]

// if .greenkeeperrc
Expand Down Expand Up @@ -64,6 +65,8 @@ module.exports = async function (data) {
}
}

// needs to happen for all the package.jsons
// delete all branches for modified or deleted dependencies
const changes = diff(oldPkg, pkg)

const branches = []
Expand Down Expand Up @@ -110,7 +113,9 @@ function hasRelevantChanges (commits, files) {
return _.some(files, file => {
return _.some(['added', 'removed', 'modified'], changeType => {
return _.some(commits, commit => {
return _.includes(commit[changeType], file)
return _.some(commit[changeType], (path) => {
return path.includes(file)
})
})
})
})
Expand Down

0 comments on commit e06daab

Please sign in to comment.