Skip to content

Conversation

seratch
Copy link
Contributor

@seratch seratch commented Mar 11, 2023

This pull request enhances AuthorizeResult to have bot_scopes and user_scopes when they're available. For backward-compatibility, they are totally optional. The built-in authorize tries to set the properties as much as possible, but it's still fine to omit these two properties.

Also, this commit fixes the bug where authorize_result.user_id is not resolved when both bot and user tokens exist.

Category (place an x in each of the [ ])

  • slack_bolt.App and/or its core components
  • slack_bolt.async_app.AsyncApp and/or its core components
  • Adapters in slack_bolt.adapter
  • Document pages under /docs
  • Others

Requirements (place an x in each [ ])

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.

  • 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 ./scripts/install_all_and_run_tests.sh after making the changes.

…e (optional)

Also, this commit fixes the bug where authorize_result.user_id is not resolved when both bot and user tokens exist.
@seratch seratch added bug Something isn't working enhancement New feature or request labels Mar 11, 2023
@seratch seratch added this to the 1.17.0 milestone Mar 11, 2023
@seratch seratch self-assigned this Mar 11, 2023
@codecov
Copy link

codecov bot commented Mar 11, 2023

Codecov Report

Merging #855 (1eea8f6) into main (20d250f) will decrease coverage by 0.08%.
The diff coverage is 88.73%.

@@            Coverage Diff             @@
##             main     #855      +/-   ##
==========================================
- Coverage   92.10%   92.03%   -0.08%     
==========================================
  Files         181      181              
  Lines        6095     6137      +42     
==========================================
+ Hits         5614     5648      +34     
- Misses        481      489       +8     
Impacted Files Coverage Δ
slack_bolt/authorization/authorize_result.py 93.93% <81.81%> (-6.07%) ⬇️
slack_bolt/authorization/async_authorize.py 84.61% <90.00%> (-0.39%) ⬇️
slack_bolt/authorization/authorize.py 84.41% <90.00%> (-0.37%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@seratch seratch merged commit 2837e11 into slackapi:main Mar 13, 2023
@seratch seratch deleted the authorize_enhancement branch March 13, 2023 04:13
seratch added a commit to seratch/bolt-python that referenced this pull request Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant