@@ -18,14 +18,13 @@ def write_to_markdown(
1818 """
1919 This function writes a list of collaborators to a markdown file in table format
2020 and optionally to GitHub Actions Job Summary if running in a GitHub Actions environment.
21- Each collaborator is represented as a dictionary with keys 'username',
22- 'company', 'contribution_count', 'new_contributor', and 'commits '.
21+ Each collaborator is represented as a ContributorStats object with fields
22+ 'username', ' company', 'contribution_count', 'new_contributor', and 'commit_url '.
2323
2424 Args:
25- collaborators (list): A list of dictionaries, where each dictionary
26- represents a collaborator. Each dictionary should
27- have the keys 'username', 'company', 'contribution_count',
28- and 'commits'.
25+ collaborators (list): A list of ContributorStats objects. Each object should
26+ have the fields 'username', 'company', 'contribution_count',
27+ 'new_contributor', and 'commit_url'.
2928 filename (str): The path of the markdown file to which the table will
3029 be written.
3130 start_date (str): The start date of the date range for the contributor
@@ -156,8 +155,9 @@ def get_summary_table(collaborators, start_date, end_date, total_contributions):
156155 This function returns a string containing a markdown table of the summary statistics.
157156
158157 Args:
159- collaborators (list): A list of dictionaries, where each dictionary represents a collaborator.
160- Each dictionary should have the keys 'username', 'company', 'contribution_count', and 'commits'.
158+ collaborators (list): A list of ContributorStats objects.
159+ Each object should have the fields 'username', 'company',
160+ 'contribution_count', and 'new_contributor'.
161161 start_date (str): The start date of the date range for the contributor list.
162162 end_date (str): The end date of the date range for the contributor list.
163163 total_contributions (int): The total number of contributions made by all of the contributors.
@@ -201,8 +201,9 @@ def get_contributor_table(
201201 This function returns a string containing a markdown table of the contributors and the total contribution count.
202202
203203 Args:
204- collaborators (list): A list of dictionaries, where each dictionary represents a collaborator.
205- Each dictionary should have the keys 'username', 'contribution_count', and 'commits'.
204+ collaborators (list): A list of ContributorStats objects.
205+ Each object should have the fields 'username', 'company',
206+ 'contribution_count', 'commit_url', and 'new_contributor'.
206207 start_date (str): The start date of the date range for the contributor list.
207208 end_date (str): The end date of the date range for the contributor list.
208209 organization (str): The organization for which the contributors are being listed.
@@ -235,7 +236,7 @@ def get_contributor_table(
235236 total_contributions += collaborator .contribution_count
236237 username = collaborator .username
237238 contribution_count = collaborator .contribution_count
238- company = collaborator .company . strip () if collaborator . company else "-"
239+ company = collaborator .company or "-"
239240 if repository :
240241 commit_urls = collaborator .commit_url
241242 if organization :
0 commit comments