-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Wiki mirroring implementation #3233
Conversation
Thanks your PR!
|
|
It is.
The error handling is somehow confusion, how to distinguish real fail (not exist) and occasional fail?
I think we should at least detect URL prefix and only do clone wiki for allowed set of URL prefixes. |
Will implement remote checking and BitBucket workaround right now, then will split into 2 PRs. |
It is not an excuse to not check. |
@unknwon excuse me, but I can't quite catch what do you mean. If the first, then it is exactly what I am going to implement. If the second, we lose the ability to clone any GitLab, Gogs, Bitbucket project not located in their cloud (gitlab.com, gogs.io, bitbucket.org). |
@unknwon implemented remote checking, removed any admin dashboard modifications. Will open another PR for dashboard operation. |
Thanks, but seems having conflict? |
@@ -6,7 +6,7 @@ | |||
<span class="mega-octicon octicon-book"></span> | |||
<h2>{{.i18n.Tr "repo.wiki.welcome"}}</h2> | |||
<p>{{.i18n.Tr "repo.wiki.welcome_desc"}}</p> | |||
{{if .IsRepositoryWriter}} |
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.
Any reasons why you add this?
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.
See my comment in PR.
Should we allow user to edit mirrored repos? If we allow, then my IsRepoMirror changes should be reverted. Otherwise we should keep them intact. |
@unknwon how about reviewing this PR? It is mergeable now. |
Please sign the CLA. |
Done! |
Thanks! |
Now available on https://try.gogs.io/ |
I've implemented wiki mirroring. Admin dashboard operation removed.
Tested on a couple of GitHub repos, with or without wikis.
Any kind of mirrored wiki modification is forbidden.
In this commit I've removed the wiki page name restriction. It now tries correct name, but if it's not found, it tries without space-to-dash replacement. I've done this in order to allow all mirrored wikis to be displayed. You're still not allowed to create or edit page names so that it contains spaces. Any better alternatives?
P.S. I have never written a single line in Go, so coding style might be inconsistent. Applied gofmt corrections.
P.P.S. Meanwhile, thanks for the project! It is a great alternative to GitLab for those, who do not need CI and some advanced features!