Feature Request: make GitHub token optional for githubRelease
Is your feature request related to a problem?
The githubRelease source currently requires a token to be specified:
kind
----
ERROR: { ✗ { { }}} github parameter(s) required: [token]
helm
----
ERROR: { ✗ { { }}} github parameter(s) required: [token]
However, GitHub's API does not require a token (not providing a token means that requests may be rate limited aggressively, but the token is not a strict requirement).
When running updatecli in GitHub Actions, this is not a big deal, because we can use the GITHUB_TOKEN injected automatically by the system.
Solution you'd like
Attempt to download release information without a token, and only emit a warning if there is an error when running the request.
Alternatives you've considered
No response
Anything else?
The documentation says:
Information about published releases are available to everyone. Only users with push access will receive listings for draft releases.
Source: https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#list-releases
The current implementation relies on GitHub API v4 which requires a token. But you are right an improvement would be to switch to the v3 api if the token is not specified.
I am aware of Updatecli users who do not have a GitHub account (and don't want to have one) so I suggested them to use the json plugin for that. cfr https://github.com/updatecli/updatecli/issues/1060
Also worth mentioning the github plugin is one of the oldest updatecli plugin and it would need some refactoring to split that login "package" into different one between source of kind githubrelease, action of kind github/pullrequest, and scm of kind github
I think @dduportal started looking into that