Skip to content

Upload multiple files and folders #1766

Answered by gr2m
satishbkodali asked this question in Q&A
Discussion options

You must be logged in to vote

No, the octokit.repos.createOrUpdateFileContents method will only create or update a single file at the time. If you create a file in a folder that does not exist yet, the folders will be created automatically.

In order to create/update multiple files, you an call the octokit.repos.createOrUpdateFileContents method multiple times. If you want to edit multiple files in a single commit, you will need to use the octokit.git.* APIs. If you are interested, you can use my Octokit plugin to create a pull request as a reference.

Replies: 1 comment

Comment options

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