rtk-ai/rtk

gh run view --log: strip runner boilerplate, surface script output

Open

#923 创建于 2026年3月30日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)Rust (2,914 fork)batch import
area:clieffort-mediumenhancementfilter-qualityhelp wantedpriority:medium

仓库指标

Star
 (48,085 star)
PR 合并指标
 (平均合并 11天 1小时) (30 天内合并 45 个 PR)

描述

What

rtk gh run view <id> --log and --log-failed pass through raw GHA log output without filtering. Runner setup boilerplate (provisioner, image version, region, permissions) dominates — actual script content is buried.

Example

rtk gh run view 23733040015 --repo WILSCH-AI-SERVICES/archibus-bulk-import --log-failed

First 30 lines are all runner setup (provisioner version, Azure region, Ubuntu version, image SHA, permissions). The actual validation output (container_name: found — breaks isolation) is at line 217 of 234.

Expected

RTK should strip:

  • Runner provisioner/image/version/region lines
  • ##[group]/##[endgroup] markers and content between them (when it's setup, not script output)
  • GITHUB_TOKEN Permissions block
  • Secret source / Prepare workflow / Download action / Getting action download info lines
  • Post-job cleanup (git config, orphan process cleanup, token revocation)
  • ANSI escape sequences ([36;1m, [0m)
  • UNKNOWN STEP label (replace with step name if extractable)

Surfacing only the actual script output.

Impact

gh run view --log is one of the most token-expensive gh commands. A 500-line log typically has ~50 lines of actual content — 10x context waste in AI agent workflows reading GHA deploy logs.

贡献者指南