Skip to content

Conversation

@mwbrooks
Copy link
Member

Summary

🤾🏻 Kudos to @zimeg for pointing this out!

This pull request updates all references to https://api.slack.com to https://slack.dev, when available.

In most cases, this just prevents a redirect from happening.

The main benefit is the promote our new CHANGELOG page whenever the Slack CLI has an update:

image

Requirements

@mwbrooks mwbrooks added docs M-T: Documentation work only changelog Use on updates to be included in the release notes semver:patch Use on pull requests to describe the release version increment labels Apr 11, 2025
@mwbrooks mwbrooks added this to the Next Release milestone Apr 11, 2025
@mwbrooks mwbrooks self-assigned this Apr 11, 2025
@codecov
Copy link

codecov bot commented Apr 11, 2025

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 62.92%. Comparing base (85749e2) to head (c689906).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/update/cli.go 0.00% 2 Missing ⚠️
cmd/function/function.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #34      +/-   ##
==========================================
+ Coverage   62.90%   62.92%   +0.01%     
==========================================
  Files         210      210              
  Lines       22149    22149              
==========================================
+ Hits        13933    13937       +4     
+ Misses       7131     7126       -5     
- Partials     1085     1086       +1     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member Author

@mwbrooks mwbrooks left a comment

Choose a reason for hiding this comment

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

Added a few comments to help the kind reviewers! 📚


[circleci]: ../.circleci/config.yml
[commands]: https://api.slack.com/automation/cli/commands
[commands]: https://tools.slack.dev/slack-cli/reference/commands/slack
Copy link
Member Author

Choose a reason for hiding this comment

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

note: We might be able shorten this URL in the future to:
https://tools.slack.dev/slack-cli/reference/commands

$ {{.CommandPath}}{{if eq .Name (GetProcessName)}} <command>{{end}} <subcommand> --help
For guides and documentation, head over to {{LinkText "https://api.slack.com/automation"}}{{end}}
For guides and documentation, head over to {{LinkText "https://tools.slack.dev/slack-cli"}}{{end}}
Copy link
Member Author

Choose a reason for hiding this comment

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

thought: I think a more appropriate page is the new, Slack CLI homepage! ✨

