Skip to content

Commit 33bd1f3

Browse files
Add script to print GitHub workflow run errors
This script allows users to specify a workflow name and branch to find the latest run. It then identifies any failed jobs within that run and prints the last N lines of logs for each failed step. Key features: - Fetches the most recent workflow run for a given workflow and branch. - Identifies jobs within the run that have a 'failure' conclusion. - For each failed job, attempts to identify failed steps and extracts their logs. - Prints the last 500 lines (configurable) of the log for each failed step. - Handles various scenarios including successful runs, running workflows, and missing data. - Supports GitHub token via CLI arg, env var, or ~/.github_token. - Auto-detects repository from git remote, or accepts via CLI args.
1 parent 648848c commit 33bd1f3

File tree

1 file changed

+410
-0
lines changed

1 file changed

+410
-0
lines changed

0 commit comments

Comments
 (0)