Add agent-aware help text and --list-labels flag#51
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR improves git-open-pull’s CLI ergonomics by making --help more informative (including agent-aware hints), adding discovery/agent-support flags, and reducing configuration friction via better defaults and environment-variable support.
Changes:
- Add agent-aware
--helpoutput plus an embedded--skilldocument (fromSKILL.md). - Add
--list-labelsto enumerate repo labels, and default--drafttotrue(especially for non-interactive usage). - Improve settings loading: support
GITHUB_TOKEN, infer default base repo from remotes, and auto-detectmainvsmaster.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
SKILL.md |
Adds an embedded skill doc intended for agent guidance and consistent CLI usage. |
settings.go |
Adds non-interactive settings loading, GITHUB_TOKEN support, base repo inference, and base branch auto-detection. |
README.md |
Updates environment-variable documentation (but needs formatting correction). |
git-open-pull.go |
Implements new flags/help output, integrates settings pre-load for --help, and changes draft defaults/flow. |
go.mod |
Adds agentdetection dependency and bumps Go toolchain version. |
go.sum |
Adds checksums for the new dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+159
to
+167
| if *listLabels { | ||
| labels, err := Labels(ctx, client, settings) | ||
| if err != nil { | ||
| log.Fatal(err) | ||
| } | ||
| for _, label := range labels { | ||
| fmt.Println(label) | ||
| } | ||
| return |
f7d2ce0 to
7a7e1da
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improves the CLI experience for AI agents and users by expanding
--helpoutput, better describe missing settings, and adding a--list-labelsflag. auto-detection formainvsmasteris also included to simplify use.An embedded skill file is also provided for more complete guidance.
Changes:
--helpnow always shows a summary of what git-open-pull does and which account/repo/branch code will be pushed to (loaded from settings before flag parsing)agentdetection.IsAgent()),--helpalso shows a hint to run--list-labelsfirst before passing--labels--list-labelsflag lists all repository labels and exits, reusing the existingLabels()helper--skillflag lists an agent SKILL file.--draft=truefor non-interactive calls.Adds
github.com/jehiah/agentdetectionas a direct dependency.