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
--changelog-include-commits-client-login
doesn't work with independent mode
#310
Comments
it works flawlessly with my repos, the only possible reason that this might not work would be that it doesn't pull the correct date of the last release (it might also be affected by the branch you are in) OR that your local branch is not in sync with The reason I use the date is mostly because the GitHub API has a limit of max 100 results per query. The method which tries to find the last release date is the following (perhaps I should add from that date, it will then run the GraphQL query from the GitHub API (which you can try yourself with the GitHub GraphQL Explorer) Also note that it is relying a lot on the last release date, if you happen to do a pre-release and then the same day do a master release, then it won't find anything because the last date found would be the pre-release date. There isn't much I can do about that part, unless I add an extra option to manually provide the date to query from (but it has to follow the git timestamp format for it to work in the graphql query) |
I tried it on |
please follow the instruction I gave you to troubleshoot it, I can't help without them executed first basically run this git command to find out what is the last release date it found and then run the GrahpQL query git log {lastTagName}..HEAD --format="%h %aI" --reverse hmm actually this last tag name might be the problem since I know you use the independent tag and I'm not, it probably won't find the correct date in that case |
I have a monorepo with two different tag formats. Do you remember my PR #222 Maybe your forgot to add this here as well?
Yes, https://github.com/wundergraph/wundergraph/blob/main/lerna.json
|
from the reverse list, it will only use the top most date (first one), you then take that date (without the left hash) and you put it into the GitHub GraphQL query that is shown on top. but again I think the issue is probably because you're using independent versions and I'm not and in that case how to pull the date, I'm also not sure what is the tag name used in this case for that git command. It looks like I forgot to add any kind of log about the date found, I'll take a look at adding that latest tonight or tomorrow and possibly a new option to provide a manual date, the git command to find last tag is executed from the git describe --always --long --dirty --first-parent I'm really not sure what would be the result when using |
returns the wrong tag |
so if you know what git command to execute to get the last release date from the last git tag then please propose suggestion. The only thing it really does is to find the last release date, perhaps finding the last git tag to then find the last release date is too cumbersome. It was working fine with fixed versions, but I'm not sure this is really the best thing to do in I could add some of these options, but I would rather not add too many options for no big reason
|
I will take a deeper look and let you know. |
If you want to take a look, all the code I added for this feature were added into these 2 new files
which is then used in the update-changelog.ts Perhaps another thing I could do would be to add a prompt to ask the user (you) which tag to start querying from, but that would require a lot more code I guess. I would prefer to go without it if possible but that could be a last resource option |
oh by looking at the code you referenced, I think I found the way to fix this as you highlighted, a few lines below it does add So I guess this code change would probably work const describeOptions: DescribeRefOptions = { ...execOpts };
+ if (isIndependent) {
+ describeOptions.match = tagPattern;
+ }
const { lastTagName } = describeRefSync(describeOptions, includeMergedTags); however the Would you like to submit a PR? |
--changelog-include-commits-client-login
doesn't work with independent mode
closed by PR #311 @StarpTech |
Thank you! |
Hi, @ghiscoding I found the issue. With the latest version it works but |
oh you mean it's not treated as a proper boolean, I'll have to take a look then, I also use it with a template so I might have missed that. I'll reopen the issue then, it should be a quick fix if it's just a boolean problem |
Exactly |
Describe the bug
Hello,
I try
and it generate this
same as without the flag
Expectation
Should add the authors to the changelog as described in https://github.com/ghiscoding/lerna-lite/tree/main/packages/version#--changelog-include-commits-client-login-msg
Reproduction
See above.
Lerna config and logs
lerna.json
<!-- Please paste your `lerna.json` here -->
lerna-debug.log
Environment Info
Used Package Manager
pnpm
Validations
The text was updated successfully, but these errors were encountered: