Giter VIP home page Giter VIP logo

pivotal_tools's Introduction

pivotal_tools

Geeky command-line interface with additional scrum, planning poker, and changelog generation features

Blog post on its usage

install

pip install pivotal_tools

setup

Add PIVOTAL_TOKEN to your environment

I put mine in ~/.zshenv, like so ...

export PIVOTAL_TOKEN='your token'

Also make sure in your pivotal project settings that you have "Allow API Access" checked (which is currently the default behavior)

usage

A collection of tools to help with your pivotal workflow

changelog

List out projects stories that are delivered or finished (not accepted)

show stories

Lists all stories for a given project (will prompt you if not specified) Can filter by user with the for option By default show the top 20 stories, can specify more (or less) with the number option

show story

Show the details for a given story. passing the project-index parameter will make it faster

open

Will open the given story in a browser. passing the project-index parameter will make it faster

scrum

Will list stories and bugs that team members are working on. Grouped by team member

poker (aka planning)

Help to facilitate a planning poker session

create (feature|bug|chore)

Create a story

CLI

  pivotal_tools create (feature|bug|chore) <title> [<description>] [--project-index=<pi>]
  pivotal_tools (start|finish|deliver|accept|reject) story <story_id> [--project-index=<pi>]
  pivotal_tools show stories [--project-index=<pi>] [--for=<user_name>] [--number=<number_of_stories>]
  pivotal_tools show story <story_id> [--project-index=<pi>]
  pivotal_tools open <story_id> [--project-index=<pi>]
  pivotal_tools changelog [--project-index=<pi>]
  pivotal_tools scrum [--project-index=<pi>]
  pivotal_tools (planning|poker) [--project-index=<pi>]

Options:
  -h --help             Show this screen.
  --for=<user_name>     Username, or initials
  --project-index=<pi>  If you have multiple projects, this is the index that the project shows up in my prompt
                        This is useful if you do not want to be prompted, and then you can pipe the output

pivotal_tools's People

Contributors

jtushman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pivotal_tools's Issues

"create story in label" mode

Our common use case is to enter stories by label, i.e. I first create an admin label, enter all stories related to it, then go on to an user label, create all the stories related to it and so on.

It would be great if pivotal_tools could have this in. I'd expect it to work like this:

What label would you like to create stories on?
>> admin

CREATING STORIES FOR MY SIMPLE PROJECT [label: admin]
---------------------------------------------------------------------

Title:
>> My story title

---> Story "My story title" created under label 'admin'.

Title:
>> My other story title

--> Story "My other story title" created under label 'admin'.

Title:
>>[enter]

What label would you like to create stories on?
>> user

And on.

I'll try to contribute to it later on, despite my non-existent Python skills.

It's a great tool, thanks for sharing it with the community!

Querying for done stories in scrum

Great tool, I especially like to use this in our morning standups. However, we typically discuss what was done yesterday in addition to what we are working on today. So I was trying to add a function to return all of the stories that were done yesterday. The following query works in the tracker UI

accepted:-1d..today

So I would like to use the results of this to include 'what I finished yesterday' in the scrum tool, but when I try to create a function in pivotal.py to do this such as

def accepted_in_last_day_stories(self):
        return self.get_stories('accepted:-1d..today')

I get 0 results. Do you know if this is a limitation of the v3 API or if there is another way to accomplish what I am looking for (stories accepted in the last day)?

Non-ASCII characters in project name causes error

Hey, looks like I’m getting Python encoding errors if my Pivotal project name has a non-ASCII character in it, specifically ‘é’ in my case.

The error:

$ pivotal_tools changelog
Select a Project:
[1] An ASCII Project Name
[2] Another ASCII Project Name
Traceback (most recent call last):
  File "/usr/local/bin/pivotal_tools", line 9, in <module>
    load_entry_point('pivotal-tools==0.14', 'console_scripts', 'pivotal_tools')()
  File "/usr/local/lib/python2.7/dist-packages/pivotal_tools/cli.py", line 508, in main
    project = prompt_project(arguments)
  File "/usr/local/lib/python2.7/dist-packages/pivotal_tools/cli.py", line 353, in prompt_project
    print "[{}] {}".format(idx+1, project.name)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 4: ordinal not in range(128)

The line in question:

print "[{}] {}".format(idx+1, project.name)

Adding the unicode u does fix the problem:

print u"[{}] {}".format(idx+1, project.name)

But I guess this will be a tool-wide issue. Happy to submit a PR if needed, depending on what you think the correct way to fix this is.

Cheers :)

We need tests.

Feel free to disagree, but I think it's a good idea to have them so we don't eventually get regressions.

Passing --project-index to show_story gives list index out of range

