Skip to content

Impl ghrcooldown latest command#9

Merged
sue445 merged 20 commits into
mainfrom
feature/cmd
Apr 16, 2026
Merged

Impl ghrcooldown latest command#9
sue445 merged 20 commits into
mainfrom
feature/cmd

Conversation

@sue445

@sue445 sue445 commented Apr 15, 2026

Copy link
Copy Markdown
Owner

TODO

  • Write doc
  • Add test

ref. #10

@sue445 sue445 added the enhancement New feature or request label Apr 15, 2026
@sue445 sue445 force-pushed the feature/cmd branch 2 times, most recently from ffd3314 to c38c654 Compare April 15, 2026 16:04
@sue445 sue445 requested a review from Copilot April 16, 2026 14:50
@sue445 sue445 marked this pull request as ready for review April 16, 2026 14:55

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.

Pull request overview

Adds a ghrcooldown CLI (in addition to the existing library) and implements the ghrcooldown latest command to print the latest release tag while respecting a cooldown period.

Changes:

  • Introduce cmd/ghrcooldown CLI entrypoint using urfave/cli/v3 with a latest subcommand.
  • Add command wiring (CommandLatest) plus parsing helpers and new CLI-focused tests/utilities.
  • Update docs/build tooling for the new CLI and add a shared Day duration constant.

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
testutil_test.go Removes the old days() helper now that Day is a shared constant.
client.go Adds Day constant used for cooldown calculations.
client_test.go Updates tests to use ghrcooldown.Day instead of the removed helper.
cmd/ghrcooldown/main.go Adds the CLI app, flags, and ParseRepositoryPath.
cmd/ghrcooldown/commands.go Implements CommandLatest that calls the library client and prints the tag.
cmd/ghrcooldown/main_test.go Adds unit tests for ParseRepositoryPath.
cmd/ghrcooldown/commands_test.go Adds a CLI-command-level test for CommandLatest.
cmd/ghrcooldown/testutil_test.go Adds CLI-test helpers (readTestData, captureStdout).
go.mod / go.sum Adds github.com/urfave/cli/v3 dependency.
README.md Documents CLI usage and help output; reframes project as CLI + library.
Makefile Changes default target to build the CLI binary and inject revision via ldflags.
.gitignore Ignores bin/ output directory.

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

Comment thread README.md Outdated
Comment thread cmd/ghrcooldown/testutil_test.go
Comment thread cmd/ghrcooldown/commands.go
Comment thread cmd/ghrcooldown/main.go Outdated
Comment thread cmd/ghrcooldown/main.go Outdated
Comment thread Makefile Outdated
Comment thread cmd/ghrcooldown/commands_test.go
sue445 and others added 4 commits April 16, 2026 23:59

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.

Pull request overview

Copilot reviewed 11 out of 13 changed files in this pull request and generated 3 comments.


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

Comment thread cmd/ghrcooldown/main.go Outdated
Comment thread cmd/ghrcooldown/commands_test.go Outdated
Comment thread cmd/ghrcooldown/testutil_test.go Outdated
sue445 and others added 4 commits April 17, 2026 00:43
@sue445 sue445 merged commit acbc429 into main Apr 16, 2026
6 checks passed
@sue445 sue445 deleted the feature/cmd branch April 16, 2026 15:49
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.

2 participants