Upload multiple files and folders #1766
-
currently I see only this api function to update files octokit.repos.createOrUpdateFileContents({
owner, repo, path, message, content, committer, author
}) But will this update or create recursive folders and with multiple files in those folders too? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
No, the In order to create/update multiple files, you an call the |
Beta Was this translation helpful? Give feedback.
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 theoctokit.git.*
APIs. If you are interested, you can use my Octokit plugin to create a pull request as a reference.