Skip to content

Instantly share code, notes, and snippets.

@kslr
Created January 1, 2021 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kslr/ceb836f48ec4cdc268fb1e60afa4a22f to your computer and use it in GitHub Desktop.
Save kslr/ceb836f48ec4cdc268fb1e60afa4a22f to your computer and use it in GitHub Desktop.
const child = require('child_process');
const latestTag = child.execSync('git describe --tags --long').toString('utf-8').split('-')[0];
const logs = child.execSync(`git log ${latestTag}..HEAD --oneline --decorate`).toString("utf-8");
logs.split("\n")
.map(commit => {
let sha = commit.substring(0, 8)
let message = commit.substring(8).trim()
console.info(`* ${message} ([${sha}](https://github.com/v2fly/v2ray-core/commit/${sha}))`)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment