Documentation
¶
Overview ¶
Package skillremove opens the pull request a `skill: remove <name>` request asks for (run skills design D44): one commit deleting `.agents/skills/<name>/` on `maku/skill-remove-<name>`, made by the factory with no model and no run. A human merges it; nothing here touches the default branch.
Index ¶
Constants ¶
const ReasonUnsupported = "skill_removal_unsupported"
ReasonUnsupported is the task's end reason for an UnsupportedError.
Variables ¶
var ErrBranchExists = errors.New("skill_removal_branch_exists")
ErrBranchExists is maku/skill-remove-<name> left behind by a closed removal pull request, or holding anything but this removal: opening a pull request on it would propose whatever commit it holds, so the request is refused until a maintainer deletes the branch. Nothing is force-moved.
var ErrNotFound = errors.New("skill_not_found")
ErrNotFound is a skill not on the default branch, or a name no skill can have.
var ErrOff = errors.New("skill_removal_off")
ErrOff is a repository with no connection that can open a removal pull request.
Functions ¶
Types ¶
type Git ¶
type Git interface {
RepositoryInfo(ctx context.Context) (forge.RepositoryInfo, error)
DefaultBranchHead(ctx context.Context) (string, error)
SubtreeSHA(ctx context.Context, commit, dir string) (string, bool, error)
Tree(ctx context.Context, sha string, recursive bool) ([]forge.TreeEntry, bool, error)
DeleteFiles(ctx context.Context, base string, paths []string, message string) (string, error)
CreateBranchAt(ctx context.Context, branch, sha string) error
ResolveRef(ctx context.Context, ref string) (string, error)
CompareFiles(ctx context.Context, base, head string) ([]forge.FilePatch, error)
CreatePR(ctx context.Context, base, head, title, body string, draft bool) (forge.PR, error)
PullRequestForBranchInto(ctx context.Context, branch, base string) (int, error)
PullRequest(ctx context.Context, number int) (forge.PR, error)
}
Git is the repository connection a removal needs; *forge.GitHub implements it.
type Result ¶
Result is the pull request, and whether this call opened it.
func Open ¶
Open opens, or finds open, the pull request removing name, requested in issue with evidence, into the repository's default branch. It is safe to call again: an open pull request from the branch is answered, never a second, and a branch an earlier call made but opened no pull request on is reused when it holds exactly this removal.
type UnsupportedError ¶
type UnsupportedError struct{ Why string }
UnsupportedError is a skill directory a removal commit is not built for: a retry gets the same answer, so the request ends. Why is one of the package's fixed phrases, never repository text.