Skip to content

Rule: Missing/short description detection (missing-description) #25

@ddjain

Description

@ddjain

Rule: Missing Description Detection

Overview

Flags PRs with missing or very short descriptions that don't provide context about changes.

Label Metadata

  • Label Name: missing-description
  • Color: fef2c0 (Light Yellow)
  • Description: PR description is missing or too short (<20 words)

Detection Logic

Analyze PR description/body:

  • Check if description is empty/null
  • Count words in description
  • Default threshold: 20 words (configurable)
  • Strip markdown syntax for word counting
  • Ignore common PR templates (check if just template)

Word Counting

  • Strip markdown syntax (#, *, [], etc.)
  • Count actual words
  • Ignore empty lines and formatting

Configuration

  • Default threshold: 20 words
  • Configurable via input: min_description_words (optional)

Example Descriptions That Trigger

Empty:

  • `` (empty)
  • null / undefined

Too Short:

  • Fixed bug (2 words)
  • Added feature (2 words)
  • Updated code (2 words)

Example Descriptions That Do NOT Trigger

  • Fixed login bug where users couldn't authenticate. Added error handling and improved validation. (14 words - over threshold)
  • Detailed multi-paragraph description

Test Cases Needed

  • Detects empty descriptions
  • Detects short descriptions (<threshold)
  • Counts words accurately (ignores markdown)
  • Configurable threshold
  • Handles markdown formatting
  • Handles PR templates (consider if just template text)

Edge Cases

  • Description with only links/URLs (should still count words)
  • Description with emoji only (count as description?)
  • PR template partially filled (still too short)

Integration Notes

  • Useful for enforcing PR documentation standards
  • May want to make threshold configurable per repository
  • Consider making this rule optional/opt-in

Priority

Low - Team policy dependent


Status: Not implemented
Category: PR Structure & Metadata

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions