feat: auto-update pouch and catalog sources during normal use
Add taste-skill to catalog.yaml, and refresh pouch plus cloned catalog or custom Git sources on a 24h interval so users do not need a separate update command.
This commit is contained in:
@@ -204,6 +204,36 @@ class CatalogCollectionTests(unittest.TestCase):
|
||||
self.assertFalse((skill_dir / "first-skill").exists())
|
||||
self.assertFalse((skill_dir / "second-skill").exists())
|
||||
|
||||
def test_add_refreshes_collection_before_installing_new_children(self) -> None:
|
||||
first = self.run_pouch("add", "test-pack/first-skill", "-g", "-a", "codex")
|
||||
self.assertEqual(first.returncode, 0, first.stderr)
|
||||
|
||||
write_skill(self.upstream / "skills", "third-skill")
|
||||
subprocess.run(["git", "-C", str(self.upstream), "add", "."], check=True)
|
||||
subprocess.run(
|
||||
[
|
||||
"git",
|
||||
"-C",
|
||||
str(self.upstream),
|
||||
"-c",
|
||||
"user.name=Test",
|
||||
"-c",
|
||||
"user.email=test@example.com",
|
||||
"commit",
|
||||
"-m",
|
||||
"add third",
|
||||
],
|
||||
check=True,
|
||||
capture_output=True,
|
||||
)
|
||||
|
||||
second = self.run_pouch("add", "test-pack", "-g", "-a", "codex")
|
||||
skill_dir = self.home / ".codex" / "skills"
|
||||
|
||||
self.assertEqual(second.returncode, 0, second.stderr)
|
||||
self.assertTrue((skill_dir / "third-skill").is_symlink())
|
||||
self.assertTrue((skill_dir / "third-skill" / "SKILL.md").is_file())
|
||||
|
||||
def test_status_expands_collection_children(self) -> None:
|
||||
installed = self.run_pouch("add", "test-pack", "-g", "-a", "codex")
|
||||
status = self.run_pouch("status", "-a", "codex")
|
||||
|
||||
Reference in New Issue
Block a user