Skip to content

Commit 151b276

Browse files
committed
fix:continue when not finding ver
1 parent b37691b commit 151b276

3 files changed

Lines changed: 48 additions & 43 deletions

File tree

gha_cli/cli.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import click
88
import coloredlogs
99
import yaml
10-
from github import Github, Workflow
10+
from github import Github, Workflow, UnknownObjectException
1111
from github.Organization import Organization
1212
from github.PaginatedList import PaginatedList
1313

@@ -77,10 +77,15 @@ def check_for_updates(self, action_name: str) -> Optional[str]:
7777
if '@' not in action_name:
7878
return None
7979
repo_name, current_version = action_name.split('@')
80+
logging.debug(f'Checking for updates for {action_name}: Getting repo {repo_name}')
8081
repo = self.client.get_repo(repo_name)
81-
latest_release = repo.get_latest_release()
82-
if compare_versions(latest_release.tag_name, current_version):
83-
return latest_release.tag_name
82+
logging.debug(f'Getting latest release for repository: {repo_name}')
83+
try:
84+
latest_release = repo.get_latest_release()
85+
if compare_versions(latest_release.tag_name, current_version):
86+
return latest_release.tag_name
87+
except UnknownObjectException:
88+
logging.warning(f'No releases found for repository: {repo_name}')
8489
return None
8590

8691
def get_repo_actions_latest(self, repo_name: str) -> Dict[str, List[ActionVersion]]:

poetry.lock

Lines changed: 38 additions & 38 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ github-actions-cli = "gha_cli.cli:cli"
88

99
[tool.poetry]
1010
name = "github-actions-cli"
11-
version = "1.1.1"
11+
version = "1.1.2"
1212
description = "GitHub Actions CLI - allows updating workflows, etc."
1313
readme = "README.md"
1414
keywords = ["GitHub Actions", "CLI"]

0 commit comments

Comments
 (0)