Show story after changing state and remove print

This commit is contained in:
Sijmen 2018-10-17 15:15:56 +02:00
parent 16bd00cc20
commit 44f7e57ae1
2 changed files with 3 additions and 4 deletions

View file

@ -13,7 +13,6 @@ def put_story(token: str, story_id: int, **kwargs) -> Dict[str, Any]:
r = requests.put(
f'https://www.pivotaltracker.com/services/v5/stories/{story_id}',
headers={'X-TrackerToken': token}, json=kwargs)
print(r.text)
return r.json()

View file

@ -180,14 +180,14 @@ def _set_story_state(story: str, state: str) -> None:
@click.option('--scope', default='current')
@click.option('--show-accepted/--hide-accepted', default=True)
@click.option('--set-state', type=click.Choice([
'started', 'finished', 'delivered', 'rejected', 'accepted']))
'planned', 'started', 'finished', 'delivered', 'rejected', 'accepted']))
@require_login
def stories(project: str, story: Optional[str], scope: str,
show_accepted: bool, set_state: str) -> None:
if story is not None:
if set_state is not None:
_set_story_state(story, set_state)
else:
stories_info(story)
else:
_stories_current(project, scope, show_accepted)