diff --git a/update.js b/update.js index eeca68d5..1527763f 100755 --- a/update.js +++ b/update.js @@ -32,6 +32,11 @@ module.exports = function update () { return console.error('This build should not update the lockfile. It could be a PR, not a branch build.') } + // legacy support + if (config.branchPrefix === 'greenkeeper/' && info.branchName.startsWith('greenkeeper-')) { + config.branchPrefix = 'greenkeeper-' + } + if (!info.branchName.startsWith(config.branchPrefix)) { return console.error('Not a Greenkeeper branch') } diff --git a/upload.js b/upload.js index bf97397d..45175df6 100755 --- a/upload.js +++ b/upload.js @@ -8,11 +8,19 @@ const info = require('./ci-services')() const env = process.env module.exports = function upload () { + // legacy support + if (config.branchPrefix === 'greenkeeper/' && info.branchName.startsWith('greenkeeper-')) { + config.branchPrefix = 'greenkeeper-' + } + if (!info.branchName.startsWith(config.branchPrefix)) { return console.error('Not a Greenkeeper branch') } - if (info.branchName === (config.branchPrefix + 'initial')) { + const isInitial = info.branchName === (config.branchPrefix + 'initial') || + info.branchName === (config.branchPrefix + 'update-all') + + if (isInitial) { return console.error('Not a Greenkeeper update pull request') }