Skip to content

feat: deprecate the "branch" and "template" flag for the samples command - #193

Merged
zimeg merged 5 commits into
mainfrom
zimeg-feat-samples-create-flag-deprecation
Sep 19, 2025
Merged

feat: deprecate the "branch" and "template" flag for the samples command#193
zimeg merged 5 commits into
mainfrom
zimeg-feat-samples-create-flag-deprecation

Conversation

@zimeg

Copy link
Copy Markdown
Member

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

@zimegzimeg added this to the Next Release milestone Aug 13, 2025
@zimegzimeg self-assigned this Aug 13, 2025
@zimeg
zimeg requested a review from a team as a code ownerAugust 13, 2025 08:45
@zimegzimeg 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

codecovBot commented Aug 13, 2025

Copy link
Copy Markdown

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 linesPatch %Lines
cmd/project/samples.go70.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.

@mwbrooksmwbrooks left a comment

Copy link
Copy Markdown
Member

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. 👌🏻

Comment threadcmd/project/samples.go Outdated
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
Copy Markdown
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
Copy Markdown
MemberAuthor

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
Copy Markdown
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.

@zimegzimeg modified the milestones: v3.6.1, Next ReleaseAug 22, 2025
@zimegzimeg modified the milestones: v3.7.0, Next ReleaseSep 5, 2025
Base automatically changed from zimeg-feat-samples-list to mainSeptember 19, 2025 21:59
zimegand others added 2 commits September 19, 2025 15:02
@zimeg

Copy link
Copy Markdown
MemberAuthor

@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 mainSep 19, 2025
6 checks passed
@zimeg
zimeg deleted the zimeg-feat-samples-create-flag-deprecation branch September 19, 2025 22:18
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelogUse on updates to be included in the release notescode healthM-T: Test improvements and anything that improves code healthenhancementM-T: A feature request for new functionalitysemver:patchUse on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@zimeg@mwbrooks