Skip to content

Commit

Permalink
update descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
cgundy committed Dec 4, 2024
1 parent d1b68b4 commit 843d593
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion reusable_workflows/shared/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@


def download_gh_file(repo: github3.github.repo, file_path: str) -> str:
# sometimes the request does not work the first time, so set a retry
"""
Handles the download of a file from a GitHub repository. Retries 4 times if the request fails.
"""
for attempt in range(5):
try:
file_content = repo.file_contents(file_path)
Expand All @@ -26,6 +28,9 @@ def download_gh_file(repo: github3.github.repo, file_path: str) -> str:


def load_env_vars(var_names: list[str]) -> dict:
"""
Loads required env vars and returns them as a dictionary.
"""
env_vars = {}
for var in var_names:
try:
Expand Down

0 comments on commit 843d593

Please sign in to comment.