diff --git a/lib/platform/bitbucket/index.js b/lib/platform/bitbucket/index.js index a9c8256cb93db760febf59ea753039b8fee0a39d..55932383eb364aaa3a42672626bf2e0579960907 100644 --- a/lib/platform/bitbucket/index.js +++ b/lib/platform/bitbucket/index.js @@ -2,6 +2,7 @@ const parseDiff = require('parse-diff'); const api = require('./bb-got-wrapper'); const utils = require('./utils'); const hostRules = require('../../util/host-rules'); +const { appSlug } = require('../../config/app-strings'); let config = {}; @@ -585,7 +586,7 @@ function getPrBody(input) { return input .replace(/<\/?summary>/g, '**') .replace(/<\/?details>/g, '') - .replace(/\n---\n\n.*?<!-- renovate-rebase -->.*?\n/, '') + .replace(new RegExp(`\n---\n\n.*?<!-- ${appSlug}-rebase -->.*?\n`), '') .substring(0, 50000); } diff --git a/lib/platform/vsts/index.js b/lib/platform/vsts/index.js index 8ed5a4f4897be41ade41e843e3055fea5cf78e53..818a2fc2410fd124818296b4c8e35b51200c3a87 100644 --- a/lib/platform/vsts/index.js +++ b/lib/platform/vsts/index.js @@ -2,6 +2,7 @@ const vstsHelper = require('./vsts-helper'); const vstsApi = require('./vsts-got-wrapper'); const hostRules = require('../../util/host-rules'); +const { appSlug } = require('../../config/app-strings'); const config = {}; @@ -519,7 +520,7 @@ async function mergePr(pr) { function getPrBody(input) { // Remove any HTML we use return input - .replace(/\n---\n\n.*?<!-- renovate-rebase -->.*?\n/, '') + .replace(new RegExp(`\n---\n\n.*?<!-- ${appSlug}-rebase -->.*?\n`), '') .replace('<summary>', '**') .replace('</summary>', '**') .replace('<details>', '') diff --git a/lib/workers/branch/parent.js b/lib/workers/branch/parent.js index 69f969c279958579a45745d7377c5c8d01a06fc6..010087448b6899661475c8314c89d8c85a8c575b 100644 --- a/lib/workers/branch/parent.js +++ b/lib/workers/branch/parent.js @@ -1,3 +1,5 @@ +const { appSlug } = require('../../config/app-strings'); + module.exports = { getParentBranch, }; @@ -20,7 +22,7 @@ async function getParentBranch(config) { logger.info('Manual rebase requested via PR title for #' + pr.number); return { parentBranch: undefined }; } - if (pr.body && pr.body.includes('- [x] <!-- renovate-rebase -->')) { + if (pr.body && pr.body.includes(`- [x] <!-- ${appSlug}-rebase -->`)) { logger.info('Manual rebase requested via PR checkbox for #' + pr.number); return { parentBranch: undefined }; } diff --git a/lib/workers/pr/pr-body.js b/lib/workers/pr/pr-body.js index e9cbe1091bc50288b7a80e260947597144402a35..8c76eee25fc33c71dbee1c796bbd0c43d0ee813f 100644 --- a/lib/workers/pr/pr-body.js +++ b/lib/workers/pr/pr-body.js @@ -4,7 +4,7 @@ const releaseNotesHbs = require('./changelog/hbs-template'); const versioning = require('../../versioning'); -const { appName, urls } = require('../../config/app-strings'); +const { appName, appSlug, urls } = require('../../config/app-strings'); handlebars.registerHelper('encodeURIComponent', encodeURIComponent); @@ -232,8 +232,7 @@ async function getPrBody(config) { config.upgrades.length === 1 ? 'this update' : 'these updates' } again.\n\n`; } - prBody += - '\n\n---\n\n - [ ] <!-- renovate-rebase -->If you want to rebase/retry this PR, check this box\n\n'; + prBody += `\n\n---\n\n - [ ] <!-- ${appSlug}-rebase -->If you want to rebase/retry this PR, check this box\n\n`; // istanbul ignore if if (config.global) { if (config.global.prBanner) {