Add AssignmentRules cop for enforcing TODO assignment policies#121
Draft
sambostock wants to merge 2 commits intomainfrom
Draft
Add AssignmentRules cop for enforcing TODO assignment policies#121sambostock wants to merge 2 commits intomainfrom
sambostock wants to merge 2 commits intomainfrom
Conversation
This cop allows teams to enforce that all smart TODOs include specific
required assignees (such as team channels or key stakeholders). This helps
centralize TODO notifications and ensures important TODOs don't get missed.
The cop is configurable via .rubocop.yml:
SmartTodo/AssignmentRules:
RequiredAssignees:
- '#project-alerts'
- '@team-lead'
The cop only applies to "smart" TODOs (those with events and assignees),
and checks that all required assignees are present in the TODO's assignee
list.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Member
|
Thank for this feature !
With this new cop enabled, does this mean every TODO will need to be assigned to the right persons/slack channel ? Wouldn't this make all TODOs seem "critical" now ? What do you think about letting developers mark the TODO as critical (inferring the importance of a TODO with tooling is going to be very hard, so maybe its best to let humans decide), and when SmartTodo detects a critical TODO it sends a notification to a channel you have configured ? |
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.
Summary
This PR adds a new RuboCop cop called
AssignmentRulesthat allows teams to enforce that all smart TODOs include specific required assignees. This helps centralize TODO notifications and ensures important TODOs don't get missed.Motivation
Teams often want to ensure that critical TODOs are visible to specific channels or stakeholders. For example, a team might want all smart TODOs to be assigned to their project channel so they can track and review them in one place.
How it works
The cop checks that all "smart" TODOs (those with events and assignees) include all required assignees specified in the configuration.
Configuration
Example
Features
Future extensibility
The
AssignmentRulesname was chosen to allow for future extensions such as:Test plan
🤖 Generated with Claude Code