| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
* Update spec documentation * Add test cases
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
There was a problem hiding this comment.
Adds support for an age filter (with minimum / maximum duration constraints) to Golang module and Golang language source/condition plugins, so users can implement "cooldown" semantics that exclude releases that are too recent or too old. A new shared pkg/plugins/utils/age package introduces the spec, validation, duration parsing (with h/d/w/mo/y units), and IsOlderThan / IsNewerThan helpers. For the Golang language plugin, when age filtering is enabled, version dates are obtained by cloning the upstream Go git repository and using committer dates.
Changes:
Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.
Show a summary per file| File | Description |
|---|---|
| pkg/plugins/utils/age/main.go | New shared age filter Spec with duration parsing and comparison helpers |
| pkg/plugins/utils/age/main_test.go | Unit tests for parser, Validate, IsOlderThan, IsNewerThan, IsZero |
| pkg/plugins/resources/go/module/spec.go | Adds Age field and documents per-mode compatibility |
| pkg/plugins/resources/go/module/main.go | Validates Age spec in constructor; includes it in ReportConfig |
| pkg/plugins/resources/go/module/version.go | Filters proxy versions/pseudo versions by release age; extracts versionInfo struct |
| pkg/plugins/resources/go/module/condition.go | Branches on Age to additionally check release date for Version |
| pkg/plugins/resources/go/module/source_test.go | Adds age-based source test cases |
| pkg/plugins/resources/go/module/condition_test.go | Adds age-based condition test cases |
| pkg/plugins/resources/go/language/spec.go | Adds Age field with documentation |
| pkg/plugins/resources/go/language/main.go | Includes Age in ReportConfig |
| pkg/plugins/resources/go/language/source.go | Selects between proxy and git-based version lookup based on Age |
| pkg/plugins/resources/go/language/condition.go | Same selection logic for condition path |
| pkg/plugins/resources/go/language/age.go | New git-clone-based tag enumeration to obtain release dates |
| pkg/plugins/resources/go/language/source_test.go | Adds age-based source tests |
| pkg/plugins/resources/go/language/condition_test.go | Adds age-based condition tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
|
Tick the box to add this pull request to the merge queue (same as @mergifyio queue).
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Related to #7866
Fix #8997
Implement the ability to filter out version newer or older than a specific date.
This pull request adds support for Golang module.
Here is an example of a source definition:
sources: default: kind: golang/module spec: module: github.com/updatecli/udash versionfilter: kind: semver age: #maximum: 1y minimum: 1yTest
To test this pull request, you can run the following commands:
Or test manually the example above.
Additional Information
Checklist
Tradeoff
Potential improvement