Documentation
¶
Overview ¶
Package forge implements the software forge capability.
Package forge implements the software forge capability (Gitea, Gogs, Forgejo).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Descriptor ¶
func Descriptor(backend, app string, svc Service) hub.Descriptor
Descriptor returns the hub capability descriptor for forge.
func RegisterService ¶
RegisterService registers the forge capability with the hub registry. It returns nil and logs a warning when svc is nil (provider not configured).
Types ¶
type ListIssuesQuery ¶
type ListIssuesQuery struct {
Page ability.PageRequest
State string // open, closed, all
}
ListIssuesQuery wraps pagination and filtering for listing issues.
type Service ¶
type Service interface {
// GetUser returns the authenticated user's profile.
GetUser(ctx context.Context) (*ability.ForgeUser, error)
// GetRepo returns a single repository by owner and name.
GetRepo(ctx context.Context, owner, repo string) (*ability.ForgeRepo, error)
// ListIssues returns a paginated list of issues for the given owner.
ListIssues(ctx context.Context, owner string, q *ListIssuesQuery) (*ability.ListResult[ability.ForgeIssue], error)
// GetIssue returns a single issue by owner, repo name, and issue index.
GetIssue(ctx context.Context, owner, repo string, index int64) (*ability.ForgeIssue, error)
// GetCommitDiff returns the diff for a specific commit.
GetCommitDiff(ctx context.Context, owner, repo, commitID string) (*ability.ForgeCommitDiff, error)
// GetFileContent returns file content at a specific commit with line range.
GetFileContent(ctx context.Context, owner, repo, commitID, filePath string, lineStart, lineCount int) ([]byte, error)
}
Service defines the forge capability contract. Provider adapters implement this interface to bridge forge providers and invokers.
Click to show internal directories.
Click to hide internal directories.