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