Thinkmill / keystatic

First class CMS experience, TypeScript API, Markdown & YAML/JSON based, no DB
https://keystatic.com
MIT License
1.14k stars 75 forks source link

allow customizing commit messages #1033

Open stefanprobst opened 5 months ago

stefanprobst commented 5 months ago

when using github storage mode, it would be great to be able to customize the commit messages.

i think these are currently set here and here.

stefanprobst commented 5 months ago

would you accept a pr to support an additional storage config option?

{
  kind: "github",
  repo: { owner: "stefanprobst", name: "keystatic-test" },
  commitMessages: {
    update({ path }) {
      return `content: update ${path}`
    },
    delete({ path }) {
      return `content: delete ${path}`
    },
  }
}

see https://github.com/stefanprobst/keystatic/commit/23e2f75ede7097c683b89c7a7fed86372b488361

ducan-ne commented 5 months ago

+1 for this, I want to skip add prefix "[CI Skip]" to skipping CI build, unnecessary build About api. I only need something like this

{
  kind: "github",
  repo: { owner: "stefanprobst", name: "keystatic-test" },
  commitMessageTemplate: '[CI Skip] Update {{path}}'
}