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

Handle monorepos #158

Open
frinyvonnick opened this issue Jan 2, 2020 · 7 comments
Open

Handle monorepos #158

frinyvonnick opened this issue Jan 2, 2020 · 7 comments
Labels
enhancement New feature or request question Further information is requested

Comments

@frinyvonnick
Copy link
Owner

frinyvonnick commented Jan 2, 2020

gitmoji-changelog should handle monorepo. Currently we use tags to get a list of versions and commits for those. A monorepo can have multiple packages having independent versions. We need to find a solution so gitmoji-changelog can be called in a package folder and generate a changelog for this particular package that is correct.

Problems:

  • Having multiple tags and get only those related to a package
  • Get commits that affected a particular folder

There was a discussion on the subject in issue #157

@frinyvonnick frinyvonnick added the enhancement New feature or request label Jan 2, 2020
@frinyvonnick frinyvonnick added the question Further information is requested label Jan 2, 2020
@frinyvonnick
Copy link
Owner Author

Quick search: semantic-release-monorepo sounds to have good propositions on the subject.

@jpggvilaca
Copy link

Any updates on this? Would it be nice to have a changelog for a single package within a monorepo. Any ideas? or other packages that might do this already?

@thlmenezes
Copy link

Any updates here? About getting commits from a specific folder, there could be some investigation on other tools like standard-version

>>> npx standard-version --help | grep path
    --path  Only populate commits made under this path  [string]

Could not find any doc around the inner workings of this param in a few minutes of research, will edit comment if I do.

But my educated guess would be the usage of git log with the path parameter

>>> git log -- apps/app
# show only commits related to apps/app path

@frinyvonnick
Copy link
Owner Author

I don't have time to work on this right now but if someone is interested in contributing I could give some help 😄

@thlmenezes
Copy link

My other educated guess, by my quick read through the codebase, is that the responsible for selecting the commits to the changelog is getCommits method from packages/gitmoji-changelog-core/src/fromGitFile.js.

I saw that you use git-raw-commits to fetch commits, and they have an option path

I can see a light at the end

@thlmenezes
Copy link

thlmenezes commented Mar 1, 2022

I don't have time to work on this right now but if someone is interested in contributing I could give some help smile

Thanks for the quick reply, I don't know about the first problem, but I think I can help with the paths; will create a fork and work over the weekend.

Love the work btw, really organized code, and happy to contribute.

@thlmenezes
Copy link

@frinyvonnick The only thing I'd like to ask right away is if you have any ideia on writing the test case for this scenario, saw packages/gitmoji-changelog-core/src/index.spec.js, and I believe the path is inside the commit hash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants