Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/hermes/commands/init/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,13 +599,13 @@ def configure_gitlab(self) -> None:
self.git_remote_url + "/-/settings/ci_cd", "project's ci settings")
))
sc.echo("Then, add that token as variable with key HERMES_PUSH_TOKEN.")
sc.echo("(For your safety, you should set the visibility to 'Masked'.)")
sc.echo("(For your safety, you should set the visibility to 'Masked and hidden'.)")
sc.press_enter_to_continue()
sc.echo("Next, add the {} token{} as variable with key ZENODO_TOKEN.".format(
self.deposit_platform.name,
f" ({self.tokens[self.deposit_platform]})" if self.tokens[self.deposit_platform] else ""
))
sc.echo("(For your safety, you should set the visibility to 'Masked'.)")
sc.echo("(For your safety, you should set the visibility to 'Masked and hidden'.)")
sc.press_enter_to_continue()

def choose_deposit_platform(self) -> None:
Expand Down
9 changes: 8 additions & 1 deletion src/hermes/commands/init/util/connect_gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,14 @@ def create_variable(self, key: str, value, description: str = "") -> bool:
sc.debug_info(delete_status=delete_response.status_code, delete_response=delete_response.text)
# Then create a new variable
create_url = urljoin(self.api_url, f"projects/{self.project_id}/variables")
data = {"key": key, "value": value, "masked": True, "raw": True, "description": description}
data = {
"key": key,
"value": value,
"masked": True,
"masked_and_hidden": True,
"raw": True,
"description": description,
}
response = requests.post(create_url, headers=headers, json=data)
if response.status_code == 201:
desc = f" ({description})" if description else ""
Expand Down