Skip to content

Commit

Permalink
feat(create-version-branch): ignore in-range updates if a lockfile is…
Browse files Browse the repository at this point in the history
… present
  • Loading branch information
finnp authored and christophwitzko committed May 21, 2017
1 parent 8f1a491 commit 68260b1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions jobs/create-version-branch.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ module.exports = async function (
const installation = await installations.get(accountId)
const repository = await repositories.get(repositoryId)

const satisfies = semver.satisfies(version, oldVersion)
const lockFiles = ['package-lock.json', 'npm-shrinkwrap.json', 'yarn.lock']
const hasLockFile = _.some(_.pick(repository.files, lockFiles))
if (satisfies && hasLockFile) return

const billing = await getActiveBilling(accountId)

if (repository.private && !billing) return
Expand Down Expand Up @@ -71,8 +76,6 @@ module.exports = async function (
return parsed.toString()
}

const satisfies = semver.satisfies(version, oldVersion)

const openPR = _.get(
await repositories.query('pr_open_by_dependency', {
key: [repositoryId, dependency],
Expand Down

0 comments on commit 68260b1

Please sign in to comment.