[PR #1994] [MERGED] Make branch deletion URL more like GitHub's, fixes #1397 #16167

Closed
opened 2025-11-02 12:03:49 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/1994
Author: @lafriks
Created: 6/17/2017
Status: Merged
Merged: 6/21/2017
Merged by: @lunny

Base: masterHead: pr_delete_branch_link_change


📝 Commits (5)

  • bede0e2 Make branch deletion URL more like GitHub's, fixes #1397
  • 77617da Add PR branch deletion integration test
  • 0f64a3e Do not allow deleting protected branch
  • 00d9b4d Change http error code to 403 if user has no write rights to repository
  • 331575e Add check to not panic if forked repository has alrady been deleted

📊 Changes

7 files changed (+241 additions, -70 deletions)

View changed files

📝 integrations/editor_test.go (+43 -0)
📝 integrations/pull_create_test.go (+4 -0)
📝 integrations/pull_merge_test.go (+56 -0)
📝 routers/repo/branch.go (+0 -59)
📝 routers/repo/issue.go (+10 -8)
📝 routers/repo/pull.go (+127 -0)
📝 routers/routes/routes.go (+1 -3)

📄 Description

Also fixes broken branch deletion as MergeCommitID is not in HeadBranch so it allways was giving error message that branch has new commits and it can not be deleted.

Fixes #1397


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/1994 **Author:** [@lafriks](https://github.com/lafriks) **Created:** 6/17/2017 **Status:** ✅ Merged **Merged:** 6/21/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `pr_delete_branch_link_change` --- ### 📝 Commits (5) - [`bede0e2`](https://github.com/go-gitea/gitea/commit/bede0e29e0e319dff2a423452a5a4d22a27530a7) Make branch deletion URL more like GitHub's, fixes #1397 - [`77617da`](https://github.com/go-gitea/gitea/commit/77617da14229d962363141396c6f367360e975aa) Add PR branch deletion integration test - [`0f64a3e`](https://github.com/go-gitea/gitea/commit/0f64a3e4dcbab9e8c1931f867e0afff84b705aee) Do not allow deleting protected branch - [`00d9b4d`](https://github.com/go-gitea/gitea/commit/00d9b4d8837e8c67441a62a327edaa053e4db96b) Change http error code to 403 if user has no write rights to repository - [`331575e`](https://github.com/go-gitea/gitea/commit/331575e6d216aece34218fba7d25c1c5a68b15ee) Add check to not panic if forked repository has alrady been deleted ### 📊 Changes **7 files changed** (+241 additions, -70 deletions) <details> <summary>View changed files</summary> 📝 `integrations/editor_test.go` (+43 -0) 📝 `integrations/pull_create_test.go` (+4 -0) 📝 `integrations/pull_merge_test.go` (+56 -0) 📝 `routers/repo/branch.go` (+0 -59) 📝 `routers/repo/issue.go` (+10 -8) 📝 `routers/repo/pull.go` (+127 -0) 📝 `routers/routes/routes.go` (+1 -3) </details> ### 📄 Description Also fixes broken branch deletion as MergeCommitID is not in HeadBranch so it allways was giving error message that branch has new commits and it can not be deleted. Fixes #1397 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:03:49 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16167