From cd564736f31d3633e2c89fcc86b1ff2d4b7a6db5 Mon Sep 17 00:00:00 2001 From: Timothy Andrew Date: Thu, 18 Jun 2020 11:08:59 +0530 Subject: [PATCH] improve the USAGE section --- README.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 95c2734..7d27d77 100644 --- a/README.md +++ b/README.md @@ -29,25 +29,38 @@ WIt then looks for all PRs containing this containing this identifier and builds ```bash $ export GHSTACK_OAUTH_TOKEN='' +$ gh-stack + +USAGE: + gh-stack + +FLAGS: + -h, --help Prints help information + +SUBCOMMANDS: + annotate Annotate the descriptions of all PRs in a stack with metadata about all PRs in the stack + autorebase Rebuild a stack based on changes to local branches and mirror these changes up to the remote + log Print a list of all pull requests in a stack to STDOUT + rebase Print a bash script to STDOUT that can rebase/update the stack (with a little help) + # Idempotently add a markdown table summarizing the stack # to the description of each PR in the stack. -$ gh-stack github 'stack-identifier' +$ gh-stack annotate 'stack-identifier' # Same as above, but precede the markdown table with the # contents of `filename.txt`. -$ gh-stack github 'stack-identifier' filename.txt +$ gh-stack annotate 'stack-identifier' -p filename.txt # Print a description of the stack to stdout. $ gh-stack log 'stack-identifier' # Automatically update the entire stack, both locally and remotely. # WARNING: This operation modifies local branches and force-pushes. -$ gh-stack autorebase 'stack-identifier' /path/to/repo +$ gh-stack autorebase 'stack-identifier' -C /path/to/repo # Emit a bash script that can update a stack in the case of conflicts. # WARNING: This script could potentially cause destructive behavior. $ gh-stack rebase 'stack-identifier' - ``` ## Strategy