mr-generator

Generate GitLab merge request descriptions from git commits with emoji categorization and Jira integration.

Updated Jul 8, 2024
One-click install
npx skills add https://github.com/alexismanuel/dotfiles --skill mr-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mr-generator
Source: https://github.com/alexismanuel/dotfiles/tree/main/.opencode/skill/mr-generator
Command: npx skills add https://github.com/alexismanuel/dotfiles --skill mr-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires requests, and includes scripts (resource) components.

What problem does it solve?

This Skill analyzes git commits since the diverging point from main and generates a high-quality Merge Request description with smart categorization and optional Jira integration, saving time drafting MR content and ensuring consistency.

Core Features & Use Cases

  • Automatic commit analysis: Analyzes git commits since diverging from main branch
  • Smart categorization: Categorizes commits with emojis (🎉, ✨, 🐛, 💄, 🔥, 🚀, etc.)
  • Jira integration: Supports Jira ticket numbers and can fetch descriptions
  • Template-based: Uses your team's MR template format
  • GitLab integration: Can create MRs directly using glab CLI
  • Interactive preview: Shows MR preview before creation with edit capabilities

Quick Start

  • Basic usage: python3 scripts/mr_generator.py
  • With Jira: python3 scripts/mr_generator.py --jira PROJ-123
  • Create MR directly: python3 scripts/mr_generator.py --create --jira PROJ-123
  • Save to file: python3 scripts/mr_generator.py --output mr_description.md

Frequently Asked Questions about mr-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically generate merge request descriptions from git commits?

This Skill analyzes commits since your branch diverged from main and generates a formatted MR description with smart emoji categorization and optional Jira integration. Run `python3 scripts/mr_generator.py` to preview the description before creating your MR.

Can I use this with GitLab and the glab CLI?

Yes. The Skill integrates with GitLab workflows and uses glab CLI to create MRs directly. Pass `--create` to generate and submit your MR with one command, optionally including `--jira PROJ-123` for ticket linking.

Does it extract Jira ticket numbers from commits automatically?

Yes. The Skill scans commits for Jira ticket patterns, extracts them, and can fetch ticket descriptions to populate your MR body. Use `--jira PROJ-123` to enable Jira integration during generation.

How does commit categorization with emojis work?

The Skill applies emoji labels (🎉, ✨, 🐛, 💄, 🔥, 🚀) to commits based on their content and message patterns, organizing your MR description into semantic categories for quick scanning and consistency.

What happens if my branch hasn't diverged from main or main doesn't exist?

The Skill includes robust error handling for missing main branches or non-divergent branches. It will alert you to the issue rather than fail silently, allowing you to resolve the branch state before proceeding.

Can I use my team's MR template format?

Yes. The Skill applies your team's MR template to structure the generated description, ensuring consistency across all merge requests and compliance with your team's documentation standards.