Release Note variables cutting off commit comments

Hi- I’m trying to use build information that’s fed from TeamCity and integrate it into a release note template- I’m having a problem viewing the full commit comment however-

my template is the standard:

#{each package in Octopus.Release.Package}

  • #{package.PackageId} #{package.Version}
    #{each commit in package.Commits}
  • #{commit.CommitId} - #{commit.Comment}
    #{/each}
    #{/each}

In build info my commit comments look like this:

15780
210803:1430
TFS_12659 - Applying bla bla bla
TFS_12668 - Preventing bla bla bla
15779
210802:1400

  • “Cosmetic” changes for coding standards compliance; no impact on users
    15778
    210802:1200
  • Cosmetic" changes for coding standards compliance; no impact on users
    15777
    210802:1200
  • “Cosmetic” changes for coding-standards compliance; no impact on users

However, in the release notes, when using the template, I get this for a result:

RI4_WIN 4.10.4.66

15780 - 210803:1430

15779 - 210802:1400

15778 - 210802:1200

15777 - 210802:1200

====

Is there a way to get the full commit comment? Thanks!

Hi @sveilleux,

Thanks for getting in touch! I’m sorry to hear you’re hitting this unexpected behavior. I’ve seen a result of multi-line commit comments being rendered in unexpected ways in the UI that seems possibly related, or potentially the same cause. Are you seeing this truncated comment on the release page, or the package page (in the UI under Library > Package, under the specific package the build info is connected to)?

Lastly, are you using \n for newline? I’ve seen an issue with \n\ being rendered differently between the release and package pages in the UI.

I look forward to hearing back and getting to the bottom of this one!

Best regards,

Kenny

Hi Kenny-

We are getting the full check-in notes on our Library Package build info. I’m not sure what we’re using for newline, this is an automated build from TeamCity, using the Octopus plugin build step


Hi @sveilleux,

Thanks for reaching out and for the further information.

For us to try and do a deep dive on this, can you please send us the build information file TeamCity generates and sends to Octopus? You can either do this by going to the build information table in the DB(dbo.BuildInformation) and it will be in the JSON column for that entry, or, alternatively, you can turn verbose logging on in that TeamCity push build information step and it will show the build info file in the build log. You can DM me this file for privacy and security reasons.

Can you also please confirm which version of Octopus you’re on?

Please let me know.

Best,
Jeremy

Hi Jeremy, we’re on 2021.1 (build 7622)

I’ll send over the build info file now.

Hi @sveilleux,

Thanks for keeping in touch and sending through that information. Just a quick update to let you know I’m working on hopefully coming up with a workaround to this issue. I wanted to give you some context to this behavior which is what’s causing this unexpected outcome, and requiring a workaround.

The packages page (which are displaying correctly) is rendered to markdown, so the \n being inserted at a newline is correctly rendered and displayed here. The difference is the Release page (which is cutting off the comments) is rendered to HTML, and there looks to have been a deliberate decision by the devs to split comments at a \n here due to some complexities.

I’m hopeful though that there’s a way to get it working as you’re needing it to, so I’ll certainly keep in touch when I can get a working solution.

Please let me know if you have any questions or concerns in the meantime!

Best regards,

Kenny

Hi @sveilleux,

Thanks for your patience as I had a closer look at this one. I’m sorry to give you the unfortunate news that I don’t think there is going to be any possible workaround to this limitation. For some further context after discussing this with an engineer here is that the reason why we built it in this way was due to the way markdown is rendered when having multiple lines within a single bullet point. So rather than incorrectly rendering the entire comment as a single line, we chose to only take the first line.

My numerous attempts to come up with a workaround were unsuccessful. While you can use other methods for markdown to render a new line (e.g. double-space at the end of the line), pushing build information with that format still has the \n inserted, and the Release page is recognizing and splitting it there for the above reason.

I wish I could give you better news! Let me know if you have any further questions or concerns.

Best regards,

Kenny

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