| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
English | 中文 | 日本語 | हिन्दी | 한국어 | ภาษาไทย | العربية
A fully automated coding agent powered by GitHub Copilot CLI and GitLab CI/CD. This system enables autonomous code implementation and intelligent code review through issue assignments, merge request comments, and merge request reviewer assignments.
Youtube Demo videos
Setup:
How to use:
Example repository
graph TB
subgraph "App Repository (Target Repo)"
A[GitLab Issue/MR] -->|Issue assign to Copilot| C[Webhook Trigger]
A[GitLab Issue/MR] -->|MR comment @copilot-agent| C[Webhook Trigger]
A[GitLab Issue/MR] -->|MR assign Copilot as Reviewer| C[Webhook Trigger]
end
subgraph "Webhook Service"
C -->|HTTP POST| D[Flask Service]
D -->|Validate & Extract| E[Pipeline Variables]
E -->|Trigger| F[GitLab API]
end
subgraph "Copilot Coding Agent Repo"
F -->|Start Pipeline| G[CI/CD Pipeline]
G -->|Issue: ack → plan → create_mr| H[Issue Workflow]
G -->|MR Note: mr_update only| I[MR Note Workflow]
G -->|MR Reviewer: mr_review| L[MR Review Workflow]
H -->|implement → finalize| J[Copilot CLI]
I -->|implement changes| J
L -->|perform code review| J
J -->|Generate Code| K[Git Commit & Push]
end
K -->|Update| A
J -->|Post Comments| A
L -->|Post Review Comments| A
style D fill:#e1f5ff
style G fill:#fff4e1
style J fill:#e8f5e9
Issue Assignment Workflow (Full automation):
Issue assigned to Copilot → Webhook → Trigger Pipeline → Acknowledge Issue → Generate TODO Plan → Create MR → Implement Code → Push Changes → Update MR & Issue
MR Note Workflow (Quick updates):
Comment @copilot-agent in MR → Webhook → Trigger Pipeline → Acknowledge → Implement Changes → Push to Source Branch → Post Summary Comment
MR Reviewer Workflow (Intelligent code review):
Assign Copilot as MR Reviewer → Webhook → Trigger Pipeline → Acknowledge → Analyze Code Changes → Perform Comprehensive Review → Post Detailed Review Comment
Suggested to create a dedicated GitLab user account for the Copilot agent for better permission management and activity auditing. You may use an existing account, but it is not recommended.
Create a new GitLab account named "Copilot" or similar
Generate a Personal Access Token for this account:
Grant appropriate permissions to this user (choose one approach):
Using Copilot user operations
Import this repository to your GitLab via Git URL
Configure CI/CD Variables
Go to Settings → CI/CD → Variables, add the following:
| Variable | Description | Protected | Masked |
|---|---|---|---|
| GITLAB_TOKEN | Personal access token (from Step 1) | ✅ | ✅ |
| GITHUB_TOKEN | GitHub Copilot CLI access token, including a valid GitHub Copilot subscription | ✅ | ✅ |
To generate the GITHUB_TOKEN which is a fine-grained PAT with the "Copilot Requests" permission enabled.:

Remember to change the role that can use pipeline variables to Developer

Setup GitLab Runner
If your GitLab instance already has available Runners with Docker/Kubernetes executors, you can skip this step.
Ensure you have a GitLab Runner configured with:
if using tags, ensure the Runner has the corresponding tags, or update .gitlab-ci.yml as needed. New Runner registration can be completed following GitLab's page guidance, and can be registered at the project or group level. Here is an example for project level:

Configure Copilot CLI Access
I have built the Docker image satomic/copilot-cli:latest which includes:
Or build your own image with Copilot CLI access.
Create .env file
cat > .env << EOF
PIPELINE_TRIGGER_TOKEN=your-trigger-token, Generate in Settings → CI/CD → Pipeline trigger tokens of the repository created in Step 2
PIPELINE_PROJECT_ID=your-project-id, This repository's project ID (found in Settings → General)
PIPELINE_REF=main
GITLAB_API_BASE=https://gitlab.com # Change to self-hosted instance if needed
WEBHOOK_SECRET_TOKEN=
COPILOT_AGENT_USERNAME=copilot-agent # GitLab ID of the Copilot bot
COPILOT_AGENT_COMMIT_EMAIL=copilot@github.com # Email for git commits
LISTEN_HOST=0.0.0.0
LISTEN_PORT=8080
ENABLE_INLINE_REVIEW_COMMENTS=true
COPILOT_LANGUAGE=en
EOFRun with Docker
docker run -itd \
--name gitlab-copilot-coding-agent-hook \
-p 8080:8080 \
--env-file .env \
--restart unless-stopped \
satomic/gitlab-copilot-coding-agent-hook:latestRun from source (optional)
git clone https://github.com/satomic/gitlab-copilot-coding-agent.git
cd gitlab-copilot-coding-agent/
python3 main.pyHook URL Obtain the public URL of the webhook service, e.g.,
Generally, developers who want to use the Copilot coding agent only need to configure the webhook in their own app repository, without accessing the Copilot coding agent repository.
Go to your App Repository → Settings → Webhooks
Create Webhook
Test the webhook
Test Issue Assignment
Test MR Note
Test MR Reviewer
Check Logs
# Webhook service logs
docker logs -f gitlab-copilot-coding-agent-hook
# Check saved webhook payloads
ls -la hooks/
# Check pipeline logs
# Go to Copilot Coding Agent repo → CI/CD → PipelinesCreate an Issue in your App Repository
## Requirements
- Implement user authentication
- Add password hashing
- Create login endpoint
- Add JWT token generationAssign to Copilot
Track Progress
Note: If a merge request already exists for the issue, Copilot will detect it and post a notification in the issue, asking you to continue work in the existing MR instead of creating a duplicate.
Review & Merge
In an Existing MR, add a comment:
@copilot-agent add error handling to the login function
Supported Instructions
Copilot will:
On the MR page, assign Copilot user as a Reviewer
Copilot will:
Review Report Contents:
Writing Effective Issue Descriptions:
Using MR Note Commands:
Code Review:
The following files are generated during execution but excluded from commits:
Check webhook delivery
Verify webhook service
curl -X POST https://webhook.yourdomain.com/webhook \
-H "Content-Type: application/json" \
-d '{"test": true}'| Back | FazBrowse Home | New Git URL |