From a1853ff0d5ef2bcd27c993c627fd40a5ce9b2966 Mon Sep 17 00:00:00 2001 From: "Luis H. Ball Jr" Date: Thu, 18 Nov 2021 21:26:25 -0800 Subject: [PATCH] docs(readme): update usage section (#12) --- README.md | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index aef3acd..968a4dc 100644 --- a/README.md +++ b/README.md @@ -49,19 +49,21 @@ $ cd gh-stack $ cargo install --force --path . ``` -```bash -# Required. -# Make sure to give your token read/write access to repositories you want to manage. -$ export GHSTACK_OAUTH_TOKEN='' -# Optional, but recommended. -# If you don't supply this environment variable, you have to pass the `--repository` or `-r` flag to `gh-stack` commands. -$ export GHSTACK_TARGET_REPOSITORY='' -``` - -You can also store these tokens in a file named `.gh-stack.env` in the project root. - ## Usage +> Note: If you don't have a personal access token, you can generate one here: +> https://github.com/settings/tokens. Give your token `repo` scope permissions. + +```bash +# Set the environment variable for the Github API token +$ export GHSTACK_OAUTH_TOKEN='' + +# Set the environment variable for the repository owner/name +$ export GHSTACK_TARGET_REPOSITORY='' + +# You can also set these in a `.gh-stack.env` file in the project root. +``` + ```bash $ gh-stack @@ -84,6 +86,9 @@ $ gh-stack log 'stack-identifier' # to the description of each PR in the stack for a specific repository. $ gh-stack annotate 'stack-identifier' +# Same as above, but for the specified repository. +$ gh-stack annotate 'stack-identifier' -r '' + # Same as above, but precede the markdown table with the # contents of `filename.txt`. $ gh-stack annotate 'stack-identifier' -p filename.txt