Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ permissions: {}
jobs:
workflow-lint:
name: Workflow lint
uses: matcra587/github-actions/.github/workflows/workflow-lint.yml@8b104684e72bef79fca78b294accb5f789d3f202
uses: matcra587/github-actions/.github/workflows/workflow-lint.yml@67f0de0d0ceebe69895e868207c04e5c66b3bde8
permissions:
contents: read
# security-events: write # Required for zizmor SARIF upload.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ permissions: {}
jobs:
go-test:
name: Go test
uses: matcra587/github-actions/.github/workflows/go-test.yml@8b104684e72bef79fca78b294accb5f789d3f202
uses: matcra587/github-actions/.github/workflows/go-test.yml@67f0de0d0ceebe69895e868207c04e5c66b3bde8
permissions:
contents: read

go-lint:
name: Go lint
uses: matcra587/github-actions/.github/workflows/go-lint.yml@8b104684e72bef79fca78b294accb5f789d3f202
uses: matcra587/github-actions/.github/workflows/go-lint.yml@67f0de0d0ceebe69895e868207c04e5c66b3bde8
permissions:
contents: read

md-lint:
name: Markdown lint
uses: matcra587/github-actions/.github/workflows/md-lint.yml@8b104684e72bef79fca78b294accb5f789d3f202
uses: matcra587/github-actions/.github/workflows/md-lint.yml@67f0de0d0ceebe69895e868207c04e5c66b3bde8
permissions:
contents: read
3 changes: 2 additions & 1 deletion .rumdl.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ respect_gitignore = true

exclude = [
".git",
".agents",
".claude",
".github",
".claude/rules",
"build",
"dist",
"node_modules",
Expand Down
11 changes: 11 additions & 0 deletions cmd/slack/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ import (
"github.com/spf13/cobra"
)

func TestMain(m *testing.M) {
clearAmbientAgentEnvironment()
os.Exit(m.Run())
}

func clearAmbientAgentEnvironment() {
for _, key := range agent.KnownEnvVars() {
_ = os.Unsetenv(key)
}
}

func TestNewRootCommandDefinesPersistentFlags(t *testing.T) {
cmd := NewRootCommand()
if cmd.Use != "slack" {
Expand Down
12 changes: 12 additions & 0 deletions internal/agent/detect_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
package agent_test

import (
"os"
"testing"

"github.com/matcra587/slack-cli/internal/agent"
)

func TestMain(m *testing.M) {
clearAmbientAgentEnvironment()
os.Exit(m.Run())
}

func clearAmbientAgentEnvironment() {
for _, key := range agent.KnownEnvVars() {
_ = os.Unsetenv(key)
}
}

func TestDetectRecognizesAIAgentEnvironmentList(t *testing.T) {
tests := []struct {
env string
Expand Down