Skip to content

Conversation

@zimeg
Copy link
Member

@zimeg zimeg commented Aug 13, 2025

Changelog

We've deprecated the --branch and --template flag for the slack samples command. If those were used prior, we recommend using the slack create command with these options.

Summary

This PR deprecates the the --branch and --template flags of the slack samples command.

Preview

$ slack samples -t slack-samples/bolt-js-getting-started-app
Check /Users/eden.zimbelman/.slack/logs/slack-debug-20250813.log for error logs

⚠️  DEPRECATED: The '--branch' and '--template' flags are deprecated for the 'samples' command; use the 'create' command instead

📂 Created a new Slack project
   Cloning template slack-samples/bolt-js-getting-started-app
   To path ~/programming/tools/slack-cli/optimistic-orca-30

...

Reviewers

Confirm the samples command continues to work as expected:

$ slack samples --list --language node
$ slack samples my-app

Requirements

@zimeg zimeg added this to the Next Release milestone Aug 13, 2025
@zimeg zimeg self-assigned this Aug 13, 2025
@zimeg zimeg requested a review from a team as a code owner August 13, 2025 08:45
@zimeg zimeg added enhancement M-T: A feature request for new functionality changelog Use on updates to be included in the release notes code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment labels Aug 13, 2025
@codecov
Copy link

codecov bot commented Aug 13, 2025

Codecov Report

❌ Patch coverage is 70.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.98%. Comparing base (1d23e94) to head (fbdd02e).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
cmd/project/samples.go 70.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #193      +/-   ##
==========================================
- Coverage   63.00%   62.98%   -0.03%     
==========================================
  Files         212      212              
  Lines       21848    21857       +9     
==========================================
  Hits        13766    13766              
- Misses       7018     7022       +4     
- Partials     1064     1069       +5     

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

✅ Looks good to me and thanks for adding the (semver:major) comments and deprecation warning!

📝 I left a small suggestion and question. FWIW I'm in favour of deprecated both of these flags to simplify the code and command usage. 👌🏻

cmd.Flags().StringVarP(&samplesTemplateURLFlag, "template", "t", "", "template URL for your app")
// DEPRECATED(semver:major): Prefer the create command when repository details are known
cmd.Flags().StringVarP(&samplesGitBranchFlag, "branch", "b", "", "name of git branch to checkout")
cmd.Flag("branch").Hidden = true
Copy link
Member

Choose a reason for hiding this comment

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

thought: FWIW I think --branch has a legit use-case with the slack samples command. However, I get the idea that slack samples is meant to discover the available templates and isn't meant to target advanced use-cases. The slack create command is designed to handle the general-purpose and advanced ones.

Copy link
Member Author

Choose a reason for hiding this comment

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

@mwbrooks Thanks for sharing this - I was thinking the same to recommend the create command when creating a specific branch.

I'm wondering if we can revisit this in following change to show samples that have an existing branch when this flag is provided to avoid errors during a git clone?

Will be thinking about this and related docs! 📚

Copy link
Member

Choose a reason for hiding this comment

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

Sounds good! All in all, I'm in favour of a simpler samples command and leaving the advanced usage to create.

@zimeg zimeg modified the milestones: v3.6.1, Next Release Aug 22, 2025
@zimeg zimeg modified the milestones: v3.7.0, Next Release Sep 5, 2025
Base automatically changed from zimeg-feat-samples-list to main September 19, 2025 21:59
zimeg and others added 2 commits September 19, 2025 15:02
@zimeg
Copy link
Member Author

zimeg commented Sep 19, 2025

@mwbrooks The review and suggestion is appreciated as always!

I'm hoping we can move to more opinionated options with these flags and commands with the next major set of changes but for now let's deprecate 🪓

@zimeg zimeg merged commit dd44ec5 into main Sep 19, 2025
6 checks passed
@zimeg zimeg deleted the zimeg-feat-samples-create-flag-deprecation branch September 19, 2025 22:18
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 code health M-T: Test improvements and anything that improves code health enhancement M-T: A feature request for new functionality 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