Skip to content

Commit 018dc8a

Browse files
committed
chore: add --use-gh-cli flag (does nothing for now)
1 parent 51b8436 commit 018dc8a

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
# v2.0.0
22

3-
Breaking
3+
**Features**
4+
5+
- You can now pass `--use-gh-cli` flag and it will use the [`gh`](https://github.com/cli/cli) CLI. This lets you avoid "Rate limit" errors if you authenticate.
6+
7+
**Breaking**
48

59
I've rewritten the CLI in [Clap](https://github.com/clap-rs/clap) instead of a hand-written parser.
610

711
This has 2 advantages:
812

913
- Easier to maintain. The CLI is now declarative. Help is automatically generated. In total we went from about 3,000 lines of code (mostly tests) to just under 200 for the command-line parsing logic.
1014
- More intuitive. The previous CLI interface was nothing like you'd find in any other command-line app.
15+
- `patchy completions` subcommand generates completion for any shell
1116

1217
And it implies that you can't do stuff like fetch more than 1 PR or Branch using patchy. I don't think people used this much. However, if you'd like to do it you can just invoke `patchy` more than once.
1318

src/cli.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ pub struct Cli {
2020
/// Command to invoke
2121
#[command(subcommand)]
2222
pub command: Command,
23+
/// Use the `gh` CLI to interact with the GitHub API
24+
///
25+
/// This is useful if you run into github's rate limiting
26+
#[arg(long)]
27+
pub use_gh_cli: bool,
2328
}
2429

2530
#[derive(Subcommand, Debug)]

0 commit comments

Comments
 (0)