8000 Add PR Links as Task List Items to Issues by saadmk11 · Pull Request #518 · python/bedevere · GitHub
[go: up one dir, main page]

Skip to content

Add PR Links as Task List Items to Issues #518

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 13, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleanup
  • Loading branch information
saadmk11 committed Nov 7, 2022
commit 9e04a169b329f8b91fd7ced28afbe56c508a4ff3
6 changes: 3 additions & 3 deletions bedevere/util.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import enum
import re
import sys
from typing import Any, Dict, Union
from typing import Any, Dict

import gidgethub
from gidgethub.abc import GitHubAPI
Expand All @@ -25,7 +25,7 @@
ISSUE_BODY_TAG_NAME = f"gh-linked-{PR}s"
ISSUE_BODY_OPENING_TAG = f'<!-- {ISSUE_BODY_TAG_NAME} -->'
ISSUE_BODY_CLOSING_TAG = f'<!-- /{ISSUE_BODY_TAG_NAME} -->'
ISSUE_BODY_TEMPLATE = f"""\n
ISSUE_BODY_TASK_LIST_TEMPLATE = f"""\n
{ISSUE_BODY_OPENING_TAG}
```[tasklist]
### Linked PRs
Expand Down Expand Up @@ -145,7 +145,7 @@ def build_issue_body(pr_number: int, body: str) -> str:

if not result:
# If the body doesn't contain a tasklist, we add one using the template
body += ISSUE_BODY_TEMPLATE.format(pr_number=pr_number)
body += ISSUE_BODY_TASK_LIST_TEMPLATE.format(pr_number=pr_number)
return body

# If the body already contains a tasklist, only add the new PR to the list
Expand Down
0