Browse Source

added a cli for creating MBP issue references

master
Holger Frey 1 week ago
parent
commit
e51005fb94
  1. 1
      pyproject.toml
  2. 12
      work_helpers/sg_mbp_issue.py

1
pyproject.toml

@ -26,6 +26,7 @@ random_ints = "work_helpers.random_int:generate_random_number_list"
sensospot_rename = "work_helpers.sensospot_rename:sensospot_rename" sensospot_rename = "work_helpers.sensospot_rename:sensospot_rename"
sg_mbp_new_version = "work_helpers.sg_mbp_build:sg_mbp_new_version" 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_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" xls2changelog = "work_helpers.excel2changelog:cli"
xls2markdown = "work_helpers.excel2markdown:cli" xls2markdown = "work_helpers.excel2markdown:cli"
xls2pylist = "work_helpers.excel2pylist:cli" xls2pylist = "work_helpers.excel2pylist:cli"

12
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)
Loading…
Cancel
Save