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

28 lines
608 B
TypeScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { getCommitAsyncIterableFactory } from "../../octokit-addons/getCommitAsyncIterable";
import { createOctokit } from "../../createOctokit";
(async function () {
const octokit = createOctokit({ "github_token": "" });
const { getCommitAsyncIterable } = getCommitAsyncIterableFactory({ octokit });
const commitAsyncIterable = getCommitAsyncIterable({
"owner": "garronej",
"repo": "test-repo",
"branch": "master"
});
for await (const commit of commitAsyncIterable) {
console.log(commit.commit.message);
}
console.log("done");
})();