Show story after changing state and remove print
This commit is contained in:
parent
16bd00cc20
commit
44f7e57ae1
2 changed files with 3 additions and 4 deletions
|
@ -13,7 +13,6 @@ def put_story(token: str, story_id: int, **kwargs) -> Dict[str, Any]:
|
||||||
r = requests.put(
|
r = requests.put(
|
||||||
f'https://www.pivotaltracker.com/services/v5/stories/{story_id}',
|
f'https://www.pivotaltracker.com/services/v5/stories/{story_id}',
|
||||||
headers={'X-TrackerToken': token}, json=kwargs)
|
headers={'X-TrackerToken': token}, json=kwargs)
|
||||||
print(r.text)
|
|
||||||
return r.json()
|
return r.json()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -180,14 +180,14 @@ def _set_story_state(story: str, state: str) -> None:
|
||||||
@click.option('--scope', default='current')
|
@click.option('--scope', default='current')
|
||||||
@click.option('--show-accepted/--hide-accepted', default=True)
|
@click.option('--show-accepted/--hide-accepted', default=True)
|
||||||
@click.option('--set-state', type=click.Choice([
|
@click.option('--set-state', type=click.Choice([
|
||||||
'started', 'finished', 'delivered', 'rejected', 'accepted']))
|
'planned', 'started', 'finished', 'delivered', 'rejected', 'accepted']))
|
||||||
@require_login
|
@require_login
|
||||||
def stories(project: str, story: Optional[str], scope: str,
|
def stories(project: str, story: Optional[str], scope: str,
|
||||||
show_accepted: bool, set_state: str) -> None:
|
show_accepted: bool, set_state: str) -> None:
|
||||||
if story is not None:
|
if story is not None:
|
||||||
if set_state is not None:
|
if set_state is not None:
|
||||||
_set_story_state(story, set_state)
|
_set_story_state(story, set_state)
|
||||||
else:
|
|
||||||
stories_info(story)
|
stories_info(story)
|
||||||
else:
|
else:
|
||||||
_stories_current(project, scope, show_accepted)
|
_stories_current(project, scope, show_accepted)
|
||||||
|
|
Loading…
Reference in a new issue