зеркало из https://github.com/mozilla/bugbug.git
Add extractors for 90 days experience (#285)
This commit is contained in:
Родитель
74ec78472a
Коммит
b480ed563b
|
@ -305,6 +305,16 @@ class commit_author_experience(object):
|
|||
return sum(res) / len(res)
|
||||
|
||||
|
||||
class commit_author_experience_90_days(object):
|
||||
def __call__(self, bug, **kwargs):
|
||||
res = [
|
||||
commit["author_experience_90_days"]
|
||||
for commit in bug["commits"]
|
||||
if not commit["ever_backedout"]
|
||||
]
|
||||
return sum(res) / len(res)
|
||||
|
||||
|
||||
class commit_reviewer_experience(object):
|
||||
def __call__(self, bug, **kwargs):
|
||||
res = [
|
||||
|
@ -315,6 +325,16 @@ class commit_reviewer_experience(object):
|
|||
return sum(res) / len(res)
|
||||
|
||||
|
||||
class commit_reviewer_experience_90_days(object):
|
||||
def __call__(self, bug, **kwargs):
|
||||
res = [
|
||||
commit["reviewer_experience_90_days"]
|
||||
for commit in bug["commits"]
|
||||
if not commit["ever_backedout"]
|
||||
]
|
||||
return sum(res) / len(res)
|
||||
|
||||
|
||||
class commit_no_of_backouts(object):
|
||||
def __call__(self, bug, **kwargs):
|
||||
return sum(1 for commit in bug["commits"] if commit["ever_backedout"])
|
||||
|
|
Загрузка…
Ссылка в новой задаче