ts-ci/src/tools/test/octokit-addons/getChangeLog.ts

22 lines
553 B
TypeScript
Raw Normal View History

import { getCommitAheadFactory } from "../../octokit-addons/getCommitAhead";
import { Octokit } from "@octokit/rest";
(async ()=>{
const octokit = new Octokit();
const { getCommitAhead } = getCommitAheadFactory({ octokit });
const { commits } = await getCommitAhead({
"owner": "garronej",
"repo": "test-repo",
"branchBehind": "garronej-patch-1",
"branchAhead": "master"
});
const messages = commits.map(({ commit })=> commit.message );
console.log(JSON.stringify(messages, null, 2));
})();