diff --git a/lib/workers/global.js b/lib/workers/global.js index 058593989c7f1f3e29b48e9135da9216bb3e210f..7dc75674f54914af4e6f1074db9236bdd4d363a2 100644 --- a/lib/workers/global.js +++ b/lib/workers/global.js @@ -34,5 +34,6 @@ function getRepositoryConfig(globalConfig, index) { repoConfig.logger = logger.child({ repository: repoConfig.repository, }); + repoConfig.isGitHub = repoConfig.platform === 'github'; return configParser.filterConfig(repoConfig, 'repository'); } diff --git a/lib/workers/pr.js b/lib/workers/pr.js index e1b8a448302d0dc09b6ad8c171108398c7faeb3c..adc77c2221c0a010ac2ea9a16a47711c113dfe39 100644 --- a/lib/workers/pr.js +++ b/lib/workers/pr.js @@ -99,7 +99,6 @@ async function ensurePr(upgrades, logger) { // Update the config object Object.assign(config, upgrades[0]); - config.isGitHub = config.platform === 'github'; const prTitle = handlebars.compile(config.prTitle)(config); const prBodyMarkdown = handlebars.compile(config.prBody)(config); diff --git a/test/workers/pr.spec.js b/test/workers/pr.spec.js index 7656ac354cd71e02be44c9d4d9b50e04c1c56158..bb6a2b332473709492cd36d774c48a1f475a25c7 100644 --- a/test/workers/pr.spec.js +++ b/test/workers/pr.spec.js @@ -180,6 +180,7 @@ describe('workers/pr', () => { }); it('should return unmodified existing PR', async () => { config.depName = 'dummy'; + config.isGitHub = true; config.currentVersion = '1.0.0'; config.newVersion = '1.1.0'; config.api.getBranchPr = jest.fn(() => existingPr);