Skip to content

Conversation

lgallard
Copy link
Owner

@lgallard lgallard commented Sep 2, 2025

Problem

Current workflow creates PRs on every run, even when no new features are discovered. This leads to:

  • PR spam from metadata-only updates
  • Unnecessary maintenance overhead
  • Git history noise from frequent scan metadata commits

Solution

Implement smart PR creation logic that only creates PRs for meaningful changes.

Changes Made:

Smart PR Logic:

  • Only create PRs when ISSUES_CREATED > 0 (new features discovered)
  • Skip PR creation for metadata-only updates
  • Preserve scan logs in workflow output instead of creating noise commits

Enhanced Logging:

  • Clear messaging when PR creation is skipped
  • Informative workflow summary showing tracker update status
  • Distinguish between "no changes" vs "metadata only" scenarios

Logic Flow:

if [ "$ISSUES_CREATED" -eq 0 ]; then
  echo "📊 Tracker updated with metadata only - skipping PR creation"  
  exit 0
fi
echo "🚀 Creating PR for tracker updates with $ISSUES_CREATED new issues"

Benefits:

  • ✅ Eliminates PR spam from scheduled runs with no discoveries
  • ✅ Maintains automated issue creation functionality
  • ✅ Reduces maintenance overhead for repository maintainers
  • ✅ Creates PRs only when meaningful changes occur
  • ✅ Preserves audit trail for scan execution in workflow logs

Testing Plan:

  • Test workflow with new feature discoveries (should create PR)
  • Test workflow with no new features (should skip PR creation)
  • Verify workflow summary shows correct tracker update status

- Only create PRs when new issues are discovered (meaningful changes)
- Skip PR creation for metadata-only updates (scan dates, counts)
- Add informative logging when PR creation is skipped
- Update workflow summary to show tracker update status
- Reduces PR noise while maintaining functionality
@lgallard lgallard merged commit 10d2586 into master Sep 2, 2025
38 checks passed
@lgallard lgallard deleted the feat/smart-pr-creation branch September 2, 2025 02:45
@github-actions github-actions bot mentioned this pull request Sep 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant