fix(sync-docs): use absolute paths for sync target and report#226
Merged
Conversation
yarn workspace @vc-shell/docs-sync exec runs commands with cwd set to the workspace's package dir (cli/docs-sync/), not the repo root. The previous '--target ./vc-docs' therefore resolved to cli/docs-sync/vc-docs/ inside the workflow workspace — not the vc-docs checkout. The writer silently created files there (mkdir recursive), so git status in the real vc-docs checkout reported no changes and no PR was opened. Resolve via $GITHUB_WORKSPACE absolute paths for both --target and the PR body file.
40134f3 to
f690115
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
yarn workspace @vc-shell/docs-sync execruns commands withcwdset to the workspace package's directory (cli/docs-sync/), not the repo root. The previous--target ./vc-docstherefore resolved tocli/docs-sync/vc-docs/inside the workflow workspace — not the vc-docs checkout at\$GITHUB_WORKSPACE/vc-docs.The writer silently created files at the wrong path (it does
mkdir -precursively), sogit statusin the real vc-docs checkout reported no changes, and the workflow exited with "No changes to sync" without opening a PR.What changes
Pass absolute paths via
\$GITHUB_WORKSPACE:--target "\$WORKSPACE_DIR/vc-docs"--report "\$WORKSPACE_DIR/sync-report.md"--body-file "\$GITHUB_WORKSPACE/sync-report.md"How to verify
After merge: Actions → sync-docs → Run workflow with
target_branch: docs/vc-shell-integration. Auto-PR should open with the 127 expected file changes.