Last active
May 13, 2025 14:24
-
-
Save triangletodd/c6a909378f1ab25b8cd54ecac0d5d6e9 to your computer and use it in GitHub Desktop.
Parse GitHub GEI migration errors and dump to CSV.
This file contains hidden or 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
#!/usr/bin/env bash | |
set -ex | |
error_files=$(rg 'migration failed' | cut -d':' -f1 | sort | uniq) | |
echo "Failure,Assignee,Status,Reason,Notes" | |
for file in $error_files; do | |
repo="$(grep 'GITHUB REPO' $file | perl -pe 's/.*GITHUB REPO: (.*)/\1/')" | |
error="$(grep 'ERROR' $file | tail -1 | perl -pe 's/.*\[ERROR\] (.*)/\1/'| perl -pe 's/"/""/g')" | |
echo "\"${repo}.log\",,,,\"${error}\"" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment