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

Support slashes in release tags #12864

Merged

Conversation

zeripath
Copy link
Contributor

Fix #12861

Signed-off-by: Andrew Thornton art27@cantab.net

Fix go-gitea#12861

Signed-off-by: Andrew Thornton <art27@cantab.net>
@6543
Copy link
Member

6543 commented Sep 15, 2020

starting point :) but do not work - I'll have a look at it

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 15, 2020
@mrsdizzie
Copy link
Member

Is title meant to say forward slashes based on linked issue?

@codecov-commenter
Copy link

codecov-commenter commented Sep 15, 2020

Codecov Report

Merging #12864 into master will increase coverage by 0.14%.
The diff coverage is 95.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12864      +/-   ##
==========================================
+ Coverage   42.93%   43.08%   +0.14%     
==========================================
  Files         655      655              
  Lines       72329    72347      +18     
==========================================
+ Hits        31054    31169     +115     
+ Misses      36253    36122     -131     
- Partials     5022     5056      +34     
Impacted Files Coverage Δ
modules/templates/helper.go 47.26% <ø> (ø)
routers/repo/release.go 26.20% <0.00%> (ø)
modules/base/tool.go 64.63% <100.00%> (+2.79%) ⬆️
routers/routes/routes.go 88.96% <100.00%> (ø)
modules/util/timer.go 42.85% <0.00%> (-42.86%) ⬇️
modules/indexer/stats/db.go 43.47% <0.00%> (-17.40%) ⬇️
modules/indexer/stats/queue.go 64.70% <0.00%> (-11.77%) ⬇️
modules/git/utils.go 73.77% <0.00%> (-3.28%) ⬇️
modules/log/event.go 56.60% <0.00%> (-2.84%) ⬇️
modules/git/repo.go 46.19% <0.00%> (-0.51%) ⬇️
... and 10 more

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 a9decf0...912d577. Read the comment docs.

@zeripath zeripath changed the title Support backslashes in release tags Support slashes in release tags Sep 15, 2020
@zeripath
Copy link
Contributor Author

zeripath commented Sep 15, 2020

Sorry @mrsdizzie yes of course - I blame @6543 😉

@GiteaBot GiteaBot 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 Sep 15, 2020
Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

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

macaron is acting wrong!!
this should be right but if you try it, all tag pages become 404

so I guess it is a macaron bug :/

@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 Sep 16, 2020
@lunny
Copy link
Member

lunny commented Sep 16, 2020

@6543 Is there still a break?

@bagasme
Copy link
Contributor

bagasme commented Sep 16, 2020

releases/ page work but 404 error for tags/

Copy link
Contributor

@bagasme bagasme left a comment

Choose a reason for hiding this comment

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

ack: creating release tags with slashes worked

@6543
Copy link
Member

6543 commented Sep 16, 2020

yes still breaks

@zeripath
Copy link
Contributor Author

@6543 exactly which URLs are still broken?

Do you mean the URLs governed by:

https://github.com/zeripath/gitea/blob/912d577f60138bf0e8c0fa4f9ad222cfbd4ef7e5/routers/routes/routes.go#L629

Because I haven't changed those and frankly they need to be fixed to path escape the tag rather than changing the routing.

(It's worth noting that some of the first things I did in Gitea were fixing broken escaping and I still am doing so - we really need to get on top of this.)

Signed-off-by: Andrew Thornton <art27@cantab.net>
Copy link
Member

@6543 6543 left a comment

Choose a reason for hiding this comment

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

this did it

@zeripath
Copy link
Contributor Author

Fixed now! Sorry I wasn't testing this properly as I didn't realise how to create a release properly.


As an aside - this is a terrible UI - tags get autoreleased but then you can't easily create a release from one without stating the name. I think this needs looking at again.

@zeripath zeripath merged commit 9c439a7 into go-gitea:master Sep 17, 2020
@zeripath zeripath deleted the fix-12861-support-backslashes-in-tags branch September 17, 2020 18:24
@6543
Copy link
Member

6543 commented Sep 17, 2020

Pleace send backport ;)

zeripath added a commit to zeripath/gitea that referenced this pull request Sep 17, 2020
Backport go-gitea#12864

Fix go-gitea#12861

Signed-off-by: Andrew Thornton <art27@cantab.net>
jolheiser pushed a commit that referenced this pull request Sep 17, 2020
Backport #12864

Fix #12861

Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath added the backport/done All backports for this PR have been created label Oct 5, 2020
@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
backport/done All backports for this PR have been created 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.

[Bug] [UI] Release Page dont support tags with "/"
9 participants