Software Engineer

Creating Merge Requests From Telegram β€” One Message, Full CI Pipeline

15 sec vs 10 min per MREngineering & DevOps4 min read

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

MetricBefore (Manual)After (Agent)Improvement
MR creation time5-10 min15 seconds95% faster
Description qualityVaries (often lazy)Consistent, commit-derivedStandardized
Label accuracy60% (forgotten often)98% (auto-detected)+38%
Time to code review30 min - 2 hoursInstant on CI passNear-zero delay
Context switches per MR3-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.

GitLabTelegramCI/CDAutomationMerge Requests

Want results like these?

Start free with your own AI team. No credit card required.

Creating Merge Requests From Telegram β€” One Message, Full CI Pipeline β€” Mr.Chief