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

Release PR created with empty changelog in the description #1549

Open
Aetf opened this issue Jul 11, 2024 · 5 comments · Fixed by #1561
Open

Release PR created with empty changelog in the description #1549

Aetf opened this issue Jul 11, 2024 · 5 comments · Fixed by #1561
Labels
bug Something isn't working

Comments

@Aetf
Copy link

Aetf commented Jul 11, 2024

Bug description

shell-pool/shpool#84

We have single changelog setup following https://release-plz.ieni.dev/docs/extra/single-changelog#all-packages.

Changelog is updated correctly in the file, but the PR description contains empty changelog.

From the GitHub Action log, it seems the release subcommand is still looking for changelog at default paths.

https://github.com/shell-pool/shpool/actions/runs/9879319364/job/27298313574

image

  • Would you like to work on a fix? [n]

To Reproduce

Steps to reproduce the behavior:

  1. Setup single changelog for a cargo workspace as in https://github.com/shell-pool/shpool/blob/master/release-plz.toml
  2. Wait for the release PR to be created

Expected behavior

Changelog is populated in PR description

Environment

Additional context

@Aetf Aetf added the bug Something isn't working label Jul 11, 2024
@MarcoIeni
Copy link
Owner

This is a bug, yes, thanks for opening it.
However, even if I fix, I'm not sure release-plz will be able to parse your changelog file as it is.

We use the parse_changelog library to parse the latest release from the changelog.

In theory release-plz could read the template we pass to git-cliff for changelog generation, and parse the release itself. PR welcome for this! But first let's fix this issue 👍
I'll try to look into this soon.

@Aetf
Copy link
Author

Aetf commented Jul 12, 2024

Thanks for taking a look! It's a bit inconvenient for us to have to do a few extra clicks to see the changelog, but we can live with that for now.

I would love to do a PR, however this will likely just sit in my already large pile of things I wish to do but not doing :P

@MarcoIeni
Copy link
Owner

I addressed the bugs reported in #1561 and #1563 👍
I also opened #1564 to address the feature request I wrote in my previous comment.

Regarding the PR description, I think here we can fallback to create a list of changes if we can't parse the changelog, but I'm not sure if it makes sense, because it's not the changelog :/
What do you think?

@Aetf
Copy link
Author

Aetf commented Jul 15, 2024

I think for me the most important information I wanted to get from the PR description is: did release-plz recognize all my commits right? I.e. are there any commits going to the wrong section because it doesn't have a correct message line, and thus requires manual fixing in the changelog?

Since release-plz acts based on different commit types, this gives me a good overview of how does release-plz see the world, and would help me debug if anything went wrong.

I can always check the changelog in the files which is the source of truth anyway. So I'm less concerned about whether the PR description can be a true representation of the changelog or not.

@MarcoIeni
Copy link
Owner

Ok, here's the solution in case anyone wants to fix this:

  • here return two things as a struct: the entire changelog (as we already do) and the body of the new release (you should be able to obtain this by running new_changelog.generate() and disabling header and footer.
  • add the body of the new release to the UpdateResult struct
  • use this new field here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants