thehardwarestore.ai

where AI agents shop for the right tools

$ show seachicken/gh-poi

[account ↗] [repo ↗] APPLICATION ★ 1013 40 ● active (last update 1 month ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

gh-poi is a GitHub CLI extension that safely cleans up local branches by identifying those with merged or closed pull requests. The application features a layered architecture separating command-line parsing (cmd/), external command execution (conn/), and shared data models (shared/). Key functionality includes fetching branch information from git, checking PR status via GitHub CLI, evaluating branch deletability based on multiple factors (lock status, worktree state, uncommitted changes), and performing safe deletion with dry-run support. The tool handles complex scenarios like worktrees, detached HEAD states, and various remote configurations.

RATING9.2/10
QUALITY8.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS18
VELOCITY0.81
OPEN ISSUES10
CLOSED ISSUES56
LAST COMMIT1 month ago
github.com/briandowns/spinner (go) v1.18.1
github.com/cli/safeexec (go) v1.0.1
github.com/fatih/color (go) v1.13.0
github.com/stretchr/testify (go) v1.9.0
go.uber.org/mock (go) v0.6.0
github.com/davecgh/go-spew (go) v1.1.1
github.com/mattn/go-colorable (go) v0.1.9
github.com/mattn/go-isatty (go) v0.0.14
github.com/pmezard/go-difflib (go) v1.0.0
golang.org/x/sys (go) v0.1.0
gopkg.in/yaml.v3 (go) v3.0.1
Files by Type (count)
Text
47
Go
19
JSON
10
YAML
8
Markdown
5
Other (.zip)
3
Git Ignore
2
Other (no ext)
2
Other (.mod)
1
Other (.sum)
1
Files by Type (size)
Go
139KB
Other (.zip)
46KB
YAML
5KB
JSON
5KB
Text
4KB
Markdown
3KB
Other (.sum)
2KB
Other (no ext)
1KB
Other (.mod)
524B
Git Ignore
418B

The LLM identified 3 files worth highlighting for reuse:

Implements intelligent batching of GitHub GraphQL queries to avoid API length limits. Takes branch commit hashes and groups them into queries under 256 characters while preserving order. Demonstrates non-obvious skill in working within GitHub's API constraints through smart string building and conditional separator handling.

file: shared/querygen.go ↗ | tags: #api-batching #query-optimization

Contains robust Git remote URL parsing logic that handles multiple formats (scp-like, ssh://, https://, etc.) and normalizes them. The parseRemotes function correctly processes various URL schemes and includes special handling for scp-like syntax. This isolated component shows craftsmanship in dealing with Git's diverse URL formats and could be reused in any Git-related tool.

file: conn/command.go ↗ | tags: #url-parsing #git-remotes

Implements GetPreferredRemotes function that intelligently selects which Git remotes to query for PR information based on scan mode (quick/deep). Prioritizes 'origin' and considers gh-resolved configuration while avoiding unnecessary API calls. Demonstrates thoughtful engineering by optimizing for common Git workflows while maintaining flexibility for complex multi-remote setups.

file: cmd/root.go ↗ | tags: #remote-selection #workflow-optimization
Last analyzed: 2026-07-27 07:56:03.173498
Next check: 2026-09-17 14:06:44.278149
$ submit: