[JIRA] [core] (JENKINS-12289) Multi-line commit messages should be configurable to appear in Email-Ext build change notifications

5 views
Skip to first unread message

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 6:13:36 PM8/28/15
to jenkinsc...@googlegroups.com
sthuthi bhat commented on New Feature JENKINS-12289
 
Re: Multi-line commit messages should be configurable to appear in Email-Ext build change notifications

<pre> tag around content token does not work.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 6:13:36 PM8/28/15
to jenkinsc...@googlegroups.com

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 6:13:38 PM8/28/15
to jenkinsc...@googlegroups.com
 
Re: Multi-line commit messages should be configurable to appear in Email-Ext build change notifications

Can somebody please provide me jelly or groovy script for doing that? No where available. <pre> tag around content does not even work!

slide.o.mix@gmail.com (JIRA)

unread,
Aug 28, 2015, 6:20:01 PM8/28/15
to jenkinsc...@googlegroups.com

I assume you are using the HTML content type? Can you provide your template so I can take a look?

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 6:54:04 PM8/28/15
to jenkinsc...@googlegroups.com

slide.o.mix@gmail.com (JIRA)

unread,
Aug 28, 2015, 6:56:02 PM8/28/15
to jenkinsc...@googlegroups.com

slide.o.mix@gmail.com (JIRA)

unread,
Aug 28, 2015, 6:59:02 PM8/28/15
to jenkinsc...@googlegroups.com

Looks like you probably need to move the <pre> inside your format string to be directly around the commit message format characterm. Putting it around the div would do nothing.

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:05:01 PM8/28/15
to jenkinsc...@googlegroups.com

I have even tried putting around<pre><em> %m</em></pre>. something like this. Still does not work.

slide.o.mix@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:06:01 PM8/28/15
to jenkinsc...@googlegroups.com

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:07:01 PM8/28/15
to jenkinsc...@googlegroups.com

We follow git message like this:

git first line commit message
(blank)
git commit message line 2
git commit message line 3
git commit message line 4

Is that blank line causing it?

slide.o.mix@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:11:02 PM8/28/15
to jenkinsc...@googlegroups.com

View the source of the message and see what is actually being put into the email.

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:13:01 PM8/28/15
to jenkinsc...@googlegroups.com

So I tried putting <pre> around %m. Did not work as expected.
Question:
How to view the source of message?

slide.o.mix@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:15:01 PM8/28/15
to jenkinsc...@googlegroups.com

Depends on your mail client. You'll have to figure out how to do that.

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:26:01 PM8/28/15
to jenkinsc...@googlegroups.com

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:26:01 PM8/28/15
to jenkinsc...@googlegroups.com

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:27:02 PM8/28/15
to jenkinsc...@googlegroups.com

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:27:02 PM8/28/15
to jenkinsc...@googlegroups.com

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:27:03 PM8/28/15
to jenkinsc...@googlegroups.com

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:29:01 PM8/28/15
to jenkinsc...@googlegroups.com

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:31:01 PM8/28/15
to jenkinsc...@googlegroups.com
 
Re: Multi-line commit messages should be configurable to appear in Email-Ext build change notifications

Attached screenshot for the source of email.

This was written in jenkins email Default content:

<b>Changes: </b><br>
<div style="padding-left: 30px; padding-bottom: 15px;">
$

{CHANGES, showPaths=true, showDependencies=true, format="<div><b>%a</b>: %r %p </div><div style=\"padding-left:30px;\"> — “<em><pre>%m</pre></em>”</div>", pathFormat="</div><div style=\"padding-left:30px;\">%p"}

</div>

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:32:01 PM8/28/15
to jenkinsc...@googlegroups.com
sthuthi bhat edited a comment on New Feature JENKINS-12289
Attached screenshot for the source of email. 

This was written in jenkins email Default content:

<b>Changes: </b><br>
<div style="padding-left: 30px; padding-bottom: 15px;">
${CHANGES, showPaths=true, showDependencies=true, format="<div><b>%a</b>: %r %p </div><div style=\"padding-left:30px;\"> &#8212; &#8220;<em><pre>%m</pre></em>&#8221;</div>", pathFormat="</div><div style=\"padding-left:30px;\">%p"}
</div>

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:33:01 PM8/28/15
to jenkinsc...@googlegroups.com

sthuthi23@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:33:01 PM8/28/15
to jenkinsc...@googlegroups.com

slide.o.mix@gmail.com (JIRA)

unread,
Aug 28, 2015, 7:41:02 PM8/28/15
to jenkinsc...@googlegroups.com
Alex Earl commented on New Feature JENKINS-12289
 
Re: Multi-line commit messages should be configurable to appear in Email-Ext build change notifications

The CHANGES token may not support multiple lines, I'd have to look at the source. You can look at the html groovy template in the source code to see how the change set is presented there.

https://github.com/jenkinsci/email-ext-plugin/blob/master/src/main/resources/hudson/plugins/emailext/templates/groovy-html.template#L31

This will allow you to control the output more.

slide.o.mix@gmail.com (JIRA)

unread,
Sep 1, 2015, 8:03:01 PM9/1/15
to jenkinsc...@googlegroups.com
Alex Earl resolved as Not A Defect
 
Change By: Alex Earl
Status: Reopened Resolved
Assignee: Alex Earl
Resolution: Not A Defect

mark.earl.waite@gmail.com (JIRA)

unread,
Oct 22, 2019, 9:33:01 PM10/22/19
to jenkinsc...@googlegroups.com
Mark Waite closed an issue as Not A Defect
Change By: Mark Waite
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages