Skip to content

Commit

Permalink
test: --only-templates (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aslemammad committed Aug 19, 2024
1 parent 9c74c2d commit b754315
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions packages/backend/server/utils/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,10 @@ ${packageManager} ${packageCommands[packageManager]} ${refUrl}

const templatesStr = generateTemplatesStr(templates);

if(onlyTemplates) {
return templatesStr
}

return `
_commit: <a href="${checkRunUrl}"><code>${abbreviateCommitHash(workflowData.sha)}</code></a>_
${refMessages}
${!onlyTemplates ? refMessages : ""}
${templatesStr}
`;
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const main = defineCommand({
description: `"off" for no comments (silent mode). "create" for comment on each publish. "update" for one comment across the pull request with edits on each publish (default)`,
default: "update",
},
onlyTemplates: {
"only-templates": {
type: "boolean",
description: `generate only stackblitz templates`,
default: false,
Expand All @@ -88,7 +88,7 @@ const main = defineCommand({
const isCompact = !!args.compact;
const isPnpm = !!args.pnpm;
const isPeerDepsEnabled = !!args.peerDeps
const isOnlyTemplates = !!args.onlyTemplates
const isOnlyTemplates = !!args['only-templates']

const comment: Comment = args.comment as Comment;

Expand Down
2 changes: 1 addition & 1 deletion packages/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ export function isPullRequest(ref: string) {
}

export type Comment = "off" | "create" | "update";
export type PackageManager = "npm" | "pnpm" | "yarn";
export type PackageManager = "npm" | "pnpm" | "yarn" | "bun";

0 comments on commit b754315

Please sign in to comment.