BugSETI/ghcheck.go
Claude 4566e7f62e
feat: extract BugSETI from core/cli into standalone repo
Move distributed bug fixing app from core/cli internal/bugseti/ and
cmd/bugseti/ into its own module. Library code at package root,
app entry point in cmd/, design docs in docs/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 14:55:58 +00:00

22 lines
535 B
Go

package bugseti
import (
"forge.lthn.ai/core/go/pkg/forge"
)
// CheckForge verifies that the Forgejo API is configured and reachable.
// Returns nil if a token is configured and the API responds, or an error
// with actionable instructions for the user.
func CheckForge() (*forge.Client, error) {
client, err := forge.NewFromConfig("", "")
if err != nil {
return nil, err
}
// Verify the token works by fetching the current user
if _, err := client.GetCurrentUser(); err != nil {
return nil, err
}
return client, nil
}