Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix local action display name showing Run /./ instead of Run ./#4218

Merged
ericsciple merged 1 commit intomainfrom
users/ericsciple/26-01-local
Jan 30, 2026
Merged

Fix local action display name showing Run /./ instead of Run ./#4218
ericsciple merged 1 commit intomainfrom
users/ericsciple/26-01-local

Conversation

@ericsciple
Copy link
Collaborator

For local actions (uses: ./), the display name was incorrectly showing Run /./ due to a leading / being prepended to the path. This change fixes the GenerateDisplayName method to not prepend / when the repository Name is empty, which is the case for local/self-repo actions.

The Path already contains the full relative path (e.g., ./ or ./.github/actions/foo), so no leading / is needed.

Fixes: https://github.com/orgs/community/discussions/26245#discussioncomment-15646272

@ericsciple ericsciple requested a review from a team as a code owner January 30, 2026 04:45
Copilot AI review requested due to automatic review settings January 30, 2026 04:45
@ericsciple ericsciple marked this pull request as draft January 30, 2026 04:48
@ericsciple ericsciple force-pushed the users/ericsciple/26-01-local branch from e57f9ef to acfb145 Compare January 30, 2026 04:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a display name bug for local actions where "Run /./" was shown instead of "Run ./". The fix ensures that when a RepositoryPathReference has an empty Name (which occurs for local/self-repo actions), the Path is used directly without prepending a leading slash.

Changes:

  • Modified GenerateDisplayName method to check if Name is empty before prepending "/" to Path
  • Added two test cases to verify the fix for local actions with different path formats

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Runner.Worker/ActionRunner.cs Fixed path string generation to not prepend "/" when Name is empty (local actions)
src/Test/L0/Worker/ActionRunnerL0.cs Added tests for local action display names and removed trailing whitespace

For local actions (uses: ./), the display name was incorrectly showing
'Run /./' due to a leading '/' being prepended to the path. This change
fixes the GenerateDisplayName method to not prepend '/' when the
repository Name is empty, which is the case for local/self-repo actions.

The Path already contains the full relative path (e.g., './' or
'./.github/actions/foo'), so no leading '/' is needed.

Fixes: https://github.com/orgs/community/discussions/26245#discussioncomment-15646272
@ericsciple ericsciple force-pushed the users/ericsciple/26-01-local branch from acfb145 to 4394457 Compare January 30, 2026 04:58
@ericsciple ericsciple marked this pull request as ready for review January 30, 2026 05:10
@ericsciple
Copy link
Collaborator Author

Tested end-to-end.

Before:

image

After:

image

@ericsciple
Copy link
Collaborator Author

@jsoref fyi only

@ericsciple ericsciple merged commit 3a80a78 into main Jan 30, 2026
12 checks passed
@ericsciple ericsciple deleted the users/ericsciple/26-01-local branch January 30, 2026 15:24
dawidmalina pushed a commit to dawidmalina/github-runner that referenced this pull request Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants