Skip to content

feat: add support for configurable acceptable thresholds in octocov output#29

Merged
k1LoW merged 1 commit intomainfrom
metrics-acceptables
Sep 17, 2025
Merged

feat: add support for configurable acceptable thresholds in octocov output#29
k1LoW merged 1 commit intomainfrom
metrics-acceptables

Conversation

@k1LoW
Copy link
Copy Markdown
Contributor

@k1LoW k1LoW commented Sep 17, 2025

This pull request adds support for configurable acceptable metric thresholds when exporting metrics in the octocov custom metrics format. Users can now define acceptable threshold conditions for their metrics in the .patterner.yml configuration file, and these thresholds will be included in the output when using the --out-octocov-path option. The documentation has been updated to explain the new configuration and output format.

Octocov integration and configuration:

  • Added a new metrics.octocov.acceptables section to .patterner.yml for specifying acceptable metric thresholds, which are included in the octocov custom metrics output. [1] [2] [3]

Code changes to support acceptables:

  • Updated the CustomMetricSet struct and metrics command implementation to include the acceptables field in the octocov output, pulling values from the config. [1] [2]

Documentation updates:

  • Expanded the README.md to document the new octocov custom metrics format, how to configure acceptable thresholds, and provided an example output. [1] [2] [3]

@k1LoW k1LoW self-assigned this Sep 17, 2025
@k1LoW k1LoW added enhancement New feature or request minor labels Sep 17, 2025
@k1LoW k1LoW requested a review from Copilot September 17, 2025 10:29
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for configurable acceptable metric thresholds in octocov custom metrics output, allowing users to define quality standards for their metrics that octocov can use for evaluation.

  • Adds new configuration structure for defining acceptable thresholds in .patterner.yml
  • Updates octocov output format to include configurable acceptable threshold conditions
  • Expands documentation with examples and configuration details for the new feature

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
config/config.go Adds Metrics and Octocov structs to support acceptables configuration
cmd/metrics.go Updates CustomMetricSet to include acceptables field and populates it from config
README.md Documents the new octocov integration, configuration options, and output format

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread config/config.go
@github-actions
Copy link
Copy Markdown
Contributor

Code Metrics Report

main (72cde31) #29 (505863b) +/-
Coverage 30.7% 30.7% -0.1%
Code to Test Ratio 1:1.4 1:1.4 -0.1
Test Execution Time 8s 8s 0s
Details
  |                     | main (72cde31) | #29 (505863b) |  +/-  |
  |---------------------|----------------|---------------|-------|
- | Coverage            |          30.7% |         30.7% | -0.1% |
  |   Files             |             12 |            12 |     0 |
  |   Lines             |            481 |           482 |    +1 |
  |   Covered           |            148 |           148 |     0 |
- | Code to Test Ratio  |          1:1.4 |         1:1.4 |  -0.1 |
  |   Code              |           1345 |          1354 |    +9 |
  |   Test              |           1924 |          1924 |     0 |
  | Test Execution Time |             8s |            8s |    0s |

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

Files Coverage +/- Status
cmd/metrics.go 0.0% 0.0% modified
config/config.go 0.0% 0.0% modified

Reported by octocov

@k1LoW k1LoW marked this pull request as ready for review September 17, 2025 10:33
@k1LoW k1LoW requested a review from a team as a code owner September 17, 2025 10:33
Copy link
Copy Markdown

@toiroakr toiroakr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@k1LoW k1LoW merged commit ef34345 into main Sep 17, 2025
1 check passed
@k1LoW k1LoW deleted the metrics-acceptables branch September 17, 2025 14:41
@github-actions github-actions Bot mentioned this pull request Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants