• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

conventional-changelog / conventional-changelog / 27972458333

22 Jun 2026 05:45PM UTC coverage: 84.939% (+4.0%) from 80.969%
27972458333

push

github

web-flow
chore: legacy changelog presets were removed (#1475)

666 of 877 branches covered (75.94%)

1049 of 1235 relevant lines covered (84.94%)

82362.21 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.12
/tools/commit.ts
1
function fixMessage(message?: string) {
2
  let msg = message
524✔
3

4
  if (!msg || typeof msg !== 'string') {
524✔
5
    msg = 'Test commit'
36✔
6
  }
7

8
  // we need to escape backtick for bash but not for windows
9
  // probably this should be done in git-dummy-commit or shelljs
10
  if (process.platform !== 'win32') {
524✔
11
    msg = msg.replace(/`/g, '\\`')
262✔
12
  }
13

14
  return `"${msg}"`
524✔
15
}
16

17
export function formatMessageArgs(msg: string | string[]) {
18
  const args = []
422✔
19

20
  if (Array.isArray(msg)) {
422✔
21
    if (msg.length > 0) {
138!
22
      for (const m of msg) {
138✔
23
        args.push('-m', fixMessage(m))
240✔
24
      }
25
    } else {
26
      args.push('-m', fixMessage())
×
27
    }
28
  } else {
29
    args.push('-m', fixMessage(msg))
284✔
30
  }
31

32
  return args
422✔
33
}
34

35
const commitTypes = [
34✔
36
  'chore',
37
  'test',
38
  'ci',
39
  'feat',
40
  'refactor',
41
  'style',
42
  'docs'
43
]
44

45
export function createRandomCommitMessage(index: number) {
46
  const type = commitTypes[Math.round(Math.random() * (commitTypes.length - 1))]
80✔
47

48
  return `${type}: commit message for ${type} #${index}`
80✔
49
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc