-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
How to scope changelog to directory #136
Comments
Unfortunately the script doesn't pull any data about specific files changed in each commit. This would be an awesome (and useful) feature, but would require a pretty huge change to implement (and would take much longer to generate changelogs). |
Since git log can filter commit messages by path, I’m not sure why this would be particularly difficult or slow. |
Good point @ljharb. You could get there with |
Yeah wouldn't that be synonymous to trying to create a log with no diff? In other words, wouldnt this be the case now? Even without this change? |
I suppose a solution could be to fetch both the original list of commits (to gather the version commits) and the commits filtered by path, then filter out any commit from the original list that isn't a version commit or part of the filtered list. If there is a big demand for this I can take a look, but I think my original comment still holds true – it's a fairly unpleasant change to the simplicity of the current logic. |
Yup, adding a new feature will always make a codebase a little more complex. How are you evaluating whether there is a "big demand"? Most people use this package indirectly as a transitive dependency and never really need to come directly to this repo so I'm unsure of how they'd find this issue to vote on it. In fact, I had to do quite a bit of sleuthing to find this repo myself haha. At any rate, if this feature is added, it would be the first library that makes it easy to create release notes for monorepos (repos that ship multiple packages). AFAIK, there is no other releaes management library that does it--not even lerna, release-it, or semantic-release, which are some of the most popular release libs out there. |
Here are a few issues that I found that show there is some interest in a feature to establish changelogs per directory/package in a repo: release-it/release-it#516 Let me know your thoughts. |
Not sure if this was sarcastic or not.. I'm aware that features add complexity. My issue is whether the amount of added work and complexity justifies the benefit of having the feature, without knowing how many people would actually use it in practice.
What libraries are most people using that use
This certainly does make it seem worth investigating. I have a feeling the refactor coming in |
Didn't mean to come off sarcastic. Apologies.
Did you have any ideas on how we could gauge interest in this feature so that the benefit is justified?
Sorry, yes they install it directly but use it as a third-party tool that integrates with another tool. See release-it/release-it#545 for an example of how this package is used with release-it. If #142 (comment) solves this issue, that would be great! 👍 |
I've just published |
@cookpete Basically, I've got a new monorepo, with two packages, and nothing's published. I'm trying to publish the first one (so there's no tags at all on the repo yet). My typical approach is these scripts: "scripts": {
"preversion": "auto-changelog",
"version": "auto-changelog && git add CHANGELOG.md",
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
},
"auto-changelog": {
"output": "CHANGELOG.md",
"template": "keepachangelog",
"unreleased": false,
"commitLimit": false,
"backfillLimit": false
} which usually (in 200+ of my single-repo packages) ensures I end up with a tagged commit that includes both the version bump and the changelog. However, in this case, when I run |
@ljharb looks like you're missing |
@mkay581 has gone dark it seems, but I'm hoping scoping to a directory is now possible in |
Oh, I'm no longer using the package. Things have been quite busy for me lately and not sure of when I can get to it. Can it be tested without me? |
Of course. No problem. Just good to know if it works in the wild! |
Hello, love this package! Forgive me if this is already been covered (and I somehow missed it) 🤗 But is it possible to only generate a changelog for the files in a particular directory other than the root? We have a repo that contains multiple directories that each need their own release notes generated.
The text was updated successfully, but these errors were encountered: