octokit.js icon indicating copy to clipboard operation
octokit.js copied to clipboard

[FEAT]: Plugin / API for high-level / porcelain rename / delete ops

Open vadimkantorov opened this issue 8 months ago • 1 comments

Describe the need

  • Renaming a file / directory (analogue for git mv ...)
  • Deleting a directory (analogue for git rm ...)

These are currently not available in GitHub API, but possible via raw octokit gitdata interface (some attempts in https://stackoverflow.com/questions/31563444/rename-a-file-with-github-api). It would be great to have an official Octokit plugin for such high-level ops/shortcuts with reliable/tested implementations.

Currently there already exists a high-level plugin for a text variant of https://octokit.github.io/rest.js/v21/#repos-create-or-update-file-contents : https://github.com/octokit/plugin-create-or-update-text-file.js/

I think more complex ops such as renaming/deleting a file/dir would be awesome as an official plugin...

These are very useful for any editors using GitHub repo as a small file storage / remote FS - frequent usecase for static blogs

SDK Version

No response

API Version

No response

Relevant log output


Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

vadimkantorov avatar Mar 10 '25 11:03 vadimkantorov

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

github-actions[bot] avatar Mar 10 '25 11:03 github-actions[bot]