Skip to content

Fix evaluation.yml run-name: quote expression so '#' isn't a YAML comment#759

Merged
JanKrivanek merged 1 commit into
dotnet:mainfrom
YuliiaKovalova:fix/eval-run-name-quote
Jun 12, 2026
Merged

Fix evaluation.yml run-name: quote expression so '#' isn't a YAML comment#759
JanKrivanek merged 1 commit into
dotnet:mainfrom
YuliiaKovalova:fix/eval-run-name-quote

Conversation

@YuliiaKovalova

Copy link
Copy Markdown
Member

Problem

Every evaluation.yml run on main has failed since #746 merged (13:50), with GitHub reporting "This run likely failed because of a workflow file issue" and no jobs starting. This is not caused by #754 (baseline reuse) — that feature's eval run succeeded at 13:17; the first failure is the #746 merge commit.

Root cause

#746 added a run-name as an unquoted plain YAML scalar:

run-name: ${{ inputs.pr_number != '' && format('Evaluate PR #{0} @ {1}', inputs.pr_number, inputs.head_sha) || '' }}

In YAML, a space followed by # begins a comment. So #{0} @ {1}', inputs.pr_number, inputs.head_sha) || '' }} is stripped as a comment, leaving an unterminated ${{ expression. The file still parses as valid YAML (which is why yaml.safe_load and a casual review pass), but the GitHub Actions workflow parser rejects the broken expression and refuses to start any run.

Fix

Wrap the value in double quotes so the # stays inside the scalar:

run-name: "${{ inputs.pr_number != '' && format('Evaluate PR #{0} @ {1}', inputs.pr_number, inputs.head_sha) || '' }}"

The inner expression only uses single quotes, so double-quoting is safe.

Verification

  • actionlint on the fixed file: 0 errors (previously: got unexpected EOF while lexing end of string literal at line 34).
  • One-line change; no behavioral change to the run name itself.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

…ment

The run-name added in dotnet#746 is an unquoted plain scalar containing
` #{0}`. In YAML, a space followed by '#' starts a comment, so everything
from '#{0} ...' onward was stripped, leaving an unterminated ${{ }}
expression. The file still parses as YAML (yaml.safe_load succeeds) but
GitHub Actions rejects it ("This run likely failed because of a workflow
file issue"), which broke every evaluation run on main after dotnet#746 merged.
Wrapping the value in double quotes keeps the full expression intact;
verified with actionlint.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 12, 2026 14:27
@github-actions

Copy link
Copy Markdown
Contributor

Note

This PR is from a fork and modifies infrastructure files (eng/ or .github/).

Changes to infrastructure typically need to be submitted from a branch in dotnet/skills (not a fork) so that CI workflows run with the correct permissions and secrets.

Please consider recreating this PR from an upstream branch. If you don't have push access to dotnet/skills, ask a maintainer to push your branch for you.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a GitHub Actions workflow parsing failure introduced by an unquoted run-name expression containing #, which YAML treats as a comment delimiter in plain scalars—resulting in a truncated/invalid ${{ ... }} expression and preventing the workflow from starting.

Changes:

  • Quote the run-name value in .github/workflows/evaluation.yml so # remains part of the string and the expression remains intact.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@YuliiaKovalova YuliiaKovalova enabled auto-merge (squash) June 12, 2026 14:32
@JanKrivanek

Copy link
Copy Markdown
Member

/evaluate

@github-actions github-actions Bot added the pr-state/ready-for-eval PR is mergeable and awaiting evaluation label Jun 12, 2026
@JanKrivanek JanKrivanek disabled auto-merge June 12, 2026 18:27
@JanKrivanek JanKrivanek merged commit c8be210 into dotnet:main Jun 12, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-state/ready-for-eval PR is mergeable and awaiting evaluation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants