From eefc802fc8e627c1079bb1de1f1ab837275f6c6c Mon Sep 17 00:00:00 2001 From: Dan Stangel Date: Wed, 11 Jun 2014 13:50:09 -0600 Subject: [PATCH] Update gitdm to use gerrit 2.8 workflow names This accomodates the changes in workflow state names from the updated gerrit version 2.8, and allows gitdm's gerritdm tools to continue to work with openstack. Change-Id: Ib28b16f0d68d0b0d0915c46a50824d4e8802c5d5 --- gerrit/parse-reviews.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gerrit/parse-reviews.py b/gerrit/parse-reviews.py index 064b853..47f85e1 100644 --- a/gerrit/parse-reviews.py +++ b/gerrit/parse-reviews.py @@ -34,13 +34,14 @@ class Reviewer: return cls(r.get('username'), r.get('name'), r.get('email')) class Approval: - CodeReviewed, Approved, Submitted, Verified = range(4) + CodeReviewed, Approved, Submitted, Verified, Workflow = range(5) type_map = { - 'CRVW': CodeReviewed, - 'APRV': Approved, + 'Code-Review': CodeReviewed, + 'Approved': Approved, 'SUBM': Submitted, - 'VRIF': Verified, + 'Verified': Verified, + 'Workflow': Workflow, } def __init__(self, type, value, date, by):