Skip to content

Conversation

@luqven
Copy link
Owner

@luqven luqven commented Dec 29, 2025

Summary

Add status.rs with the core status functionality:

  • StatusBit enum (Passed/Failed/Pending/NotApplicable)
  • PrStatus struct with CI/approval/mergeable/stack_clear bits
  • build_status_entries() - fetch and compute status for stack
  • render_status() - format output with status bits (unicode/ASCII)
  • render_status_json() - JSON output format
  • Legend detection via ~/.gh-stack-legend-seen (first-run only)
  • Title truncation to 50 chars

Output Format

◉ feature-3 (current) #125 - Add final feature...
│ [✓ ✗ ✓ ✗]  2 hours ago
│
│ - abc1234 Add widget component
│
◯ main

Status: [CI | Approved | Mergeable | Stack]

Tests

38 tests including:

  • 29 unit tests for status bit logic, formatting, stack computation
  • 9 snapshot tests for output rendering (ASCII, Unicode, JSON)

Dependencies

  • Adds dirs crate for home directory detection
  • Adds Serialize derive to CommitInfo for JSON output

Part 3 of 5 in the status-command stack

Stacked PR Chain: status-command

PR Title Merges Into
#30 Add head_sha/html_url accessors to PullRequest -
#31 Add GitHub Checks API module #30
#32 👉Add status module with core logic and rendering #31
#33 Add status subcommand and log --status flag #32
#34 Add status command documentation #33

Add status.rs with:
- StatusBit enum (Passed/Failed/Pending/NotApplicable)
- PrStatus struct with CI/approval/mergeable/stack_clear bits
- build_status_entries() - fetch and compute status for stack
- render_status() - format output with status bits (unicode/ASCII)
- render_status_json() - JSON output format
- Legend detection via ~/.gh-stack-legend-seen (first-run only)
- Title truncation to 50 chars

Includes 38 tests:
- 29 unit tests for status bit logic, formatting, stack computation
- 9 snapshot tests for output rendering

Also adds dirs dependency for home directory detection and
Serialize derive to CommitInfo for JSON output.
@luqven
Copy link
Owner Author

luqven commented Dec 29, 2025

Landed via #34

@luqven luqven closed this Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants