Skip to content

Conversation

@k1LoW
Copy link
Owner

@k1LoW k1LoW commented Sep 25, 2025

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:

  • Updated addReportContentToSummary in cmd/summary.go to accept a key parameter, generate a unique signature, and replace existing content blocks with the same signature instead of always appending. This uses the repin library for block replacement and improves idempotency and clarity of the summary file.
  • Modified the call to addReportContentToSummary in cmd/root.go to pass the appropriate key parameter, aligning with the new function signature and behavior.

@k1LoW k1LoW self-assigned this Sep 25, 2025
@k1LoW k1LoW added the enhancement New feature or request label Sep 25, 2025
@github-actions

This comment has been minimized.

1 similar comment
@github-actions
Copy link
Contributor

Code Metrics Report

main (182e240) #565 (8050d22) +/-
Coverage 51.5% 51.3% -0.2%
Code to Test Ratio 1:0.6 1:0.6 -0.1
Test Execution Time 31s 30s -1s
Details
  |                     | main (182e240) | #565 (8050d22) |  +/-  |
  |---------------------|----------------|----------------|-------|
- | Coverage            |          51.5% |          51.3% | -0.2% |
  |   Files             |             53 |             53 |     0 |
  |   Lines             |           3963 |           3976 |   +13 |
+ |   Covered           |           2042 |           2043 |    +1 |
- | Code to Test Ratio  |          1:0.6 |          1:0.6 |  -0.1 |
  |   Code              |           7708 |           7730 |   +22 |
  |   Test              |           4869 |           4869 |     0 |
+ | Test Execution Time |            31s |            30s |   -1s |

Code coverage of files in pull request scope (22.2% → 21.9%)

Files Coverage +/- Status
cmd/root.go 0.0% 0.0% modified
cmd/summary.go 0.0% 0.0% modified
config/config.go 62.1% +0.5% affected

Benchmark-0 (this is custom metrics test)

main (182e240) #565 (8050d22) +/-
Number of iterations 1000 1000 0
Nanoseconds per iteration 676.5 ns/op 676.5 ns/op 0 ns/op
Metadata
main (182e240) #565 (8050d22)
GOOS darwin darwin
GOARCH amd64 amd64

Benchmark-1 (this is custom metrics test)

main (182e240) #565 (8050d22) +/-
Number of iterations 1500 1500 0
Nanoseconds per iteration 1345 ns/op 1345 ns/op 0 ns/op
Metadata
main (182e240) #565 (8050d22)
GOOS darwin darwin
GOARCH amd64 amd64

Reported by octocov

@k1LoW k1LoW changed the title fix: enhance report content handling with key-based signature fix: enhance report content handling with key-based signature on summary Sep 25, 2025
@k1LoW k1LoW marked this pull request as draft September 25, 2025 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants