New lines in commits not feeding through into release notes

Hi there!

I am pushing packages into Octopus (Cloud) from Azure and I am including metadata about commits. Unfortunately, if our commit messages have new lines in them, everything after the first new line seems to get dropped off in the release notes.

Here is the commit as it’s been pushed in to the package (so looks good):

But here is the release notes:

The release notes are generated using this template:
#{each package in Octopus.Release.Package}
#{each commit in package.Commits}

  • #{commit.Comment}
    #{/each}
    #{/each}

Do I need to somehow escape the commit.Comment?

Thanks!

Hi Bron,

Thanks for getting in touch! Everything I can see here looks alright. Would you be willing to send through a full raw commit comment that’s causing this so I can repro locally, and see if I can find a way around this? I’m assuming you’re using /n for the newline?

I look forward to hearing back!

Best regards,

Kenny

Hi Kenny,

Sure I can, but where do you mean that you want me to send it from? Does this help? this is the actual commit as I have created - it’s just what i showed in the screenshot above, though, so maybe that’s not what you mean.

YOULI-5251 bulk edit now uses the optimised query function to get all the invitees, reduce number of invitees queried at a time in optimised function down from 100 to 50, increase database conetxt timeout to 3 minutes
YOULI-5254 Change export filename
YOULI-5255 Exclude price, paid, owing for invited people

I’m on Windows personally, but not 100% sure about whether Azure would be feeding a \n or a \r\n to Octopus?

Cheers,
Bron

Hi Bron,

Thanks for following up! That looks very straight forward, however my test correctly shows the multiple lines from the comment in the single commit, both on the package like you’re seeing, and also on the release, along with the \r\n on the comment.

Would you be willing to find one of these affected in /api/build-information and send what you see? This is a bit odd and hoping comparing the two might help narrow it down.

I look forward to getting to the bottom of this one!

Best regards,

Kenny

Hi Kenny,

Sorry for the delay with my response, i had to find some spare time in this crazy period to familiarise myself with the API :slight_smile: All done now… here’s the output, and it shows that it’s only getting a “\n” in it. Also noting, though, that it doesn’t even end up showing those extra lines at all in the release notes.

Does this help you identify what the issue may be?

Thanks
Bron

Hi Bron,

Thank you for keeping in touch and sending that through! That definitely does help point out where I went wrong in my attempt to reproduce earlier. I’ve been able to reproduce this now based on that new information, where the comment on the release is cut off at the first newline.

I brought this up with a couple engineers and had a look at our code directly, and it looks like this is actually working as intended, where the release page is intended on giving you just a succinct look at the comment and it cuts off displaying anything after \n.

I’ve raised this with my team as potentially something we’d tweak in the future. Note that unfortunately we’ve just started our holiday shutdown period, so we only have a skeleton crew onboard now and we probably won’t hear feedback on this until the new year.

I hope this helps, and please don’t hesitate to reach out if you have any questions or concerns moving forward! :slight_smile:

Best regards,

Kenny

Hi Kenny,

Sorry for my own delay in responding, I went on holiday myself.

I do have an issue with this, and the issue is that as a result of this apparent concatenation, when I send out release notes, such as via Slack, the deployment changes message is missing a bunch of details, where they were on extra lines in commits.

For example, in one of our releases today, there was one commit in particular containing a commit that had changes for 5 tickets, which we split over 5 lines:

But in the release notes it just cuts all that additional information off, so it’s literally lost information:

We don’t give access to Octopus to our test team, so it’s not like they can go into each package that was released and check the details, and that would be really inefficient, anyway.

I don’t understand why this is seen as a feature? It means that release notes could be missing key information.

I look forward to hearing if something can be done about this, or if you can suggest some other way for me to ensure i get these full details through into my release notes (and subsequent updates to Slack etc).

Thanks,
Bron

Hi Bron,

Thanks for keeping in touch, and I hope you had a great holiday!

I appreciate your additional thoughts and details. I do think this will be considered a bug in how newlines are rendered between the package and release pages in the UI. I set up a new reproduction of this locally, and I’ve noticed using the HTML newline (<br />) it isn’t rendered as a newline in the package page, and instead continues on the same line and doesn’t cut off info like \n does on the release page, but it is rendered as a newline in the release page.

I’m going to run through this with my team tomorrow to get consensus, and it might result in raising a bug report which I’ll send a link to.

Best regards,

Kenny

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.