Add "Run" prefix for unnamed action steps#36624
Conversation
Steps defined with `run:` or `uses:` but without an explicit `name:` now display with a "Run <cmd>" prefix in the Actions log UI, matching GitHub Actions behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the Actions run log UI so that workflow steps without an explicit name: get a “Run …” prefixed display name, aligning the step list presentation with GitHub Actions behavior.
Changes:
- Add server-side logic in the Actions log view model conversion to prefix unnamed steps using a localized string.
- Add an English locale string for the new prefix.
- Add a unit test covering step summary generation for named vs unnamed steps.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| routers/web/repo/actions/view.go | Prefixes unnamed workflow steps with a localized “Run %s” display string during view model conversion. |
| routers/web/repo/actions/view_test.go | Adds a focused test asserting step summary output for unnamed uses:/run: steps and named steps. |
| options/locale/locale_en-US.json | Introduces actions.runs.run_prefix translation key (“Run %s”). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
What's wrong? Constructive feedback please. If you want a simpler alternative implementation I can revert 954fe95, but Copilot did not like the mutation. |
|
It is wrong. Everything every time I told you what's wrong, you just don't understand.
I won't waste time on you and your AI crap |
wxiaoguang
left a comment
There was a problem hiding this comment.
Need to fix the wrong and fragile logic generated by AI
|
Tell me what's wrong. I don't play guessing games. |
|
Give me a reason why I should waste time on you. #36618 (comment) |
This reverts commit 954fe95.
|
I've reverted the complication that came from the Copilot, now the code is very easy to understand, it adds the prefix into if task.Job != nil {
if wj, err := task.Job.ParseJob(); err == nil {
for i, step := range task.Steps {
if i < len(wj.Steps) && wj.Steps[i].Name == "" {
step.Name = ctx.Locale.TrString("actions.runs.run", step.Name)
}
}
}
} |
|
I guess I could move the prefixing into the template rendering as well. Then there are no dirty mutations in the go code. |
Instead of applying the prefix at display time (which required re-parsing the workflow YAML on every view and duplicating logic across the web UI and API), apply it in CreateTaskForRunner when step names are first generated. This matches GitHub Actions behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
I've changed the prefixing to be done at creation time, before it's inserted into the database, which means the prefixing only applies for new runs and can not be localized. Maybe that is more to @wxiaoguang's liking, I don't know what they want exactly, so this is a all a guesswork. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
ChristopherHX
left a comment
There was a problem hiding this comment.
Tested this manually
- rerun an existing job => new naming schema applied
- a new test workflow has also better step names
Steps defined with `run:` or `uses:` without an explicit `name:` now display with a "Run <cmd>" prefix in the Actions log UI, matching GitHub Actions behavior. <img width="311" height="236" alt="image" src="https://github.com/user-attachments/assets/9fde83f5-c43a-4732-ac55-0f4e1fbc1314" /> --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

Steps defined with
run:oruses:without an explicitname:now display with a "Run " prefix in the Actions log UI, matching GitHub Actions behavior.