You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--notes-from-tag should warn if the tag is not annotated #9558
$ git tag --list v0.0.3 --format='%(contents)'
* Added `com.gradleup.gratatouille` for `buildSrc` and other use cases where classloader isolation isn't required.
* Expose the normalized path in `GInputFiles`
This is the expected changelog.
But when creating the release from CI (here), the release notes are the contents of the commit:
Might want to check the behavior of actions/checkout, actually. I remember a while ago I was having issues with actions/checkout not including my tags in the checkout, and I ended up doing this:
I just played around with this. actions/checkout does this command: git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +ff7e2f589fe52277099dddff1fc2a5400105b47d:refs/tags/v0.0.4. Note the --no-tags flag. I ran this locally, and it did clone the tag, but it was not annotated. I ran git tag --list TAG_NAME --format='%(contents)' and it returned the commit message. It's strange behavior, but it looks like explicitly fetching the tag and passing --no-tags causes the tag to be fetched without annotations. I can't say I've experimented enough to know this for sure, but I'm pretty confident. But I did then call git tag -d v0.0.4; git fetch to force the tag to be re-fetched. Then I called git tag --list TAG_NAME --format='%(contents)' again, and it did print the tag's annotated message.
So I think what the CLI is missing, if anything, is a way to report that the tag it's referencing is not annotated, and it's using the commit message instead. But with a "normal" clone, it should work as expected.
FWIW, there's some discussion and people with the same issue in actions/checkout#1467.
So I think what the CLI is missing, if anything, is a way to report that the tag it's referencing is not annotated, and it's using the commit message instead.
changed the title [-]`--notes-from-tag` uses commit message instead of tag message[/-][+]`--notes-from-tag` should warn if the tag is not annotated[/+]on Sep 4, 2024
Activity
Goooler commentedon Sep 3, 2024
Seems there are various bugs on different devices,
--titleoption passed.You can repro and view all these cases at Goooler/keep-a-changelog#1.
Goooler commentedon Sep 3, 2024
I would prefer
--notes-fileover--notes-from-tag, guys who have been blocked by issues related to this could try the workaround like https://github.com/GradleUp/shadow/blob/ae72788e9475da71cb3874239723eb91839f9ba5/.github/workflows/release.yml#L40-L49martinbonnin commentedon Sep 3, 2024
--notes-fileor just plain--noteswork for me. It's a tiny bit more work but largely doable.--notes-from-tagas it stands is pretty much misleading. I would vote to either fix it (by using the tag message) or just remove it.spenserblack commentedon Sep 3, 2024
What's the output for
git tag --list TAG_NAME --format='%(contents)'and is that the expected release notes?
martinbonnin commentedon Sep 3, 2024
Using https://github.com/GradleUp/gratatouille/tree/v0.0.3:
This is the expected changelog.
But when creating the release from CI (here), the release notes are the contents of the commit:
What am I missing?
spenserblack commentedon Sep 3, 2024
Might want to check the behavior of
actions/checkout, actually. I remember a while ago I was having issues withactions/checkoutnot including my tags in the checkout, and I ended up doing this:spenserblack commentedon Sep 3, 2024
I just played around with this.
actions/checkoutdoes this command:git -c protocol.version=2 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +ff7e2f589fe52277099dddff1fc2a5400105b47d:refs/tags/v0.0.4. Note the--no-tagsflag. I ran this locally, and it did clone the tag, but it was not annotated. I rangit tag --list TAG_NAME --format='%(contents)'and it returned the commit message. It's strange behavior, but it looks like explicitly fetching the tag and passing--no-tagscauses the tag to be fetched without annotations. I can't say I've experimented enough to know this for sure, but I'm pretty confident. But I did then callgit tag -d v0.0.4; git fetchto force the tag to be re-fetched. Then I calledgit tag --list TAG_NAME --format='%(contents)'again, and it did print the tag's annotated message.So I think what the CLI is missing, if anything, is a way to report that the tag it's referencing is not annotated, and it's using the commit message instead. But with a "normal" clone, it should work as expected.
Goooler commentedon Sep 4, 2024
martinbonnin commentedon Sep 4, 2024
Thanks @spenserblack, this is it indeed. Your workaround works for me:
FWIW, there's some discussion and people with the same issue in actions/checkout#1467.
+1. That would be very welcome.
Goooler commentedon Sep 4, 2024
This workaround works for me. The new issue should be
See https://github.com/Goooler/keep-a-changelog/releases/tag/v1.1.7
[-]`--notes-from-tag` uses commit message instead of tag message[/-][+]`--notes-from-tag` should warn if the tag is not annotated[/+]martinbonnin commentedon Sep 4, 2024
@Goooler what would you like the title to be instead? The name of the tag? Something else?
I've updated the title of this issue to be about warning if the tag is not annotated. Can you add a separate one for the title?
Goooler commentedon Sep 4, 2024
I filed a new one to #9563.