Fix #664 Django example installation store improvement#665
Merged
srajiang merged 1 commit intoslackapi:mainfrom Jun 2, 2022
Merged
Fix #664 Django example installation store improvement#665srajiang merged 1 commit intoslackapi:mainfrom
srajiang merged 1 commit intoslackapi:mainfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## main #665 +/- ##
=======================================
Coverage 92.05% 92.05%
=======================================
Files 172 172
Lines 5864 5864
=======================================
Hits 5398 5398
Misses 466 466 Continue to review full report at Codecov.
|
filmaj
approved these changes
Jun 2, 2022
Contributor
filmaj
left a comment
There was a problem hiding this comment.
LGTM, I added one suggestion to a comment in the example to help potential future maintainers understand the workaround introduced here.
| if len(rows) > 0: | ||
| i = rows[0] | ||
| if user_id is not None: | ||
| # Fetch the latest bot token |
Contributor
There was a problem hiding this comment.
I suggest we add a bit more context to this comment to help remind future maintainers about this workaround.
Suggested change
| # Fetch the latest bot token | |
| # Above, when fetching applicable installations, we retrieved relevant installations but filtered on matching user ID | |
| # In the case that this app uses both bot and user scopes, we also now fetch installations that match only on team/enterprise ID and contain a bot token | |
| # If any such results are retrieved, we merged them into the user-id-filtered results. | |
| # This is a fix for the situation described in https://github.com/slackapi/bolt-python/issues/664 |
DataGreed
approved these changes
Jun 2, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request resolves #664 by improving the installation store in Django example app.
Category (place an
xin each of the[ ])slack_bolt.Appand/or its core componentsslack_bolt.async_app.AsyncAppand/or its core componentsslack_bolt.adapter/docsRequirements (place an
xin 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.
./scripts/install_all_and_run_tests.shafter making the changes.