Skip to content

feat: add authenticated generic slack api command - #8

Merged
codesoda merged 1 commit into
mainfrom
slack/api-command
Sep 9, 2026
Merged

feat: add authenticated generic slack api command#8
codesoda merged 1 commit into
mainfrom
slack/api-command

Conversation

@codesoda

@codesoda codesoda commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add slack api <method-or-url> for Slack Web API methods without dedicated CLI commands.
  • Reuse stored OAuth/browser credentials, workspace selection, and token overrides.
  • Support GET/POST, raw and typed fields, JSON parameter files/stdin, and full JSON responses.
  • Restrict endpoints to Slack API methods and disable redirects to protect credentials.
  • Add bounded rate-limit retries, shared token resolution, and README documentation.

Testing

  • 26 dedicated end-to-end tests in tests/cli_api.rs, using a local mock server and fake tokens; no Slack login required.
  • cargo build
  • SLACK_RUN_MOCK_TESTS=1 cargo test
  • cargo test --test cli_api
  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --document-private-items

All checks above passed locally. Live Slack integration tests and coverage checks were not run.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@codesoda
codesoda merged commit a03cb38 into main Sep 9, 2026
10 checks passed
@codesoda
codesoda deleted the slack/api-command branch September 9, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant