Skip to content

[Code Quality] Create workflow health dashboard command (gh aw health) #12595

Closed

Description

@github-actions

Description

Create a new gh aw health command that displays workflow success/failure rates, execution trends, and health metrics over time. This enables proactive monitoring to catch degrading workflows before they become critical issues.

Current Behavior

  • No centralized view of workflow health
  • Must manually check each workflow's GitHub Actions page
  • No historical trend analysis or anomaly detection
  • Issues discovered reactively when workflows fail

Desired Behavior

  • gh aw health shows summary of all workflows with success rates
  • gh aw health workflow-name shows detailed metrics for specific workflow
  • Historical analysis: last 7/30/90 days
  • Trend indicators (improving ↑, stable →, degrading ↓)
  • Alerting when success rate drops below threshold (default 80%)

Files Affected

  • pkg/cli/health_command.go (new file)
  • pkg/cli/health_metrics.go (new file)
  • pkg/cli/flags.go (add health-related flags)

Suggested Changes

  1. Create health_command.go following CLI command patterns
  2. Implement summary view (all workflows)
  3. Implement detailed view (single workflow)
  4. Fetch workflow runs from GitHub API (7/30/90 days)
  5. Calculate success rate, failure rate, average duration
  6. Detect trends with visual indicators
  7. Add --threshold flag for alerting
  8. Support table and JSON output formats

Success Criteria

  • gh aw health shows all workflow summaries
  • gh aw health (workflow-name) shows detailed metrics
  • Historical analysis for 7/30/90 days works
  • Trend detection implemented (↑→↓ indicators)
  • --threshold flag highlights low success rates
  • --json flag for programmatic consumption
  • Unit tests and integration tests added
  • Documentation in CLI reference
  • Health monitoring guide created

Example Output

Workflow Health Summary (Last 7 Days)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Workflow                 Success Rate  Trend  Avg Duration
issue-monster.md         100%  (50/50) ↑      2m 30s
code-review.md           94%   (47/50) →      3m 15s
dependency-update.md     78%   (39/50) ↓ ⚠️   5m 45s

⚠️ 1 workflow below 80% success threshold
ℹ Run 'gh aw health (workflow-name)' for details

Priority

High - Provides proactive visibility, prevents user-reported issues, critical for scaling 198+ workflows

Source

Extracted from Repository Quality Improvement Report - Workflow Health Monitoring #12540 - Task 2

AI generated by Discussion Task Miner - Code Quality Improvement Agent

  • expires on Feb 12, 2026, 5:15 PM UTC

Activity

  1. github-actions commented on Jan 30, 2026

    @github-actions
    ContributorAuthor

    🍪 Issue Monster has assigned this to Copilot!

    I've identified this issue as a good candidate for automated resolution and assigned it to the Copilot agent.

    The Copilot agent will analyze the issue and create a pull request with the fix.

    Om nom nom! 🍪

    AI generated by Issue Monster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions