Skip to content

Latest commit

 

History

History
71 lines (53 loc) · 2.4 KB

File metadata and controls

71 lines (53 loc) · 2.4 KB

Debugging PR Description Generation

I've reverted the changes to keep the original logic (only update blank PRs) and added extensive debugging. Here's what to check:

Enhanced Debugging Added

  1. Detailed PR description checking - Shows exactly what GitHub returns as the current description
  2. AI model response parsing - Shows if PR description was generated and extracted from AI response
  3. API call debugging - Shows when GitHub API calls are made

How to Debug

  1. Enable debug mode in your workflow:

    with:
      debug: "true"
  2. Look for these log messages in the GitHub Actions output:

    PR Description Update Check:

    🔍 PR Description Update Check: {"updatePrDescriptionEnabled":true,"prDescriptionGenerated":true,"prDescriptionLength":250}
    

    Current PR Description Analysis:

    🔍 PR #123 current description: ""
    🔍 Current description type: string
    🔍 Current description === null: false
    🔍 Current description === "": true
    🔍 Should update (is blank): true
    

    AI Model PR Description Generation:

    🔍 PR Description parsing: {"foundMatch":true,"rawMatch":"## Fix user authentication bug...","normalizedLength":245}
    

    GitHub API Call:

    🔄 Making GitHub API request to update PR description...
    ✅ Updated PR #123 description successfully
    

Possible Issues to Check

  1. AI Model not generating descriptions:

    • Look for ⚠️ No PR description was generated by the AI model
    • Check if your AI model/provider supports the current prompt format
  2. GitHub API permission issues:

    • Look for ❌ Failed to update PR #123 description:
    • Ensure your GITHUB_TOKEN has pull_requests: write permission
  3. PR description not actually blank:

    • Check the logged current description value
    • GitHub might be returning whitespace or hidden characters
  4. Configuration issues:

    • Verify update_pr_description: "true" in your workflow
    • Check if the feature is disabled: ⏭️ PR description update is disabled in config

Test with a Fresh PR

Create a new PR with a completely empty description and watch the logs. You should see:

  1. PR description generation in the diff summary
  2. Attempt to update the PR description
  3. Either success or detailed error message

The enhanced debugging will show you exactly where the process is failing.