@@ -25,14 +25,13 @@ def write_to_markdown(
2525 """
2626 This function writes a list of collaborators to a markdown file in table format
2727 and optionally to GitHub Actions Job Summary if running in a GitHub Actions environment.
28- Each collaborator is represented as a dictionary with keys 'username',
29- 'company', 'contribution_count', 'new_contributor', and 'commits '.
28+ Each collaborator is represented as a ContributorStats object with fields
29+ 'username', ' company', 'contribution_count', 'new_contributor', and 'commit_url '.
3030
3131 Args:
32- collaborators (list): A list of dictionaries, where each dictionary
33- represents a collaborator. Each dictionary should
34- have the keys 'username', 'company', 'contribution_count',
35- and 'commits'.
32+ collaborators (list): A list of ContributorStats objects. Each object should
33+ have the fields 'username', 'company', 'contribution_count',
34+ 'new_contributor', and 'commit_url'.
3635 filename (str): The path of the markdown file to which the table will
3736 be written.
3837 start_date (str): The start date of the date range for the contributor
@@ -166,8 +165,9 @@ def get_summary_table(collaborators, start_date, end_date, total_contributions):
166165 This function returns a string containing a markdown table of the summary statistics.
167166
168167 Args:
169- collaborators (list): A list of dictionaries, where each dictionary represents a collaborator.
170- Each dictionary should have the keys 'username', 'company', 'contribution_count', and 'commits'.
168+ collaborators (list): A list of ContributorStats objects.
169+ Each object should have the fields 'username', 'company',
170+ 'contribution_count', and 'new_contributor'.
171171 start_date (str): The start date of the date range for the contributor list.
172172 end_date (str): The end date of the date range for the contributor list.
173173 total_contributions (int): The total number of contributions made by all of the contributors.
@@ -212,8 +212,9 @@ def get_contributor_table(
212212 This function returns a string containing a markdown table of the contributors and the total contribution count.
213213
214214 Args:
215- collaborators (list): A list of dictionaries, where each dictionary represents a collaborator.
216- Each dictionary should have the keys 'username', 'contribution_count', and 'commits'.
215+ collaborators (list): A list of ContributorStats objects.
216+ Each object should have the fields 'username', 'company',
217+ 'contribution_count', 'commit_url', and 'new_contributor'.
217218 start_date (str): The start date of the date range for the contributor list.
218219 end_date (str): The end date of the date range for the contributor list.
219220 organization (str): The organization for which the contributors are being listed.
@@ -252,7 +253,7 @@ def get_contributor_table(
252253 total_contributions += collaborator .contribution_count
253254 username = collaborator .username
254255 contribution_count = collaborator .contribution_count
255- company = collaborator .company . strip () if collaborator . company else "-"
256+ company = collaborator .company or "-"
256257 if repository :
257258 commit_urls = collaborator .commit_url
258259 if organization :
0 commit comments