Skip to content

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented May 14, 2025

Changelog: The example slack app link and slack app list commands shown in the slack app --help help pages now use the entire command to map to the correct command.

Summary

This PR includes the app portion of the app link and app list commands to avoid aliased errors.

Preview

EXAMPLE
  $ slack install    # Install a production app to a team
  $ slack app link   # Link an existing app to the project
  $ slack app list   # List all teams with the app installed
  $ slack uninstall  # Uninstall an app from a team
  $ slack delete     # Delete an app and app info from a team

Requirements

@zimeg zimeg added this to the Next Release milestone May 14, 2025
@zimeg zimeg self-assigned this May 14, 2025
@zimeg zimeg requested a review from a team as a code owner May 14, 2025 04:44
@zimeg zimeg added bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented 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 May 14, 2025
Copy link
Member Author

@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.

📝 One note for the observant and kind reviewers-

},
PostRunE: func(cmd *cobra.Command, args []string) error {
ctx := cmd.Context()
// DEPRECATED(semver:major): remove the "workspace" alias
Copy link
Member Author

Choose a reason for hiding this comment

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

📣 Wanting to call this change out! This matches deprecations that we might hope to search for in the next set of breaking changes.

@zimeg zimeg changed the title Zimeg fix app command examples fix: include the top level app command for unaliased sub commands link and list May 14, 2025
@zimeg zimeg changed the title fix: include the top level app command for unaliased sub commands link and list fix: include the top level app command with unaliased sub commands link and list in help pages May 14, 2025
@codecov
Copy link

codecov bot commented May 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.19%. Comparing base (29d536b) to head (eafdabb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #93      +/-   ##
==========================================
- Coverage   63.20%   63.19%   -0.01%     
==========================================
  Files         210      210              
  Lines       22194    22195       +1     
==========================================
- Hits        14028    14027       -1     
- Misses       7081     7084       +3     
+ Partials     1085     1084       -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

@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.

✅ Thanks for catching this @zimeg!

🤔 It makes me wonder if we should display the full command for the other as well: app install, app uninstall, and app delete. For someone looking at the help info for app, it'd odd to see examples that aren't "using" the app command.

@zimeg
Copy link
Member Author

zimeg commented May 15, 2025

@mwbrooks And thanks for the kind review 🙏 ✨

I was also wondering that and am so open to making that update, but was wanting to keep this PR scoped to just a fix to start. I found this confusing myself though...

FWIW the platform aliases are kept in examples:

EXAMPLE
  $ slack run                     # Run an app locally in a workspace
  $ slack deploy --team T0123456  # Deploy to a specific team
  $ slack activity -t             # Continuously poll for new activity logs

The mismatch does seem so strange here. Let me know if you're also thinking about the long form examples read best:

EXAMPLE
  $ slack app install    # Install a production app to a team
  $ slack app link       # Link an existing app to the project
  $ slack app list       # List all teams with the app installed
  $ slack app uninstall  # Uninstall an app from a team
  $ slack app delete     # Delete an app and app info from a team

I'm so open to updating just these subcommands or all other commands now too to avoid later alias breakings that could perhaps happen 👾

@mwbrooks
Copy link
Member

@zimeg I agree, we should keep this PR scoped to the app commands and merge it :shipit:

It would make sense to open a new PR that updates all commands to be consistent. I suppose that means we need to decide what standard to use. Off the top of my head, I feel the subcommand examples should be prefixed with the subcommand (e.g. slack platform run). When a global alias is available, it wouldn't hurt to also show the shorthand (e.g. slack run # Global alias). 🤔

@zimeg
Copy link
Member Author

zimeg commented May 15, 2025

@mwbrooks Wonderful ideas! I am a big fan 👾

the subcommand examples should be prefixed with the subcommand

This seems best with a somewhat scoped GLOBAL ALIASES section appearing above other sections in help, though the inclusion of list confuses me.

GLOBAL ALIASES
  delete      app   > delete
  install     app   > install
  list        auth  > list
  uninstall   app   > uninstall

For now let's merge this PR with changes to the other app subcommands 🙏 ✨

@zimeg
Copy link
Member Author

zimeg commented May 15, 2025

Edit: Oh I sent that too soon, but do let me know if repeating the global aliases is seeming ideal! We can also discuss this point more in a follow up. I took a note to follow up on this 🤖

@zimeg zimeg changed the title fix: include the top level app command with unaliased sub commands link and list in help pages fix: include the top level app command with sub commands in help page examples May 15, 2025
@zimeg zimeg merged commit 4485405 into main May 15, 2025
6 checks passed
@zimeg zimeg deleted the zimeg-fix-app-command-examples branch May 15, 2025 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug M-T: confirmed bug report. Issues are confirmed when the reproduction steps are documented 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