GitLab integration
Prerequisites
- Signed in to Faheem Code Cloud with a GitLab account.
Adding GitLab repository access
Upon signing into Faheem Code Cloud with a GitLab account, Faheem Code will have access to your repositories.
Working with GitLab repos in Faheem Code Cloud
After signing in with a Gitlab account, use the Open Repository section to select the appropriate repository and
branch you'd like Faheem Code to work on. Then click on Launch to start the conversation.
Screenshot: connect repo.
Using tokens with reduced scopes
Faheem Code requests an API-scoped token during OAuth authentication. By default, this token is provided to the agent.
To restrict the agent's permissions, you can define a custom secret GITLAB_TOKEN,
which will override the default token assigned to the agent. While the high-permission API token is still requested
and used for other components of the application (e.g. opening merge requests), the agent will not have access to it.
Working on GitLab issues and merge requests using Faheem Code
Giving GitLab repository access to Faheem Code also allows you to work on GitLab issues and merge requests directly.
Working with issues
On your repository, label an issue with faheemcode or add a message starting with @faheem-code. Faheem Code will:
- Comment on the issue to let you know it is working on it.
- You can click on the link to track the progress on Faheem Code Cloud.
- Open a merge request if it determines that the issue has been successfully resolved.
- Comment on the issue with a summary of the performed tasks and a link to the PR.
Working with merge requests
To get Faheem Code to work on merge requests, mention @faheem-code in the comments to:
- Ask questions
- Request updates
- Get code explanations
Managing GitLab webhooks
The GitLab webhook management feature allows you to view and manage webhooks for your GitLab projects and groups directly from the Faheem Code Cloud Integrations page.
Accessing webhook management
The webhook management table is available on the Integrations page when:
- You are signed in to Faheem Code Cloud with a GitLab account
- Your GitLab token is connected
To access it:
- Navigate to the
Settings > Integrationspage - Find the GitLab section
- If your GitLab token is connected, you'll see the webhook management table below the connection status
Viewing webhook status
The webhook management table displays GitLab groups and individual projects (not associated with any groups) that are accessible to Faheem Code.
- Resource: The name and full path of the project or group
- Type: Whether it's a "project" or "group"
- Status: The current webhook installation status:
- Installed: The webhook is active and working
- Not Installed: No webhook is currently installed
- Failed: A previous installation attempt failed (error details are shown below the status)
Reinstalling webhooks
If a webhook is not installed or has failed, you can reinstall it:
- Find the resource in the webhook management table
- Click the
Reinstallbutton in the Action column - The button will show
Reinstalling...while the operation is in progress - Once complete, the status will update to reflect the result
Important behaviors:
- The Reinstall button is disabled if the webhook is already installed
- Only one reinstall operation can run at a time
- After a successful reinstall, the button remains disabled to prevent duplicate installations
- If a reinstall fails, the error message is displayed below the status badge
- The resources list automatically refreshes after a reinstall completes
Constraints and limitations
- The webhook management table only displays resources that are accessible with your connected GitLab token
- Webhook installation requires Admin or Owner permissions on the GitLab project or group
Next steps
- Learn about the Cloud UI.
- Use the Cloud API to programmatically interact with Faheem Code.