MCPcopy Create free account
hub / github.com/cli/cli / writeSkill

Function writeSkill

pkg/cmd/skills/publish/publish_test.go:1595–1600  ·  view source on GitHub ↗

writeSkill creates skills/ /SKILL.md with the given content.

(t *testing.T, dir, name, content string)

Source from the content-addressed store, hash-verified

1593
1594// writeSkill creates skills/<name>/SKILL.md with the given content.
1595func writeSkill(t *testing.T, dir, name, content string) {
1596 t.Helper()
1597 skillDir := filepath.Join(dir, "skills", name)
1598 require.NoError(t, os.MkdirAll(skillDir, 0o755))
1599 require.NoError(t, os.WriteFile(filepath.Join(skillDir, "SKILL.md"), []byte(content), 0o644))
1600}
1601
1602func TestEnsurePushed(t *testing.T) {
1603 tests := []struct {

Callers 3

TestPublishRunFunction · 0.70

Calls 2

JoinMethod · 0.80
HelperMethod · 0.65

Tested by

no test coverage detected