1.2.0 • Published 4 years ago
chglog v1.2.0
Crawling pull-request with commit message and commit hash
Installation
yarn add chglog
Usage
Define a visitor
export interface Visitor {
visitLabel(label: Label, source: PullRequest): void;
visitAuthor(author: User, source: PullRequest): void;
}
const createSampleVistor = () => {
return {
visitLabel(label: Label, source: PullRequest) {
...
},
visitAuthor(author: User, source: PullRequest) {
...
},
};
Fetch and parse
const visitor = createSampleVistor();
await fetchData(
{
rightRef: '',
leftRef: '',
githubToken: '',
repoOwner: '',
repoName: '',
workingDirectory: ''
},
visitor
);