Skip to content

Add support for rm_file in GitHubFileSystem implementation #1839

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mecit-san
Copy link

This PR adds support for the rm_file method in the GitHubFileSystem implementation of fsspec, enabling file deletion using the GitHub REST API.

The GitHub API for managing file contents requires:

  • A commit message for each action (add/update/delete), similar to editing files via the GitHub web interface.
  • The SHA of the target file’s latest version when deleting or updating, to avoid race conditions.

This implementation adheres to those requirements, making rm_file work reliably for GitHub-backed filesystems.

Note: This PR focuses solely on file deletion. I plan to follow up with a separate PR to implement the remaining methods and functionality (e.g., adding file, updating file, etc.) for full GitHubFileSystem support.

#1836

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.

1 participant