mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-07-18 07:28:47 +00:00
Adds an option "force_overwrite_new_branch" when posting to
/repos/{owner}/{repo}/contents to modify multiple files in a repository.
When user provides both "branch" and "new_branch" options, and
"new_branch" already exists, the "force_overwrite_new_branch" option
allows the user to overwrite the existing branch. Under the hood this
amounts to a "git push --force".
[Issue #12600](https://codeberg.org/forgejo/forgejo/issues/12600)
### Tests for Go changes
- I added test coverage for Go changes...
- [ ] in their respective `*_test.go` for unit tests.
- [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I ran...
- [x] `make pr-go` before pushing
### Documentation
- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [ ] I did not document these changes and I do not expect someone else to do it.
- [x] API swagger docs updated
### Release notes
- [x] This change will be noticed by a Forgejo user or admin (feature, bug fix, performance, etc.). I suggest to include a release note for this change.
- [ ] This change is not visible to a Forgejo user or admin (refactor, dependency upgrade, etc.). I think there is no need to add a release note for this change.
Co-authored-by: Rob Gonnella <rob.gonnella@papayapay.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12663
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
|
||
|---|---|---|
| .. | ||
| archiver | ||
| commitstatus | ||
| files | ||
| gitgraph | ||
| adopt.go | ||
| adopt_test.go | ||
| avatar.go | ||
| avatar_test.go | ||
| branch.go | ||
| cache.go | ||
| check.go | ||
| collaboration.go | ||
| collaboration_test.go | ||
| commit.go | ||
| contributors_graph.go | ||
| contributors_graph_test.go | ||
| create.go | ||
| create_test.go | ||
| delete.go | ||
| fork.go | ||
| fork_test.go | ||
| generate.go | ||
| generate_repo_commit.go | ||
| generate_repo_commit_legacy.go | ||
| generate_test.go | ||
| hooks.go | ||
| init.go | ||
| lfs.go | ||
| lfs_test.go | ||
| main_test.go | ||
| migrate.go | ||
| push.go | ||
| repository.go | ||
| repository_test.go | ||
| review.go | ||
| review_test.go | ||
| setting.go | ||
| star.go | ||
| sync_fork.go | ||
| template.go | ||
| transfer.go | ||
| transfer_test.go | ||