- 📋 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:
GIT_CREDENTIALS_KEYis required and must be a 32-byte string- Ensure the API service actually reads this
.envfile (depending on the actual startup method, the file may be in the root directory orapps/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
- Log in to GitHub, go to Settings → Developer settings → GitHub Apps
- Click New GitHub App button
-
Fill in the application information:
-
Configure Webhook (optional):
- Active: Uncheck (if Webhook is not needed)
- Webhook URL: Leave empty
-
Configure App permissions:
-
Configure Where can this GitHub App be installed?
- Select: Only on this account or Any account
- 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:- System redirects to GitHub App installation page
- User selects repositories to authorize (all repositories or specific repositories)
- Click Save to complete authorization
- 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.OAuth Mode (Recommended)
1. Create GitLab Application
- Log in to GitLab, go to User Settings → Applications
-
Fill in the application information:
-
Check the following permissions (Scopes):
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.
:::
- 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:- System redirects to GitLab authorization page
- User clicks Authorize to complete authorization
- After successful authorization, the system can access the user’s GitLab repositories
PAT Mode
PAT mode does not require configuringGITLAB_CLIENT_ID and GITLAB_CLIENT_SECRET.
User Configuration Steps
- User generates a Personal Access Token in GitLab
- Select GitLab on the system connection page
- Select PAT mode
- 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
- Log in to Gitee, go to Settings → Third-Party Applications → Create Application
-
Fill in the application information:
-
Check the following permissions (Scopes):
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.
:::
- 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:- System redirects to Gitee authorization page
- User clicks Agree to Authorize to complete authorization
- After successful authorization, the system can access the user’s Gitee repositories
PAT Mode
PAT mode does not require configuringGITEE_CLIENT_ID and GITEE_CLIENT_SECRET.
User Configuration Steps
- User generates a Personal Access Token in Gitee
- Select Gitee on the system connection page
- Select PAT mode
- 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
- Log in to Yunxiao
- Go to Personal Settings → Access Tokens → Create Access Token
-
Configure token permissions:
- Click Create and copy the generated token
2. User Configuration Steps
On the system connection page:- Select Yunxiao Codeup
- Fill in the following information:
- Organization ID: Yunxiao organization ID
- Token: Personal access token
🚀 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_KEYis 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
.envfile are correctly configured - Whether the API service actually reads the
.envfile
Q2: Authorization succeeds but API returns 401/403 errors?
A: This is usually caused by permission configuration mismatch:- Check if
GITLAB_SCOPESorGITEE_SCOPESare 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:- ✅ Configure backend environment variables (
.env) - ✅ Create applications on each platform (GitHub App / GitLab Application / Gitee Application)
- ✅ Configure correct callback URLs and permission scopes
- ✅ User completes authorization or provides PAT
- ✅ Follow security best practices
After configuration, you can let the Coding Expert help you automate code tasks and improve development efficiency!