Skip to content

Enable installation_store authorize to fallback to bots (prep for #254) - #287

Merged
seratch merged 1 commit into
slackapi:mainfrom
seratch:fallback-to-bot
Apr 12, 2021
Merged

seratch merged 1 commit into
slackapi:mainfrom
seratch:fallback-to-bot

Conversation

@seratch

@seratch seratch commented Apr 9, 2021 •

Copy link
Copy Markdown
Contributor

This pull request improves InstallationStoreAuthorize and AsyncInstallationStoreAuthorize for better installation data resolution as part of #254 feature addition.

Even when all user installations are revoked, bot scope installation should exist as long as the app is not uninstalled in the workspace. This is the reason why this SDK recommends having two data tables - bots and user installations. This pull request improves the authorize functions to be capable to resolve bot installation regardless of the behavior of find_installation method in InstallationStore / AsyncInstallationStore. Refer to the test code for learning what the use case is.

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.

@seratch seratch added the enhancement New feature or request label Apr 9, 2021
@seratch seratch added this to the 1.5.0 milestone Apr 9, 2021
@seratch seratch self-assigned this Apr 9, 2021
@codecov

codecov Bot commented Apr 9, 2021

Copy link
Copy Markdown

Codecov Report

Merging #287 (052fbcb) into main (efab010) will decrease coverage by 0.02%.
The diff coverage is 80.95%.

❗ Current head 052fbcb differs from pull request most recent head deaba2e. Consider uploading reports for the commit deaba2e to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #287      +/-   ##
==========================================
- Coverage   91.50%   91.47%   -0.03%     
==========================================
  Files         160      160              
  Lines        5000     5010      +10     
==========================================
+ Hits         4575     4583       +8     
- Misses        425      427       +2     
Impacted Files Coverage Δ
slack_bolt/authorization/authorize.py 86.45% <80.00%> (-0.50%) ⬇️
slack_bolt/authorization/async_authorize.py 86.73% <81.81%> (-0.23%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update efab010...deaba2e. Read the comment docs.

@mwbrooks
mwbrooks requested review from mwbrooks and stevengill April 9, 2021 22:59
@seratch
seratch merged commit 8babac6 into slackapi:main Apr 12, 2021
@seratch
seratch deleted the fallback-to-bot branch April 12, 2021 02:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants