mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 23:14:57 +08:00
1.9 KiB
1.9 KiB
| name | description | args | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| hack | Implement a GitHub issue end-to-end until CI passes |
|
This command implements a GitHub issue from start to finish, ensuring all CI checks pass.
Usage: /hack <github-issue-url> [plan_mode]
What it does:
- Fetches the GitHub issue details using
ghCLI - Analyzes the issue requirements and creates an implementation plan
- If plan_mode=true, presents plan for approval before implementing
- Implements the requested feature or fix
- Creates a commit with proper issue reference
- Runs
om cito validate the implementation - Iterates and fixes any CI failures until all checks pass
Workflow:
- Parse the GitHub issue URL to extract repository and issue number
- Use
gh apito fetch issue title, description, and labels - Create a detailed implementation plan based on issue requirements
- Implement the solution step by step
- Commit changes with concise description
- Run
om ciand analyze any failures - Fix CI issues and re-run until all checks pass
- Provide final status report
Prerequisites:
- GitHub CLI (
gh) must be authenticated - Must be in a git repository with a non-mainline branch
- omnix (
om) must be available for CI checks - Repository must have CI configured via omnix
Error handling:
- Validates GitHub URL format
- Handles GitHub API errors gracefully
- Provides detailed feedback on CI failures
- Supports iterative fixing until CI passes
Examples:
/hack https://github.com/myorg/myproject/issues/42
/hack https://github.com/myorg/myproject/issues/42 true
First example directly implements issue #42. Second example creates a plan first and waits for approval before implementing.