devcontainer

package
v0.29.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package devcontainer provides devcontainer detection functionality for worktree operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

type Detector struct {
	// contains filtered or unexported fields
}

Detector provides devcontainer detection functionality.

func NewDetector

func NewDetector(fs fs.FS) *Detector

NewDetector creates a new Detector instance.

func (*Detector) DetectDevcontainer

func (d *Detector) DetectDevcontainer(repoPath string) (bool, error)

DetectDevcontainer checks if a repository has a devcontainer configuration. It checks for both .devcontainer/devcontainer.json and .devcontainer.json files.

type PreWorktreeCreationHook

type PreWorktreeCreationHook struct {
	// contains filtered or unexported fields
}

PreWorktreeCreationHook provides devcontainer detection as a pre-worktree creation hook.

func NewPreWorktreeCreationHook

func NewPreWorktreeCreationHook() *PreWorktreeCreationHook

NewPreWorktreeCreationHook creates a new devcontainer PreWorktreeCreationHook instance.

func (*PreWorktreeCreationHook) Execute

Execute is a no-op for PreWorktreeCreationHook.

func (*PreWorktreeCreationHook) Name

func (h *PreWorktreeCreationHook) Name() string

Name returns the hook name.

func (*PreWorktreeCreationHook) OnPreWorktreeCreation

func (h *PreWorktreeCreationHook) OnPreWorktreeCreation(ctx *hooks.HookContext) error

OnPreWorktreeCreation handles devcontainer detection before worktree creation.

func (*PreWorktreeCreationHook) Priority

func (h *PreWorktreeCreationHook) Priority() int

Priority returns the hook priority.

func (*PreWorktreeCreationHook) RegisterForOperations

func (h *PreWorktreeCreationHook) RegisterForOperations(
	registerHook func(operation string, hook hooks.PreWorktreeCreationHook) error,
) error

RegisterForOperations registers this hook for worktree operations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL