)]}'
{"storyboardclient/v1/storyboard_bot.py":[{"author":{"_account_id":16363,"name":"Pedro Alvarez","email":"pedro.alvarez@softiron.com","username":"pedroalvarez"},"change_message_id":"d6139d834a9b4a7759d5b1501a82c291160409a9","unresolved":false,"context_lines":[{"line_number":26,"context_line":"gerritEvents \u003d gerritThing.getEvent()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def getDetailsFromGerrit(events):"},{"line_number":29,"context_line":"    for key, value in gerritEvents.items():"},{"line_number":30,"context_line":"       if (key\u003d\u003d\"change\"):"},{"line_number":31,"context_line":"          status \u003d value.get(\u0027status\u0027)"},{"line_number":32,"context_line":"          message \u003d value.get(\u0027commitMessage\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_1cca8f6d","line":29,"range":{"start_line":29,"start_character":22,"end_line":29,"end_character":42},"updated":"2016-05-19 17:48:39.000000000","message":"can gerritEvents have more than one event? if so, here you are only handling one, and then forgetting about the others. In that case, it might be a good idea to call \u0027storyboardUpdater\u0027 inside of this module instead of calling \u0027return\u0027 with the data.","commit_id":"b8403486c475389744fd92947d6331f67b43b7c0"},{"author":{"_account_id":16963,"name":"Zara","email":"thezarazia@gmail.com","username":"Zara"},"change_message_id":"4a20a630194e9ab955e5ede42854cd0e182e47c3","unresolved":false,"context_lines":[{"line_number":26,"context_line":"gerritEvents \u003d gerritThing.getEvent()"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"def getDetailsFromGerrit(events):"},{"line_number":29,"context_line":"    for key, value in gerritEvents.items():"},{"line_number":30,"context_line":"       if (key\u003d\u003d\"change\"):"},{"line_number":31,"context_line":"          status \u003d value.get(\u0027status\u0027)"},{"line_number":32,"context_line":"          message \u003d value.get(\u0027commitMessage\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_623ca6c8","line":29,"range":{"start_line":29,"start_character":22,"end_line":29,"end_character":42},"in_reply_to":"bab6814e_1cca8f6d","updated":"2016-05-20 14:02:14.000000000","message":"Hm, I think I\u0027ve named this misleadingly, I believe it\u0027s one event... so it just processes the most recent one. well, that\u0027s the intended behaviour, at least. I\u0027m not even sure what happens if if takes longer to process an event than for multiple new events to appear (or if that\u0027s possible), would imagine this script would end up missing events... but I\u0027m not even confident of that.","commit_id":"b8403486c475389744fd92947d6331f67b43b7c0"},{"author":{"_account_id":16363,"name":"Pedro Alvarez","email":"pedro.alvarez@softiron.com","username":"pedroalvarez"},"change_message_id":"f0ee6b793b95772809c38dde9d298014db282f5d","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"while True\u003d\u003dTrue:"},{"line_number":57,"context_line":"    storyboardUpdater(status, message, owner) #\u0027owner\u0027 doesn\u0027t do anything yet, but we\u0027d like to make the task assignee the owner in the end"},{"line_number":58,"context_line":"    gerritEvents \u003d gerritThing.getEvent()"},{"line_number":59,"context_line":"    status, message, owner \u003d getDetailsFromGerrit(gerritEvents)"},{"line_number":60,"context_line":"#lines above kinda work, break after a bit. Whenever it can\u0027t find what it\u0027s looking for, this script crashes."}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_7902cd70","line":57,"range":{"start_line":57,"start_character":48,"end_line":57,"end_character":136},"updated":"2016-05-19 17:36:20.000000000","message":"Interesting idea. I guess we only can do this if we have the email of the user, and that email is registered in StoryBoard? It should be possible but we might need to add some support in the API.\n\nI\u0027d call \u0027storyboardUpdater\u0027 after \u0027getDetailsFromGerrit\u0027, and remove the previous \u0027getDetailsFromGerrit\u0027 on line #37","commit_id":"b8403486c475389744fd92947d6331f67b43b7c0"},{"author":{"_account_id":16963,"name":"Zara","email":"thezarazia@gmail.com","username":"Zara"},"change_message_id":"4a20a630194e9ab955e5ede42854cd0e182e47c3","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"while True\u003d\u003dTrue:"},{"line_number":57,"context_line":"    storyboardUpdater(status, message, owner) #\u0027owner\u0027 doesn\u0027t do anything yet, but we\u0027d like to make the task assignee the owner in the end"},{"line_number":58,"context_line":"    gerritEvents \u003d gerritThing.getEvent()"},{"line_number":59,"context_line":"    status, message, owner \u003d getDetailsFromGerrit(gerritEvents)"},{"line_number":60,"context_line":"#lines above kinda work, break after a bit. Whenever it can\u0027t find what it\u0027s looking for, this script crashes."}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_42cd2284","line":57,"range":{"start_line":57,"start_character":48,"end_line":57,"end_character":136},"in_reply_to":"bab6814e_7902cd70","updated":"2016-05-20 14:02:14.000000000","message":"will try, and see how it goes, thanks :). Yeah, I\u0027d planned to use the name, since I *think* that\u0027s the least likely to be different (the options are \u0027name\u0027, \u0027email\u0027 and [gerrit]\u0027username\u0027); I think that \u0027name\u0027 should correspond to user_full_name in storyboard, in general. We *could* check against all three for a match to either the name or email. But that\u0027s probably not worth digging into just yet.","commit_id":"b8403486c475389744fd92947d6331f67b43b7c0"}]}
