[FEATURE] Allow conventions to append additional information to job summary#2974
Draft
[FEATURE] Allow conventions to append additional information to job summary#2974
Conversation
Copilot
AI
changed the title
[WIP] [FEATURE] Append additional information to job summary
[FEATURE] Allow conventions to append additional information to job summary
Jul 8, 2025
BernieWhite
requested changes
Jul 9, 2025
BernieWhite
reviewed
Jul 9, 2025
Member
BernieWhite
left a comment
There was a problem hiding this comment.
Allow registering conventions by using the IRuntimeServiceCollection interface. Similar to AddService add a method for AddConvention.
Contributor
Author
Added |
fb70d04 to
f2bbe27
Compare
f2bbe27 to
92218c7
Compare
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.
This PR implements the ability for conventions to contribute custom content to PSRule job summaries, providing extensibility for the generated output.
Changes Made
Core Implementation
IJobSummaryContributorinterface: Allows conventions to provide custom content sectionsJobSummarySectionclass: Represents custom sections with title and markdown contentJobSummaryWriter: Now collects and displays convention contributions in job summariesAssertPipelineBuilder: Passes convention contributors toJobSummaryWriterduring pipeline constructionKey Features
Usage Example
Conventions can implement the
IJobSummaryContributorinterface to add custom sections:The job summary will include additional sections after the standard PSRule content:
Testing
This implementation provides the requested extensibility for job summaries while maintaining all existing functionality and following PSRule's architectural patterns.
Fixes #2667.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.