Skip to content

fix: ensure symlinked git directories work#2394

Open
dballance wants to merge 2 commits intoactions:mainfrom
dballance:fix/2393
Open

fix: ensure symlinked git directories work#2394
dballance wants to merge 2 commits intoactions:mainfrom
dballance:fix/2393

Conversation

@dballance
Copy link

Resolves #2393

@dballance
Copy link
Author

Tested this against my environment and it resolves the issue!

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

Fixes credential includeIf "gitdir:..." matching on self-hosted runners where the workspace path includes symlinks by resolving the host .git directory path before writing includeIf.gitdir:* entries.

Changes:

  • Resolve symlinks for the host .git directory used in includeIf.gitdir: keys (with a fallback when resolution fails).
  • Update the bundled dist/index.js to reflect the source change.
  • Add Jest coverage for symlink resolution and the fallback path behavior.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/git-auth-helper.ts Resolves the host .git path via realpath to make includeIf gitdir matching work with symlinked workspaces.
dist/index.js Compiled/bundled output updated to include the new symlink-resolution logic.
test/git-auth-helper.test.ts Adds tests verifying symlink resolution in includeIf keys and fallback behavior when resolution fails.

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

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.

v6 credential includeIf matching fails on self-hosted runners with symlinked _work directory

2 participants