## Summary - Extract PHP/Laravel commands to `core/php` repo (42 files, standalone module) - Extract CI/release + SDK commands to `core/ci` repo (10 files) - Remove `internal/variants/` build tag system entirely - Move all 30 remaining command packages from `internal/cmd/` to top-level `cmd/` - Rewrite `main.go` with direct imports — no more variant selection - PHP and CI are now optional via commented import lines in main.go Co-authored-by: Claude <developers@lethean.io> Reviewed-on: #2 Co-authored-by: Charon <charon@lthn.ai> Co-committed-by: Charon <charon@lthn.ai>
47 lines
1.2 KiB
Go
47 lines
1.2 KiB
Go
// Package gitea provides CLI commands for managing a Gitea instance.
|
|
//
|
|
// Commands:
|
|
// - config: Configure Gitea connection (URL, token)
|
|
// - repos: List repositories
|
|
// - issues: List and create issues
|
|
// - prs: List pull requests
|
|
// - mirror: Create GitHub-to-Gitea mirrors
|
|
// - sync: Sync GitHub repos to Gitea upstream branches
|
|
package gitea
|
|
|
|
import (
|
|
"forge.lthn.ai/core/go/pkg/cli"
|
|
)
|
|
|
|
func init() {
|
|
cli.RegisterCommands(AddGiteaCommands)
|
|
}
|
|
|
|
// Style aliases from shared package.
|
|
var (
|
|
successStyle = cli.SuccessStyle
|
|
errorStyle = cli.ErrorStyle
|
|
warningStyle = cli.WarningStyle
|
|
dimStyle = cli.DimStyle
|
|
valueStyle = cli.ValueStyle
|
|
repoStyle = cli.RepoStyle
|
|
numberStyle = cli.NumberStyle
|
|
infoStyle = cli.InfoStyle
|
|
)
|
|
|
|
// AddGiteaCommands registers the 'gitea' command and all subcommands.
|
|
func AddGiteaCommands(root *cli.Command) {
|
|
giteaCmd := &cli.Command{
|
|
Use: "gitea",
|
|
Short: "Gitea instance management",
|
|
Long: "Manage repositories, issues, and pull requests on your Gitea instance.",
|
|
}
|
|
root.AddCommand(giteaCmd)
|
|
|
|
addConfigCommand(giteaCmd)
|
|
addReposCommand(giteaCmd)
|
|
addIssuesCommand(giteaCmd)
|
|
addPRsCommand(giteaCmd)
|
|
addMirrorCommand(giteaCmd)
|
|
addSyncCommand(giteaCmd)
|
|
}
|