1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-11-26 06:29:50 +01:00

Move get_editor() and related functions from command-line module to gitea_api.common

This commit is contained in:
2025-07-01 13:25:09 +02:00
parent cd92782d58
commit 666e9ab7c0
5 changed files with 63 additions and 66 deletions

View File

@@ -135,9 +135,8 @@ class PullRequestReviewInteractiveCommand(osc.commandline_git.GitObsCommand):
def decline(self, owner: str, repo: str, number: int):
from osc import gitea_api
from .pr_create import edit_message
message = edit_message(template=DECLINE_REVIEW_TEMPLATE.format(**locals()))
message = gitea_api.edit_message(template=DECLINE_REVIEW_TEMPLATE.format(**locals()))
# remove comments
message = "\n".join([i for i in message.splitlines() if not i.startswith("#")])
@@ -149,9 +148,8 @@ class PullRequestReviewInteractiveCommand(osc.commandline_git.GitObsCommand):
def comment(self, owner: str, repo: str, number: int):
from osc import gitea_api
from .pr_create import edit_message
message = edit_message(template=NEW_COMMENT_TEMPLATE.format(**locals()))
message = gitea_api.edit_message(template=NEW_COMMENT_TEMPLATE.format(**locals()))
# remove comments
message = "\n".join([i for i in message.splitlines() if not i.startswith("#")])