-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[Feature] [API] Add Endpoint for Branch creation #11376
Labels
issue/confirmed
Issue has been reviewed and confirmed to be present or accepted to be implemented
type/proposal
The new feature has not been accepted yet but needs to be discussed first.
Comments
tle-huu
added a commit
to tle-huu/gitea
that referenced
this issue
May 29, 2020
Issue: go-gitea#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>
zeripath
added a commit
that referenced
this issue
May 29, 2020
* [FEATURE] [API] Add Endpoint for Branch Creation Issue: #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>
This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions. |
lunny
added
type/proposal
The new feature has not been accepted yet but needs to be discussed first.
issue/confirmed
Issue has been reviewed and confirmed to be present or accepted to be implemented
labels
Jul 11, 2020
closed by #11607 |
ydelafollye
pushed a commit
to ydelafollye/gitea
that referenced
this issue
Jul 31, 2020
* [FEATURE] [API] Add Endpoint for Branch Creation Issue: go-gitea#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>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
issue/confirmed
Issue has been reviewed and confirmed to be present or accepted to be implemented
type/proposal
The new feature has not been accepted yet but needs to be discussed first.
We want to automatically create Dev-Stacks in our Company (new Application, Package, ....)
To create a Repository we want to create the complete basic structure.
The Api of Gitea is already very powerfull, but we also need an Endpoint to create a new Branch.
proposal for: repository
add
POST /repos/{owner}/{repo}/branches
Information to create a new branch should be
I hope i didn't forgot something
The text was updated successfully, but these errors were encountered: