Skip to content

Commit 5eb7472

Browse files
authored
Merge branch 'main' into zimeg-fix-env-quote
2 parents 5122e45 + ba1b784 commit 5eb7472

46 files changed

Lines changed: 2873 additions & 66 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ jobs:
159159
- run:
160160
name: Run GoReleaser. Without actually publishing.
161161
command: |
162-
LDFLAGS="-s -w -X 'github.com/slackapi/slack-cli/internal/pkg/version.Version=$BUILD_VERSION'"
162+
LDFLAGS="-s -w -X 'github.com/slackapi/slack-cli/internal/version.Version=$BUILD_VERSION'"
163163
make LDFLAGS="$LDFLAGS" build-snapshot
164164
- run:
165165
name: Show binaries are generated correctly

.claude/CLAUDE.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ Versions use semantic versioning with git tags (format: `v*.*.*`).
171171
Version is generated dynamically using `git describe` and injected at build time:
172172

173173
```bash
174-
LDFLAGS=-X 'github.com/slackapi/slack-cli/internal/pkg/version.Version=`git describe --tags --match 'v*.*.*'`'
174+
LDFLAGS=-X 'github.com/slackapi/slack-cli/internal/version.Version=`git describe --tags --match 'v*.*.*'`'
175175
```
176176

177177
**Versioning Rules**:
@@ -189,6 +189,10 @@ When deprecating features, commands, or flags:
189189
3. **Public functionality**: Add comment `// DEPRECATED(semver:major): <description and migration path>`
190190
4. **Internal functionality**: Add comment `// DEPRECATED: <description>`
191191

192+
## Style Guide
193+
194+
See [`.github/STYLE_GUIDE.md`](../.github/STYLE_GUIDE.md) for conventions on command inputs and outputs.
195+
192196
## Important Configuration Files
193197

194198
- `.golangci.yml` - Linter configuration with custom initialisms (CLI, API, SDK, etc.) and staticcheck rules

.claude/settings.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,13 @@
2727
"Bash(make build:*)",
2828
"Bash(make lint:*)",
2929
"Bash(make test:*)",
30+
"Bash(mkdir:*)",
3031
"Bash(tree:*)",
32+
"Bash(vhs:*)",
3133
"WebFetch(domain:docs.slack.dev)",
3234
"WebFetch(domain:github.com)"
33-
]
35+
],
36+
"deny": ["Bash(vhs publish:*)"]
3437
},
3538
"enabledPlugins": {
3639
"gopls-lsp@claude-plugins-official": true

.github/MAINTAINERS_GUIDE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ Certain things are common during development and require a few commands.
294294
- [Bumping the Golang version](#bumping-the-golang-version)
295295
- [Bumping Go packages versions](#bumping-go-package-versions)
296296
- [Bumping Goreleaser versions](#bumping-goreleaser-versions)
297+
- [Designing](#designing)
297298
- [Deprecating features and flags](#deprecating-features-and-flags)
298299
- [Allowlist configuration](#allowlist-configuration)
299300

@@ -632,6 +633,11 @@ updates in the following files on occasion:
632633
633634
Testing in our CI setup uses changes to these files when creating test builds.
634635
636+
### Designing
637+
638+
Conventions for how commands handle inputs and format outputs are documented in
639+
the [style guide][style-guide].
640+
635641
### Deprecating features and flags
636642
637643
Many good things come to an end. This can sometimes include commands and flags.
@@ -926,6 +932,7 @@ When in doubt, find the other maintainers and ask.
926932
[practical-go]: https://dave.cheney.net/practical-go/presentations/qcon-china.html
927933
[scripts]: ../scripts
928934
[semver]: https://semver.org/
935+
[style-guide]: ./STYLE_GUIDE.md
929936
[sync]: https://github.com/slackapi/slack-cli/blob/main/.github/workflows/sync-docs-from-cli-repo.yml
930937
[vscode]: https://github.com/slackapi/slack-cli/blob/main/.vscode/settings.json
931938
[wf-dependencies]: ./workflows/dependencies.yml

.github/STYLE_GUIDE.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Style Guide
2+
3+
A current suggestion for how Slack CLI inputs are handled and outputs are formatted.
4+
5+
- **Input**
6+
- [Prompts are Flags with Forms](#prompts-are-flags-with-forms)
7+
- **Output**
8+
- [Format Sections with Command Details](#format-sections-with-command-details)
9+
10+
## Input
11+
12+
Customizations to commands are made through arguments, flags, environment variables, saved files, details from the Slack API itself, or sometimes just kept as "sensible" defaults.
13+
14+
### Prompts are Flags with Forms
15+
16+
When information is needed we can prompt for text, confirmation, or a selection.
17+
18+
These decisions can be made in an interactive terminal (TTY) or not, such as in a scripting environment.
19+
20+
A flag option should exist for each prompt with a form fallback. Either default values should be used if forms are attempted in a non-TTY setup or an error and remmediation to use a flag should be returned.
21+
22+
## Output
23+
24+
Results of a command go toward informing current happenings and suggesting next steps.
25+
26+
### Format Sections with Command Details
27+
28+
A command often prints information and details about the process happenings. We format this as a section:
29+
30+
```txt
31+
📚 App Install
32+
Installing "focused-lamb-99" app to "devrelsandbox"
33+
Finished in 2.0s
34+
```
35+
36+
This example highlights some recommendations:
37+
38+
- An emoji is used with the section header.
39+
- The section header text is the command name, with "Title Case" letters.
40+
- Following details reveal progress of the process.

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Install Tests
3737
run: make test-install
3838
- name: Upload coverage to Codecov
39-
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
39+
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
4040
with:
4141
token: ${{ secrets.CODECOV_TOKEN }}
4242
files: ./coverage.out

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
# Common variables
16-
LDFLAGS=-X 'github.com/slackapi/slack-cli/internal/pkg/version.Version=`git describe --tags --match 'v*.*.*'`'
16+
LDFLAGS=-X 'github.com/slackapi/slack-cli/internal/version.Version=`git describe --tags --match 'v*.*.*'`'
1717
BUILD_VERSION = `git describe --tags --match 'v*.*.*' | sed 's/v//'`
1818
RELEASE_VERSION := $(shell git describe --tags --match 'v*.*.*')
1919
testdir ?= ...

cmd/doctor/check.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ import (
2626
"github.com/slackapi/slack-cli/internal/config"
2727
"github.com/slackapi/slack-cli/internal/deputil"
2828
"github.com/slackapi/slack-cli/internal/iostreams"
29-
"github.com/slackapi/slack-cli/internal/pkg/version"
3029
"github.com/slackapi/slack-cli/internal/shared"
3130
"github.com/slackapi/slack-cli/internal/shared/types"
3231
"github.com/slackapi/slack-cli/internal/slackerror"
3332
"github.com/slackapi/slack-cli/internal/style"
3433
"github.com/slackapi/slack-cli/internal/update"
34+
"github.com/slackapi/slack-cli/internal/version"
3535
"golang.org/x/text/cases"
3636
"golang.org/x/text/language"
3737
)

cmd/doctor/check_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ import (
2323
"github.com/slackapi/slack-cli/internal/config"
2424
"github.com/slackapi/slack-cli/internal/deputil"
2525
"github.com/slackapi/slack-cli/internal/hooks"
26-
"github.com/slackapi/slack-cli/internal/pkg/version"
2726
"github.com/slackapi/slack-cli/internal/shared"
2827
"github.com/slackapi/slack-cli/internal/shared/types"
2928
"github.com/slackapi/slack-cli/internal/slackcontext"
3029
"github.com/slackapi/slack-cli/internal/slackdeps"
3130
"github.com/slackapi/slack-cli/internal/slackerror"
31+
"github.com/slackapi/slack-cli/internal/version"
3232
"github.com/slackapi/slack-cli/test/slackmock"
3333
"github.com/stretchr/testify/assert"
3434
"github.com/stretchr/testify/mock"

cmd/doctor/doctor_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ import (
2424
"github.com/slackapi/slack-cli/internal/config"
2525
"github.com/slackapi/slack-cli/internal/deputil"
2626
"github.com/slackapi/slack-cli/internal/hooks"
27-
"github.com/slackapi/slack-cli/internal/pkg/version"
2827
"github.com/slackapi/slack-cli/internal/shared"
2928
"github.com/slackapi/slack-cli/internal/shared/types"
3029
"github.com/slackapi/slack-cli/internal/slackcontext"
3130
"github.com/slackapi/slack-cli/internal/slackdeps"
3231
"github.com/slackapi/slack-cli/internal/slackerror"
32+
"github.com/slackapi/slack-cli/internal/version"
3333
"github.com/slackapi/slack-cli/test/slackmock"
3434
"github.com/slackapi/slack-cli/test/testutil"
3535
"github.com/stretchr/testify/assert"

0 commit comments

Comments
 (0)