mirror of https://github.com/go-gitea/gitea.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
141d52cc0f
* [FEATURE] [API] Add Endpoint for Branch Creation Issue: https://github.com/go-gitea/gitea/issues/11376 This commit introduces an API endpoint for branch creation. The added route is POST /repos/{owner}/{repo}/branches. A JSON with the name of the new branch and the name of the old branch is required as parameters. Signed-off-by: Terence Le Huu Phuong <terence@qwasar.io> * Put all the logic into CreateBranch and removed CreateRepoBranch * - Added the error ErrBranchDoesNotExist in error.go - Made the CreateNewBranch function return an errBranchDoesNotExist error when the OldBranch does not exist - Made the CreateBranch API function checks that the repository is not empty and that branch exists. * - Added a resetFixtures helper function in integration_test.go to fine-tune test env resetting - Added api test for CreateBranch - Used resetFixture instead of the more general prepareTestEnv in the repo_branch_test CreateBranch tests * Moved the resetFixtures call inside the loop for APICreateBranch function * Put the prepareTestEnv back in repo_branch_test * fix import order/sort api branch test Co-authored-by: zeripath <art27@cantab.net> |
5 years ago | |
---|---|---|
.. | ||
admin_user.go | 6 years ago | |
attachment.go | 5 years ago | |
commit_status.go | 5 years ago | |
doc.go | 6 years ago | |
fork.go | 6 years ago | |
git_blob.go | 6 years ago | |
git_hook.go | 6 years ago | |
hook.go | 5 years ago | |
issue.go | 5 years ago | |
issue_comment.go | 6 years ago | |
issue_label.go | 5 years ago | |
issue_milestone.go | 6 years ago | |
issue_reaction.go | 5 years ago | |
issue_stopwatch.go | 5 years ago | |
issue_tracked_time.go | 5 years ago | |
lfs_lock.go | 6 years ago | |
miscellaneous.go | 6 years ago | |
notifications.go | 5 years ago | |
org.go | 5 years ago | |
org_member.go | 6 years ago | |
org_team.go | 5 years ago | |
org_type.go | 6 years ago | |
pull.go | 5 years ago | |
pull_review.go | 5 years ago | |
release.go | 5 years ago | |
repo.go | 5 years ago | |
repo_branch.go | 5 years ago | |
repo_collaborator.go | 6 years ago | |
repo_commit.go | 5 years ago | |
repo_file.go | 5 years ago | |
repo_key.go | 6 years ago | |
repo_refs.go | 6 years ago | |
repo_tag.go | 6 years ago | |
repo_topic.go | 6 years ago | |
repo_tree.go | 6 years ago | |
repo_watch.go | 6 years ago | |
status.go | 6 years ago | |
task.go | 5 years ago | |
user.go | 6 years ago | |
user_app.go | 5 years ago | |
user_email.go | 6 years ago | |
user_gpgkey.go | 6 years ago | |
user_key.go | 6 years ago |