Skip to content

Instantly share code, notes, and snippets.

@JJ
Created December 23, 2021 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JJ/e1285c0a33ce45905d359b426fe96a74 to your computer and use it in GitHub Desktop.
Save JJ/e1285c0a33ce45905d359b426fe96a74 to your computer and use it in GitHub Desktop.
GitHub action step to chart the latest number of files changed in commits using Raku
- name: Install Text::Chart
run: zef install Text::Chart
- name: Chart files changed latest commits
shell: raku {0}
run: |
use Text::Chart;
my @changed-files = qx<git log --oneline --shortstat -$COMMITS>
.lines.grep( /file/ )
.map( * ~~ /$<files>=(\d+) \s+ file/ )
.map: +*<files>;
say vertical(
:max( @changed-files[0..*-2].max),
@changed-files[0..*-2]
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment