Skip to content

v1.4.0: Inline Comment Automation

Choose a tag to compare

@vince-winkintel vince-winkintel released this 23 Feb 22:51
· 60 commits to main since this release
0604223

New Features

🎯 Inline Comment Automation

Add add-inline-comment.sh script for posting inline code review comments to GitLab MRs at specific line numbers.

Why this matters:

  • 📍 Contextualized feedback - Comments appear at exact line locations
  • ⏱️ Saves time - No manual clicking in GitLab UI
  • 🤖 Enables automation - Can be integrated into review workflows
  • ✅ Better UX - Developers see feedback in context

Usage:

add-inline-comment.sh <repo> <mr_iid> <file_path> <line_number> <comment_text>

Example:

add-inline-comment.sh owner/repo 42 "src/main.js" 100 "Bug: Add null check"

Documentation:

  • Full guide: scripts/README-inline-comments.md
  • Script: scripts/add-inline-comment.sh
  • Quick ref: scripts/README.md

Requirements:

  • glab CLI configured and authenticated
  • jq for JSON parsing
  • curl for API calls

How it works:

  1. Auto-extracts GitLab token from glab config
  2. Fetches MR metadata (project ID, commit SHAs)
  3. Posts inline comment via GitLab Discussions API
  4. Validates inline placement (checks for DiffNote type)
  5. Returns direct URL to comment

Closes: #26

Installation

# Via ClawHub (when published)
clawhub install gitlab-cli-skills

# Or manual
git clone https://github.com/vince-winkintel/gitlab-cli-skills.git
cd gitlab-cli-skills
chmod +x scripts/add-inline-comment.sh

What's Changed

Full Changelog: v1.3.0...v1.4.0