Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This is a C# based repository that produces several CLIs that are used by custom
- `pkg/scriptgen/`: PowerShell script generation (ported from C#)
- `pkg/github/`: GitHub API client (REST + GraphQL)
- `pkg/ado/`: Azure DevOps API client
- `pkg/bbs/`: Bitbucket Server API client
- `pkg/storage/`: Cloud storage clients (Azure Blob, AWS S3, GitHub-owned multipart)
- `pkg/archive/`: Archive upload orchestration
- `pkg/logger/`, `pkg/env/`: Shared Go packages
Expand All @@ -43,24 +44,24 @@ This is a C# based repository that produces several CLIs that are used by custom

## Go Port Sync Requirements

**Current state:** `gei` and `ado2gh` are fully ported to Go. This includes the ADO API client, all ado2gh commands (migrate-repo, generate-script, inventory-report, etc.), and all gei commands. The GitHub API client, shared commands, and cloud storage clients are also ported.
**Current state:** All three CLIs (`gei`, `ado2gh`, `bbs2gh`) are fully ported to Go. Every command has behavioral parity with the C# version. Any C# behavioral change must be reflected in the Go port.

**When making C# changes, check if the Go port needs updating:**
**When making C# changes, you MUST make the corresponding Go change:**

| C# Area | Go Equivalent | Sync Required? |
|----------|--------------|----------------|
| `src/gei/Commands/` (any command) | `cmd/gei/` | **Yes** — all gei commands are ported |
| `src/ado2gh/Commands/` (any command) | `cmd/ado2gh/` | **Yes** — all ado2gh commands are ported |
| `GenerateScriptCommandHandler.cs` (any CLI) | `cmd/{cli}/generate_script.go` + `pkg/scriptgen/generator.go` | **Yes** — scripts must be identical |
| `src/Octoshift/Services/GithubApi.cs` | `pkg/github/client.go` | **Yes** — API behavior must match |
| `src/Octoshift/Services/GithubClient.cs` | `pkg/github/client.go` | **Yes** — HTTP/auth behavior must match |
| `src/Octoshift/Services/AdoApi.cs` | `pkg/ado/client.go` | **Yes** — API behavior must match |
| Shared commands in `src/Octoshift/Commands/` | `internal/sharedcmd/` | **Yes** — command behavior must match |
| `src/Octoshift/Services/AzureApi.cs` | `pkg/storage/azure/client.go` | **Yes** — upload behavior must match |
| `src/Octoshift/Services/AwsApi.cs` | `pkg/storage/aws/client.go` | **Yes** — upload behavior must match |
| `src/Octoshift/Services/HttpDownloadService.cs` | `pkg/storage/ghowned/client.go` | **Yes** — multipart upload must match |
| `src/Octoshift/Services/ArchiveUploader.cs` | `pkg/archive/uploader.go` | **Yes** — orchestration must match |
| BBS API client (`src/Octoshift/Services/BbsApi.cs`) | Not yet ported | No |
| `bbs2gh` commands | Not yet ported | No |
| C# Area | Go Equivalent |
|----------|--------------|
| `src/gei/Commands/` (any command) | `cmd/gei/` |
| `src/ado2gh/Commands/` (any command) | `cmd/ado2gh/` |
| `src/bbs2gh/Commands/` (any command) | `cmd/bbs2gh/` |
| `GenerateScriptCommandHandler.cs` (any CLI) | `cmd/{cli}/generate_script.go` + `pkg/scriptgen/generator.go` |
| `src/Octoshift/Services/GithubApi.cs` | `pkg/github/client.go` |
| `src/Octoshift/Services/GithubClient.cs` | `pkg/github/client.go` |
| `src/Octoshift/Services/AdoApi.cs` | `pkg/ado/client.go` |
| `src/Octoshift/Services/BbsApi.cs` | `pkg/bbs/client.go` |
| Shared commands in `src/Octoshift/Commands/` | `internal/sharedcmd/` |
| `src/Octoshift/Services/AzureApi.cs` | `pkg/storage/azure/client.go` |
| `src/Octoshift/Services/AwsApi.cs` | `pkg/storage/aws/client.go` |
| `src/Octoshift/Services/HttpDownloadService.cs` | `pkg/storage/ghowned/client.go` |
| `src/Octoshift/Services/ArchiveUploader.cs` | `pkg/archive/uploader.go` |

**Testing:** Run `go test ./...` to verify Go changes. Run `golangci-lint run` to check for lint issues.
Loading
Loading