Fix GitHub API to use the API versioning information correctly #255

Open
opened 2024-04-30 21:26:54 +00:00 by jade · 3 comments
Owner

in src/libfetchers/github.cc we do not specify the github api version. this is sorta busted but also it will just default to 2022-11-28 if not specified. it would be very easy to fix though. see:

https://docs.github.com/en/rest/about-the-rest-api/api-versions?apiVersion=2022-11-28

the thing that's weird is that we ask for api v3 on on-prem instances and don't specify for cloud github.com.

in `src/libfetchers/github.cc` we do not specify the github api version. this is sorta busted but also it will just default to 2022-11-28 if not specified. it would be very easy to fix though. see: https://docs.github.com/en/rest/about-the-rest-api/api-versions?apiVersion=2022-11-28 the thing that's weird is that we ask for api v3 on on-prem instances and don't specify for cloud github.com.
jade added the
devx
label 2024-04-30 21:30:11 +00:00
jade added the
E/easy
E/help wanted
labels 2024-04-30 21:49:29 +00:00

From what I understand, the v3 in the URL for on-prem instances is an old versioning for the REST API that is still leaking through, and not related to the currently used date-based API versioning scheme (2022-11-28).

So the version header should be added for both on-prem and cloud, and the v3 is just a fixed part of the URL for on-prem.

From what I understand, the `v3` in the URL for on-prem instances is an old versioning for the REST API that is still leaking through, and not related to the currently used date-based API versioning scheme (`2022-11-28`). So the version header should be added for both on-prem and cloud, and the `v3` is just a fixed part of the URL for on-prem.
Author
Owner

i think Artemis(not t) is working on this, based on fedi posts. just fyi if anyone else is looking into picking it up.

i think Artemis(not t) is working on this, based on fedi posts. just fyi if anyone else is looking into picking it up.
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/1925 ("fix(libfetchers): set GitHub API version header, closes #255")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/1925", "number": 1925, "kind": "commit message"}], "cl_meta": {"1925": {"change_title": "fix(libfetchers): set GitHub API version header, closes #255"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/1925](https://gerrit.lix.systems/c/lix/+/1925) ("fix(libfetchers): set GitHub API version header, closes #255")
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#255
No description provided.