-
Notifications
You must be signed in to change notification settings - Fork 9k
fix(skills): stage updates in a temp dir and swap in-place #13449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+242
−52
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8de6903
fix(skills): stage updates in a temp dir and swap in-place
SamMorrowDrums f1780f8
fixup(skills): use same-filesystem atomic swap with rollback
SamMorrowDrums e71b11f
test: add why-comments and tighten leftover assertion
SamMorrowDrums 6af3a03
Merge branch 'trunk' into sammorrowdrums/fix-skill-update-in-place
SamMorrowDrums b4e79e7
Merge branch 'trunk' into sammorrowdrums/fix-skill-update-in-place
SamMorrowDrums cbbdb95
Merge branch 'trunk' into sammorrowdrums/fix-skill-update-in-place
SamMorrowDrums File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Updating a namespaced skill via --dir must write back to its original | ||
| # location and must NOT delete the original directory (issue #13370). | ||
|
|
||
| # Dry-run update should detect the namespaced skill and report an update | ||
| exec gh skill update --dry-run --all --dir $WORK/skills-dir | ||
| stdout 'git-commit' | ||
|
|
||
| # Force update should re-download in-place | ||
| exec gh skill update --force --all --dir $WORK/skills-dir | ||
| stdout 'Updated' | ||
|
|
||
| # Verify the SKILL.md was rewritten at the ORIGINAL namespaced location | ||
| grep 'github-repo' $WORK/skills-dir/anthropics-skills/git-commit/SKILL.md | ||
| ! grep 'Test skill content' $WORK/skills-dir/anthropics-skills/git-commit/SKILL.md | ||
|
|
||
| # The namespace directory must still exist (not deleted) | ||
| exists $WORK/skills-dir/anthropics-skills/git-commit/SKILL.md | ||
|
|
||
| # The skill must NOT have been relocated to a flat path | ||
| ! exists $WORK/skills-dir/git-commit/SKILL.md | ||
|
|
||
| -- skills-dir/anthropics-skills/git-commit/SKILL.md -- | ||
| --- | ||
| name: git-commit | ||
| description: Git commit helper | ||
| metadata: | ||
| github-repo: https://github.com/github/awesome-copilot.git | ||
| github-tree-sha: 0000000000000000000000000000000000000000 | ||
| github-path: skills/git-commit | ||
| --- | ||
| Test skill content |
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.