mirror of
https://github.com/penpot/penpot.git
synced 2026-11-26 21:00:32 +00:00
* ✨ Add on-demand pull request reviews Run Claude Code, Copilot CLI and OpenCode Go from PR slash commands in the official development image. Let maintainers configure a default model and effort for each reviewer and override both in a comment. Configure MCP for code navigation and reply to inline questions in their original thread. AI-assisted-by: gpt-6 Signed-off-by: Michael Panchenko <michael.panchenko@oraios-ai.de> * ✨ Add a local runner for pull request reviews Run the CI review scripts for a PR on a local machine and print the review instead of posting it. Use the local Claude login when no OAuth token is set, start Serena through uvx when it is not installed, and show OpenCode errors when it returns no answer. AI-assisted-by: claude-opus-5-5 * ✨ Add /review and default OpenCode to DeepSeek V4.1 Flash Accept /review at the start of a comment as an alias for /oc with the repository defaults, and keep the typed command as the native agent's mention. Use deepseek-v4.1-flash when no OPENCODE_MODEL is configured. AI-assisted-by: claude-opus-5-5 * 🔧 Default OpenCode reviews to high effort Use high effort for DeepSeek V4.1 Flash when no OPENCODE_EFFORT is configured, in CI and in the local runner. AI-assisted-by: claude-opus-5-5 --------- Signed-off-by: Michael Panchenko <michael.panchenko@oraios-ai.de> Co-authored-by: alonso.torres <alonso.torres@kaleidos.net>
39 lines
1.5 KiB
Python
39 lines
1.5 KiB
Python
"""Write the selected reviewer's config for the stdio servers in config/mcp.json."""
|
|
|
|
import json
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
|
|
def review_config(provider):
|
|
config_dir = Path(__file__).parent / "config"
|
|
# Serena tailors its tools to the client that launches it.
|
|
contexts = {"claude": "claude-code", "copilot": "copilot-cli", "opencode": "ide"}
|
|
config = json.loads((config_dir / "mcp.json").read_text(encoding="utf-8"))
|
|
servers = config["mcpServers"]
|
|
# Copilot can launch MCP servers from the Actions workspace, one level above
|
|
# the reviewed checkout. Pass the checkout path explicitly to every client.
|
|
arguments = {"${PROJECT_ROOT}": str(Path.cwd()), "${SERENA_CONTEXT}": contexts[provider]}
|
|
for server in servers.values():
|
|
server["args"] = [arguments.get(arg, arg) for arg in server["args"]]
|
|
|
|
if provider == "copilot":
|
|
for server in servers.values():
|
|
server.update(type="local", tools=["*"])
|
|
elif provider == "opencode":
|
|
config = json.loads((config_dir / "opencode-go.json").read_text(encoding="utf-8"))
|
|
# OpenCode takes the executable and its arguments in a single array.
|
|
config["mcp"] = {
|
|
name: {
|
|
"type": "local",
|
|
"command": [server["command"], *server["args"]],
|
|
"timeout": 120000,
|
|
}
|
|
for name, server in servers.items()
|
|
}
|
|
return config
|
|
|
|
|
|
if __name__ == "__main__":
|
|
print(json.dumps(review_config(sys.argv[1]), indent=2))
|