-
Notifications
You must be signed in to change notification settings - Fork 765
Add PR message flags for non-interactive use #12184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for non-interactive PR creation by introducing --message (-m) and --file (-F) flags to the but pr new command. These flags allow users to specify PR title and description without requiring editor prompts, making the command suitable for CI/CD and automation scenarios.
Changes:
- Added
--messageand--fileflags tobut pr newcommand for non-interactive PR message specification - Implemented message parsing logic that treats the first line as title and subsequent lines as description
- Added validation to detect non-interactive environments and require appropriate flags
- Limited custom PR messages to the selected branch only (dependent branches in stacks use default messages)
- Updated skill reference documentation to reflect new flags and behavior
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/but/src/args/forge.rs | Added message and file arguments with mutual exclusivity constraints for the New subcommand |
| crates/but/src/lib.rs | Implemented file reading, message parsing, non-interactive environment detection, and updated create_pr call signature |
| crates/but/src/command/legacy/forge/review.rs | Added PrMessage struct, parse_pr_message function, updated function signatures to thread message through the call chain, limited custom messages to selected branches, and added comprehensive unit tests |
| crates/but/skill/references/reference.md | Updated documentation with examples of -F and -m flags, non-interactive usage guidance, and stacked branch behavior |
| crates/but/skill/SKILL.md | Added quick reference for -F flag and noted stacked branch behavior |
83411d4 to
6fa7c82
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
6fa7c82 to
2313a79
Compare
2313a79 to
0cf2848
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Update PR message docs in skill references Limit custom PR message to selected branch
0cf2848 to
7811643
Compare
Update PR message docs in skill references
Limit custom PR message to selected branch