@@ -214,9 +214,7 @@ async def contribute_readme_md(
214
214
self ,
215
215
repo : AliceGitRepo ,
216
216
base : "BaseBranch" ,
217
- commit_message : Optional [
218
- "ReadmeCommitMessage"
219
- ] = "Recommended Community Standard: Add README" ,
217
+ commit_message : "ReadmeCommitMessage" ,
220
218
) -> "ReadmeBranch" :
221
219
# Attempt multiple commands
222
220
async for event , result in dffml .run_command_events (
@@ -379,10 +377,11 @@ async def readme_issue(
379
377
body ,
380
378
],
381
379
logger = self .logger ,
380
+ events = [dffml .Subprocess .STDOUT ],
382
381
):
383
- if event is Subprocess .STDOUT :
382
+ if event is dffml . Subprocess .STDOUT :
384
383
# The URL of the issue created
385
- return result .strip ()
384
+ return result .strip (). decode ()
386
385
387
386
@staticmethod
388
387
def readme_commit_message (
@@ -392,7 +391,7 @@ def readme_commit_message(
392
391
f"""
393
392
Recommended Community Standard: README
394
393
395
- Closes: # { issue_url }
394
+ Closes: { issue_url }
396
395
"""
397
396
).lstrip ()
398
397
@@ -402,7 +401,7 @@ def meta_issue_body(
402
401
repo : AliceGitRepo ,
403
402
base : AlicePleaseContributeRecommendedCommunityStandardsOverlayGit .BaseBranch ,
404
403
readme_path : AlicePleaseContributeRecommendedCommunityStandards .ReadmePath ,
405
- readme_issue : Optional [ " ReadmeIssue" ] = None ,
404
+ readme_issue : ReadmeIssue ,
406
405
) -> "MetaIssueBody" :
407
406
"""
408
407
>>> AlicePleaseContributeRecommendedCommunityStandardsGitHubIssueOverlay.meta_issue_body(
@@ -417,9 +416,14 @@ def meta_issue_body(
417
416
"""
418
417
return "\n " .join (
419
418
[
420
- f"- [x] [README]({ repo .URL } /blob/{ base } /{ readme_path .relative_to (repo .directory ).as_posix ()} )"
421
- if readme_issue is None
422
- else f"- [ ] { readme_issue } " ,
419
+ "- ["
420
+ + ("x" if readme_issue is None else " " )
421
+ + "] "
422
+ + (
423
+ "README: " + readme_issue
424
+ if readme_issue is not None
425
+ else f"[README]({ repo .URL } /blob/{ base } /{ readme_path .relative_to (repo .directory ).as_posix ()} )"
426
+ ),
423
427
]
424
428
)
425
429
@@ -442,10 +446,11 @@ async def create_meta_issue(
442
446
body ,
443
447
],
444
448
logger = self .logger ,
449
+ events = [dffml .Subprocess .STDOUT ],
445
450
):
446
- if event is Subprocess .STDOUT :
451
+ if event is dffml . Subprocess .STDOUT :
447
452
# The URL of the issue created
448
- return result .strip ()
453
+ return result .strip (). decode ()
449
454
450
455
451
456
# TODO Spawn background task (could use an orchestrator which creates a
0 commit comments