File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 1212
1313import click
1414from copr .v3 import Client
15- from git import Repo
15+ from git import Repo , GitConfigParser
1616
1717import changelog
1818
@@ -350,6 +350,15 @@ def create_blogpost(
350350 title_text = f"Week { since_week_number } "
351351 file_name = f"week-{ since_week_number } .md"
352352
353+ try :
354+ git_config_mail = GitConfigParser ().get_value ("user" , "email" )
355+ author = git_config_mail .split ("@" )[0 ]
356+ author_string = f"authors: { author } "
357+ except Exception :
358+ author_string = (
359+ "# TODO replace <login> with your kerberos login\n authors: <login>"
360+ )
361+
353362 today = datetime .today ()
354363
355364 click .echo (
@@ -359,6 +368,7 @@ def create_blogpost(
359368 "---\n "
360369 f"title: { title_text } in Packit\n "
361370 f"date: { today .strftime ('%Y-%m-%d' )} \n "
371+ f"{ author_string } \n "
362372 f"tags:\n "
363373 f" - { since .year } -{ since .strftime ('%B' )} \n "
364374 f" - { since .year } \n "
You can’t perform that action at this time.
0 commit comments