if len(triggerFilePaths) <= 0 {
clients.IO.PrintInfo(ctx, false, style.SectionSecondaryf(
"No trigger definition files found\nLearn more about triggers: https://api.slack.com/automation/triggers/link",
"No trigger definition files found\nLearn more about triggers:\nhttps://tools.slack.dev/deno-slack-sdk/guides/creating-link-triggers",
Copy link
Member Author

Choose a reason for hiding this comment

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

note: I added a newline \n since the URL is a little longer.

var checkForUpdatesFunc = checkForUpdates

const changelogURL = "https://api.slack.com/automation/changelog"
const changelogURL = "https://docs.slack.dev/changelog"
Copy link
Member Author

Choose a reason for hiding this comment

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

note: MVP change!

Comment on lines +344 to +351
Remediation: fmt.Sprintf(`Learn about building apps with the Deno Slack SDK:
https://tools.slack.dev/deno-slack-sdk
If you are using a Bolt framework, add a deploy hook then run: %s
Otherwise start your app for local development with: %s`,
style.Commandf("deploy --experiment=bolt", true),
style.Commandf("deploy", true),
Copy link
Member Author

Choose a reason for hiding this comment

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

note: Updated an old Bolt Experiment reference, how does it read?

echo "🛑 Error: This installer is only supported on Linux and macOS"
echo "🔖 Try using a different installation method:"
echo "🔗 https://api.slack.com/automation/cli/install"
echo "🔗 https://tools.slack.dev/slack-cli"
Copy link
Member Author

Choose a reason for hiding this comment

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

note: Install script updates! So we'll want to deploy those next release 🚀

Copy link
Member

Choose a reason for hiding this comment

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

This is a good landing page to point to IMO since the exact error at this point might not be known to the installer.

Once more I'm optimistic that issues will be useful in debugging issues with the installation script when these are encountered 🙏 ✨

Copy link
Member

Choose a reason for hiding this comment

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

Edit: I also look forward to the next release! 🚀

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea, I'm looking forward to weaving GitHub Issues into more of the output from the CLI!

if [ -z "$LATEST_SLACK_CLI_VERSION" ]; then
echo "🛑 Error: Installer cannot find the latest Slack CLI version!"
echo "🔖 Check the status of https://api.slack.com and try again"
echo "🔖 Check the status of https://slack-status.com/ and try again"
Copy link
Member Author

Choose a reason for hiding this comment

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

note: Cool with this? The URL seems more appropriate?

Copy link
Member

Choose a reason for hiding this comment

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

🧠 This is a nice change! IIRC the status of CLI downloads will match other services of Slack and might not be related to the api.slack.com page.

Tracking status problems down from reported issues seems ideal to me now that this can be reported via GitHub issues.

Before this codebase was open source we might've been reliant on sharing updates through other channels but I do not recall if we've had to do that...

Copy link
Member

Choose a reason for hiding this comment

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

Edit: I realize this particular change is after erroring while gathering metadata from the "api.slack.com" pages!

This makes even more sense to use the https://slack-status.com/ site instead in case the linked subdomain might error somehow else 😅

Copy link
Member Author

Choose a reason for hiding this comment

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

Good points! If we find that https://slack-status.com/ doesn't reflect our file serving endpoints (I imagine it does) then we can always update this error to ask people to submit a GitHub Issue. This would allow us to investigate it further.

@mwbrooks mwbrooks marked this pull request as ready for review April 11, 2025 20:45
@mwbrooks mwbrooks requested a review from a team as a code owner April 11, 2025 20:45
Copy link
Member

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

@mwbrooks All of these updates are so much appreciated 📚 ✨

These pages and related have been in constant motion the past few days but now seems like the right time to make these updates.

I did leave a few comments of links to "api.slack.com" that might have alternative "docs.slack.dev" endpoints we might use instead?

That's no blocker but I do think we should make these replacements where possible. I'm adding a commit that updates a few more links in comments and related too, but please revert that if it's not making the right changes 🤖


## 📄 Hook Specification

Hooks are entry points for the CLI to initiate inter-process communication with the SDK. SDKs should implement one hook: `get-hooks`. It is the recommended approach for SDKs to enable communication with the CLI (for more details, see the [Hook Resolution](#hook-resolution) section).
Copy link
Member

Choose a reason for hiding this comment

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

👾

### 🪝 `build` (optional)

Implementing this hook allows for the CLI to [deploy function code to Slack's managed infrastructure](https://api.slack.com/automation/deploy). The work of assembling the application bundle according to Slack's application bundle format is delegated to the SDK via this hook.
Implementing this hook allows for the CLI to [deploy function code to Slack's managed infrastructure](https://tools.slack.dev/deno-slack-sdk/guides/deploying-to-slack). The work of assembling the application bundle according to Slack's application bundle format is delegated to the SDK via this hook.
Copy link
Member

Choose a reason for hiding this comment

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

📣 I'm glad the specification is included with the repo.

Some sidethought makes me think we might want to include the build hook before deploy for bolt apps too.

I don't mean to sidetrack this PR though! We could instead discuss this on a separate PR around this document 🤖

Copy link
Member Author

Choose a reason for hiding this comment

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

Definitely want consistency in how the hooks are executed - it shouldn't skip hooks based on the framework, instead the framework can have a no-op (exit 0) script.

if [ -z "$LATEST_SLACK_CLI_VERSION" ]; then
echo "🛑 Error: Installer cannot find the latest Slack CLI version!"
echo "🔖 Check the status of https://api.slack.com and try again"
echo "🔖 Check the status of https://slack-status.com/ and try again"
Copy link
Member

Choose a reason for hiding this comment

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

🧠 This is a nice change! IIRC the status of CLI downloads will match other services of Slack and might not be related to the api.slack.com page.

Tracking status problems down from reported issues seems ideal to me now that this can be reported via GitHub issues.

Before this codebase was open source we might've been reliant on sharing updates through other channels but I do not recall if we've had to do that...

echo "🛑 Error: This installer is only supported on Linux and macOS"
echo "🔖 Try using a different installation method:"
echo "🔗 https://api.slack.com/automation/cli/install"
echo "🔗 https://tools.slack.dev/slack-cli"
Copy link
Member

Choose a reason for hiding this comment

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

This is a good landing page to point to IMO since the exact error at this point might not be known to the installer.

Once more I'm optimistic that issues will be useful in debugging issues with the installation script when these are encountered 🙏 ✨

echo "🛑 Error: This installer is only supported on Linux and macOS"
echo "🔖 Try using a different installation method:"
echo "🔗 https://api.slack.com/automation/cli/install"
echo "🔗 https://tools.slack.dev/slack-cli"
Copy link
Member

Choose a reason for hiding this comment

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

Edit: I also look forward to the next release! 🚀

@mwbrooks
Copy link
Member Author

@zimeg As always, thanks for the thorough review! I've added all of your suggestions and it inspired me to do another search through our api.slack.com references. Commit c689906 also updates our app manifest reference to this new page:
https://docs.slack.dev/reference/app-manifest

@mwbrooks mwbrooks changed the title docs: update Slack CLI and Install Scripts to use the new https://slack.dev website docs: update Slack CLI and Install Scripts to use the new https://slack.dev docs Apr 14, 2025
@mwbrooks mwbrooks merged commit 9e6bc44 into main Apr 14, 2025
6 checks passed
@mwbrooks mwbrooks deleted the mwbrooks-slack-dot-dev-urls branch April 14, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Use on updates to be included in the release notes docs M-T: Documentation work only semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants