FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: support cooldown for Golang module by olblak · Pull Request #8966 · updatecli/updatecli · GitHub

feat: support cooldown for Golang module - #8966

Merged
olblak merged 19 commits into
updatecli:mainfrom
olblak:issue/7866/1
Jun 30, 2026
Merged

feat: support cooldown for Golang module#8966
olblak merged 19 commits into
updatecli:mainfrom
olblak:issue/7866/1

Conversation

olblak commented May 24, 2026
edited
Loading

Copy link
Copy Markdown
Member

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: 1y

Test

To test this pull request, you can run the following commands:

cd pkg/plugins/utils/age/
go test

Or test manually the example above.

Additional Information

Checklist

  • I have updated the documentation via pull request in website repository.

Tradeoff

Potential improvement

olblak added 2 commits May 24, 2026 19:39
Signed-off-by: Olblak <me@olblak.com>
olblak added the enhancement New feature or request label May 24, 2026
olblak marked this pull request as draft May 24, 2026 17:47
olblak changed the title Issue/7866/1 feat: support cooldown for Golang module May 24, 2026
olblak added 4 commits May 26, 2026 08:43
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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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/module source and condition via Go proxy @v/<ver>.info metadata.
  • Wire age filtering into go/language source/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
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.

olblak and others added 4 commits May 31, 2026 11:32
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>
Signed-off-by: Olblak <me@olblak.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Pull request overview

Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.

Comment thread pkg/plugins/resources/go/module/spec.go Outdated
olblak marked this pull request as ready for review June 29, 2026 19:10
olblak enabled auto-merge (squash) June 29, 2026 19:13

mergify Bot commented Jun 29, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

olblak merged commit 9149c53 into updatecli:main Jun 30, 2026
8 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

Support Golang Autodiscovery

2 participants


Back | FazBrowse Home | New Git URL