Software Engineer
Creating Merge Requests From Telegram β One Message, Full CI Pipeline
Key Takeaway
One Telegram message to our agent creates a fully-described GitLab merge request, triggers CI, and routes to code review β in 15 seconds.
The Problem
Creating a merge request should take 30 seconds. It doesn't.
You open GitLab. You pick the source branch. You pick the target. You write a title. Then a description β what changed, why, what to test. You add labels. You assign reviewers. You wait for CI to kick off. You check back later.
That's 5-10 minutes if you're fast. And it's 5-10 minutes of pure context switching β you were deep in code, now you're filling out a form. Multiply by 8-12 MRs per week across our team. That's over an hour a week. Gone.
I have 31 agents running at PyratzLabs. They exist precisely so I don't spend time on things that follow patterns. MR creation is a pattern.
The Solution
Thom β our lead developer agent β handles merge requests through a single Telegram message. The command is natural language. The output is a production-grade MR with everything filled in.
The flow: I send a message. Thom creates the MR. CI runs. If it passes, Nico (our code review agent) gets pinged. If it fails, Thom shows me the error and suggests a fix. I never open GitLab.
The Process
The interaction looks like this in Telegram:
View details
Me: @thom merge feature/auth into main
Thom: β
MR created: !142 β "Add JWT authentication middleware"
π Description: 3 commits summarized
π· Labels: backend, auth, security
π CI pipeline running...
Under the hood, Thom runs a sequence through the GitLab CLI:
bashShow code
# Extract commit messages for the description
git log main..feature/auth --pretty=format:"- %s" > /tmp/mr_desc.md
# Detect changed files to auto-label
changed_files=$(git diff --name-only main..feature/auth)
labels=""
echo "$changed_files" | grep -q "frontend/" && labels="$labels,frontend"
echo "$changed_files" | grep -q "api/" && labels="$labels,backend"
echo "$changed_files" | grep -q "auth\|security" && labels="$labels,security"
# Create the merge request
glab mr create \
--source-branch feature/auth \
--target-branch main \
--title "Add JWT authentication middleware" \
--description "$(cat /tmp/mr_desc.md)" \
--label "${labels#,}" \
--assignee bea7892046
The title generation is smart. It doesn't just use the branch name β it reads the commit messages and generates a human-readable title. feature/auth becomes "Add JWT authentication middleware" because that's what the commits describe.
CI triggers automatically on MR creation. Thom monitors the pipeline:
bashShow code
# Watch pipeline status
pipeline_id=$(glab ci list --per-page 1 -o json | jq '.[0].id')
glab ci view "$pipeline_id" --web=false
The pipeline runs four stages β lint, test, build, deploy preview. Each status update flows back to Telegram:
View details
Thom: π Pipeline #891 β lint β
| test β
| build β³ | deploy β³
Thom: β
Pipeline #891 passed. Preview: https://preview-142.pyratzlabs.dev
Thom: π Pinging @nico for code review.
If CI fails:
View details
Thom: β Pipeline #891 failed at "test" stage
Job: test-unit β exit code 1
Error: AssertionError in test_auth_middleware.py:47
π‘ Suggestion: Token expiry check expects UTC but receives local time.
See commit a3f2c1 where timezone handling changed.
The Results
| Metric | Before (Manual) | After (Agent) | Improvement |
|---|---|---|---|
| MR creation time | 5-10 min | 15 seconds | 95% faster |
| Description quality | Varies (often lazy) | Consistent, commit-derived | Standardized |
| Label accuracy | 60% (forgotten often) | 98% (auto-detected) | +38% |
| Time to code review | 30 min - 2 hours | Instant on CI pass | Near-zero delay |
| Context switches per MR | 3-5 (IDE β browser β GitLab) | 0 (stays in Telegram) | Eliminated |
Try It Yourself
This works with any GitLab instance and the glab CLI. The core pattern: parse branch names, extract commit messages, detect file categories for labels, and wire CI status back to your chat platform. Mr.Chief makes the orchestration simple β one skill config, one agent, one message.
15 seconds. That's the real cost of a merge request now.
Related case studies
DevOps Engineer
CI/CD Pipeline Monitoring β The Agent That Never Sleeps
How an AI agent monitors CI/CD pipelines 24/7 across 5+ GitLab repos, auto-retries flaky jobs, and delivers failure alerts to Telegram β so developers never context-switch to check builds again.
DevOps Engineer
Release Automation β From Tag to Changelog to GitLab Release in 60 Seconds
PyratzLabs automated the entire release process with an AI agent. One Telegram command creates a tag, generates a categorized changelog, and publishes a GitLab release in 60 seconds flat.
CTO
The Engineering Pipeline β From Idea to Production in 24 Hours
From approved idea to production deployment in one day. See how 31 AI agents coordinate across GitLab, Docker, Vercel, and Render to ship with confidence.
Want results like these?
Start free with your own AI team. No credit card required.