-
Notifications
You must be signed in to change notification settings - Fork 36
Adding additional log for support multiple projects from tracker. #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I pulled out just the multiple tracker projects part of my changes and some styling fixes. I made another fix on that same branch that. I didn't feel should be included since it was for the slack module. I will do second pull request for that since it definitely needs additional testing in that module. Please manually test. We did test manually. But it's always good to test on another persons machine. Or even a eat your own dog food approach with some automation with travis and pivotal tracker. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks okay to me. The only caveat I saw is that version bumping will take into consideration all Tracker projects, not just a primary project, in determining whether it's major, minor, or bugfix.
I also think overall it looks okay. I do have a concern here https://github.com/homedepot/flow/pull/51/files#diff-85126f0265dac5f79c7a24f99fe104a9R126 I feel like the break here implies an assumption that story ids are unique across all projects, since we break out of the loop at the first 200 response received. Do we know that story ids are unique across all projects? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PyTest seems happy running locally. Looks fine reading through the changes, just a single comment for messaging, not a stopper.
commons.print_msg(Tracker.clazz, method, "Unable to tag story {story} with label {lbl} \r\n " | ||
"Response: {response}".format(story=story_id, lbl=label, | ||
response=resp.text), 'WARN') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to aggregate these messages to reduce noise for story_id
s which exist on the non-first project, but will succeed on a subsequent project. Not a show stopper, but definitely something to loop back on.
They should be, yes. For instance, if you link someone to a story through their UI, it doesn't include the project id, simply creates a link like |
if Tracker.project_ids is not None: | ||
for project_id in Tracker.project_ids: | ||
tracker_story_details.append( | ||
{'url': Tracker.tracker_url + '/services/v5/projects/' + project_id + '/stories/' + story_id}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if there are any gotchas, but we can probably use the following API to get around having to loop through all the project_id
s
export TOKEN='your Pivotal Tracker API token'
curl -X GET -H "X-TrackerToken: $TOKEN" "https://www.pivotaltracker.com/services/v5/stories/559"
From: https://www.pivotaltracker.com/help/api/rest/v5#Stories (Does not let me link directly to the specific endpoint, scroll down through this section).
Please test this out...this is the just the multiple project support...I've split all the changes i've made into new branches.