Skip to content

Commit

Permalink
chore(changeset): add custom commit script
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjavi committed Aug 11, 2023
1 parent bb3d34a commit b750e15
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .changeset/commits.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
function getAddMessage() {
return `docs(changeset): add new entries`
}

function getVersionMessage(releasePlan) {
const releasePlanTxt = String(releasePlan)
const parts = releasePlanTxt.split('@')
const versionParts = parts[parts.length - 1].split('\n')
const version = versionParts[0] ?? 'new version'
return `chore: release v${version}`
}

export { getAddMessage, getVersionMessage }
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "itsjavi/storylite", "summary": "" }],
"commit": true,
"commit": "./commits.js",
"fixed": [],
"linked": [],
"access": "public",
Expand Down

0 comments on commit b750e15

Please sign in to comment.