Provide option to unlink a fork#11858
Merged
Merged
Conversation
Fix go-gitea#4566 Signed-off-by: Andrew Thornton <art27@cantab.net>
Contributor
|
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 <matti@mdranta.net>
Contributor
Author
|
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 <art27@cantab.net>
zeripath
commented
Jun 12, 2020
| log.ColorFprintf(s, "%d:%s/%s", | ||
| log.NewColoredIDValue(repo.ID), | ||
| ownerName, | ||
| repo.OwnerName, |
Contributor
Author
There was a problem hiding this comment.
This set of changes just tidies up this function since we changed to always store the OwnerName
Contributor
Author
|
@CirnoT This will now check if you can create repos before transferring. |
Contributor
|
That should be fine then |
Contributor
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> |
Contributor
|
Seems good otherwise |
CirnoT
approved these changes
Jun 15, 2020
6543
approved these changes
Jun 24, 2020
Contributor
Author
|
make lg-tm work |
ydelafollye
pushed a commit
to ydelafollye/gitea
that referenced
this pull request
Jul 31, 2020
* Provide option to unlink a fork Fix go-gitea#4566 Signed-off-by: Andrew Thornton <art27@cantab.net> * Apply suggestions from code review Co-authored-by: techknowlogick <matti@mdranta.net> * Add check that user can create repo Signed-off-by: Andrew Thornton <art27@cantab.net> * as per @CirnoT Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <matti@mdranta.net>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Provides a setting option to unlink a fork from its base repository.
Fix #4566
Signed-off-by: Andrew Thornton art27@cantab.net