renovate/lib/util/ignore.ts
RahulGautamSingh 91f067b39f
fix: refactor regex to use re2 part3 (#12283)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2021-10-27 14:37:11 +00:00

14 lines
434 B
TypeScript

import { logger } from '../logger';
import { regEx } from './regex';
export function isSkipComment(comment?: string): boolean {
if (regEx(/^(renovate|pyup):/).test(comment)) {
// TODO #12070 #12071 needs to be checked manually
const command = comment.split('#')[0].split(':')[1].trim();
if (command === 'ignore') {
return true;
}
logger.debug('Unknown comment command: ' + command);
}
return false;
}