Skip to content
Snippets Groups Projects
Commit 32e21408 authored by Rhys Arkins's avatar Rhys Arkins
Browse files

fix(deprecations): do not raise warnings for onboarding repos

parent c742ac02
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,13 @@ module.exports = { ...@@ -3,7 +3,13 @@ module.exports = {
}; };
async function raiseDeprecationWarnings(config, packageFiles) { async function raiseDeprecationWarnings(config, packageFiles) {
if (config.suppressNotifications && config.suppressNotifications.includes('deprecationWarningIssues')) { if (!config.repoIsOnboarded) {
return;
}
if (
config.suppressNotifications &&
config.suppressNotifications.includes('deprecationWarningIssues')
) {
return; return;
} }
const deprecatedPackages = {}; const deprecatedPackages = {};
......
...@@ -8,7 +8,15 @@ Array [ ...@@ -8,7 +8,15 @@ Array [
Please take the actions necessary to rename or substitute this deprecated package and commit to your base branch. If you wish to ignore this deprecation warning and continue using \`foo\` as-is, please add it to your [ignoreDeps](https://renovatebot.com/docs/configuration-options/#ignoredeps) array in Renovate config before closing this issue, otherwise another issue will be recreated the next time Renovate runs. Please take the actions necessary to rename or substitute this deprecated package and commit to your base branch. If you wish to ignore this deprecation warning and continue using \`foo\` as-is, please add it to your [ignoreDeps](https://renovatebot.com/docs/configuration-options/#ignoredeps) array in Renovate config before closing this issue, otherwise another issue will be recreated the next time Renovate runs.
Affected package file(s): \`package.json\`, \`frontend/package.json\`", Affected package file(s): \`package.json\`, \`frontend/package.json\`
Would you like to disable Renovate's deprecation warning issues? Add the following to your config:
\`\`\`
\\"suppressNotifications\\": [\\"deprecationWarningIssues\\"]
\`\`\`
",
], ],
] ]
`; `;
...@@ -4,14 +4,20 @@ const { ...@@ -4,14 +4,20 @@ const {
describe('workers/repository/process/deprecated', () => { describe('workers/repository/process/deprecated', () => {
describe('raiseDeprecationWarnings()', () => { describe('raiseDeprecationWarnings()', () => {
it('returns if onboarding', async () => {
const config = {};
await raiseDeprecationWarnings(config, {});
});
it('returns if disabled', async () => { it('returns if disabled', async () => {
const config = { const config = {
repoIsOnboarded: true,
suppressNotifications: ['deprecationWarningIssues'], suppressNotifications: ['deprecationWarningIssues'],
}; };
await raiseDeprecationWarnings(config, {}); await raiseDeprecationWarnings(config, {});
}); });
it('raises deprecation warnings', async () => { it('raises deprecation warnings', async () => {
const config = { const config = {
repoIsOnboarded: true,
suppressNotifications: [], suppressNotifications: [],
}; };
const packageFiles = { const packageFiles = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment