-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
API: Ability to create a commit including multiple files #14619
Comments
What about a endpoint, that apply diff & patch files? cc @zeripath |
Heheh Ok I'll simplify and propose the patch endpoint pr. We'll get the rest of stuff sorted later. |
@d-lunyov why aren't you creating a temporary working branch to commit stuff to and the merge it in to your primary branch? |
@zeripath This is exactly what I do. But I think this is a workaround. In addition, the number of requests to the server increases in proportion to the number of files. Another git-providers offers:
Gitlab: create a commit with multiple files and actions endpoint Bitbucket: create new commits in the repository by uploading files Azure: Push changes to the repository with multiple actions Bitbucket-server also does not propose a simply-way to create a multiple files to commit, so I'm using a workaround with temporary branch. |
Is there any progress on this issue? currently I'm blocked by this on a pr I'm working on to enable support for Gitea on https://github.com/fluxcd/go-git-providers . It is used by https://github.com/fluxcd/flux2 to support git resource reconciliation logic. |
I think we need both patch upload endpoint and multiple files changed endpoint. |
Are there any updates on that? I created a gitea backend for Static CMS, but without this feature I'm dependent on a hack which fails regularly.... |
This PR creates an API endpoint for creating/updating/deleting multiple files in one API call similar to the solution provided by [GitLab](https://docs.gitlab.com/ee/api/commits.html#create-a-commit-with-multiple-files-and-actions). To archive this, the CreateOrUpdateRepoFile and DeleteRepoFIle functions in files service are unified into one function supporting multiple files and actions. Resolves #14619
There are three endpoints to make a commit via API: repoUpdateFile, repoCreateFile, repoDeleteFile. But there are no way to make a commit, that contains a multiple changes in multiple files.
The text was updated successfully, but these errors were encountered: