Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the engine CLI harness to create a working branch + PR via the GitHub API (instead of locally cloning), improves event/console rendering, and adds a build step to bundle the MCP server for distribution.
Changes:
- Add GitHub API helpers to create a branch/empty commit and open/update a PR during engine runs.
- Introduce a new styled event renderer for engine-cli output and a
--engine-logsmode. - Add an esbuild-based bundling step for
src/mcp-server.tsand update dependencies.
Reviewed changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
cli/cmd/engine-cli/main.go |
Switches harness flow to PR-based setup, adds --engine-logs, updates event handling and summary output. |
cli/cmd/engine-cli/repo.go |
New GitHub API client/utilities for repo URL parsing, branch/commit creation, and PR creation/update. |
cli/cmd/engine-cli/display.go |
New lipgloss-based rendering for key platform events. |
cli/go.mod |
Bumps Go version and adds TUI/styling-related dependencies. |
cli/go.sum |
Updates Go dependency checksums for the new CLI dependencies. |
package.json |
Adds an esbuild bundling script and wires it into npm run build. |
.gitignore |
Ignores bin/gofumpt. |
pkg/sumdb/sum.golang.org/latest |
Adds a sumdb “latest” file (appears to be a generated Go cache artifact). |
Comments suppressed due to low confidence (1)
pkg/sumdb/sum.golang.org/latest:6
- This file looks like a Go module sumdb cache artifact (typically generated under $GOMODCACHE/pkg/sumdb). Committing it will cause noisy diffs and can go stale; it’s better to remove it from the repo and add the appropriate sumdb cache path (e.g., pkg/sumdb/) to .gitignore.
go.sum database tree
50794107
U00W9lZkrWx58fnkllP9K7cH7sZzLQ4R0VV8mlRicCc=
— sum.golang.org Az3grnbO6ZNDhr/Z/PvNgPKTbsnLH7vL45pu4XUoFQc74qvp3lfAEgaaqLxBExmTIAE8Ke1Hk+TxpZh/UBfb+CenAQA=
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
5
to
+11
| require github.com/spf13/cobra v1.8.0 | ||
|
|
||
| require ( | ||
| github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect | ||
| github.com/charmbracelet/bubbletea v1.3.10 // indirect | ||
| github.com/charmbracelet/colorprofile v0.2.3-0.20250311203215-f60798e515dc // indirect | ||
| github.com/charmbracelet/lipgloss v1.1.0 // indirect |
| "body": body, | ||
| "head": head, | ||
| "base": base, | ||
| "draft": false, |
| req.Header.Set("Content-Type", "application/json") | ||
| } | ||
|
|
||
| resp, err := http.DefaultClient.Do(req) |
Comment on lines
+115
to
+118
| apiBaseURL := serverURL + "/api/v3" | ||
| if strings.Contains(serverURL, "github.com") { | ||
| apiBaseURL = "https://api.github.com" | ||
| } |
| } | ||
| } | ||
|
|
||
| if engineLogs { |
Comment on lines
+271
to
+275
| for len(remaining) > width { | ||
| idx := width | ||
| for idx > 0 && remaining[idx] != ' ' { | ||
| idx-- | ||
| } |
Comment on lines
+22
to
25
| "build": "npm run typecheck && npm run bundle:mcp-server", | ||
| "typecheck": "tsc", | ||
| "bundle:mcp-server": "esbuild src/mcp-server.ts --bundle --platform=node --format=esm --target=node20 --outfile=dist/mcp-server.bundled.js --banner:js=\"import { createRequire } from 'module';const require = createRequire(import.meta.url);\"", | ||
| "prepare": "npm run build", |
| PRDescription string `json:"pr_description"` | ||
| } | ||
| if json.Unmarshal(event.Content, &ev) == nil && (ev.PRTitle != "" || ev.PRDescription != "") { | ||
| _ = updatePullRequest(apiBaseURL, githubToken, owner, repo, prNumber, ev.PRTitle, ev.PRDescription) |
| u, err := url.Parse(strings.TrimSuffix(raw, ".git")) | ||
| if err != nil { | ||
| return "", "", err | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.