gitlab bot: add a class to track review scanning
the code to scan all merge request notes for reviews is getting messy, going to try moving most of the state into a class. still unsure this is final
This commit is contained in:
parent
1a428e7d29
commit
fca69b1994
@ -161,3 +161,17 @@ class GitlabBot(object):
|
||||
self.client.update(merge_request, assignee_id=new_approver_obj.id)
|
||||
else:
|
||||
log.warning("no approvers left to approve %s, doing nothing", merge_request.title)
|
||||
|
||||
|
||||
class _MergeRequestScanningState(object):
|
||||
|
||||
"""Track the state of a merge request as it is scanned and appropriate action identified."""
|
||||
|
||||
def __init__(self):
|
||||
"""Set default flags/values."""
|
||||
self.approver_list = []
|
||||
|
||||
self.unlogged_approval_reset = False
|
||||
self.unlogged_approval = False
|
||||
self.needs_reviewer = False
|
||||
self.needs_accepter = False
|
||||
|
Loading…
Reference in New Issue
Block a user