1.2.0 • Published 4 years ago

chglog-cli v1.2.0

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

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
);