From 6665b0295613848428791e0066ac2dda0c865d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Th=C3=B6rnvik?= Date: Sat, 23 May 2026 23:17:18 +0200 Subject: [PATCH 1/2] Truncate commit-derived workflow run names ## Summary - replace commit-message-derived workflow run names with compact commit identifiers - preserve existing pull request title or number behavior where already in use - fall back to `github.sha` when `head_commit` is unavailable ## Testing - parse the modified workflow YAML with PyYAML Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/code-scanning.yaml | 2 +- .github/workflows/main.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code-scanning.yaml b/.github/workflows/code-scanning.yaml index 3753ee4..59c719d 100644 --- a/.github/workflows/code-scanning.yaml +++ b/.github/workflows/code-scanning.yaml @@ -1,6 +1,6 @@ name: Code scanning -run-name: "Scanning: ${{ github.event.pull_request.number || github.event.head_commit.message }}" +run-name: "Scanning: ${{ github.event.pull_request.number || github.event.head_commit.id || github.sha }}" on: push: diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index a4e3641..ab607de 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,6 +1,6 @@ name: Main branch protection -run-name: "Main branch protection: ${{ github.event.head_commit.message }}" +run-name: "Main branch protection: ${{ github.event.head_commit.id || github.sha }}" on: push: From 54b72c6e85b0ef6f3909784f973affe27e4e8801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Th=C3=B6rnvik?= Date: Sat, 23 May 2026 23:20:40 +0200 Subject: [PATCH 2/2] Use readable fallback workflow run names Replace the push-side SHA fallback with a compact readable fallback based on the branch name and workflow run number while keeping PR numbers and titles unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/code-scanning.yaml | 2 +- .github/workflows/main.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code-scanning.yaml b/.github/workflows/code-scanning.yaml index 59c719d..79e44dd 100644 --- a/.github/workflows/code-scanning.yaml +++ b/.github/workflows/code-scanning.yaml @@ -1,6 +1,6 @@ name: Code scanning -run-name: "Scanning: ${{ github.event.pull_request.number || github.event.head_commit.id || github.sha }}" +run-name: "Scanning: ${{ github.event.pull_request.number || format('{0} #{1}', github.ref_name, github.run_number) }}" on: push: diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index ab607de..ca3e75a 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,6 +1,6 @@ name: Main branch protection -run-name: "Main branch protection: ${{ github.event.head_commit.id || github.sha }}" +run-name: "Main branch protection: ${{ format('{0} #{1}', github.ref_name, github.run_number) }}" on: push: