ci: pr stats: deal with trivial+hotfix PRs
deal wit the case of Trivial+Hotifx and mark it correctly in PR dashboard. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
0bc1a2b314
commit
5529241bc9
1 changed files with 8 additions and 6 deletions
|
@ -92,12 +92,14 @@ def process_pr(pr):
|
||||||
business_days = sum(1 for day in dates if day.weekday() < 5)
|
business_days = sum(1 for day in dates if day.weekday() < 5)
|
||||||
prj['business_days_open'] = business_days
|
prj['business_days_open'] = business_days
|
||||||
|
|
||||||
# less than 2 business days ...
|
trivial = 'Trivial' in labels
|
||||||
if business_days < 2 and not ('Trivial' in labels or 'Hotfix' in labels) or \
|
hotfix = 'Hotfix' in labels
|
||||||
deltah < 4 and 'Trivial' in labels:
|
min_review_time_rule = "no"
|
||||||
prj['time_rule'] = "no"
|
|
||||||
else:
|
if hotfix or (trivial and deltah >= 4) or business_days >= 2:
|
||||||
prj['time_rule'] = "yes"
|
min_review_time_rule = "yes"
|
||||||
|
|
||||||
|
prj['time_rule'] = min_review_time_rule
|
||||||
|
|
||||||
# This is all data we get easily though the Github API and serves as the basis
|
# This is all data we get easily though the Github API and serves as the basis
|
||||||
# for displaying some trends and metrics.
|
# for displaying some trends and metrics.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue