Skip to content

feat: add action update cooldown#2

Merged
qartik merged 4 commits into
mainfrom
codex-issue-1-update-cooldown
May 14, 2026
Merged

feat: add action update cooldown#2
qartik merged 4 commits into
mainfrom
codex-issue-1-update-cooldown

Conversation

@qartik
Copy link
Copy Markdown
Owner

@qartik qartik commented May 14, 2026

Summary

  • add an optional --cooldown-days flag to gate upgrades on tag age
  • resolve effective tag publish times from GitHub git refs for annotated and lightweight tags
  • cover cooldown selection, unchanged reporting, and CLI parsing with tests

Testing

  • go test ./...

Fixes #1

Drive by

  • Added a new CI workflow configuration in .github/workflows/ci.yml to ensure tests are run on pull requests and pushes to main.

Copy link
Copy Markdown

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

Adds an optional “update cooldown” feature to prevent upgrading GitHub Action tags that are newer than a specified age, improving supply-chain hygiene by avoiding freshly-published tags.

Changes:

  • Introduces --cooldown-days CLI flag and threads its value through report planning and GitHub tag resolution.
  • Enhances GitHub client logic to determine tag “publish time” via git refs (handling annotated vs lightweight tags) and caches tag timestamps.
  • Adds tests covering cooldown behavior, unchanged reporting reasons, and CLI parsing.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Documents --cooldown-days usage and how it affects eligibility of tags.
internal/github/client.go Implements cooldown filtering by resolving tag timestamps from GitHub git refs and caching results.
internal/github/client_test.go Adds unit tests for cooldown selection, timestamp source (annotated/lightweight), and caching.
cmd/actupdate/main.go Adds flag parsing and passes cooldown duration into planning/resolution.
cmd/actupdate/main_test.go Adds CLI parsing tests and end-to-end-ish run tests for cooldown scenarios.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/github/client.go Outdated
Comment thread internal/github/client.go Outdated
Comment thread cmd/actupdate/main_test.go Outdated
Comment thread cmd/actupdate/main_test.go
Copy link
Copy Markdown

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

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

Comment thread cmd/actupdate/main.go
@qartik qartik merged commit 988d1bc into main May 14, 2026
4 checks passed
@qartik qartik deleted the codex-issue-1-update-cooldown branch May 14, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for update cooldown

2 participants