Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ make core independent from the git client. #171

Merged
merged 2 commits into from
Jan 21, 2020

Conversation

bpetetot
Copy link
Collaborator

@bpetetot bpetetot commented Jan 14, 2020

In order to use gitmoji-changlelog with other git clients (like a http client or other), we need to extract the dependency with the current git client (reading .git on the filesystem).

Here is a naive refactoring extracting all calls done by the current git client.

First step for #168

You can now call the core with:

generateChangelog(from, to, { client: myGitClient }) 

The client myGitClient must have 2 functions:

getTags() : Promise([string])
getCommits(fromTag: string, toTag: string) : Promise([{ hash, author, date, subject, body }])

@bpetetot bpetetot self-assigned this Jan 14, 2020
@bpetetot bpetetot force-pushed the refactor/git-client-independant branch from e445ede to 386097a Compare January 14, 2020 16:01
@frinyvonnick frinyvonnick merged commit 4094bb9 into master Jan 21, 2020
@frinyvonnick frinyvonnick deleted the refactor/git-client-independant branch January 21, 2020 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants