<commit_before>// Provides dev-time type structures for  `danger` - doesn't affect runtime.
import {DangerDSLType} from '../../node_modules/danger/distribution/dsl/DangerDSL';
declare const danger: DangerDSLType;

export declare function message(message: string): void;
export declare function warn(message: string): void;
export declare function fail(message: string): void;
export declare function markdown(message: string): void;

/**
 * PR rules
 */
export let android = {

  /**  Warn when .gradle or Manifest.xml files are modified */
  async modifiedGradleOrManifest() {
    const hasFileWithPattern = (array: string[], pattern: string): boolean => {
      const patternRegex = new RegExp(`.*${pattern}`, 'gi');
      const fileChanged = array.findIndex(file => patternRegex.test(file)) > -1;
      return fileChanged;
    };

    if (hasFileWithPattern(danger.git.modified_files, 'Manifest.xml')) {
      warn('This PR changes the "Manifest.xml" file.');
    }

    if (hasFileWithPattern(danger.git.modified_files, '.gradle')) {<commit_msg>Change method param<commit_after>// Provides dev-time type structures for  `danger` - doesn't affect runtime.
import {DangerDSLType} from '../../node_modules/danger/distribution/dsl/DangerDSL';
declare const danger: DangerDSLType;

export declare function message(message: string): void;
export declare function warn(message: string): void;
export declare function fail(message: string): void;
export declare function markdown(message: string): void;

/**
 * PR rules
 */
export let android = {

  /**  Warn when .gradle or Manifest.xml files are modified */
  async modifiedGradleOrManifest() {
    const hasFileWithPattern = (array: string[], pattern: RegExp): boolean => {
      const fileChanged = array.findIndex(file => pattern.test(file)) > -1;
      return fileChanged;
    };

    if (hasFileWithPattern(danger.git.modified_files, /Manifest.xml/ig)) {
      warn('This PR changes the "Manifest.xml" file.');
    }

    if (hasFileWithPattern(danger.git.modified_files, /\.gradle/)) {
{'fraction_non_alphanumeric': 0.12983831455169034, 'fraction_numerical': 0.0009799118079372856, 'mean_word_length': 4.249357326478149, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3353488', 'n_tokens_mistral': 596, 'n_tokens_neox': 580, 'n_words': 173}