func estimateStory(storyID string, estimate int, config config.Config) { req, reqErr := storyupdate.Req(storyID, storyupdate.None, config.UserID, estimate) if reqErr != nil { panic("cant make request for estimating story") } req.Header.Add("X-TrackerToken", config.Token) sendUpdateRequest(req, http.StatusOK, fmt.Sprintf("story estimated at %v points", estimate)) }
func startStory(storyID string, config config.Config) { req, reqErr := storyupdate.Req(storyID, storyupdate.Started, config.UserID, 0) if reqErr != nil { panic("cant make request for starting story") } req.Header.Add("X-TrackerToken", config.Token) sendUpdateRequest(req, http.StatusOK, "story started") }
func deliverStory(storyID string, config config.Config) { req, reqErr := storyupdate.Req(storyID, storyupdate.Delivered, 0, 0) if reqErr != nil { panic("cant make request for delivering story") } req.Header.Add("X-TrackerToken", config.Token) sendUpdateRequest(req, http.StatusOK, "story delivered") }