-
Notifications
You must be signed in to change notification settings - Fork 6
Validate AI-suggested labels against repository labels #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…inations Co-authored-by: swissspidy <[email protected]>
Co-authored-by: swissspidy <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds validation to prevent AI-suggested labels from being applied if they don't exist in the repository's available labels, addressing the issue of AI hallucinating non-existent labels.
Changes:
- Added label validation logic that filters AI suggestions against
AVAILABLE_LABELSbefore applying them - Added logging to track when invalid labels are skipped
- Added null safety checks for missing
AVAILABLE_LABELSenvironment variable
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…dation Co-authored-by: swissspidy <[email protected]>
Plan: Only use existing labels in issue triage workflow
.github/workflows/reusable-issue-triage.ymltriage-new-itemjob to filter labels againstAVAILABLE_LABELStriage-single-itemjob to filter labels againstAVAILABLE_LABELSSummary
Successfully implemented label validation to prevent AI hallucinations in the issue triage workflow. Both "Apply labels" steps now:
AVAILABLE_LABELSwith case-insensitive comparisonNo security vulnerabilities found.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.