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

Add tags list for repos whose release setting is disabled #23465

Merged
merged 16 commits into from
Apr 25, 2023

Conversation

Zettat123
Copy link
Contributor

@Zettat123 Zettat123 commented Mar 14, 2023

Close #23427

Co-Author: @wxiaoguang

If a repo's release setting is enabled, the logic has't changed. Clicking the "Tags" button will jump to /{user}/{repo}/tags and templates/repo/release/list.tmpl template will be used.

If the release setting is disabled, clicking the "Tags" button will still jump to /{user}/{repo}/tags but a new template templates/repo/tag/list.tmpl will be used.

Since both templates above need to render the tags list, I moved the tags list to a shared template located in templates/repo/tag/table.tmpl.

routers/web/repo/release.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 14, 2023
routers/web/web.go Outdated Show resolved Hide resolved
@Zettat123 Zettat123 changed the title Add tags list for repos whose release setting is disabled WIP: Add tags list for repos whose release setting is disabled Mar 14, 2023
@Zettat123 Zettat123 changed the title WIP: Add tags list for repos whose release setting is disabled Add tags list for repos whose release setting is disabled Mar 15, 2023
@Zettat123 Zettat123 requested a review from lunny March 15, 2023 03:42
@codecov-commenter

This comment was marked as off-topic.

@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 Mar 15, 2023
@lunny lunny added the outdated/backport/v1.19 This PR should be backported to Gitea 1.19 label Mar 15, 2023
@lunny lunny added this to the 1.20.0 milestone Mar 15, 2023
@yp05327
Copy link
Contributor

yp05327 commented Mar 28, 2023

There are some big changes in #23243, conflicts must be resolved.

@Zettat123 Zettat123 force-pushed the bugfix/issue-23427 branch 2 times, most recently from e17756d to 202009c Compare March 28, 2023 05:56
@Zettat123 Zettat123 requested a review from yp05327 March 28, 2023 06:05
@Zettat123 Zettat123 requested review from wxiaoguang and removed request for yp05327 March 28, 2023 06:19
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 25, 2023
@silverwind silverwind merged commit 30c1cd9 into go-gitea:main Apr 25, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 25, 2023
@GiteaBot
Copy link
Contributor

I was unable to create a backport for 1.19. @Zettat123, please send one manually. 🍵

@GiteaBot GiteaBot added the backport/manual No power to the bots! Create your backport yourself! label Apr 25, 2023
@silverwind
Copy link
Member

Sould we really backport such a large PR?

zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 26, 2023
* giteaofficial/main:
  Fix broken clone script on an empty archived repo (go-gitea#24339)
  Improve RSS (go-gitea#24335)
  Automatically select the org when click create repo from org dashboard (go-gitea#24325)
  on schedule
  on schedule
  switch to use Actions from drone for cron (go-gitea#24314)
  [skip ci] Updated translations via Crowdin
  Restore bold on repolist (go-gitea#24337)
  Fix template function DateTime (go-gitea#24317)
  Fix incorrect CORS response in Http Git handler (go-gitea#24303)
  Updated upgrade script that is informing user that Gitea service has to be running in order to upgrade it (go-gitea#24260)
  Add tags list for repos whose release setting is disabled (go-gitea#23465)
  Refactor config provider (go-gitea#24245)
  Add RSS Feeds for branches and files (go-gitea#22719)
  Make SVG in dropdown menu have the same margin-right as IMG (go-gitea#24316)
  Respect the REGISTER_MANUAL_CONFIRM setting when registering via OIDC (go-gitea#24035)
@lunny
Copy link
Member

lunny commented Apr 26, 2023

Because this fixed a bug when disabling release, clicking tags on Code tab will return 404.

Zettat123 added a commit to Zettat123/gitea that referenced this pull request Apr 27, 2023
…3465)

Close go-gitea#23427

Co-Author: @wxiaoguang

If a repo's release setting is enabled, the logic has't changed.
Clicking the "Tags" button will jump to `/{user}/{repo}/tags` and
`templates/repo/release/list.tmpl` template will be used.

<img
src="https://user-images.githubusercontent.com/15528715/224939362-bd8974fd-08b0-4f79-a114-3389d15847ca.png"
width="600px" />

If the release setting is disabled, clicking the "Tags" button will
still jump to `/{user}/{repo}/tags` but a new template
`templates/repo/tag/list.tmpl` will be used.

<img
src="https://user-images.githubusercontent.com/15528715/233834564-74741e49-f4e9-47c8-ac12-e306642798dc.png"
width="600px" />

Since both templates above need to render the tags list, I moved the
tags list to a shared template located in
`templates/repo/tag/table.tmpl`.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
@wxiaoguang wxiaoguang deleted the bugfix/issue-23427 branch April 27, 2023 03:26
lunny pushed a commit that referenced this pull request Apr 27, 2023
…24369)

Backport #23465

Close #23427 

Co-Author: @wxiaoguang 

If a repo's release setting is enabled, the logic has't changed.
Clicking the "Tags" button will jump to `/{user}/{repo}/tags` and
`templates/repo/release/list.tmpl` template will be used.

<img
src="https://user-images.githubusercontent.com/15528715/224939362-bd8974fd-08b0-4f79-a114-3389d15847ca.png"
width="600px" />

If the release setting is disabled, clicking the "Tags" button will
still jump to `/{user}/{repo}/tags` but a new template
`templates/repo/tag/list.tmpl` will be used.

<img
src="https://user-images.githubusercontent.com/15528715/233834564-74741e49-f4e9-47c8-ac12-e306642798dc.png"
width="600px" />

Since both templates above need to render the tags list, I moved the
tags list to a shared template located in
`templates/repo/tag/table.tmpl`.
@wxiaoguang
Copy link
Contributor

Because this fixed a bug when disabling release, clicking tags on Code tab will return 404.

I never thought that this would be backported.

It's not a serious bug indeed. Maybe next time we do not need to backport such a big PR.

@silverwind
Copy link
Member

Yes, I had concerns above, but they were ignored.

@lunny
Copy link
Member

lunny commented Apr 29, 2023

I don't think so. The bug is if you disable releasing, then you cannot list tags anymore, and the page return 404.

@wxiaoguang wxiaoguang mentioned this pull request May 9, 2023
techknowlogick pushed a commit that referenced this pull request Jul 5, 2023
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Jul 5, 2023
silverwind pushed a commit that referenced this pull request Jul 5, 2023
Backport #25624 by @lunny

This casused by #23465

Before

release disabled
<img width="1320" alt="图片"
src="https://github.com/go-gitea/gitea/assets/81045/190a1c81-daa5-41bc-91ac-c9a0bf629b5f">

release enabled
<img width="1320" alt="图片"
src="https://github.com/go-gitea/gitea/assets/81045/a0372c31-727c-4ee0-a6b9-30e502498d90">

After

release disabled
<img width="1304" alt="图片"
src="https://github.com/go-gitea/gitea/assets/81045/a747ea80-a3d9-4792-8f6d-e8955da78b9e">

release enabled
<img width="1290" alt="图片"
src="https://github.com/go-gitea/gitea/assets/81045/7c0bc43a-9149-4148-859d-35839aeb60ca">

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
@lunny lunny added the backport/done All backports for this PR have been created label Jul 26, 2023
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 1, 2023
@GiteaBot
Copy link
Contributor

GiteaBot commented Aug 1, 2023

We lock pull requests 3 months after they were closed. If there's any need for further discussion, please open a new issue. 🍵

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 backport/manual No power to the bots! Create your backport yourself! lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. outdated/backport/v1.19 This PR should be backported to Gitea 1.19 size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disabled releases lead to 404 on tags page
7 participants