From d0971146d3d39d396ec6c4845647fe5c3406c1c9 Mon Sep 17 00:00:00 2001 From: Liam Morley Date: Wed, 5 May 2021 18:14:13 -0400 Subject: [PATCH] Update README to clarify instructions --- .github/workflows/release.yml | 6 ++---- README.md | 40 +++++++++++++++++++++++++---------- 2 files changed, 31 insertions(+), 15 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2b3ddb8..8121348 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,10 +51,8 @@ jobs: uses: actions/setup-go@v2 with: go-version: 1.15 - - name: Build Git Story View - run: go build -v -o git-story-view ./cli/git-story-view/main.go - - name: Build Git Story Open - run: go build -v -o git-story-open ./cli/git-story-open/main.go + - name: Build + run: go build -v -o . ./cli/... - name: Zip up release run: tar -zvc git-story-* > ${{github.workspace}}/git-story-darwin-x64.tar.gz - name: Upload Release Asset diff --git a/README.md b/README.md index e50c0df..c199d65 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# git-story-branch +# git-story -So you've got a branch, and it's in support of a particular user story, so you put your story id at the end of your branch name. +So you've got a git branch, and it's in support of a particular [Pivotal Tracker](https://www.pivotaltracker.com) user story, so you put your [story ID](https://www.pivotaltracker.com/help/articles/working_with_stories/) at the end of your branch name. -With the power of `git-story-branch`, this allows you to: +With the power of `git-story`, this allows you to: 1. Open the story for the current branch in your browser 2. Delete old branches for stories that have already been accepted @@ -13,36 +13,54 @@ At least, it will, some day. ## Installation -1. Configure your tracker API token +1. Configure your [Pivotal Tracker API token](https://www.pivotaltracker.com/help/articles/api_token/) ```sh export TRACKER_API_TOKEN="YOUR PIVOTAL TRACKER API TOKEN" # https://www.pivotaltracker.com/help/articles/api_token/ ``` -2. Setup the homebrew tap and install Git-Story +2. Setup the homebrew tap and install git-story ```sh $ brew tap git-story-branch/tap $ brew install git-story ``` -3. Use the git subcommand to get the story! +## Usage +`git-story` is useful when your git branch name ends in the story ID of the Pivotal Tracker story you're working on: ```sh -git story-view +$ git checkout WIP-some-story-1234567890 +``` + +### git story-view : view the details of a story + +```sh +$ git story-view +State: delivered +Description goes here... +``` + +### git story-open : open the story URL in your default browser + +```sh +$ git story-open ``` ## Contributing to Git-Story +We use [ginkgo](https://github.com/onsi/ginkgo) for testing. -To build the source files +To build the CLI tools: ```sh -go build ./cli/main.go +go build -v -o . ./cli/... ``` -To run +To run: ```sh -./main # assuming the library has been built and you're in a branch that has a story ID at the end +# assuming the library has been built and you're in a branch that has a story ID at the end... +./git-story-view +./git-story-open ``` \ No newline at end of file