jenkinsci / jenkinsci/gerrit-trigger-plugin
[JENKINS-46083] Return carries are not expanded in the Gerrit comment
- Dominant language
- Java
- Stars
- 226
- Forks
- 289
- PR merge metrics
- No merged PRs in 30d
Description
Hi there,
I've been struggling a bit to be able to format the gerrit comment with some blank lines but it seems it only works with single lines rather than multilines. Return carries (\n | \r\n) are not expanded as return carries but as strings.
For instance:
This is the current Gerrit Trigget configuration within Jenkins

And, in the below screenshot you can see the output in the gerrit review:

It only happens when using the Gerrit Verified Commands or the Job Custom Build messages, but it works when using the setGerritReview unsuccessfulMessage in the pipeline or the Unsuccessful Message File in the Job.
Please let me know if you need further details and also whether this is a genuine requirement of probably an expected behaviour.
Thanks
---
Originally reported by
v2v, imported from: Return carries are not expanded in the Gerrit comment
rsandell
Raw content of original issue
Hi there,
I've been struggling a bit to be able to format the gerrit comment with some blank lines but it seems it only works with single lines rather than multilines. Return carries (\n | \r\n) are not expanded as return carries but as strings.
For instance:
This is the current Gerrit Trigget configuration within Jenkins
And, in the below screenshot you can see the output in the gerrit review:
It only happens when using the Gerrit Verified Commands or the Job Custom Build messages, but it works when using the setGerritReview unsuccessfulMessage in the pipeline or the Unsuccessful Message File in the Job.
Please let me know if you need further details and also whether this is a genuine requirement of probably an expected behaviour.
Thanks
2 attachments
- [Screen Shot 2017-08-09 at 09.28.33.png](https://issues.jenkins.io/secure/attachment/39207/Screen%20Shot%202017-08-09%20at%2009.28.33.png)
> 
- [Screen Shot 2017-08-09 at 09.29.23.png](https://issues.jenkins.io/secure/attachment/39208/Screen%20Shot%202017-08-09%20at%2009.29.23.png)
> 
Contributor guide
Research direction
Start by tracing how Gerrit Verified Commands and Job Custom Build messages are assembled, then compare them with the working setGerritReview unsuccessfulMessage and Unsuccessful Message File paths. Confirm that \n and \r\n are expanded into line breaks in Gerrit comments for the affected paths without changing the already-working behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- ci-cd
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100