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 support for latest in Run-URL #27911

Closed
JOKUE2002 opened this issue Nov 5, 2023 · 6 comments
Closed

Add support for latest in Run-URL #27911

JOKUE2002 opened this issue Nov 5, 2023 · 6 comments
Assignees
Labels
topic/gitea-actions related to the actions of Gitea type/proposal The new feature has not been accepted yet but needs to be discussed first.
Milestone

Comments

@JOKUE2002
Copy link

Description

Whilst trying to access the latest run of my action, I noticed, that the URL https://my-gitea.tld/user/repo/actions/runs/latest would always point to the run with the ID 0 (like https://my-gitea.tld/user/repo/actions/runs/0). This would also work with any other word (e.g. 'hello', 'world', 'anything', ...) instead of latest.

Would love to see "latest" to point to the newest run (run w/ highest ID) and any other word to point nowhere.

Couldn't reproduce on try.gitea.io because I have no action-runner I can access or repurpose available

Gitea Version

1.20.5

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.42.0

Operating System

Ubuntu 16.04.7 LTS

How are you running Gitea?

Downloaded binary with a systemctl service

Database

SQLite

@KN4CK3R
Copy link
Member

KN4CK3R commented Nov 5, 2023

The parameter behind /run/ is supposed to be a number and a failed number conversion just results in 0. This should be a proposal.

@KN4CK3R KN4CK3R added type/proposal The new feature has not been accepted yet but needs to be discussed first. and removed type/bug labels Nov 5, 2023
@KN4CK3R KN4CK3R changed the title Run-URL can be anything to display run with ID 0 Add support for latest in Run-URL Nov 5, 2023
@lunny lunny added the topic/gitea-actions related to the actions of Gitea label Nov 6, 2023
@fuxiaohei
Copy link
Contributor

In Github Actions. The latest is not supported. For example in Gitea repo, I get runs link https://github.com/go-gitea/gitea/actions/runs/6863940854, but https://github.com/go-gitea/gitea/actions/runs/latest is 404.

There is another problem.
https://github.com/go-gitea/gitea/actions/runs/6863940854 is from docker-dryrun workflow.
But previous one https://github.com/go-gitea/gitea/actions/runs/6863940853 is from db-tests workflow.
The latest run can be from any workflow. Should we provide latest in this case ?

@monogatron
Copy link

monogatron commented Aug 6, 2024

I am wondering why it is working on this [0] gitea server. If you look into the README.md of the mentioned repo you can see that the mainainer is using the link with latest as a tag. By following the link you always get to the latest run.

As @JOKUE2002 stated here, this is not a Gitea server, but a Forgejo server.

[0] https://git.madhouse-project.org/algernon/chronicles.mad-scientist.club

@JOKUE2002
Copy link
Author

JOKUE2002 commented Aug 6, 2024

I am wondering why it is working on this [0] gitea server.

For starters it appears to be a forgejo server...

But would still love to see this in gitea.
If you for example have a repository with a single workflow (e.g. building a node project), getting the latest would make deployment using gitea more simple than before.

@monogatron
Copy link

monogatron commented Aug 6, 2024

Oh you're right. I just saw the UI and assumed that it is a gitea server. But after your comment I looked again and scrolled down a bit: "Powered by Forgejo"

But I agree with you: I'd also love to see this feature in gitea.

@fuxiaohei fuxiaohei self-assigned this Aug 9, 2024
@lunny lunny added this to the 1.23.0 milestone Aug 9, 2024
wolfogre pushed a commit that referenced this issue Aug 10, 2024
Proposal from
#27911 (comment)

When visit latest run path, such as
`/{user}/{repo}/actions/runs/latest`. It renders latest run instead of
index=0 currently.
@lunny
Copy link
Member

lunny commented Sep 6, 2024

Resolved by #31808

@lunny lunny closed this as completed Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/gitea-actions related to the actions of Gitea type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

5 participants