Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Use GitHub REST v3 API as fallback to get project metadata #446

Open
imphil opened this issue Apr 28, 2020 · 1 comment
Open

Use GitHub REST v3 API as fallback to get project metadata #446

imphil opened this issue Apr 28, 2020 · 1 comment

Comments

@imphil
Copy link
Contributor

imphil commented Apr 28, 2020

Currently we use the GitHub v4 GraphQL API to get project metadata. This API requires an authenticated client (authenticated as user, that is). We generally have the necessary tokens for all users who added their projects through the GitHub flow in the "Add project" page. But we don't have this information for

  • Users who entered a GitHub-backed Git URL directly in the "Add Project" page.
  • Users who's token expired for any reason.

The project metadata is still publicly available via the v3 (REST) API from GitHub, so we can fall back to this API. There should already be some code around from before we switched to GraphQL.

imphil added a commit that referenced this issue Apr 28, 2020
The way we get project metadata from GitHub requires an authenticated
user. We get the required token if a user adds a project to LibreCores
through some, but not all mechanisms. Fail more gracefully if we don't
have the required information available.

This, however, doesn't yet give us the ability to get project metadata
without a user access token. This work is tracked in #446.
@recrsn
Copy link
Collaborator

recrsn commented May 3, 2020

Could we have a librecores bot user?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants