feat: add fork action to github tool - #2139
Conversation
There was a problem hiding this comment.
Pull request overview
Adds first-class support for forking repositories via the github WASM tool, extending the tool’s repository management surface area and updating discovery metadata accordingly.
Changes:
- Introduces a new
fork_repoaction inGitHubActionand wires it throughexecute_inner. - Implements
fork_repo()to callPOST /repos/{owner}/{repo}/forkswith optional parameters. - Extends the JSON schema and supported-action test set to include
fork_repo, and updates capabilities notes to no longer list forks as unsupported.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tools-src/github/src/lib.rs | Adds fork_repo action, API implementation, schema entry, and updates action-set tests. |
| tools-src/github/github-tool.capabilities.json | Updates discovery notes to remove “forks” from the “Not supported yet” list. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request implements the fork_repo functionality for the GitHub tool. It adds the ForkRepo action to the GitHubAction enum, implements the fork_repo logic with input validation and API request construction, updates the tool's capabilities and JSON schema, and includes the new action in the test suite. I have no feedback to provide.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -16,7 +16,7 @@ | |||
| "notes": [ | |||
| "Use `tool_info(name: \"github\", detail: \"schema\")` for the full action schema before guessing fields.", | |||
| "Supported families: repositories, issues, pull requests, reviews/comments, search, branches, code reads, file writes, releases, workflow dispatch/runs, and webhook normalization.", | |||
There was a problem hiding this comment.
Low Severity · [Certain] · Documentation
The "Supported families" note on line 18 wasn't updated to include forks. The "Not supported yet" note on line 19 correctly removed "forks", but the preceding line still reads:
Supported families: repositories, issues, pull requests, reviews/comments, search, branches, code reads, file writes, releases, workflow dispatch/runs, and webhook normalization.
An LLM reading discovery_summary gets a "supported" list that doesn't mention forks and a "not supported" list that no longer mentions them either — a minor gap. Consider appending ", forks" to the supported families list.
Take-it-or-leave-it nit — the code itself is clean.
serrrfirat
left a comment
There was a problem hiding this comment.
LGTM — clean addition following existing patterns. One doc nit left as a comment.
feat: add fork_repo action to GitHub WASM tool Adds fork_repo action with full input validation, optional organization/name/default_branch_only params. CI failures are pre-existing (RUSTSEC-2026-0098 in rustls-webpki transitive dep, unrelated to this PR).
Summary
forkaction to the Github toolChange Type
Linked Issue
Closes #2138
Validation
cargo fmt --all -- --checkcargo clippy --all --benches --tests --examples --all-features -- -D warningscargo build./tools-src/github->cargo testcargo test --features integrationif database-backed or integration behavior changedreview-prorpr-shepherd --fixwas run before requesting reviewSecurity Impact
None
Database Impact
None
Blast Radius
Nothing, adds a small simple action to github tool
Review track: A