-
-
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
Provide option to unlink a fork #11858
Conversation
Fix go-gitea#4566 Signed-off-by: Andrew Thornton <[email protected]>
I don't think we should push it before we have a way to limit forks user can create, otherwise all instances will suffer from repository limit being broken |
Co-authored-by: techknowlogick <[email protected]>
We already have a convert mirror which I think also gets round the repo counts. But in any case I had forgotten about the repo counts - I guess we can prevent the conversion if they're at the limit. |
Signed-off-by: Andrew Thornton <[email protected]>
log.ColorFprintf(s, "%d:%s/%s", | ||
log.NewColoredIDValue(repo.ID), | ||
ownerName, | ||
repo.OwnerName, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This set of changes just tidies up this function since we changed to always store the OwnerName
@CirnoT This will now check if you can create repos before transferring. |
That should be fine then |
Index: web_src/less/_repository.less
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- web_src/less/_repository.less (revision cce3f9f6fccbcd4dbcadc28c605ef334e74f9baf)
+++ web_src/less/_repository.less (date 1592203778992)
@@ -2744,7 +2744,10 @@
}
#transfer-repo-modal,
-#delete-repo-modal {
+#delete-repo-modal,
+#delete-wiki-modal,
+#convert-fork-repo-modal,
+#convert-mirror-repo-modal {
.ui.message {
width: 100% !important;
}
Index: templates/repo/settings/options.tmpl
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- templates/repo/settings/options.tmpl (revision cce3f9f6fccbcd4dbcadc28c605ef334e74f9baf)
+++ templates/repo/settings/options.tmpl (date 1592203778999)
@@ -360,7 +360,7 @@
{{if .Repository.IsMirror}}
<div class="item">
<div class="ui right">
- <button class="ui basic red show-modal button" data-modal="#convert-repo-modal">{{.i18n.Tr "repo.settings.convert"}}</button>
+ <button class="ui basic red show-modal button" data-modal="#convert-mirror-repo-modal">{{.i18n.Tr "repo.settings.convert"}}</button>
</div>
<div>
<h5>{{.i18n.Tr "repo.settings.convert"}}</h5>
@@ -448,7 +448,7 @@
{{if .Permission.IsOwner}}
{{if .Repository.IsMirror}}
- <div class="ui small modal" id="convert-repo-modal">
+ <div class="ui small modal" id="convert-mirror-repo-modal">
<div class="header">
{{.i18n.Tr "repo.settings.convert"}}
</div> |
Seems good otherwise |
Signed-off-by: Andrew Thornton <[email protected]>
make lg-tm work |
* Provide option to unlink a fork Fix go-gitea#4566 Signed-off-by: Andrew Thornton <[email protected]> * Apply suggestions from code review Co-authored-by: techknowlogick <[email protected]> * Add check that user can create repo Signed-off-by: Andrew Thornton <[email protected]> * as per @CirnoT Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: techknowlogick <[email protected]>
Provides a setting option to unlink a fork from its base repository.
Fix #4566
Signed-off-by: Andrew Thornton [email protected]