2019-08-15 00:26:21 -06:00
|
|
|
import { logger } from '../logger';
|
2021-10-27 08:37:11 -06:00
|
|
|
import { regEx } from './regex';
|
2019-07-15 03:04:05 -06:00
|
|
|
|
2019-08-15 00:26:21 -06:00
|
|
|
export function isSkipComment(comment?: string): boolean {
|
2022-02-11 03:02:30 -07:00
|
|
|
if (comment && regEx(/^(renovate|pyup):/).test(comment)) {
|
2020-04-12 10:09:36 -06:00
|
|
|
const command = comment.split('#')[0].split(':')[1].trim();
|
2018-11-15 10:42:01 -07:00
|
|
|
if (command === 'ignore') {
|
|
|
|
return true;
|
|
|
|
}
|
2020-02-24 00:43:01 -07:00
|
|
|
logger.debug('Unknown comment command: ' + command);
|
2018-11-15 10:42:01 -07:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|