Skip to content

feat: AI-suggested conventional title when PR title validation fails #1015

@myakove

Description

@myakove

Description

When a PR title fails conventional-title validation, use an AI CLI tool to suggest a proper title. The suggestion is included in the check run failure output.

Controlled by a new ai-features config section (global or per-repo).

Configuration

ai-features:
  ai-provider: "claude"    # claude | gemini | cursor
  ai-model: "claude-opus-4-6[1m]"

Behavior

  • When conventional-title check fails AND ai-features is configured:
    • Call the AI CLI with the PR title, diff context, and allowed types
    • Include the AI-suggested title in the check run failure output
  • On any error (CLI failure, timeout, etc.): log the error, continue without suggestion
  • Never break the PR flow

Deliverables

  • Create webhook_server/libs/ai_cli.py - shared AI CLI wrapper (call_ai_cli function)
  • Add ai-features config schema (global + per-repo)
  • Integrate AI suggestion into conventional-title check run failure output
  • Add tests
  • Update example configs, README, CLAUDE.md

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions