Skip to content

Better CLI + bundle of MCP#1

Merged
josebalius merged 2 commits intomainfrom
jg/pr-ops
Mar 4, 2026
Merged

Better CLI + bundle of MCP#1
josebalius merged 2 commits intomainfrom
jg/pr-ops

Conversation

@josebalius
Copy link
Member

No description provided.

@josebalius josebalius self-assigned this Mar 4, 2026
Copilot AI review requested due to automatic review settings March 4, 2026 21:03
@josebalius josebalius merged commit 72b5c9c into main Mar 4, 2026
5 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-logs mode.
  • Add an esbuild-based bundling step for src/mcp-server.ts and 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
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants