8000 Use the Sigstore 1.x API instead of CLI · python/release-tools@e15053a · GitHub
[go: up one dir, main page]

Skip to content

Commit e15053a

Browse files
committed
< 8000 div class="CommitHeader-module__commit-message-container--nl1pf">
Use the Sigstore 1.x API instead of CLI
1 parent d9996a1 commit e15053a

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

run_release.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
import aiohttp
3030
import gnupg
3131
import paramiko
32-
import sigstore
33-
import sigstore._cli
3432
import sigstore.oidc
3533
from alive_progress import alive_bar
3634

@@ -735,15 +733,11 @@ def run_add_to_python_dot_org(db: DbfilenameShelf) -> None:
735733

736734
auth_info = db["auth_info"]
737735
assert auth_info is not None
736+
738737
# Do the interactive flow to get an identity for Sigstore
739-
args = argparse.Namespace(
740-
oidc_disable_ambient_providers=True,
741-
oidc_client_secret=None,
742-
oidc_issuer=sigstore.oidc.DEFAULT_OAUTH_ISSUER_URL,
743-
oidc_client_id="sigstore",
744-
staging=False,
745-
)
746-
identity_token = sigstore._cli._get_identity_token(args)
738+
issuer = sigstore.oidc.Issuer(sigstore.oidc.DEFAULT_OAUTH_ISSUER_URL)
739+
identity_token = issuer.identity_token()
740+
747741
stdin, stdout, stderr = client.exec_command(
748742
f"AUTH_INFO={auth_info} SIGSTORE_IDENTITY_TOKEN={identity_token} python3 add-to-pydotorg.py {db['release']}"
749743
)

0 commit comments

Comments
 (0)
0