Skip to content

Commit aacb267

Browse files
author
Emerson Knapp
committed
On TSC mode - only list authors who ended up in the report, and remove unecessary charatcters
Signed-off-by: Emerson Knapp <eknapp@amazon.com>
1 parent f7d1bb0 commit aacb267

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

ros_github_scripts/generate_contribution_report.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def line_format_contribution(node: dict) -> str:
131131
author = node['author']['name']
132132
link = node['permalink']
133133
merged = format_github_time_to_date(node['mergedAt'])
134-
return f'[{title}]({link}) -P {author} (merged {merged})'
134+
return f'[{title}]({link}) - {author} (merged {merged})'
135135

136136

137137
def line_format_contributions(
@@ -145,13 +145,14 @@ def line_format_contributions(
145145
146146
:returns: A list of markdown lines
147147
"""
148+
contrib_authors = set(node['node']['author']['login'] for node in contributions)
148149
lines = [
149-
'# Contributions', '',
150-
'By Authors: {}'.format(', '.join(authors)), '',
151-
'To Repositories in Organizations: {}'.format(', '.join(orgs)), '',
152-
f'Merged Since: {since.isoformat()}', '',
153-
f'This report generated: {datetime.date.today().isoformat()}', '',
154-
f'Contribution count (remember to update if you remove things): {len(contributions)}', '',
150+
'* By Authors: {}'.format(', '.join(contrib_authors)),
151+
'* To Repositories in Organizations: {}'.format(', '.join(orgs)), '',
152+
f'* Merged Since: {since.isoformat()}', '',
153+
f'* This report generated: {datetime.date.today().isoformat()}', '',
154+
f'* Contribution count (remember to update if you remove things): {len(contributions)}',
155+
'',
155156
]
156157

157158
byrepo: Dict[str, List[str]] = {}

0 commit comments

Comments
 (0)