ci: Add CI workflow, linting, and version infrastructure (Phase 1)#10
Merged
rianjs merged 6 commits intoopen-cli-collective:mainfrom Jan 11, 2026
Merged
Conversation
Add CI workflow that runs on every push to main and every PR: - Build and test job with race detection and coverage - Lint job using golangci-lint This establishes the foundation for validating all future changes. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add .golangci.yml with standard linters: - errcheck, govet, ineffassign, staticcheck, unused, misspell - gofmt and goimports formatters with local prefix Fix lint issues found: - Replace fmt.Sscanf with strconv.ParseInt in formatTimestamp - Properly handle resp.Body.Close() errors using named returns - Fix import ordering with goimports Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add build-time version injection via ldflags: - VERSION from git describe - COMMIT from git rev-parse - DATE from current time Add new targets: - test-cover: Run tests with coverage report - test-short: Run quick tests - lint: Run golangci-lint - fmt: Run gofmt and goimports - deps: Download and tidy dependencies - verify: Verify go.mod Update build target to output to bin/ directory. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add version package with variables set via ldflags: - Version: semantic version from git tag - Commit: git commit hash - Date: build timestamp Includes Info() helper for formatted version string. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add version information to root command: - Set Version field from version package - Custom version template showing commit and build date Now `slack-cli --version` shows: slack-cli vX.Y.Z (commit: abc123, built: 2024-...) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Apply goimports formatting with local prefix to ensure consistent import ordering across all command files. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
4 tasks
rianjs
added a commit
to rianjs/slack-cli
that referenced
this pull request
Jan 11, 2026
Refactor all 21 command files to use options structs with injectable client parameters. This enables unit testing by allowing mock clients to be injected during tests. Changes: - Add XxxOptions struct to each command file - Change runXxx(cmd, args) to runXxx(opts, client) or runXxx(args..., opts, client) - If client is nil, create default client (backward compatible) - Bind flags directly to options struct fields using XxxVar() This completes Issue open-cli-collective#10 of the CLI alignment roadmap. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5 tasks
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.
Summary
This is Phase 1 of the CLI guide alignment roadmap (Issue #1).
Changes
CI Workflow (
.github/workflows/ci.yml)Linting (
.golangci.yml)Makefile Updates
Version Package (
internal/version/version.go)Root Command
--versionoutputslack-cli vX.Y.Z (commit: abc123, built: 2024-...)Test plan
make buildproduces binary with version info./bin/slack-cli --versionshows version, commit, datemake lintpasses with no issuesmake testruns tests (currently no test files)Fixes #1
🤖 Generated with Claude Code