Repository is archived
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
`aw` is a command line tool to automate software development workflows based on github pull requests.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0
>= 0

Runtime

~> 2.0.5
~> 0.4.0
~> 2.0
~> 0.19
~> 0.2.0
 Project Readme

Assisted Workflow (aw)

Gem Version Build Status Code Climate Dependency Status Coverage Status

AW is a CLI tool to automate software development workflows based on github pull requests.

Here in Inaka we have the following workflow steps:

  1. Start a pivotal/jira/github story, moving to a new git branch for the new feature/bug fix
  2. Commit the changes, pushing to a new remote branch
  3. Submit a pull-request, allowing other team member to review the code, and merge into master if everything is ok
  4. Finish the story, removing both local and remote feature branches
  5. Deploy master branch.

For more details, please read more about the Inaka's Development Workflow.

This gem provides a command line tool to automate tasks related with start, submit and finish steps.

Contact Us

For questions or general comments regarding the use of this library, please use our public hipchat room.

If you find any bugs or have a problem while using this library, please open an issue in this repo (or a pull request :)).

And you can check all of our open-source projects at inaka.github.io

Installation

On OS X, use homebrew:

$ brew tap inaka/formulas
$ brew install assisted_workflow

You can also install it as a ruby gem, adding this line to your application's Gemfile:

gem 'assisted_workflow'

And then executing:

$ bundle

Or installing it yourself as:

$ gem install assisted_workflow

Initial Setup

assisted_worflow uses .awconfig files to store your credentials and settings. When running the setup command, it will create a global config file placed in your home folder, and one config file specific for a project, inside the project folder. In order to start using it, go to your project folder and run:

$ aw setup

You need to run this command for all projects you want to use assisted_worflow.

If this is your initial setup, you need to inform your pivotal and github keys to allow api access. Do this using the config command:

$ aw config pivotal.fullname='Flavio Granero' --global
$ aw config pivotal.username='flavio' --global
$ aw config pivotal.token=MYPIVOTALTOKEN --global
$ aw config github.token=MYGITHUBOAUTHTOKEN --global
$ aw config branch_username='Username for branch names' --global

Note we're using the --global flag, to store this info in the global config file, valid for all projects. You can get your pivotal Api Token in your profile page and the github api key following the instructions to generate an oauth token.

Make sure to create the github token with the following permissions:

Github permissions

After the global setup, you need to inform the pivotal project_id, storing it in the project .awconfig file:

$ aw config pivotal.project_id=00001

You may want to store the local .awconfig file into the project repository, preventing other users to run this setup step for every project.

Usage

Having the setup step done, you are able to use the following commands to automate your workflow:

  • $ aw start

List your next 5 pending stories in pivotal, showing a table with each story id, estimate and title. In order to include the already started stories in the list, run it with the -a flag.

  • $ aw start STORY_ID

Find and mark a pivotal story as started, moving to a new git branch named with your pivotal username, story id and title. If the story is not estimated yet, you'll see an error message. You can set the estimate before starting it using the option -e 3, for instance.

  • $ aw submit

Submit the current story branch, creating a new github pull request. Once you're done with the story changes and everything is commited, run submit command to rebase the feature branch with master and submit it, creating a new pull request. The pull request url will be added as a note in the pivotal story, marking it as finished.

  • $ aw finish

Run finish command from a feature branch to check if the pull request has been merged into master, and to remove the local and remote branches safety.

There are shortcuts for these 3 main commands. Use $ aw s to start, $ aw u to submit and $ aw f to finish a story.

##Requirements

assisted_workflow assumes you're using an 'origin' remote. If you are not, either add an 'origin' remote that points to the GitHub repository you want to submit pull requests.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request