Move module identity to our own Forgejo instance. All import paths updated across 434 Go files, sub-module go.mod files, and go.work. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
22 lines
536 B
Go
22 lines
536 B
Go
package bugseti
|
|
|
|
import (
|
|
"forge.lthn.ai/core/cli/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
|
|
}
|