Commit Graph

4 Commits

Author SHA1 Message Date
Robert Alonso
f1f17d8372 refactor: add common base class to GitHubClient and LocalClient
Enables adding type checking to minimize mypy errors
2024-10-28 18:38:59 +00:00
Robert Alonso
a4edef676c feat: add get_issue_url()
This is really just a dummy operation so that
main can unconditionally make the call on any client
2024-10-28 18:38:59 +00:00
Robert Alonso
02c158cabe refactor: abstract diff method within client
There's no reason to have main directly construct
the URL. A different VCS (such as GitLab) could
have a different URL construction. Further, in the
case of LocalClient, there is no URL.
2024-10-28 18:38:59 +00:00
Robert Alonso
714153eaf3 feat: add Local client
This is just a safe fallback for local testing.
If environment variables which activate the
creation of the GitHub client aren't set, then
the Local client is created. It acts on the most
recent commit of the repo in the working directory.

Minor edit to GitHubClient so that it raises an
EnvironmentError exception if INPUT_GITHUB_URL
environment variable is not defined. This allows
main to detect the error and fall back to trying
to use the Local client
2024-10-25 00:07:47 +00:00