MCPcopy Create free account
hub / github.com/FastLED/FastLED / main

Function main

ci/tools/gh_debug.py:520–560  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

518
519
520def main():
521 parser = argparse.ArgumentParser(
522 description="Debug GitHub Actions failures efficiently",
523 formatter_class=argparse.RawDescriptionHelpFormatter,
524 epilog="""
525Examples:
526 %(prog)s 18397776636
527 %(prog)s https://github.com/FastLED/FastLED/actions/runs/18397776636
528 %(prog)s 18397776636 --max-errors 20 --context 10
529 """,
530 )
531 parser.add_argument("run_id", help="GitHub Actions run ID or URL")
532 parser.add_argument(
533 "--max-errors",
534 type=int,
535 default=10,
536 help="Maximum number of errors to collect (default: 10)",
537 )
538 parser.add_argument(
539 "--context",
540 type=int,
541 default=5,
542 help="Lines of context before/after errors (default: 5)",
543 )
544
545 args = parser.parse_args()
546
547 debugger = GitHubDebugger(
548 run_id=args.run_id,
549 max_errors=args.max_errors,
550 context_lines=args.context,
551 )
552
553 try:
554 debugger.debug()
555 except KeyboardInterrupt as ki:
556 handle_keyboard_interrupt(ki)
557 raise
558 except Exception as e:
559 print(f"\nError: {e}", file=sys.stderr)
560 sys.exit(1)
561
562
563if __name__ == "__main__":

Callers 1

gh_debug.pyFile · 0.70

Calls 5

debugMethod · 0.95
GitHubDebuggerClass · 0.85
parse_argsMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected