Conversation
The github/action crawler now accepts an `age` window and propagates it to the
release, tag, and branch sources it generates, so a freshly published Action
version can be held back until it has cooled down.
The four source kinds it emits gained the same `age` setting, since none of them
could honor it before:
* githubrelease, from the release publication date newly requested from the
GraphQL API. The git tag fallback only reports tag names, so an age window
is reported as an error there rather than silently ignored.
* gittag and gitbranch, from the dates already carried by TagRefs/BranchRefs.
`lsRemote` lists tags without their dates and is rejected alongside `age`.
* gitea/release, from the release publication date, falling back to its
creation date.
The filter narrows down which version to pick, so it applies to sources only:
conditions check that a specific reference exists and keep matching every one.
Ref updatecli#8999
Signed-off-by: Loïs Postula <lois@postu.la>
The scenario left `credentials` empty, so the crawler fell back to the GITHUB_TOKEN of whatever environment ran the test and emitted it in the generated manifest. That passes locally and fails on CI runners. Pin an explicit token like every other GitHub scenario in this table does. Signed-off-by: Loïs Postula <lois@postu.la>
|
Tick the box to add this pull request to the merge queue (same as
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new Gitea cooldown filtering lacks regression coverage for exclusion and all-filtered behavior.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds dependency cooldown support to GitHub Action autodiscovery and its generated release, tag, and branch sources.
Changes:
- Adds shared age-window matching and manifest templating.
- Filters GitHub/Gitea releases, Git tags, and Git branches by age.
- Propagates crawler age settings into generated manifests with tests.
File summaries
| File | Description |
|---|---|
pkg/plugins/utils/age/main.go |
Adds matching and shared template helpers. |
pkg/plugins/utils/age/main_test.go |
Tests age-window matching. |
pkg/plugins/scms/github/release.go |
Retrieves release publication dates. |
pkg/plugins/resources/gittag/utils.go |
Filters dated tags. |
pkg/plugins/resources/gittag/source.go |
Applies source age filtering. |
pkg/plugins/resources/gittag/source_test.go |
Tests tag cooldown behavior. |
pkg/plugins/resources/gittag/main.go |
Adds and validates age configuration. |
pkg/plugins/resources/gittag/condition.go |
Excludes age from conditions. |
pkg/plugins/resources/githubrelease/source.go |
Filters releases by publication age. |
pkg/plugins/resources/githubrelease/source_test.go |
Tests release cooldown behavior. |
pkg/plugins/resources/githubrelease/main.go |
Adds release age configuration. |
pkg/plugins/resources/gitea/release/source.go |
Applies Gitea release filtering. |
pkg/plugins/resources/gitea/release/main.go |
Adds age-aware release discovery. |
pkg/plugins/resources/gitea/release/condition.go |
Excludes age from conditions. |
pkg/plugins/resources/gitea/release/age_test.go |
Tests publication-date fallback. |
pkg/plugins/resources/gitbranch/source.go |
Filters branches by commit age. |
pkg/plugins/resources/gitbranch/source_test.go |
Tests branch cooldown behavior. |
pkg/plugins/resources/gitbranch/main.go |
Adds branch age configuration. |
pkg/plugins/autodiscovery/githubaction/workflowGHAManifest.go |
Supplies age to templates. |
pkg/plugins/autodiscovery/githubaction/utils_test.go |
Registers the age fixture. |
pkg/plugins/autodiscovery/githubaction/testdata/age/.github/workflows/updatecli.yaml |
Adds cooldown discovery input. |
pkg/plugins/autodiscovery/githubaction/templateGHAGitHub.go |
Emits age for GitHub sources. |
pkg/plugins/autodiscovery/githubaction/templateGHAGitea.go |
Emits age for Gitea sources. |
pkg/plugins/autodiscovery/githubaction/main.go |
Exposes and validates crawler age. |
pkg/plugins/autodiscovery/githubaction/main_test.go |
Verifies generated cooldown manifests. |
Review details
- Files reviewed: 25/25 changed files
- Comments generated: 2
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
olblak
approved these changes
Sep 4, 2026
olblak
enabled auto-merge (squash)
September 4, 2026 12:26
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix #8999
Follows #8966 (Golang) and #9915 (npm) in the dependency cooldown epic #7866.
The
github/actioncrawler now accepts anagewindow and propagates it to the release, tag, and branch sources it generates, so a freshly published Action version can be held back until it has cooled down:The four source kinds the crawler emits gained the same
agesetting, since none of them could honor it before:githubreleasepublishedAt, falling back tocreatedAtfor drafts)gittaggitgeneric.TagRefsgitbranchgitgeneric.BranchRefsgitea/releasescm.Release.Published, falling back toCreatedThe filter narrows down which version a source picks, so it applies to sources only. Conditions check that a specific reference exists and keep matching every one, which the generated manifests rely on for their
dependson: condition#releasegating.The
age:block emitted into a generated manifest now comes from a single sharedage.ManifestTemplatesnippet rather than being pasted per source.Test
To test this pull request, you can run the following commands:
Additional Information
Checklist
Both are still open on my side: the new
agesetting on the crawler and on the four resources needs a website PR, and I have only exercised this through the unit tests, not against the live GitHub and Gitea APIs.Tradeoff
Two cases where an age window cannot be honored are reported as errors rather than silently ignored, since a cooldown that quietly stops applying is worse than a loud failure:
githubreleasefalls back to git tags when a repository publishes no release, and that fallback only reports tag names. Note this is not reachable from the generated manifests, where thereleasesource is gated behind a condition checking the reference really is a release.gittagwithlsRemote: truelists tags without their dates, so the combination is rejected at validation time.ageis opt-in with no default, matching the Golang crawler. The npm crawler defaults tominimum: 3d, so the two conventions still differ.Potential improvement
SearchTagsto return commit dates via the GraphQLcommittedDateinline fragment, so thegithubreleasegit tag fallback can honor a cooldown instead of refusing.ageondockerimageanddockerdigestfirst.age:manifest block and could move to the sharedage.ManifestTemplateadded here.