MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / listCommits

Function listCommits

scripts/release-helper.mjs:28–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26}
27
28function listCommits() {
29 const thisTag = exec('git describe --abbrev=0 --tags');
30 const prevTag = exec(`git describe --abbrev=0 --tags "${thisTag}^"`);
31 const tagRange = `${prevTag}...${thisTag}`;
32 const list = exec(`git log --oneline --skip=1 --reverse "${tagRange}"`)
33 .replace(/</g, '\\<')
34 .split('\n')
35 .map((str, i) => `${str.split(/\s/, 2)[1]}${10000 + i}\n* ${str}`)
36 .sort()
37 .map((str) => str.split('\n')[1])
38 .join('\n');
39 return `${prevTag}:\n${list}\n\nCommit log: ${
40 process.env.GITHUB_SERVER_URL || 'https://github.com'
41 }/${
42 process.env.GITHUB_REPOSITORY || 'violentmonkey/violentmonkey'
43 }/compare/${tagRange}`;
44}
45
46function getReleaseNote() {
47 return `${

Callers 1

getReleaseNoteFunction · 0.85

Calls 2

execFunction · 0.90
mapMethod · 0.80

Tested by

no test coverage detected