When I pass --project-index to show_story, I get error displayed below.
Without specifying this option, it works as expected.

I've installed to a virtualenv, with pip install.
Running on Ubuntu 12.10 (server), Python 2.7.3

$ pivotal_tools show_story 12345678 --project-index=12345
Traceback (most recent call last):
  File "~/bin/pivotal_tools", line 8, in <module>
    load_entry_point('pivotal-tools==0.13', 'console_scripts', 'pivotal_tools')()
  File "~/local/lib/python2.7/site-packages/pivotal_tools/cli.py", line 487, in main
    show_story(arguments['<story_id>'], arguments)
  File "~/local/lib/python2.7/site-packages/pivotal_tools/cli.py", line 172, in show_story
    story = load_story(story_id, arguments)
  File "~/local/lib/python2.7/site-packages/pivotal_tools/cli.py", line 245, in load_story
    story = Story.find(story_id, project_index=idx)
  File "~/local/lib/python2.7/site-packages/pivotal_tools/pivotal.py", line 78, in find
    project = Project.all()[project_index]
IndexError: list index out of range

Unable to do anything

I apologize for how non-specific this issue is.

I set $PIVOTAL_TOKEN and confirmed that it's correct. But none of the commands work - show_stories always returns None, and add_story gives me a traceback with HTTP 400 (bad request).

Perhaps the solution is better error handling for bad tokens?

UnicodeEncodeError: 'ascii' codec can't encode character u'\xb4' in position 186: ordinal not in range(128) when poker'ing a story

The following stacktrace and crash:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/pivotal_tools", line 9, in
load_entry_point('pivotal-tools==0.14', 'console_scripts', 'pivotal_tools')()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pivotal_tools/cli.py", line 522, in main
poker(project)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pivotal_tools/cli.py", line 249, in poker
pretty_print_story(story)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pivotal_tools/cli.py", line 446, in pretty_print_story
print "[{}] {}".format(initials(note.author), note.text)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xb4' in position 186: ordinal not in range(128)

When poker planning a story with this description:

Created by: Yvette Wesbecher ()
Ticket #:154 http://handshakez.uservoice.com/admin/tickets/154

attachments: []
body: I emailed an invite. This is the link: http://app.handshakez.com/invite/ea21c1b209416c71fae32a52177c742c8aa8b337/engage/

The link isn't working.
channel: cw
created_at: 2013/10/05 13:45:32 +0000
id: 22114377
is_admin_response: False
plaintext_body: I emailed an invite. This is the link: http://app.handshakez.com/invite/ea21c1b209416c71fae32a52177c742c8aa8b337/engage/

The link isn't working.
sender: {u'name': u'Yvette Wesbecher', u'title': None, u'url': u'http://handshakez.uservoice.com/users/33775133-yvette-wesbecher', u'created_at': u'2013/03/07 18:18:18 +0000', u'updated_at': u'2013/09/25 18:06:08 +0000', u'id': 33775133, u'avatar_url': u'https://secure.gravatar.com/avatar/e4d9688100e7391835a77242baa811da?size=70&amp;default=http://cdn.uservoice.com/images/admin/icons/user_70.png', u'karma_score': 4, u'email': u'[email protected]'}
updated_at: 2013/10/05 13:45:32 +0000

UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 8383: ordinal not in range(128)

when doing pivotal_tools scrum {number}
i get this error

Traceback (most recent call last):
  File "/usr/local/bin/pivotal_tools", line 9, in <module>
    load_entry_point('pivotal-tools==0.14', 'console_scripts', 'pivotal_tools')()
  File "/usr/local/lib/python2.7/site-packages/pivotal_tools/cli.py", line 519, in main
    scrum(project)
  File "/usr/local/lib/python2.7/site-packages/pivotal_tools/cli.py", line 228, in scrum
    bugs = project.open_bugs()
  File "/usr/local/lib/python2.7/site-packages/pivotal_tools/pivotal.py", line 247, in open_bugs
    return self.get_stories('type:bug state:unstarted')
  File "/usr/local/lib/python2.7/site-packages/pivotal_tools/pivotal.py", line 219, in get_stories
    stories_root = ET.fromstring(response.text)
  File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML
    parser.feed(text)
  File "/usr/local/Cellar/python/2.7.7_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1640, in feed
    self._parser.Parse(data, 0)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 8383: ordinal not in range(128)

Doesn't work with projects that require HTTPS

Hi, it's me again. The real problem from #1 is that we have our project set up to require access via HTTPS. pivotal_tools uses hard-coded HTTP urls.

I may or may not invest the time to write a patch and fix it. I'd imagine just replacing http with https would work, though ideally there'd be some kind of protocol variable in the URL format strings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.