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

feat: suppressNotifications=prValidation

Adds option to suppress PR validations by adding ‘prValidation’ to the ‘suppressNotifications’ array.

Workaround for #4061
parent 9a3c9cab
No related branches found
No related tags found
No related merge requests found
......@@ -1819,6 +1819,7 @@ const options = [
'artifactErrors',
'deprecationWarningIssues',
'onboardingClose',
'prValidation',
],
cli: false,
env: false,
......
......@@ -17,6 +17,12 @@ async function getRenovateFiles(prNo) {
}
async function validatePrs(config) {
if (
config.suppressNotifications &&
config.suppressNotifications.includes('prValidation')
) {
return;
}
logger.setMeta({ repository: config.repository });
logger.debug('branchPrefix: ' + config.branchPrefix);
const renovatePrs = await getRenovatePrs(config.branchPrefix);
......
......@@ -6,6 +6,9 @@ beforeEach(() => {
describe('workers/repository/validate', () => {
describe('validatePrs()', () => {
it('returns if disabled', async () => {
await validate.validatePrs({ suppressNotifications: ['prValidation'] });
});
it('catches error', async () => {
platform.getPrList.mockReturnValueOnce([
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment