<commit_before>#!/usr/bin/env perl6

unit sub MAIN (
    Bool :$no-repo-check,
    Str  :$start        = '6.c-errata',
    Str  :$end          = 'HEAD',
    UInt :$n            = 10,
    UInt :$skip         = 0,
    UInt :$skip-batches = 0, # skip this number multiplied by $n
    Str  :$browser      = 'google-chrome',
);

note ｢`git remote` suggests we are NOT inside roast repo. Aborting.｣ and exit 1
  unless $no-repo-check
    or qx/git remote -v/ ~~ m｢'https://github.com/'<-[^/]>+'/roast'｣;

run $browser, qqx｢
  git log --pretty=format:'\%h | \%s' --reverse $start...$end
｣.lines.skip($skip || $n*$skip-batches).grep({
    not /'6.' <[d..z]> ' REVIEW' | ^\S+ ' | Remove trailing whitespace' $/
}).map({
    'https://github.com/perl6/roast/commit/' ~ .words.head<commit_msg>Tweak review tool<commit_after>#!/usr/bin/env perl6

unit sub MAIN (
    Bool :$no-repo-check,
    Str  :$start        = '6.c-errata',
    Str  :$end          = 'HEAD',
    UInt :$n            = 10,
    UInt :$skip         = 0,
    UInt :$skip-batches = 0, # skip this number multiplied by $n
    Str  :$browser      = 'google-chrome',
);

note ｢`git remote` suggests we are NOT inside roast repo. Aborting.｣ and exit 1
  unless $no-repo-check
    or qx/git remote -v/ ~~ m｢'https://github.com/'<-[^/]>+'/roast'｣;

run $browser, qqx｢
  git log --pretty=format:'\%h | \%s' --reverse $start...$end
｣.lines.grep(*.chars).grep({
    not /'6.' <[d..z]> ' REVIEW' | ^\S+ ' | Remove trailing whitespace' $/
}).skip($skip || $n*$skip-batches).map({
    'https://github.com/perl6/roast/commit/' ~ .words.head
{'fraction_non_alphanumeric': 0.20822784810126582, 'fraction_numerical': 0.01139240506329114, 'mean_word_length': 2.356687898089172, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '3997544', 'n_tokens_mistral': 668, 'n_tokens_neox': 609, 'n_words': 149}