Skip to content

Deleting folder from github using octokit/rest #2240

Closed Answered by timrogers
muhamadto asked this question in Q&A
Discussion options

You must be logged in to vote

Hey there! It looks like your question here is more about how deleting a file works in the GitHub API than how Octokit works - but I’ll try to help anyway 😊

You are filtering treeData.tree but then you don’t ever use that value - you only refer to treeData.sha which you haven’t changed.

I believe the step you’re missing is to create a tree which deletes the files you want to delete. I think the instructions at https://stackoverflow.com/a/67101960 will help. Let me know how you get on!

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by muhamadto
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants