Created
February 3, 2015 19:32
-
-
Save hazeledmands/675e6690dabd386aef1a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pivotal = require 'pivotal' | |
fibrous = require 'fibrous' | |
shelljs = require 'shelljs' | |
slug = require 'slug' | |
humanparser = require 'humanparser' | |
token = # ???? | |
projectId = # ??? | |
name = # ??? | |
pivotal.useToken token | |
start = fibrous (storyId) -> | |
human = humanparser.parseName(name) | |
story = pivotal.sync.getStory projectId, storyId | |
slug = "#{human.firstName}/#{slug(story.name.slice(0, 40))}-#{storyId}".toLowerCase() | |
shelljs.exec "git checkout -b #{slug}" | |
# mark story as started | |
# story.current_state = 'started' | |
# pivotal.sync.updateStory projectId, story | |
start '79156070', (err) -> | |
if err | |
console.error "ERROR" | |
console.error err.stack |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment