git-changelog-gradle-plugin
git-changelog-gradle-plugin copied to clipboard
fromCommit doesn't works
This is the piece of code that doesn't work:
tasks.register('makeChangelog', GitChangelogTask) {
fromRepo = projectDir.absolutePath.toString()
file = file('CHANGELOG.md')
fromCommit = '5062fd494493e12b6419d2af2fa3a73ff5119ece'
toRef = 'HEAD'
templateContent = file('changelog.mustache').text
untaggedName = 'Next release'
}
It produces this error: https://github.com/railcraft-reborn/railcraft/actions/runs/5835400872/job/15826896012#step:6:41 While if I use the date it works and doesn't cause any problems:
tasks.register('makeChangelog', GitChangelogTask) {
fromRepo = projectDir.absolutePath.toString()
file = file('CHANGELOG.md')
ignoreCommitsOlderThan = LocalDate.of(2023, 8, 10).toDate()
templateContent = file('changelog.mustache').text
untaggedName = 'Next release'
}
Are you sure it clones deep enough to get this commit?
I see the clone command: /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin +7b01415eddb3dec0462ecfdd835cbe1f2ec3d25b:refs/remotes/origin/test-changelog
It has depth 1. But also looks like it is downloading a lot of commits...
I can have a closer look later.
Thanks, because I really don't know where to look anymore
I tried putting fetch-depth: '0', and that works