Commits from robots are filtered out
After adding of openstack.org company all robots started to match to OpenStack Foundation. The special check is added to ignore commits from robots. Closes bug 1213078 Change-Id: I8292598f4e5767545c1e612165511c4ccf056668
This commit is contained in:
parent
f9e9112230
commit
0ebe272457
@ -1991,7 +1991,9 @@
|
||||
}
|
||||
],
|
||||
"user_name": "OpenStack Robot",
|
||||
"emails": ["review@openstack.org", "jenkins@review.openstack.org", "jenkins@openstack.org", "hudson@openstack.org", "openstack-infra@lists.openstack.org"]
|
||||
"emails": ["review@openstack.org", "jenkins@review.openstack.org",
|
||||
"jenkins@openstack.org", "hudson@openstack.org",
|
||||
"openstack-infra@lists.openstack.org", "elastic-hadoop-ci@mirantis.com"]
|
||||
},
|
||||
{
|
||||
"launchpad_id": "p-draigbrady",
|
||||
|
@ -14,6 +14,19 @@
|
||||
"end_date": null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"launchpad_id": "openstack",
|
||||
"companies": [
|
||||
{
|
||||
"company_name": "*robots",
|
||||
"end_date": null
|
||||
}
|
||||
],
|
||||
"user_name": "OpenStack Robot",
|
||||
"emails": ["review@openstack.org", "jenkins@review.openstack.org",
|
||||
"jenkins@openstack.org", "hudson@openstack.org",
|
||||
"openstack-infra@lists.openstack.org", "elastic-hadoop-ci@mirantis.com"]
|
||||
}
|
||||
],
|
||||
|
||||
@ -33,6 +46,10 @@
|
||||
{
|
||||
"company_name": "Intel",
|
||||
"domains": ["intel.com"]
|
||||
},
|
||||
{
|
||||
"domains": ["openstack.org"],
|
||||
"company_name": "OpenStack Foundation"
|
||||
}
|
||||
],
|
||||
|
||||
|
@ -125,9 +125,14 @@ class RecordProcessor(object):
|
||||
|
||||
record['user_id'] = user['user_id']
|
||||
|
||||
company = self._get_company_by_email(email)
|
||||
if not company:
|
||||
company = self._find_company(user['companies'], record['date'])
|
||||
company_by_user = self._find_company(user['companies'], record['date'])
|
||||
if company_by_user == '*robots':
|
||||
# don't map robots by email
|
||||
company = company_by_user
|
||||
else:
|
||||
company = self._get_company_by_email(email)
|
||||
if not company:
|
||||
company = company_by_user
|
||||
record['company_name'] = company
|
||||
|
||||
if ('user_name' in user) and (user['user_name']):
|
||||
@ -157,7 +162,8 @@ class RecordProcessor(object):
|
||||
|
||||
self._update_record_and_user(review)
|
||||
|
||||
yield review
|
||||
if record['company_name'] != '*robots':
|
||||
yield review
|
||||
|
||||
def _spawn_marks(self, record):
|
||||
review_id = record['id']
|
||||
|
Loading…
x
Reference in New Issue
Block a user