From e51005fb942530a625f7651bed9ad973c6ce4b7f Mon Sep 17 00:00:00 2001 From: Holger Frey Date: Fri, 10 Jan 2025 09:43:10 +0100 Subject: [PATCH] added a cli for creating MBP issue references --- pyproject.toml | 1 + work_helpers/sg_mbp_issue.py | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 work_helpers/sg_mbp_issue.py diff --git a/pyproject.toml b/pyproject.toml index be1bda7..dc458a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,7 @@ random_ints = "work_helpers.random_int:generate_random_number_list" sensospot_rename = "work_helpers.sensospot_rename:sensospot_rename" sg_mbp_new_version = "work_helpers.sg_mbp_build:sg_mbp_new_version" sg_mbp_build = "work_helpers.sg_mbp_build:sg_mbp_build" +sg_mbp_issue_ref = "work_helpers.sg_mbp_issue:sg_mbp_issue_ref" xls2changelog = "work_helpers.excel2changelog:cli" xls2markdown = "work_helpers.excel2markdown:cli" xls2pylist = "work_helpers.excel2pylist:cli" diff --git a/work_helpers/sg_mbp_issue.py b/work_helpers/sg_mbp_issue.py new file mode 100644 index 0000000..e03ab26 --- /dev/null +++ b/work_helpers/sg_mbp_issue.py @@ -0,0 +1,12 @@ +import click +import pyperclip + +MBP_ISSUE_BASE = "Safeguard/MBP-issues" + + +@click.command() +@click.argument("issue", type=int) +def sg_mbp_issue_ref(issue): + reference = f"{MBP_ISSUE_BASE}#{issue}" + pyperclip.copy(f"{MBP_ISSUE_BASE}#{issue}") + click.echo(reference) \ No newline at end of file