Created
December 23, 2021 08:47
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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