-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add Filtering Capabilities to SummaryHtml Formatter #2062
base: master
Are you sure you want to change the base?
Add Filtering Capabilities to SummaryHtml Formatter #2062
Conversation
Hey @AlphaGit, CI auto-fix is currently not enabled for you. Please reach out to the Sweep team to enable it. 📖 For more information on how to use Sweep, please read our documentation. Tracking ID: 763187f40e-ci-0
|
WalkthroughThe pull request introduces filtering capabilities to the SummaryHtml formatter. This enhancement allows filtering of worklog entries within tag groupings by adding new configuration options, methods, and type definitions. The changes span three files: the formatter configuration, the formatter itself, and its test suite. The implementation enables more granular control over worklog entry selection through tag-based and custom filter functions while maintaining the existing HTML generation process. Changes
Sequence DiagramsequenceDiagram
participant Config as SummaryHtmlFormatterConfiguration
participant Formatter as SummaryHtmlFormatter
participant Worklogs as Worklog[]
Config->>Formatter: Initialize with tags and filters
Formatter->>Worklogs: Apply filters
Worklogs-->>Formatter: Filtered worklog entries
Formatter->>Formatter: Generate HTML aggregation lines
Formatter-->>Config: Formatted HTML summary
Assessment against linked issues
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
⏰ Context from checks skipped due to timeout of 90000ms (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Purpose
Enhance the SummaryHtml formatter to support advanced filtering of worklog entries during report generation, allowing more granular control over which entries are included in the summary.
This pull request was created to solve the following GitHub issue:
Add a filter to each grouping in the SummaryHtml formatter
Details
No response
Add filtering capability to SummaryHtml formatter groupings
Description:
Extend the
SummaryHtmlFormatter
to support filtering of worklog entries within each tag grouping, inheriting from the base text formatter while adding HTML-specific filtering functionality.Tasks:
In
app/formatters/SummaryHtml/SummaryHtmlFormatterConfiguration.ts
:filters
property to store filtering criteria for each tag groupIn
app/formatters/SummaryHtml/Formatter.ts
:_generateAggregationLines
method to apply filtersTest:
app/formatters/SummaryHtml/Formatter.test.ts
, add:Example test cases:
Description
This pull request introduces a new filtering mechanism for the SummaryHtml formatter that enables users to apply custom filters to worklog entries based on tag groups. The changes include:
TagGroupFilter
type that allows defining filters for specific tag combinationsSummaryHtmlFormatterConfiguration
to support these new filtersSummaryHtmlFormatter
to selectively include or exclude worklog entriesThe filtering mechanism allows for complex filtering scenarios, such as:
Summary
FilterFunction
andTagGroupFilter
types toSummaryHtmlFormatterConfiguration
SummaryHtmlFormatter
with filter application methodsFormatter.test.ts
Fixes
Fixes #2061. Continue the conversation here: https://app.sweep.dev/c/86d4e4c1-1999-4a83-b3e1-3236531d8135.
To have Sweep make further changes, please add a comment to this PR starting with "Sweep:".
📖 For more information on how to use Sweep, please read our documentation.