Skip to content

feat: add AtomGit/GitCode support for PR and Issue reviews#11

Open
wuxiaoqiang12 wants to merge 1 commit intoAsyncFuncAI:mainfrom
wuxiaoqiang12:feat/atomgit-support
Open

feat: add AtomGit/GitCode support for PR and Issue reviews#11
wuxiaoqiang12 wants to merge 1 commit intoAsyncFuncAI:mainfrom
wuxiaoqiang12:feat/atomgit-support

Conversation

@wuxiaoqiang12
Copy link

Summary

Add support for reviewing Pull Requests and Issues from AtomGit and GitCode platforms, in addition to the existing GitHub support.

  • AtomGit: China's open source code hosting platform (atomgit.com)
  • GitCode: Another popular Chinese code hosting platform (gitcode.com)
    Both platforms use a GitHub-compatible API with private-token authentication.

Changes

New Files

File Description
cli/atomgit_fetcher.py URL parsing and data fetching for AtomGit/GitCode
cr/atomgit.py AtomGit API wrapper (PR, Issue, file contents, comments)
skills/atomgit/SKILL.md Agent skill definition for AtomGit reviews

Modified Files

File Changes
cli/main.py Add AtomGit URL detection and routing
cli/virtual_runner.py Add platform detection and AtomGit data fetching
cr/config.py Add ATOMGIT_TOKEN, ATOMGIT_API_BASE, GITCODE_API_BASE
.env.example Add AtomGit configuration examples
README.md Add AtomGit usage documentation

Usage

# AtomGit PR review
asyncreview review --url https://atomgit.com/owner/repo/pulls/123 -q "Review this PR"
# GitCode PR review  
asyncreview review --url https://gitcode.com/owner/repo/pull/456 -q "Any security issues?"

Configuration

# Required for private repos
ATOMGIT_TOKEN=your-token
# Optional: custom API endpoints (defaults provided)
ATOMGIT_API_BASE=https://api.atomgit.com
GITCODE_API_BASE=https://api.gitcode.com

Supported URL Formats

Platform PR URL
AtomGit https://atomgit.com/owner/repo/pulls/123
GitCode https://gitcode.com/owner/repo/pull/123

Testing

Tested with real PRs from gitcode.com/openeuler/IB_Robot:

  • PR #15: PointCloud2 side-car support ✅
  • PR #16: MoveIt gateway fixes and ROS migration ✅
  • PR #17: DP3/iDP3 pointcloud policy ✅

Notes

  • API authentication uses private-token header (AtomGit specific)
  • Fully backward compatible - no changes to existing GitHub functionality
  • Uses the same RLM review pipeline as GitHub

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the AsyncReview tool by integrating support for AtomGit and GitCode, two prominent code hosting platforms. The changes enable the tool to perform agentic code reviews on PRs and Issues from these new platforms, mirroring the existing GitHub functionality. This broadens the utility of AsyncReview, allowing users to leverage its advanced review capabilities across a wider range of development environments, particularly those utilizing GitHub-compatible APIs with private-token authentication.

Highlights

  • AtomGit/GitCode Support: Added comprehensive support for reviewing Pull Requests and Issues on AtomGit and GitCode platforms, expanding the tool's compatibility beyond GitHub.
  • New API Fetching Modules: Introduced cli/atomgit_fetcher.py and cr/atomgit.py to handle URL parsing, data fetching (PRs, issues, files, commits, comments), and API interactions specific to AtomGit/GitCode.
  • CLI and Runner Integration: Modified the command-line interface (cli/main.py) and the virtual review runner (cli/virtual_runner.py) to automatically detect AtomGit/GitCode URLs and route requests to the appropriate platform-specific fetchers and context builders.
  • Configuration and Documentation: Updated .env.example and README.md with new environment variables (ATOMGIT_TOKEN, ATOMGIT_API_BASE, GITCODE_API_BASE) and detailed usage instructions for AtomGit/GitCode, including prerequisites for private repositories.
  • Agent Skill Definition: Created a new skill definition file (skills/atomgit/SKILL.md) to guide agents on how to effectively use the AsyncReview CLI for AtomGit reviews, covering authentication and command usage.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

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

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 introduces support for AtomGit and GitCode platforms, which is a valuable addition. The changes involve new fetcher modules, updates to the CLI, and documentation. However, there are some critical inconsistencies in API authentication methods and documentation, as well as duplicated logic and potentially misleading information that need to be addressed to ensure correct and reliable functionality.

):
"""Run a review on a GitHub URL."""
"""Run a review on a GitHub or AtomGit URL."""
platform = "atomgit" if ("atomgit.com" in url or "gitcode.com" in url) else "github"

Choose a reason for hiding this comment

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

medium

The logic for detecting the platform (atomgit.com or gitcode.com in the URL) is duplicated here and in cli/virtual_runner.py. It would be more maintainable to centralize this logic into a shared utility function to avoid inconsistencies and simplify future updates.

Suggested change
platform = "atomgit" if ("atomgit.com" in url or "gitcode.com" in url) else "github"
platform = _detect_platform_from_url(url)

Comment on lines +153 to +157
def _detect_platform(self, url: str) -> str:
"""Detect platform from URL (github, atomgit, or gitcode)."""
if "atomgit.com" in url or "gitcode.com" in url:
return "atomgit"
return "github"

Choose a reason for hiding this comment

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

medium

The _detect_platform method duplicates the URL parsing logic already present in cli/main.py. This should be refactored into a single utility function to ensure consistency and ease of maintenance. Duplicated logic can lead to bugs if one instance is updated and the other is not.

Suggested change
def _detect_platform(self, url: str) -> str:
"""Detect platform from URL (github, atomgit, or gitcode)."""
if "atomgit.com" in url or "gitcode.com" in url:
return "atomgit"
return "github"
# Consider moving this to a shared utility function
def _detect_platform(self, url: str) -> str:
"""Detect platform from URL (github, atomgit, or gitcode)."""
if "atomgit.com" in url or "gitcode.com" in url:
return "atomgit"
return "github"

@wuxiaoqiang12 wuxiaoqiang12 force-pushed the feat/atomgit-support branch 4 times, most recently from 10f363d to 2109cdf Compare March 18, 2026 08:42
- Add AtomGit/GitCode URL parsing and API integration
- Support private-token authentication for AtomGit API
- Add atomgit_fetcher.py for URL parsing and data fetching
- Add cr/atomgit.py for AtomGit API wrapper
- Update CLI to detect and route AtomGit URLs
- Add skills/atomgit/SKILL.md for agent skill definition
- Update .env.example with AtomGit configuration
- Update README.md with AtomGit usage examples

Supports both atomgit.com and gitcode.com domains.
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.

1 participant