diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 629ee64..a83e59e 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -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. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c0df0cc..b325ebb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.rumdl.toml b/.rumdl.toml index 3a88ed1..cf6da96 100644 --- a/.rumdl.toml +++ b/.rumdl.toml @@ -10,8 +10,9 @@ respect_gitignore = true exclude = [ ".git", + ".agents", + ".claude", ".github", - ".claude/rules", "build", "dist", "node_modules", diff --git a/cmd/slack/main_test.go b/cmd/slack/main_test.go index 7d74e54..17615ee 100644 --- a/cmd/slack/main_test.go +++ b/cmd/slack/main_test.go @@ -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" { diff --git a/internal/agent/detect_test.go b/internal/agent/detect_test.go index 235fe1c..9c5ee82 100644 --- a/internal/agent/detect_test.go +++ b/internal/agent/detect_test.go @@ -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