Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove greenkeeper migration (#6685)
Service discontinued June 3
- Loading branch information
Showing
6 changed files
with
4 additions
and
71 deletions.
There are no files selected for viewing
16 changes: 0 additions & 16 deletions
16
lib/workers/repository/onboarding/branch/__snapshots__/index.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,9 @@ | ||
import is from '@sindresorhus/is'; | ||
import { RenovateConfig } from '../../../../config'; | ||
import { logger } from '../../../../logger'; | ||
import { clone } from '../../../../util/clone'; | ||
import { readLocalFile } from '../../../../util/fs'; | ||
|
||
export async function getOnboardingConfig( | ||
config: RenovateConfig | ||
): Promise<string> { | ||
export function getOnboardingConfig(config: RenovateConfig): string { | ||
const onboardingConfig = clone(config.onboardingConfig); | ||
try { | ||
logger.debug('Checking for greenkeeper config'); | ||
|
||
const greenkeeperConfig = JSON.parse( | ||
await readLocalFile('package.json', 'utf8') | ||
).greenkeeper; | ||
if (greenkeeperConfig) { | ||
onboardingConfig.statusCheckVerify = true; | ||
} | ||
const { label, branchName, ignore } = greenkeeperConfig; | ||
if (label) { | ||
logger.debug({ label }, 'Migrating Greenkeeper label'); | ||
onboardingConfig.labels = [ | ||
String(label).replace('greenkeeper', 'renovate'), | ||
]; | ||
} | ||
if (branchName) { | ||
logger.debug({ branch: branchName }, 'Migrating Greenkeeper branchName'); | ||
onboardingConfig.branchName = String(branchName).replace( | ||
'greenkeeper', | ||
'renovate' | ||
); | ||
} | ||
if (is.nonEmptyArray(ignore)) { | ||
logger.debug({ ignore }, 'Migrating Greenkeeper ignore'); | ||
onboardingConfig.ignoreDeps = ignore.map(String); | ||
} | ||
} catch (err) { | ||
logger.debug('No greenkeeper config migration'); | ||
} | ||
logger.debug({ config: onboardingConfig }, 'onboarding config'); | ||
return JSON.stringify(onboardingConfig, null, 2) + '\n'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters