Skip to main content
:::tip PRO This feature is available in the Professional Edition. ::: The Coding Expert is a powerful AI programming assistant that can connect to mainstream code management platforms (GitHub, GitLab, Gitee, Yunxiao) to automate code review, issue handling, code modification, and PR submission. With the Coding Expert, you can:
  • 📋 Automatically Review Issues: Intelligently analyze and categorize issues, providing solution suggestions
  • 🔧 Automatically Modify Code: Automatically modify code files based on issues or requirements
  • 🚀 Automatically Submit PRs: Create Pull Requests with auto-generated descriptions
  • 🤝 Code Review: Intelligently review PRs and provide improvement suggestions
  • 📝 Generate Documentation: Automatically generate or update project documentation

📦 Supported Platforms

🔧 Backend Configuration

Before using the Coding Expert, you need to configure the relevant environment variables in the backend.

Callback URL Rules

The backend unified callback route is: /v1/git/connections/callback/:providerId Local development example (backend running on port 3001): :::info Production Environment In production, replace http://localhost:3001 with your public API domain (e.g., https://api.xxx.com). ::: :::note Yunxiao Codeup Yunxiao Codeup does not support third-party OAuth callbacks, use PAT mode for direct connection. :::

Environment Variables Configuration

Configure the following required items in the .env file:
:::warning Important Notes
  • GIT_CREDENTIALS_KEY is required and must be a 32-byte string
  • Ensure the API service actually reads this .env file (depending on the actual startup method, the file may be in the root directory or apps/api/.env) :::

🚀 Platform Configuration Steps

GitHub Configuration (App Mode)

GitHub uses App Installation mode, where the platform pre-configures the GitHub App and users only need to install and authorize it in the system.

1. Create GitHub App

  1. Log in to GitHub, go to SettingsDeveloper settingsGitHub Apps
  2. Click New GitHub App button
  3. Fill in the application information:
  4. Configure Webhook (optional):
    • Active: Uncheck (if Webhook is not needed)
    • Webhook URL: Leave empty
  5. Configure App permissions:
  6. Configure Where can this GitHub App be installed?
    • Select: Only on this account or Any account
  7. Click Create GitHub App to create the app

2. Get and Save Credentials

After successful creation, get the following information on the app details page: :::tip Getting Private Key At the bottom of the app details page, click Generate a private key to download the .pem file, open the file and copy all content to GITHUB_APP_PRIVATE_KEY. :::

3. User Authorization Flow

When users click connect in the system:
  1. System redirects to GitHub App installation page
  2. User selects repositories to authorize (all repositories or specific repositories)
  3. Click Save to complete authorization
  4. After successful authorization, the system can access the user’s authorized repositories

GitLab Configuration

GitLab supports two integration methods: OAuth Mode (recommended) and PAT Mode.
1. Create GitLab Application
  1. Log in to GitLab, go to User SettingsApplications
  2. Fill in the application information:
  3. Check the following permissions (Scopes):
:::warning Permission Matching Principle GITLAB_SCOPES must be exactly the same as the permissions configured in the GitLab application, otherwise the authorization will succeed but the API will return 401/403 errors. :::
  1. Click Save application to create the app
2. Get and Save Credentials
After successful creation, copy the following information to .env:
3. User Authorization Flow
When users click connect in the system:
  1. System redirects to GitLab authorization page
  2. User clicks Authorize to complete authorization
  3. After successful authorization, the system can access the user’s GitLab repositories

PAT Mode

PAT mode does not require configuring GITLAB_CLIENT_ID and GITLAB_CLIENT_SECRET.
User Configuration Steps
  1. User generates a Personal Access Token in GitLab
  2. Select GitLab on the system connection page
  3. Select PAT mode
  4. Enter the following information:
    • Token: Personal access token
    • Base URL (optional): GitLab instance URL (if using self-hosted GitLab)

Gitee Configuration

Gitee supports two integration methods: OAuth Mode and PAT Mode.

OAuth Mode

1. Create Gitee Third-Party Application
  1. Log in to Gitee, go to SettingsThird-Party ApplicationsCreate Application
  2. Fill in the application information:
  3. Check the following permissions (Scopes):
:::warning Permission Matching Principle GITEE_SCOPES must be exactly the same as the permissions configured in the Gitee application, otherwise the authorization will succeed but the API will return 401/403 errors. :::
  1. Click Create Application
2. Get and Save Credentials
After successful creation, copy the following information to .env:
3. User Authorization Flow
When users click connect in the system:
  1. System redirects to Gitee authorization page
  2. User clicks Agree to Authorize to complete authorization
  3. After successful authorization, the system can access the user’s Gitee repositories

PAT Mode

PAT mode does not require configuring GITEE_CLIENT_ID and GITEE_CLIENT_SECRET.
User Configuration Steps
  1. User generates a Personal Access Token in Gitee
  2. Select Gitee on the system connection page
  3. Select PAT mode
  4. Enter the personal access token

Yunxiao Codeup Configuration (PAT Mode)

Yunxiao Codeup only supports PAT Mode and does not support OAuth callbacks.

1. Create Yunxiao PAT

  1. Log in to Yunxiao
  2. Go to Personal SettingsAccess TokensCreate Access Token
  3. Configure token permissions:
  4. Click Create and copy the generated token

2. User Configuration Steps

On the system connection page:
  1. Select Yunxiao Codeup
  2. Fill in the following information:
    • Organization ID: Yunxiao organization ID
    • Token: Personal access token
:::tip Getting Organization ID You can view the organization ID in the Yunxiao organization settings page under “Joined Organizations”. It is a string like “6932875abb64aae55975251f”. :::

🚀 Using the Coding Expert

After configuration, you can use the Coding Expert tools in agents or workflows.

Available Tools

  • Manually review all code changes
  • Check if the agent’s modifications comply with project standards
  • Verify that the functionality works correctly

4. Error Handling

The Coding Expert may encounter errors during execution, it’s recommended to:
  • Configure error notification mechanisms to detect issues in time
  • Log operations for troubleshooting
  • Set up retry mechanisms for handling temporary errors

🔒 Security Considerations

1. Credential Security

  • Do not commit sensitive information like Client Secret, AppSecret, Private Key to code repositories
  • Regularly rotate application secrets and tokens
  • Use environment variables to store sensitive information
  • Ensure GIT_CREDENTIALS_KEY is stored securely

2. Access Control

  • Limit the scope of repositories the Coding Expert can access
  • Configure different application instances for different projects
  • Regularly review the list of authorized applications

3. Audit Logs

  • Enable platform audit logging
  • Regularly check the Coding Expert’s operation records
  • Handle abnormal operations promptly

📚 FAQ

Q1: What to do if authorization fails?

A: Please check the following:
  • Whether the callback URL is correctly configured (including protocol http/https)
  • Whether application permissions are correctly checked
  • Whether environment variables in .env file are correctly configured
  • Whether the API service actually reads the .env file

Q2: Authorization succeeds but API returns 401/403 errors?

A: This is usually caused by permission configuration mismatch:
  • Check if GITLAB_SCOPES or GITEE_SCOPES are exactly the same as the permissions configured in the platform application
  • Confirm that the application permission scope is sufficient
  • Recreate the application and ensure permission configuration is correct

Q3: Coding Expert cannot access private repositories?

A: Please confirm:
  • User has correctly authorized or provided a valid PAT
  • PAT has permission to access the repository
  • Whether the repository’s access settings allow third-party application access

Q4: How to limit the Coding Expert’s operation scope?

A: You can:
  • Select specific repositories when installing GitHub App
  • Clearly define the operation scope in the agent’s prompt
  • Use branch protection rules to restrict operable branches

Q5: What to do if the code modified by the Coding Expert is incorrect?

A: It’s recommended to:
  • Enable branch protection and require manual review
  • Configure CI/CD checks to automatically detect code issues
  • Close problematic PRs promptly and provide feedback to the agent

🎓 Summary

The Coding Expert is a powerful AI programming assistant that can automate various code tasks by connecting to mainstream code management platforms. Configuration Key Points:
  1. ✅ Configure backend environment variables (.env)
  2. ✅ Create applications on each platform (GitHub App / GitLab Application / Gitee Application)
  3. ✅ Configure correct callback URLs and permission scopes
  4. ✅ User completes authorization or provides PAT
  5. ✅ Follow security best practices
Integration Method Comparison: After configuration, you can let the Coding Expert help you automate code tasks and improve development efficiency!