Skip to content

feat: add fork action to github tool - #2139

Merged
serrrfirat merged 10 commits into
nearai:stagingfrom
gagdiez:feat/github-fork
Apr 22, 2026
Merged

serrrfirat merged 10 commits into
nearai:stagingfrom
gagdiez:feat/github-fork

Conversation

@gagdiez

@gagdiez gagdiez commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Added fork action to the Github tool

Change Type

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • CI/Infrastructure
  • Security
  • Dependencies

Linked Issue

Closes #2138

Validation

  • cargo fmt --all -- --check
  • cargo clippy --all --benches --tests --examples --all-features -- -D warnings
  • cargo build
  • Relevant tests pass: ./tools-src/github -> cargo test
  • cargo test --features integration if database-backed or integration behavior changed
  • Manual testing: Requested IronClaw to fork a public repo, it did managed to do it
  • If a coding agent was used and supports it, review-pr or pr-shepherd --fix was run before requesting review

Security Impact

None

Database Impact

None

Blast Radius

Nothing, adds a small simple action to github tool

Review track: A

Copilot AI review requested due to automatic review settings April 8, 2026 08:52
@github-actions github-actions Bot added size: M 50-199 changed lines risk: low Changes to docs, tests, or low-risk modules contributor: new First-time contributor labels Apr 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_repo action in GitHubAction and wires it through execute_inner.
  • Implements fork_repo() to call POST /repos/{owner}/{repo}/forks with 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.

Comment thread tools-src/github/src/lib.rs
Comment thread tools-src/github/src/lib.rs Outdated
gagdiez and others added 2 commits April 8, 2026 10:56
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 8, 2026 08:58

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread tools-src/github/src/lib.rs

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@github-actions github-actions Bot added contributor: regular 2-5 merged PRs and removed contributor: new First-time contributor labels Apr 10, 2026
Copilot AI review requested due to automatic review settings April 10, 2026 14:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread tools-src/github/github-tool.capabilities.json
Copilot AI review requested due to automatic review settings April 15, 2026 09:36
@github-actions github-actions Bot added the scope: docs Documentation label Apr 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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 serrrfirat left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM — clean addition following existing patterns. One doc nit left as a comment.

@serrrfirat
serrrfirat merged commit 6538017 into nearai:staging Apr 22, 2026
16 of 18 checks passed
@henrypark133 henrypark133 mentioned this pull request Apr 29, 2026
This was referenced May 7, 2026
theredspoon pushed a commit to theredspoon/ironclaw that referenced this pull request Jun 21, 2026
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).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor: regular 2-5 merged PRs risk: low Changes to docs, tests, or low-risk modules scope: docs Documentation size: M 50-199 changed lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing Github fork action

3 participants