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

allow "latest" to be used in release vTag when downloading file #26748

Conversation

merlleu
Copy link
Contributor

@merlleu merlleu commented Aug 26, 2023

Hello,

In the discord I saw someone complaining that you can't use the "latest" keyword as release tag to download a specific file:
In his example:
https://www.uberwald.me/gitea/public/fvtt-ecryme/releases/latest/system.json

However the latest keyword works for the release page, so I think it's a good thing to implement this on the release attachment download url too.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Aug 26, 2023
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 26, 2023
@wxiaoguang
Copy link
Contributor

The idea is pretty good. The question in my mind is: could be the logic changed to: if latest tag doesn't exist in the repo, then use GetLatestReleaseByRepoID, instead of always assuming latest is GetLatestReleaseByRepoID ? This behavior won't break the repo which already has a real latest tag.

routers/web/repo/repo.go Outdated Show resolved Hide resolved
@merlleu
Copy link
Contributor Author

merlleu commented Aug 27, 2023

The idea is pretty good. The question in my mind is: could be the logic changed to: if latest tag doesn't exist in the repo, then use GetLatestReleaseByRepoID, instead of always assuming latest is GetLatestReleaseByRepoID ? This behavior won't break the repo which already has a real latest tag.

Yep I'll implement this, do you think we should allow new releases to be created with the "latest" name ?

@merlleu merlleu requested a review from lunny August 28, 2023 10:01
@deurk
Copy link

deurk commented Sep 6, 2023

Will be great to see this get implemented!

@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 6, 2023
@wxiaoguang wxiaoguang added this to the 1.21.0 milestone Sep 6, 2023
@wxiaoguang wxiaoguang added the type/enhancement An improvement of existing functionality label Sep 6, 2023
@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 6, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 6, 2023
@lunny lunny enabled auto-merge (squash) September 6, 2023 09:35
@lunny lunny merged commit a7d9a70 into go-gitea:main Sep 6, 2023
24 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 6, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Sep 7, 2023
* giteaofficial/main:
  Fix schedule actions still running even if workflow disalbed (go-gitea#26939)
  Fix the missing repo count (go-gitea#26942)
  Improve SSH Key / GPG Key / Deploy Key UI (go-gitea#26949)
  [skip ci] Updated translations via Crowdin
  Update nginx recommendations (go-gitea#26924)
  docs: Update Profile README information (go-gitea#26947)
  Fix scoped label layout (go-gitea#26932)
  Move createrepository from module to service layer (go-gitea#26927)
  Add a documentation note for Windows Service (go-gitea#26938)
  allow "latest" to be used in release vTag when downloading file (go-gitea#26748)
  Extract common code to new template (go-gitea#26933)
  Show always repo count in header (go-gitea#26842)
  Show always repo count in header (go-gitea#26842)
  Artifacts retention and auto clean up (go-gitea#26131)
  Fix UI anomalies (go-gitea#26929)
  Fix the display of org level badges  (go-gitea#26504)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Dec 5, 2023
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. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants