-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Depending on what is being returned by github it can be a timezone aware datetime object, or it could not. As the datetime.now() is not tzaware since we're not adding a timezone it breaks when we get a timezone aware due to inability to compare non timezone and timezone datetimes as seen below:
File "/opt/homebrew/bin/github-actions-cli", line 7, in <module>
sys.exit(cli())
~~~^^
File "/opt/homebrew/lib/python3.13/site-packages/click/core.py", line 1462, in __call__
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.13/site-packages/click/core.py", line 1383, in main
rv = self.invoke(ctx)
File "/opt/homebrew/lib/python3.13/site-packages/click/core.py", line 1850, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/opt/homebrew/lib/python3.13/site-packages/click/core.py", line 1246, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.13/site-packages/click/core.py", line 814, in invoke
return callback(*args, **kwargs)
File "/opt/homebrew/lib/python3.13/site-packages/click/decorators.py", line 34, in new_func
return f(get_current_context(), *args, **kwargs)
File "/opt/homebrew/lib/python3.13/site-packages/gha_cli/cli.py", line 320, in update_actions
workflow_action_versions = gh.get_repo_actions_latest(repo_name)
File "/opt/homebrew/lib/python3.13/site-packages/gha_cli/cli.py", line 158, in get_repo_actions_latest
latest_version = self.get_action_latest_release(action)
File "/opt/homebrew/lib/python3.13/site-packages/gha_cli/cli.py", line 86, in get_action_latest_release
if latest_release[1] > datetime.now():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: can't compare offset-naive and offset-aware datetimes
Metadata
Metadata
Assignees
Labels
No labels