From c1201777a9a454ec506fedbe58462834b8d3a8a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Wed, 6 Nov 2024 17:10:20 +0100 Subject: [PATCH] fix --- README.md | 6 +++++- poetry.lock | 14 +++++--------- pyproject.toml | 2 +- tag_publish/__init__.py | 5 +++-- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 2d6b750..f2c369a 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,11 @@ It can also contain the following sentences: See also [GitHub Documentation](https://docs.github.com/en/github/managing-security-vulnerabilities/adding-a-security-policy-to-your-repository) -## Publishing +## Configuration + +### Dry run + +Dry run publish: `GITHUB_REF=... c2cciutils-publish --dry-run ...` ### To pypi diff --git a/poetry.lock b/poetry.lock index 9831e17..1e7e42a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -896,28 +896,24 @@ files = [ [[package]] name = "multi-repo-automation" -version = "1.3.0" +version = "1.4.1" description = "Library for automation updates on multiple repositories." optional = false python-versions = ">=3.9" files = [ - {file = "multi_repo_automation-1.3.0-py3-none-any.whl", hash = "sha256:aea5b368bfcab3ccf488d55066d88ace08d709d16b8d7e9f72a15b0512e729a6"}, - {file = "multi_repo_automation-1.3.0.tar.gz", hash = "sha256:f9fdbd78f83a3a71d61515dcda6309ad84529eec662107b52642d038f2fca4a8"}, + {file = "multi_repo_automation-1.4.1-py3-none-any.whl", hash = "sha256:300f299fa4d1e11aa4865f0308afa3a1bcd54a467a2a88b8191166e2b51a9608"}, + {file = "multi_repo_automation-1.4.1.tar.gz", hash = "sha256:d0f2ecc88489ec04b667790490827c5f09c9f21bc6615a41e85d71b41ebb69ac"}, ] [package.dependencies] configupdater = "*" identify = "*" -idna = "*" json5 = "*" PyYAML = "*" requests = "*" "ruamel.yaml" = "*" +security_md = "*" tomlkit = "*" -typing_extensions = "*" - -[package.extras] -update-stabilization-branches = ["c2cciutils"] [[package]] name = "mypy" @@ -2218,4 +2214,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<4.0" -content-hash = "6d01ee17306b54d746d5638ee00f1b9d64e39e69a257dd240185582f64eb6d58" +content-hash = "bb870a867f40e1c77c5e26b9cf2123cc78b891e9d823d48763c02065b7994c3b" diff --git a/pyproject.toml b/pyproject.toml index ba92f22..5f9fc60 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,7 +69,7 @@ security-md = "0.2.3" application-download = "0.0.1.dev3" PyGithub = "2.4.0" debian-inspector = "31.1.0" -multi-repo-automation = "1.3.0" +multi-repo-automation = "1.4.1" [tool.poetry.group.dev.dependencies] prospector = { version = "1.12.1", extras = ["with-bandit", "with-mypy", "with-pyroma"] } diff --git a/tag_publish/__init__.py b/tag_publish/__init__.py index 92422a3..72eb701 100644 --- a/tag_publish/__init__.py +++ b/tag_publish/__init__.py @@ -9,7 +9,6 @@ from typing import Any, Optional, TypedDict, cast import github -import multi_repo_automation as mra import requests import ruamel.yaml import security_md @@ -36,7 +35,9 @@ def __init__(self) -> None: token = ( os.environ["GITHUB_TOKEN"] if "GITHUB_TOKEN" in os.environ - else mra.get("gh", "auth", "token").strip() + else subprocess.run( + ["gh", "auth", "token"], check=True, stdout=subprocess.PIPE, encoding="utf-8" + ).stdout.strip() ) self.auth = github.Auth.Token(token) self.github = github.Github(auth=self.auth)