Skip to content
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

Fix serving of raw wiki files other than .md #5814

Merged
merged 9 commits into from Feb 6, 2019
Merged

Fix serving of raw wiki files other than .md #5814

merged 9 commits into from Feb 6, 2019

Conversation

gabrielsimoes
Copy link
Contributor

@gabrielsimoes gabrielsimoes commented Jan 23, 2019

Closes #4690.
Closes #4395.

This is a step towards #574, but maybe a GUI could also be implemented.

Signed-off-by: Gabriel Silva Simões simoes.sgabriel@gmail.com

@codecov-io
Copy link

codecov-io commented Jan 23, 2019

Codecov Report

Merging #5814 into master will increase coverage by 0.04%.
The diff coverage is 47.82%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5814      +/-   ##
==========================================
+ Coverage    38.7%   38.74%   +0.04%     
==========================================
  Files         330      330              
  Lines       48642    48650       +8     
==========================================
+ Hits        18825    18850      +25     
+ Misses      27090    27071      -19     
- Partials     2727     2729       +2
Impacted Files Coverage Δ
models/wiki.go 62.5% <ø> (ø) ⬆️
routers/repo/wiki.go 50.79% <47.82%> (+6.2%) ⬆️
routers/repo/download.go 51.85% <0%> (+3.7%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a747ae...663707a. Read the comment docs.

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 23, 2019
@bkcsoft bkcsoft added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jan 23, 2019
@lafriks lafriks added this to the 1.8.0 milestone Jan 23, 2019
@zeripath
Copy link
Contributor

Is there any easy way you can write a test of this functionality?

(I suspect you've got the same problem I have in #5787 for making tests.)

Copy link
Member

@lunny lunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code includes some repeated lines. It maybes more clear?

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jan 24, 2019
@gabrielsimoes
Copy link
Contributor Author

gabrielsimoes commented Jan 24, 2019

Sorry for the force push, hope it didn't mess up anything. I simplified the code, @lunny, please check if that is ok for you. I feel like if I simplified it further things would get a little confused.

EDIT: I'll try working on a test.

@gabrielsimoes
Copy link
Contributor Author

gabrielsimoes commented Jan 25, 2019

Added tests. Had to update macaron due to a bug that made SetParams("*", "something") not work.

Closes #4690.
Closes #4395.

Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
Signed-off-by: Gabriel Silva Simões <simoes.sgabriel@gmail.com>
@gabrielsimoes
Copy link
Contributor Author

@lunny, I think it is all set, except for the changes you requested.

@lafriks
Copy link
Member

lafriks commented Feb 5, 2019

@lunny last ping before dismissing your review ;)

@techknowlogick techknowlogick merged commit 3b7f41f into go-gitea:master Feb 6, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Images in Wiki repo not showing in Gitea Wiki Pictures in wiki acting just like pictures in main project.git
9 participants