Repository navigation
feat: support cooldown for Golang module - #8966
Conversation
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.
Pull request overview
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:
- Introduce reusable
age.Spec(parser, validator, comparator) plus tests. - Wire age filtering into
go/modulesource and condition via Go proxy@v/<ver>.infometadata. - Wire age filtering into
go/languagesource/condition with a new git-tag-based release-date lookup (age.go).
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 7 comments.
Show a summary per file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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>

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:
Test
To test this pull request, you can run the following commands:
Or test manually the example above.
Additional Information
Checklist
Tradeoff
Potential improvement