Skip to content
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

Add API route to rename a branch #23061

Closed
wants to merge 5 commits into from

Conversation

sillyguodong
Copy link
Contributor

close: #22526

Screenshot

test in swagger:
image

@sillyguodong sillyguodong changed the title Feature/issue 22526 implement the api for renaming branch Feb 22, 2023
@@ -300,6 +300,94 @@ func ListBranches(ctx *context.APIContext) {
ctx.JSON(http.StatusOK, apiBranches)
}

// RenameBranch rename a branch for a user's repository
func RenameBranch(ctx *context.APIContext) {
// swagger:operation POST /repos/{owner}/{repo}/branches/{name}/rename repository repoRenameBranch
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if the branch is named "test/branch/rename"? Won't the http router look for the branched named "test/branch"?

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 22, 2023
@delvh delvh changed the title implement the api for renaming branch Add API route to rename a branch Feb 22, 2023
# Conflicts:
#	templates/swagger/v1_json.tmpl
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
@sillyguodong sillyguodong deleted the feature/issue_22526 branch February 29, 2024 03:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Api for branch rename
3 participants