chore(deps): update actionslib to v1.0.0 (#39295)

Co-authored-by: bircni <bircni@icloud.com>
This commit is contained in:
silverwind
2026-09-14 16:29:31 +02:00
committed by GitHub
co-authored by bircni
parent cefb81a16f
commit 13033827b1
13 changed files with 54 additions and 99 deletions
+2 -2
View File
@@ -218,13 +218,13 @@ func GetRunningTaskByToken(ctx context.Context, token string) (*ActionTask, erro
func makeTaskStepDisplayName(step *jobparser.Step, limit int) (name string) {
if step.Name != "" {
name = step.Name // the step has an explicit name
name = string(step.Name) // the step has an explicit name
} else {
// for unnamed step, its "String()" method tries to get a display name by its "name", "uses",
// "run" or "id" (last fallback), we add the "Run " prefix for unnamed steps for better display
// for multi-line "run" scripts, only use the first line to match GitHub's behavior
// https://github.com/actions/runner/blob/66800900843747f37591b077091dd2c8cf2c1796/src/Runner.Worker/Handlers/ScriptHandler.cs#L45-L58
runStr, _, _ := strings.Cut(strings.TrimSpace(step.Run), "\n")
runStr, _, _ := strings.Cut(strings.TrimSpace(string(step.Run)), "\n")
name = "Run " + util.IfZero(strings.TrimSpace(runStr), step.String())
}
return util.EllipsisDisplayString(name, limit) // database column has a length limit
+2 -2
View File
@@ -82,14 +82,14 @@ func TestMakeTaskStepDisplayName(t *testing.T) {
{
name: "very long name truncated",
jobStep: &jobparser.Step{
Name: strings.Repeat("a", 300),
Name: jobparser.BlockSafeString(strings.Repeat("a", 300)),
},
expected: strings.Repeat("a", 252) + "…",
},
{
name: "very long run truncated",
jobStep: &jobparser.Step{
Run: strings.Repeat("a", 300),
Run: jobparser.BlockSafeString(strings.Repeat("a", 300)),
},
expected: "Run " + strings.Repeat("a", 248) + "…",
},