Skip to content

Commit 7ef855f

Browse files
authored
Merge branch 'main' into ale-run-cmd-auto-login
2 parents f924f6f + 9250b37 commit 7ef855f

5 files changed

Lines changed: 40 additions & 19 deletions

File tree

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ jobs:
113113
default: "dev-build"
114114
docker: # run the steps with Docker
115115
# CircleCI Go images available at: https://hub.docker.com/r/circleci/golang/
116-
- image: cimg/go:1.25.6
116+
- image: cimg/go:1.25.7
117117
steps: # steps that comprise the `build` job
118118
- checkout # check out source code to working directory
119119
- restore_cache: # restores saved cache if no changes are detected since last run

.claude/CLAUDE.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,26 +9,30 @@ The Slack CLI is a command-line interface for building apps on the Slack Platfor
99
## Development Commands
1010

1111
### Building
12+
1213
```bash
1314
make build # Build the CLI (includes linting and cleaning)
1415
make build-ci # Build for CI (skips lint and tests)
1516
./bin/slack --version # Run the compiled binary
1617
```
1718

1819
### Testing
20+
1921
```bash
2022
make test # Run all unit tests
2123
make test testdir=cmd/auth testname=TestLoginCommand # Run specific test
2224
make coverage # View test coverage report
2325
```
2426

2527
### Linting
28+
2629
```bash
2730
make lint # Run golangci-lint
2831
golangci-lint --version # Verify linter version
2932
```
3033

3134
### Other Commands
35+
3236
```bash
3337
make init # Initialize project (fetch tags, dependencies)
3438
make clean # Remove build artifacts (bin/, dist/)
@@ -63,11 +67,13 @@ main.go Entry point with tracing and context setup
6367
### Key Architectural Patterns
6468

6569
**Command Aliases**: Many commands have shortcut aliases defined in `cmd/root.go`'s `AliasMap`:
70+
6671
- `slack login``slack auth login`
6772
- `slack deploy``slack platform deploy`
6873
- `slack create``slack project create`
6974

7075
**Client Factory Pattern**: `internal/shared/clients.go` provides a `ClientFactory` that manages shared clients and configurations across commands:
76+
7177
- `API()` - Slack API client
7278
- `Auth()` - Authentication client
7379
- `AppClient()` - App management client
@@ -84,6 +90,7 @@ Commands receive the `ClientFactory` and use it to access functionality.
8490
**Hook System**: `internal/hooks/` implements a lifecycle hook system that allows SDK projects to inject custom behavior at key points. The specification exists in `docs/reference/hooks` files.
8591

8692
**Experiment System**: Features can be gated behind experiments defined in `internal/experiment/experiment.go`:
93+
8794
- Add new experiments as constants
8895
- Register in `AllExperiments` slice
8996
- Enable permanently via `EnabledExperiments`
@@ -92,13 +99,15 @@ Commands receive the `ClientFactory` and use it to access functionality.
9299
### Command Structure
93100

94101
Commands follow this pattern:
102+
95103
1. Define in `cmd/<category>/<command>.go`
96104
2. Create a Cobra command with use/short/long descriptions
97105
3. Add flags specific to that command
98106
4. Implement `RunE` function that receives clients
99107
5. Add unit tests in `*_test.go` alongside
100108

101109
Example command structure:
110+
102111
```go
103112
func NewExampleCommand(clients *shared.ClientFactory) *cobra.Command {
104113
return &cobra.Command{
@@ -125,6 +134,7 @@ func NewExampleCommand(clients *shared.ClientFactory) *cobra.Command {
125134
### Table-Driven Test Conventions
126135

127136
**Preferred: Map pattern** - uses `tc` for test case variable:
137+
128138
```go
129139
tests := map[string]struct {
130140
input string
@@ -137,30 +147,18 @@ for name, tc := range tests {
137147
}
138148
```
139149

140-
**Legacy: Slice pattern** - uses `tc` for test case variable (do not use for new tests):
141-
```go
142-
tests := []struct {
143-
name string
144-
input string
145-
expected string
146-
}{...}
147-
for _, tc := range tests {
148-
t.Run(tc.name, func(t *testing.T) {
149-
// use tc.field
150-
})
151-
}
152-
```
153-
154150
## Version Management
155151

156152
Versions use semantic versioning with git tags (format: `v*.*.*`).
157153

158154
Version is generated dynamically using `git describe` and injected at build time:
155+
159156
```bash
160157
LDFLAGS=-X 'github.com/slackapi/slack-cli/internal/pkg/version.Version=`git describe --tags --match 'v*.*.*'`'
161158
```
162159

163160
**Versioning Rules**:
161+
164162
- `semver:patch` - Bug fixes and changes behind experiment flags
165163
- `semver:minor` - New features (once experiments are removed)
166164
- `semver:major` - Breaking changes
@@ -186,6 +184,7 @@ When deprecating features, commands, or flags:
186184
## Commit Message Format
187185

188186
When creating commits and PRs, append to the end of the commit message:
187+
189188
```
190189
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
191190
```
@@ -212,6 +211,7 @@ Use conventional commit format (feat:, fix:, chore:, etc.) for commit titles.
212211
### Understanding API Calls
213212

214213
All Slack API interactions go through `internal/api/`:
214+
215215
- `client.go` - HTTP client setup
216216
- `app.go` - App management API calls
217217
- `auth.go` - Authentication API calls

.claude/settings.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,30 @@
33
"allow": [
44
"Bash(go mod tidy:*)",
55
"Bash(gofmt:*)",
6+
"Bash(gh issue view:*)",
7+
"Bash(gh label list:*)",
8+
"Bash(gh pr checks:*)",
9+
"Bash(gh pr diff:*)",
10+
"Bash(gh pr list:*)",
11+
"Bash(gh pr status:*)",
12+
"Bash(gh pr update-branch:*)",
13+
"Bash(gh pr view:*)",
14+
"Bash(gh search code:*)",
15+
"Bash(git diff:*)",
16+
"Bash(git grep:*)",
17+
"Bash(git log:*)",
18+
"Bash(git status:*)",
19+
"Bash(go mod graph:*)",
20+
"Bash(go mod tidy:*)",
21+
"Bash(grep:*)",
22+
"Bash(ls:*)",
623
"Bash(make build:*)",
724
"Bash(make build-ci:*)",
8-
"Bash(make lint:*)"
25+
"Bash(make lint:*)",
26+
"Bash(make test:*)",
27+
"Bash(tree:*)",
28+
"WebFetch(domain:github.com)",
29+
"WebFetch(domain:docs.slack.dev)"
930
]
1031
}
1132
}

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Set up Go
2626
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
2727
with:
28-
go-version: "1.25.6"
28+
go-version: "1.25.7"
2929
- name: Lint
3030
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
3131
with:
@@ -57,7 +57,7 @@ jobs:
5757
- name: Set up Go
5858
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
5959
with:
60-
go-version: "1.25.6"
60+
go-version: "1.25.7"
6161
- name: Report health score
6262
uses: slackapi/slack-health-score@d58a419f15cdaff97e9aa7f09f95772830ab66f7 # v0.1.1
6363
with:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/slackapi/slack-cli
22

3-
go 1.25.6
3+
go 1.25.7
44

55
require (
66
github.com/AlecAivazis/survey/v2 v2.3.7

0 commit comments

Comments
 (0)