-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
actions ref_name is returning full ref ("ref/heads/*") instead of shortened name #25357
Labels
Comments
The fix does appear to be that simple. I've built and tested with that simple refName.ShortName() fix I referred to and it seems to work fine on my end. |
lunny
pushed a commit
that referenced
this issue
Jun 19, 2023
Fix #25357 . Just a simple fix the result of `${{ gitea.ref_name }}` to show the shortened name rather than the full ref.
GiteaBot
pushed a commit
to GiteaBot/gitea
that referenced
this issue
Jun 19, 2023
Fix go-gitea#25357 . Just a simple fix the result of `${{ gitea.ref_name }}` to show the shortened name rather than the full ref.
Thank you! |
silverwind
pushed a commit
that referenced
this issue
Jun 19, 2023
Backport #25358 by @nephatrine Fix #25357 . Just a simple fix the result of `${{ gitea.ref_name }}` to show the shortened name rather than the full ref. Co-authored-by: Daniel Wolf <1461334+nephatrine@users.noreply.github.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
I decided to try 1.20.0-rc0 (had been using 1.19.3) and noticed what I believe to be a regression. When using
${{ gitea.ref_name }}
in my actions to get the branch name, I'm now getting something likeref/heads/main
instead of justmain
. Per the documentation and prior behaviour, I believe it should only be returning the name.I have not tried fixing the issue myself, but I think the issue is that it is being set to refName.String() instead of refName.ShortName() in
routers/api/actions/runner/utils.go
.Gitea Version
1.20.0-rc0
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
Alpine 3.18
How are you running Gitea?
I'm building it myself from the 1.20.0-rc0 tag and running it inside an alpine:latest docker container.
Database
SQLite
The text was updated successfully, but these errors were encountered: