mirror of
https://github.com/garronej/ts-ci.git
synced 2025-11-30 21:43:05 +00:00
22 lines
553 B
TypeScript
22 lines
553 B
TypeScript
|
|
|
||
|
|
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));
|
||
|
|
|
||
|
|
})();
|