Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
PRESUBMIT.CodeReview Class Reference
Inheritance diagram for PRESUBMIT.CodeReview:

Public Member Functions

def __init__ (self, input_api)
 
def GetOwnerEmail (self)
 
def GetSubject (self)
 
def GetDescription (self)
 
def GetReviewers (self)
 
def GetApprovers (self)
 

Detailed Description

Abstracts which codereview tool is used for the specified issue.

Definition at line 573 of file PRESUBMIT.py.

Constructor & Destructor Documentation

◆ __init__()

def PRESUBMIT.CodeReview.__init__ (   self,
  input_api 
)

Definition at line 576 of file PRESUBMIT.py.

576 def __init__(self, input_api):
577 self._issue = input_api.change.issue
578 self._gerrit = input_api.gerrit
579

Member Function Documentation

◆ GetApprovers()

def PRESUBMIT.CodeReview.GetApprovers (   self)

Definition at line 594 of file PRESUBMIT.py.

594 def GetApprovers(self):
595 approvers = []
596 code_review_label = (
597 self._gerrit.GetChangeInfo(self._issue)['labels']['Code-Review'])
598 for m in code_review_label.get('all', []):
599 if m.get("value") == 1:
600 approvers.append(m["email"])
601 return approvers
602
603

◆ GetDescription()

def PRESUBMIT.CodeReview.GetDescription (   self)

Definition at line 586 of file PRESUBMIT.py.

586 def GetDescription(self):
587 return self._gerrit.GetChangeDescription(self._issue)
588

◆ GetOwnerEmail()

def PRESUBMIT.CodeReview.GetOwnerEmail (   self)

Definition at line 580 of file PRESUBMIT.py.

580 def GetOwnerEmail(self):
581 return self._gerrit.GetChangeOwner(self._issue)
582

◆ GetReviewers()

def PRESUBMIT.CodeReview.GetReviewers (   self)

Definition at line 589 of file PRESUBMIT.py.

589 def GetReviewers(self):
590 code_review_label = (
591 self._gerrit.GetChangeInfo(self._issue)['labels']['Code-Review'])
592 return [r['email'] for r in code_review_label.get('all', [])]
593

◆ GetSubject()

def PRESUBMIT.CodeReview.GetSubject (   self)

Definition at line 583 of file PRESUBMIT.py.

583 def GetSubject(self):
584 return self._gerrit.GetChangeInfo(self._issue)['subject']
585

The documentation for this class was generated from the following file: