data/data_collection.py
def _collect_signals_for_one_pull_request(
            self, pull_request_info: dict
    ) -> List:
        """Collects the signals given pull request information dict.

        Args:
            pull_request_info: A dict of pull request information.
        Returns:
            A list of values which are the signals for one pull request.
        """
        contributor = pull_request_info['user']['login']
        pull_request_number = pull_request_info['number']
        print("Collecting signals for pull request number %s"
              % pull_request_number)

        pull_request_created_time, pull_request_closed_time, \
            pull_request_review_time = self._get_pull_request_review_time(
                pull_request_info)

        reverted_pull_request_number, pull_request_revert_time = \
            self._get_reverted_pull_request_info(pull_request_info)

        review_comments_msg = self._get_review_comments_body(
            pull_request_number)
        issue_comments_msg = self._get_issue_comments_body(
            pull_request_number)
        approved_reviewers = self._get_approved_reviewers(
            pull_request_number)

        num_review_comments = len(review_comments_msg)
        num_issue_comments = len(issue_comments_msg)
        num_approved_reviewers = len(approved_reviewers)

        commits = get_pull_request_commits(
            self._repo_name, pull_request_number, self._auth)
        num_commits = len(commits)

        file_versions = self._get_file_versions(commits)
        check_run_results = self._get_check_run_results(commits)

        file_changes_tuple = self._get_file_changes(pull_request_number)
        if file_changes_tuple:
            files_changes, num_line_changes = file_changes_tuple
        else:
            files_changes = []
            num_line_changes = 0

        datum = [self._repo_name, pull_request_number, contributor,
                 pull_request_created_time, pull_request_closed_time,
                 pull_request_review_time, reverted_pull_request_number,
                 pull_request_revert_time, num_review_comments,
                 review_comments_msg, num_issue_comments, issue_comments_msg,
                 num_approved_reviewers, approved_reviewers,
                 num_commits, num_line_changes, files_changes,
                 file_versions, check_run_results]
        return datum
Collects the signals given pull request information dict.

        Args:
            pull_request_info: A dict of pull request information.
        Returns:
            A list of values which are the signals for one pull request.
        
Collects the signals given pull request information dict.
Collects the signals given pull request information dict .
def _collect_signals_for_one_pull_request(
            self, pull_request_info: dict
    ) -> List:
        contributor = pull_request_info['user']['login']
        pull_request_number = pull_request_info['number']
        print("Collecting signals for pull request number %s"
              % pull_request_number)
        pull_request_created_time, pull_request_closed_time, \
            pull_request_review_time = self._get_pull_request_review_time(
                pull_request_info)
        reverted_pull_request_number, pull_request_revert_time = \
            self._get_reverted_pull_request_info(pull_request_info)
        review_comments_msg = self._get_review_comments_body(
            pull_request_number)
        issue_comments_msg = self._get_issue_comments_body(
            pull_request_number)
        approved_reviewers = self._get_approved_reviewers(
            pull_request_number)
        num_review_comments = len(review_comments_msg)
        num_issue_comments = len(issue_comments_msg)
        num_approved_reviewers = len(approved_reviewers)
        commits = get_pull_request_commits(
            self._repo_name, pull_request_number, self._auth)
        num_commits = len(commits)
        file_versions = self._get_file_versions(commits)
        check_run_results = self._get_check_run_results(commits)
        file_changes_tuple = self._get_file_changes(pull_request_number)
        if file_changes_tuple:
            files_changes, num_line_changes = file_changes_tuple
        else:
            files_changes = []
            num_line_changes = 0
        datum = [self._repo_name, pull_request_number, contributor,
                 pull_request_created_time, pull_request_closed_time,
                 pull_request_review_time, reverted_pull_request_number,
                 pull_request_revert_time, num_review_comments,
                 review_comments_msg, num_issue_comments, issue_comments_msg,
                 num_approved_reviewers, approved_reviewers,
                 num_commits, num_line_changes, files_changes,
                 file_versions, check_run_results]
        return datum
def _collect_signals_for_one_pull_request ( self , pull_request_info : dict ) -> List : contributor = pull_request_info [ 'user' ] [ 'login' ] pull_request_number = pull_request_info [ 'number' ] print ( "Collecting signals for pull request number %s" % pull_request_number ) pull_request_created_time , pull_request_closed_time , pull_request_review_time = self . _get_pull_request_review_time ( pull_request_info ) reverted_pull_request_number , pull_request_revert_time = self . _get_reverted_pull_request_info ( pull_request_info ) review_comments_msg = self . _get_review_comments_body ( pull_request_number ) issue_comments_msg = self . _get_issue_comments_body ( pull_request_number ) approved_reviewers = self . _get_approved_reviewers ( pull_request_number ) num_review_comments = len ( review_comments_msg ) num_issue_comments = len ( issue_comments_msg ) num_approved_reviewers = len ( approved_reviewers ) commits = get_pull_request_commits ( self . _repo_name , pull_request_number , self . _auth ) num_commits = len ( commits ) file_versions = self . _get_file_versions ( commits ) check_run_results = self . _get_check_run_results ( commits ) file_changes_tuple = self . _get_file_changes ( pull_request_number ) if file_changes_tuple : files_changes , num_line_changes = file_changes_tuple else : files_changes = [ ] num_line_changes = 0 datum = [ self . _repo_name , pull_request_number , contributor , pull_request_created_time , pull_request_closed_time , pull_request_review_time , reverted_pull_request_number , pull_request_revert_time , num_review_comments , review_comments_msg , num_issue_comments , issue_comments_msg , num_approved_reviewers , approved_reviewers , num_commits , num_line_changes , files_changes , file_versions , check_run_results ] return datum
Collects the signals given pull request information dict.
Collects the signals given pull request information dict .
"""Collects the signals given pull request information dict.

        Args:
            pull_request_info: A dict of pull request information.
        Returns:
            A list of values which are the signals for one pull request.
        """
A list of values which are the signals for one pull request.
A list of values which are the signals for one pull request .
self
pull_request_info
dict
A dict of pull request information.
A dict of pull request information .