Skip to content

Conversation

@mwbrooks
Copy link
Member

@mwbrooks mwbrooks commented May 21, 2025

CHANGELOG

Fixes a bug when creating a project using a git repo template. If the template includes .git inside of the URL, then the template will fail to be cloned. For example, slack create --template https://github.com/slack-samples/example.git.project.git.

Summary

This pull request is a follow-up of #99 (comment) that fixes a bug when creating a project from a git repo template. If the repo name included .git inside of the name (and, optionally as the extension), then both .git references would be removed from the URL.

h/t @zimeg for noticing this bug! 🐛

Requirements

@mwbrooks mwbrooks added this to the Next Release milestone May 21, 2025
@mwbrooks mwbrooks self-assigned this May 21, 2025
@mwbrooks mwbrooks added 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 semver:patch Use on pull requests to describe the release version increment labels May 21, 2025
@codecov
Copy link

codecov bot commented May 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.44%. Comparing base (4406cb0) to head (80d16c1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #103   +/-   ##
=======================================
  Coverage   63.44%   63.44%           
=======================================
  Files         212      212           
  Lines       22308    22308           
=======================================
+ Hits        14153    14154    +1     
- Misses       7067     7068    +1     
+ Partials     1088     1086    -2     

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

@mwbrooks mwbrooks marked this pull request as ready for review May 27, 2025 03:58
@mwbrooks mwbrooks requested a review from a team as a code owner May 27, 2025 03:58
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 Such a clean change - great call saving this for a follow up with tests! 🙏 ✨

I left rambling thoughts on how this might snag an edge later, but we can explore this more if an issue appears perhaps 🔍

},
},
"Returns the zip URL with .git suffix removed": {
templateURL: "https://github.com/slack-samples/deno-starter-template.git",
Copy link
Member

Choose a reason for hiding this comment

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

📣 This IMO is the case we ought consider as "correct" for the --template flag since it appears on the "HTTPS" tab of the Code dropdown from the sample page:

🔗 https://github.com/slack-samples/deno-starter-template
📺 https://github.com/slack-samples/deno-starter-template.git

FWIW we do not use the .git prefix in sample names but might recommend using the entire URL ending with .git if this is encountered later... Or recommend changing the sample name altogether, though I understand this can cause hassle 😉

@mwbrooks
Copy link
Member Author

Thanks for the review and thoughts @zimeg! I'm glad we now have a public issue tracker, so hopefully we'll catch any other edge cases and start to make recommendations for template names! 🔠

@mwbrooks mwbrooks merged commit debfc8c into main May 28, 2025
6 checks passed
@mwbrooks mwbrooks deleted the mwbrooks-zip-file-trim branch May 28, 2025 03:13
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 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