Conversation
The close_discussion handler was incorrectly validating the required_category configuration option, causing it to reject closing discussions that didn't match the specified category. This was an incorrect behavior - when the agent explicitly specifies which discussion to close, the category filter should not be applied. The required_category option is only used in close_older_discussions where it acts as a search filter to find discussions to close. Fixes the error: "Category doesn't match 'Ideas'" seen in workflow runs. Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix category match error in close_discussion
Remove category validation from close_discussion handler
Jan 16, 2026
Contributor
|
@copilot the required_category field should be under the |
Contributor
|
@copilot work |
Contributor
Author
Moving
Moved |
Moved required_category field from close-discussion to create-discussion configuration where it belongs. This field is used for filtering when close-older-discussions is enabled, not for the standalone close_discussion safe output. Changes: - Added RequiredCategory field to CreateDiscussionsConfig - Updated compiler to pass required_category to create_discussion handler - Removed required_category from close_discussion handler config - Added logging for the new field This addresses the PR comment requesting that required_category be under close_older_discussions to represent the dependency correctly. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Improved documentation and logging for RequiredCategory field: - Clarified comment to indicate field is only used when close-older-discussions is enabled - Made logging conditional on CloseOlderDiscussions flag Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
Remove category validation from close_discussion handler
Fix close_discussion category validation and move required_category to create-discussion
Jan 16, 2026
Contributor
|
@copilot format, lint, review code |
After removing required_category from close_discussion handler config, the plan.lock.yml needed to be recompiled to remove the field from the compiled workflow configuration. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix close_discussion category validation and move required_category to create-discussion
Summary
The
required_categoryfield has been moved fromclose-discussionconfiguration tocreate-discussionconfiguration where it logically belongs. This field is used for filtering discussions when theclose-older-discussionsfeature is enabled, not for the standaloneclose_discussionsafe output handler.All formatting, linting, and code review checks have passed. Workflows have been recompiled to reflect the configuration changes.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.