renovate/lib/util/ignore.ts

14 lines
390 B
TypeScript
Raw Normal View History

2019-08-15 06:26:21 +00:00
import { logger } from '../logger';
import { regEx } from './regex';
2019-08-15 06:26:21 +00:00
export function isSkipComment(comment?: string): boolean {
if (comment && regEx(/^(renovate|pyup):/).test(comment)) {
const command = comment.split('#')[0].split(':')[1].trim();
2018-11-15 17:42:01 +00:00
if (command === 'ignore') {
return true;
}
logger.debug('Unknown comment command: ' + command);
2018-11-15 17:42:01 +00:00
}
return false;
}