MCPcopy Create free account
hub / github.com/Silentely/eSIM-Tools / getFirstMeaningfulLine

Function getFirstMeaningfulLine

scripts/prepare-commit-msg.js:13–23  ·  view source on GitHub ↗
(content)

Source from the content-addressed store, hash-verified

11const SKIP_SOURCES = new Set(['merge', 'squash', 'commit']);
12
13function getFirstMeaningfulLine(content) {
14 const lines = content.split(/\r?\n/);
15 for (const line of lines) {
16 const trimmed = line.trim();
17 if (!trimmed || trimmed.startsWith('#')) {
18 continue;
19 }
20 return trimmed;
21 }
22 return '';
23}
24
25function main() {
26 const messageFilePath = process.argv[2];

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected