DEVX-59: fix: make repo arg optional in publish CLI, auto-detect from GITHUB_REPOSITORY
Post-merge / detect-type (push) Successful in 14s
Post-merge / validate-commit-msg (push) Successful in 7s
Post-merge / configure-repo (push) Successful in 9s
Post-merge / release (push) Successful in 1m8s
Post-merge / vikunja (push) Successful in 15s
Post-merge / sync-wiki (push) Successful in 1m13s
Post-merge / badges (push) Successful in 1m22s

This commit was merged in pull request #97.
This commit is contained in:
2026-06-26 00:17:55 +00:00
parent ddb2d43b4e
commit 701363d935
3 changed files with 44 additions and 2 deletions
+6 -2
View File
@@ -199,7 +199,7 @@ def is_release_commit(tag: str) -> bool:
@click.command()
@click.argument("tag", required=False)
@click.argument("repo")
@click.argument("repo", required=False)
@click.option(
"--registry-url",
default=None,
@@ -223,11 +223,15 @@ def is_release_commit(tag: str) -> bool:
)
def main(
tag: str | None,
repo: str,
repo: str | None,
registry_url: str | None,
skip_build: bool,
from_tag: bool,
) -> None:
if repo is None:
repo = os.environ.get("GITHUB_REPOSITORY", "")
if not repo:
raise click.ClickException(_("REPO argument is required (or set GITHUB_REPOSITORY env var)."))
if from_tag:
detected_tag = get_latest_tag()
if not detected_tag:
+8
View File
@@ -1135,6 +1135,14 @@
"ru": "Tag is required (or use --from-tag).",
"zh": "Tag is required (or use --from-tag)."
},
"REPO argument is required (or set GITHUB_REPOSITORY env var).": {
"bg": "REPO argument is required (or set GITHUB_REPOSITORY env var).",
"de": "REPO argument is required (or set GITHUB_REPOSITORY env var).",
"en": "REPO argument is required (or set GITHUB_REPOSITORY env var).",
"pl": "Argument REPO jest wymagany (lub ustaw zmienną GITHUB_REPOSITORY).",
"ru": "REPO argument is required (or set GITHUB_REPOSITORY env var).",
"zh": "REPO argument is required (or set GITHUB_REPOSITORY env var)."
},
"Tag v{version} already existed. Publish workflow should already have been triggered.": {
"bg": "Tag v{version} already existed. Publish workflow should already have been triggered.",
"de": "Tag v{version} already existed. Publish workflow should already have been triggered.",