Skip to content

Commit

Permalink
less prints
Browse files Browse the repository at this point in the history
  • Loading branch information
nheeb committed Sep 3, 2024
1 parent 42aefd9 commit bddbb27
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
9 changes: 3 additions & 6 deletions src/hermes/commands/deposit/invenio.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,18 +263,15 @@ def __init__(self, command: HermesDepositCommand, ctx: CodeMetaContext, client=N
self.invenio_ctx = None
self.config = getattr(self.command.settings, self.platform_name)

_log.error(f"Token Secret: {self.config.auth_token}")
_log.error(f"Client is none: {str(client is None)}")

if client is None:
auth_token = self.config.auth_token

# If auth_token is a refresh-token, get the auth-token from that.
if str(auth_token).startswith("REFRESH_TOKEN:"):
_log.error(f"Getting token from refresh_token {auth_token}")
_log.debug(f"Getting token from refresh_token {auth_token}")
get_token_from_refresh_token(auth_token.split("REFRESH_TOKEN:")[1])
_log.error(f"Token: {os.environ.get('ZENODO_TOKEN')}")
_log.error(f"Refresh Token: {os.environ.get('ZENODO_TOKEN_REFRESH')}")
_log.debug(f"Token: {os.environ.get('ZENODO_TOKEN')}")
_log.debug(f"Refresh Token: {os.environ.get('ZENODO_TOKEN_REFRESH')}")
auth_token = os.environ.get('ZENODO_TOKEN')
if not auth_token:
raise DepositionUnauthorizedError("No valid auth token given for deposition platform")
Expand Down
5 changes: 0 additions & 5 deletions src/hermes/commands/init/github_secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ def create_secret(project_url: str, secret_name: str, secret_value, token = ""):
public_key_url = f"{repo_url}/actions/secrets/public-key"
secrets_url = f"{repo_url}/actions/secrets/{secret_name}"

print(repo_url)
print(public_key_url)
print(secrets_url)

# Headers for GitHub API requests
headers = {
'Authorization': f'token {token}',
Expand All @@ -43,7 +39,6 @@ def create_secret(project_url: str, secret_name: str, secret_value, token = ""):
public_key_data = response.json()
key_id = public_key_data['key_id']
public_key = public_key_data['key']
print(f"Public Key Data {public_key_data}")
else:
raise Exception(f"Failed to retrieve public key: {response.status_code} {response.text}")

Expand Down
2 changes: 1 addition & 1 deletion src/hermes/commands/init/tmp_hermes_github_to_zenodo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: pip install hermes
- run: pip install git+https://github.com/softwarepub/hermes.git@feature/init-command

# ADAPT
# If you want to publish artifacts (e.g., a zipped snapshot of your repository),
Expand Down

0 comments on commit bddbb27

Please sign in to comment.