Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #977 Add a way to turn off web page rendering for "/slack/install" #1079

Merged
merged 7 commits into from
Aug 25, 2021

Conversation

seratch
Copy link
Member

@seratch seratch commented Aug 24, 2021

Summary

This pull request fixes #977. Refer to the issue for details.

Requirements (place an x in each [ ])

@seratch seratch added the enhancement M-T: A feature request for new functionality label Aug 24, 2021
@seratch seratch added this to the 3.7.0 milestone Aug 24, 2021
@codecov
Copy link

codecov bot commented Aug 24, 2021

Codecov Report

Merging #1079 (c1c7b9c) into main (02d601d) will increase coverage by 2.16%.
The diff coverage is 86.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1079      +/-   ##
==========================================
+ Coverage   68.73%   70.90%   +2.16%     
==========================================
  Files          13       13              
  Lines        1206     1220      +14     
  Branches      355      365      +10     
==========================================
+ Hits          829      865      +36     
+ Misses        304      284      -20     
+ Partials       73       71       -2     
Impacted Files Coverage Δ
src/receivers/ExpressReceiver.ts 65.85% <0.00%> (-0.40%) ⬇️
src/receivers/HTTPReceiver.ts 30.45% <100.00%> (+12.81%) ⬆️
src/receivers/SocketModeReceiver.ts 69.64% <100.00%> (+2.33%) ⬆️
src/App.ts 83.19% <0.00%> (+0.37%) ⬆️
src/errors.ts 100.00% <0.00%> (+8.51%) ⬆️

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 02d601d...c1c7b9c. Read the comment docs.

@@ -41,6 +41,7 @@ interface InstallerOptions {
authVersion?: InstallProviderOptions['authVersion']; // default 'v2'
metadata?: InstallURLOptions['metadata'];
installPath?: string;
directInstallUrlEnabled?: boolean; // see https://api.slack.com/start/distributing/directory#direct_install
Copy link
Member Author

Choose a reason for hiding this comment

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

Do we prefer something simpler like directInstall: boolean?

Copy link
Contributor

Choose a reason for hiding this comment

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

I like the shorter name but that's only my personal preference

Copy link
Member Author

Choose a reason for hiding this comment

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

Got two votes 😄 Renamed.

Copy link
Contributor

@filmaj filmaj left a comment

Choose a reason for hiding this comment

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

LGTM, left a few minor comments.

examples/oauth/README.md Outdated Show resolved Hide resolved
examples/oauth/README.md Outdated Show resolved Hide resolved
examples/oauth/README.md Outdated Show resolved Hide resolved
examples/oauth/package.json Outdated Show resolved Hide resolved
@@ -41,6 +41,7 @@ interface InstallerOptions {
authVersion?: InstallProviderOptions['authVersion']; // default 'v2'
metadata?: InstallURLOptions['metadata'];
installPath?: string;
directInstallUrlEnabled?: boolean; // see https://api.slack.com/start/distributing/directory#direct_install
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the shorter name but that's only my personal preference

@seratch
Copy link
Member Author

seratch commented Aug 24, 2021

I think this one is ready for merge but just in case, I'll wait for others' comments until tomorrow.

Copy link
Member

@srajiang srajiang left a comment

Choose a reason for hiding this comment

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

Left just a few super minor comments - this will be a great option to have for users!

"author": "Slack Technologies, Inc.",
"license": "MIT",
"dependencies": {
"@slack/bolt": "^3.6.0"
Copy link
Member

Choose a reason for hiding this comment

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

Since the installer option would be available in 3.7.0 release, it's probably okay with the ^, but since you've pointed out already that the flag is available to 3.7.0 and on perhaps this should be ^3.7.0?

Copy link
Member Author

Choose a reason for hiding this comment

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

As the flag is commented out now, the example app works even with v3.6.0. I am using npm link for verifying the behavior with the flag. Once we release v3.7, we can upgrade the minimum version here.

src/receivers/ExpressReceiver.ts Outdated Show resolved Hide resolved
);
const HTTPReceiver = await importHTTPReceiver(overrides);

const metadata = 'this is bat country';
Copy link
Member

Choose a reason for hiding this comment

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

🤣

Copy link
Member Author

Choose a reason for hiding this comment

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

This is not mine. I just copied and pasted the example in the document 😄

Copy link
Member

Choose a reason for hiding this comment

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

Okay, I was thinking - wow what an obscure American cultural reference @seratch is making here....

src/receivers/SocketModeReceiver.spec.ts Outdated Show resolved Hide resolved
Co-authored-by: Sarah Jiang <srajiang@gmail.com>
@seratch seratch merged commit bcca0ee into slackapi:main Aug 25, 2021
@seratch seratch self-assigned this Aug 26, 2021
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a way to turn off web page rendering for "/slack/install"
4 participants