-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
[help wanted] Get basic upload-to-wiki working #12279
Conversation
e1e5349
to
40af980
Compare
Last commit rebased the code onto the current master and fixed the git hook issue caused by provided a wrong env. There are still one issue haven't get resolved, after clicking the upload button, it will says "The process cannot access the file because it is being used by another process."(the file actually get into the wiki repo, but the cached file not get removed). Still don't know where went wrong.. Anyway although it's still WIP but I think maybe it can be good if someone can review the current state of this PR now so I can know where I did wrong to get me on the right track. Any review and advices are appreciated! |
7c4a716
to
ba7d000
Compare
ba7d000
to
2cc55a2
Compare
2cc55a2
to
10b92f3
Compare
Codecov Report
@@ Coverage Diff @@
## master #12279 +/- ##
==========================================
- Coverage 43.52% 43.38% -0.14%
==========================================
Files 642 643 +1
Lines 71003 71239 +236
==========================================
+ Hits 30904 30907 +3
- Misses 35096 35322 +226
- Partials 5003 5010 +7
Continue to review full report at Codecov.
|
10b92f3
to
7ef0aeb
Compare
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 months. Thank you for your contributions. |
Codecov Report
@@ Coverage Diff @@
## master #12279 +/- ##
==========================================
- Coverage 42.24% 42.19% -0.06%
==========================================
Files 710 710
Lines 77232 77310 +78
==========================================
- Hits 32626 32618 -8
- Misses 39241 39317 +76
- Partials 5365 5375 +10
Continue to review full report at Codecov.
|
7ef0aeb
to
2b2b012
Compare
2b2b012
to
9869872
Compare
Due to very limited spare time and the gitea development actually grows pretty fast, I may not have time to continue working on this feature. I'll close this PR and leave the patch here as a reference and see if anyone else would like to work on this feature. This patch only added a place to upload image files to a Anyway hope the best :) |
Intended to resolve #574 , still WIP, not ready to merge.
I need this feature and find out there is an issue requesting this feature(#574), so would like to try to implement this feature. I tryed rebasing #6024 onto master but it seems there are too many changes from the codebase so I decided to reimplement the feature directly on master branch. Now the upload works but I do think what I did is probably not the correct way to implement it. I'll explain later.
Here are some WIP screenshots in current PR state:
Screenshots about file upload
Reason about why I think my current implementation is bad is, when try to hacking on this feature, I found
temp_repo.go
always do operation to the repo when callingNewTemporaryUploadRepository(repo *models.Repository)
, seems I cannot operate to the wiki repo directly, so I addedCloneWiki()
andPushWiki()
so I can process the wiki repo instead of the original repo. But I found insidePushingEnvironment()
there are checks about if it is a wiki repo, so I think I may probably missed something.The current PR state should be able to upload file to wiki repo, but after clicking the upload button, the page turns blank. I checked the console output and here is the related log:
I guess it is the 500 internal server error which caused the issue. I think it probably because I still missed something which cause it trigger the main repo post-receive hock, but still doesn't know where should I look at.
I still not dig into the whole codebase too deep (actually I'm new to golang), but still would like to help implementing this issue. Any advices / comments / code review would be very helpful. Thanks!