@@ -365,27 +365,46 @@ def build_app_context(self, project_overrides: dict[str, str]) -> dict[str, str]
365365 override_value = project_overrides .pop ("description" , None ),
366366 )
367367
368+ author_intro = (
369+ "Who do you want to be credited as the author of this application?\n "
370+ "\n "
371+ "This could be your own name, or the name of your company you work for."
372+ )
373+ default_author = "Jane Developer"
374+ git_username = self .get_git_config_value ("user" , "name" )
375+ if git_username is not None :
376+ default_author = git_username
377+ author_intro = (
378+ f"{ author_intro } \n \n "
379+ f"Based on your git configuration, we believe it could be '{ git_username } '."
380+ )
368381 author = self .console .text_question (
369- intro = (
370- "Who do you want to be credited as the author of this application?\n "
371- "\n "
372- "This could be your own name, or the name of your company you work for."
373- ),
382+ intro = author_intro ,
374383 description = "Author" ,
375- default = "Jane Developer" ,
384+ default = default_author ,
376385 override_value = project_overrides .pop ("author" , None ),
377386 )
378387
388+ author_email_intro = (
389+ "What email address should people use to contact the developers of "
390+ "this application?\n "
391+ "\n "
392+ "This might be your own email address, or a generic contact address "
393+ "you set up specifically for this application."
394+ )
395+ git_email = self .get_git_config_value ("user" , "email" )
396+ if git_email is None :
397+ default_author_email = self .make_author_email (author , bundle )
398+ else :
399+ default_author_email = git_email
400+ author_email_intro = (
401+ f"{ author_email_intro } \n \n "
402+ f"Based on your git configuration, we believe it could be '{ git_email } '."
403+ )
379404 author_email = self .console .text_question (
380- intro = (
381- "What email address should people use to contact the developers of "
382- "this application?\n "
383- "\n "
384- "This might be your own email address, or a generic contact address "
385- "you set up specifically for this application."
386- ),
405+ intro = author_email_intro ,
387406 description = "Author's Email" ,
388- default = self . make_author_email ( author , bundle ) ,
407+ default = default_author_email ,
389408 validator = self .validate_email ,
390409 override_value = project_overrides .pop ("author_email" , None ),
391410 )
0 commit comments