Skip to content

feat: add Slackbot availability option to team_info - #2003

Merged
mwbrooks merged 1 commit into
slackapi:mainfrom
samkantor123:samuel/slackbot-availability
Oct 29, 2026
Merged

mwbrooks merged 1 commit into
slackapi:mainfrom
samkantor123:samuel/slackbot-availability

Conversation

@samkantor123

Copy link
Copy Markdown
Contributor

Summary

Add include_slackbot_availability: Optional[bool] = None to WebClient.team_info and regenerate the async and legacy clients with scripts/codegen.py.

This makes the opt-in argument discoverable and typed. Existing callers can already pass it through **kwargs, and response dictionaries already preserve team.slackbot_availability; no response model changes are needed.

Add a regression test verifying omission and true/false serialization through the existing mock Web API server. Existing team and domain behavior stays unchanged.

Testing

Passed on Python 3.15: code generation, formatting, lint, mypy, and the full test suite (1,041 passed, 5 skipped).

source .venv/bin/activate
./scripts/run_validation.sh

Category

  • slack_sdk.web.WebClient (sync/async) (Web API client)
  • tests/integration_tests (Automated tests for this library)

Requirements

  • I've read and understood the Contributing Guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've run python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.sh after making the changes.

@samkantor123
samkantor123 requested a review from a team as a code owner October 29, 2026 22:28
@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.35%. Comparing base (fd538f7) to head (7a5ab11).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2003      +/-   ##
==========================================
- Coverage   84.38%   84.35%   -0.03%     
==========================================
  Files         118      118              
  Lines       13812    13812              
==========================================
- Hits        11655    11651       -4     
- Misses       2157     2161       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@mwbrooks mwbrooks added enhancement M-T: A feature request for new functionality web-client labels Oct 29, 2026
@mwbrooks mwbrooks added this to the 3.46.0 milestone Oct 29, 2026

@mwbrooks mwbrooks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Thanks @samkantor123! This looks good to me. Before approving, we are just confirming that the API details are finalized.

self.client.token = "xoxb-coverage"
response = self.client.team_info(team="T123")
self.assertEqual({"team": "T123"}, response.req_args["params"])
for include, encoded in [(True, "1"), (False, "0")]:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Thanks for covering the omitted, True, and False cases!

@mwbrooks mwbrooks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Thanks @samkantor123! Confirmed the API is final, so this is good to go. Appreciate the thorough tests!

@mwbrooks
mwbrooks merged commit 747d8a7 into slackapi:main Oct 29, 2026
19 checks passed
@mwbrooks mwbrooks self-assigned this Oct 29, 2026
@zimeg zimeg mentioned this pull request Oct 30, 2026
3 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality semver:minor web-client

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants