Skip to content

Switch back to REST API for getting repo contents #4

@caleb15

Description

@caleb15

GraphQL requires a github token but REST API does not, assuming that you don't spam the API. I used graphql because I thought I just wanted the filename and the REST API provided a bunch of other info. In hindsight it was not worth the extra development time getting graphql working and the (admittedly small) burden upon the user to supply to the token. Also it turns out I needed the type as well to make sure I didn't accidentily match a folder named "CHANGES".

Ex: https://api.github.com/repos/celery/celery/contents/
docs: https://docs.github.com/en/rest/reference/repos#contents
Stackoverflow: https://stackoverflow.com/questions/38449371/github-api-check-if-a-file-exists-and-then-get-it-if-it-does

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions