Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Filesystem #105

Merged
merged 7 commits into from
Feb 29, 2024
Merged

GitHub Filesystem #105

merged 7 commits into from
Feb 29, 2024

Conversation

Parzival-3141
Copy link
Collaborator

@Parzival-3141 Parzival-3141 commented Feb 14, 2024

Closes #84

TODO:

  • Basic read-only implementation
  • Method for supplying a Github Token without hardcoding it
  • Branch selection
  • File Create(), Seek(), and Write()
  • Rename/Remove
  • Handle directories

@progrium
Copy link
Contributor

Can you rebase off main and mark as not WIP?

Still WIP.

Needed patch the bootloader to ignore nonlocal requests. This is a
temporary workaround, in the future we want to make a special endpoint
for external requests and monkeypatch fetch to use it for external
hostnames.
The filesystem is read only for now, but commands like `ls` and `cat` work
great. You'll have to paste your own Github Token in `fs.go`, ideally we can
pull this from the shell environment but the shell might not even be compiled
by the time `githubfs` is mounted.
Moved `ReadDir` since there's no point in making it a top level func.
Enforce using basename for `fileInfo.name` to match the API, added
extra branch/path info.

This is starting to get messy. After adding directory and write
operations I want to review and maybe refactor.
Abstract requesting into it's own function. Implement proper reading/writing
instead of reusing the response's `ReadCloser`.
Doesn't support directories or `RemoveAll`, but now you can delete files.
@Parzival-3141 Parzival-3141 marked this pull request as ready for review February 29, 2024 02:18
@progrium progrium merged commit fdc4346 into main Feb 29, 2024
@Parzival-3141 Parzival-3141 deleted the github-fs branch March 4, 2024 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

githubfs
2 participants