Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/auto-fill-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,17 @@ jobs:
const sectionRegex = new RegExp(`## ${sectionHeader}\\s*([\\s\\S]*?)(?=\\n## |$)`, 'i');
const match = body.match(sectionRegex);
if (!match) return true;
const content = match[1].trim();
// Empty if only whitespace, empty, or just an HTML comment
return !content || /^<!--.*-->$/.test(content);
// Strip noise that doesn't count as user content:
// - HTML comments (template placeholders)
// - Reference-style link definitions added by Jira/GitHub integrations (e.g. [IM-123]: https://...)
// - Horizontal rules and our own footer markers (from previous workflow runs)
const content = match[1]
.replace(/<!--[\s\S]*?-->/g, '')
.replace(/^\[.+?\]:\s*\S.*$/gm, '')
.replace(/^[-*]{3,}$/gm, '')
.replace(/^_.*Auto-(generated|filled).*_$/gm, '')
.trim();
return !content;
};

// Helper to check if any checkbox is checked in Type of Change
Expand Down Expand Up @@ -334,7 +342,7 @@ jobs:
// Add footer if we changed anything
const madeChanges = fillDescription || (fillTicket && ticketSection) || fillType || (fillTesting && testing);
if (madeChanges && !newBody.includes('Auto-generated by Claude') && !newBody.includes('Auto-filled')) {
const footer = claudeSuccess ? '\n\n---\n_✨ Auto-generated by Claude_' : '\n\n---\n_📝 Auto-filled_';
const footer = claudeSuccess ? '\n\n***\n_✨ Auto-generated by Claude_' : '\n\n***\n_📝 Auto-filled_';
newBody = newBody.trim() + footer;
}

Expand Down