[PR #2699] [MERGED] Fix so that user can still fork his own repository to his organizations #16543

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

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/2699
Author: @lafriks
Created: 10/13/2017
Status: Merged
Merged: 10/15/2017
Merged by: @lafriks

Base: masterHead: feat/fork_own_to_org


📝 Commits (9)

  • f09a125 Fix so that user can still fork his own repository to his organizations
  • d13427d Add nil check
  • 0f894db Fix to only use owned organizations
  • 2b0d671 Small code improvement
  • f86bd84 Add integration test for forkin own repository to owned organization
  • fa0d64e Fix typo
  • f102aad Fix fork tests to load user ID by user name
  • c1ca44a Merge branch 'master' into feat/fork_own_to_org
  • ea6d8eb Merge branch 'master' into feat/fork_own_to_org

📊 Changes

8 files changed (+86 additions, -27 deletions)

View changed files

📝 integrations/pull_create_test.go (+1 -1)
📝 integrations/pull_merge_test.go (+2 -2)
📝 integrations/repo_fork_test.go (+28 -7)
📝 models/repo.go (+19 -0)
📝 modules/context/repo.go (+5 -0)
📝 routers/repo/pull.go (+20 -6)
📝 templates/repo/header.tmpl (+1 -1)
📝 templates/repo/pulls/fork.tmpl (+10 -10)

📄 Description

Fixes #2698

Allows forking to organization even when user owns repository or has already forked to his user but still limits single fork per user/organization


🔄 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/2699 **Author:** [@lafriks](https://github.com/lafriks) **Created:** 10/13/2017 **Status:** ✅ Merged **Merged:** 10/15/2017 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `feat/fork_own_to_org` --- ### 📝 Commits (9) - [`f09a125`](https://github.com/go-gitea/gitea/commit/f09a125b708a48a6aaa6c2d854dcfbbc0ff70bb2) Fix so that user can still fork his own repository to his organizations - [`d13427d`](https://github.com/go-gitea/gitea/commit/d13427dd48d7fc20fd35be0bf6e8b2525bd9f803) Add nil check - [`0f894db`](https://github.com/go-gitea/gitea/commit/0f894db6c78fff3ea6484d4162bfd91ec670e2aa) Fix to only use owned organizations - [`2b0d671`](https://github.com/go-gitea/gitea/commit/2b0d671a4059a86f2312aaf8e0dfa4c91f8ea17c) Small code improvement - [`f86bd84`](https://github.com/go-gitea/gitea/commit/f86bd84a97370a61caa73f89c3eed9711356a96a) Add integration test for forkin own repository to owned organization - [`fa0d64e`](https://github.com/go-gitea/gitea/commit/fa0d64ed85acaebc01869fc8663624634360c51a) Fix typo - [`f102aad`](https://github.com/go-gitea/gitea/commit/f102aadba7314a7068f97f1c13038efc7701e84a) Fix fork tests to load user ID by user name - [`c1ca44a`](https://github.com/go-gitea/gitea/commit/c1ca44ada1c3ceb99a88c9bcb2a38d168502aed8) Merge branch 'master' into feat/fork_own_to_org - [`ea6d8eb`](https://github.com/go-gitea/gitea/commit/ea6d8eb15afbdc2606b37487fe68bbba0473fe46) Merge branch 'master' into feat/fork_own_to_org ### 📊 Changes **8 files changed** (+86 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `integrations/pull_create_test.go` (+1 -1) 📝 `integrations/pull_merge_test.go` (+2 -2) 📝 `integrations/repo_fork_test.go` (+28 -7) 📝 `models/repo.go` (+19 -0) 📝 `modules/context/repo.go` (+5 -0) 📝 `routers/repo/pull.go` (+20 -6) 📝 `templates/repo/header.tmpl` (+1 -1) 📝 `templates/repo/pulls/fork.tmpl` (+10 -10) </details> ### 📄 Description Fixes #2698 Allows forking to organization even when user owns repository or has already forked to his user but still limits single fork per user/organization --- <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:13:04 -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#16543