fix: enhance report content handling with key-based signature on summary #565
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 pull request updates the logic for adding report content to the GitHub Actions summary file, allowing for targeted and idempotent updates using a signature based on a key. The changes ensure that content blocks can be uniquely identified and replaced if they already exist, rather than always appending new content.
Improvements to summary file handling:
addReportContentToSummaryincmd/summary.goto accept akeyparameter, generate a unique signature, and replace existing content blocks with the same signature instead of always appending. This uses therepinlibrary for block replacement and improves idempotency and clarity of the summary file.addReportContentToSummaryincmd/root.goto pass the appropriatekeyparameter, aligning with the new function signature and behavior.