YML Notification Template
Wondering if you can provide a bit more clarity on the template parameter.
In the help doc (http://www.appveyor.com/docs/notifications) you have the following:
template: "{message}, {commitId}, ..."
I am not yet clear how the above relates to the default format for example SLACK:
<{{buildUrl}}|Build {{projectName}} {{buildVersion}} {{status}}>
Commit <{{commitUrl}}|{{commitId}}> by {{commitAuthor}} on {{commitDate}}:
_{{commitMessage}}_
Could you provide an example how I can use template?
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Feodor Fitsner on Nov 29, 2014 @ 12:45 AM
For every notification provider there is "default" hard-coded template that is used in case custom template was not specified. Default templates work for the most people.
And you can set your custom template for, say, displaying some additional info about build results.
Let me know if I correctly understood your question.
2 Posted by kevin on Nov 29, 2014 @ 10:17 AM
Feodor,
In our slack channel appveyor messages are not displaying correctly for us, the _ are at beginning and end but it is not being formatted italics.
[cid:F852B942-8C89-48C7-BD58-C0CCED6FC1FB]
I would I go about creating a custom template? Would I formatted on “template:” line, how I would like to see it in the mustache syntax? How are line breaks handled? and indenting? do i just use the slack formatting *bold* _italics_ ‘code’ ‘’’performed’’’ etc.
Is there a full list of variables?
Thanks
Kevin
Support Staff 3 Posted by Feodor Fitsner on Nov 30, 2014 @ 02:37 AM
To specify multi-line value in YML use pipe, like shown here: https://github.com/FeodorFitsner/dacpac-sample/blob/master/appveyor...
Data model is
eventData
field from Webhook payload: http://www.appveyor.com/docs/notifications#message-templateSupport Staff 4 Posted by Feodor Fitsner on Nov 30, 2014 @ 02:56 AM
Re: italics - looks like an issue on Slack side. The last section of formatting spec says "By default bot message text will be formatted..." and AV posts just messages, not attachments.
I've contacted Slack support to clarify that.
Support Staff 5 Posted by Feodor Fitsner on Dec 01, 2014 @ 01:26 AM
Found the issue - it's multi-line commit message that breaks italics (or any other) formatting. Will deploy update early next week.
Support Staff 6 Posted by Feodor Fitsner on Dec 09, 2014 @ 07:46 PM
The fix has been deployed.
7 Posted by kevin on Dec 09, 2014 @ 08:28 PM
Feodor,
Thanks for the update and working on this.
Kevin
8 Posted by kevin on Jul 02, 2015 @ 07:37 PM
Feodor,
In Notification Yml for Slack is there a way to set chat.postMessage method params directly? Looking to use the Attachment.
I can roll my own via PS, but I am wondering you if might already included a way to access it.
Is the AppVeyor icon green/red/blue available for public consumption, notifications?
Support Staff 9 Posted by Feodor Fitsner on Jul 02, 2015 @ 09:01 PM
It can't be set from YML.
You can use the images, of course:
https://ci.appveyor.com/app/images/appveyor-blue-48.png
https://ci.appveyor.com/app/images/appveyor-blue-72.png
https://ci.appveyor.com/app/images/appveyor-green-48.png
https://ci.appveyor.com/app/images/appveyor-green-72.png
https://ci.appveyor.com/app/images/appveyor-red-48.png
https://ci.appveyor.com/app/images/appveyor-red-72.png
kevin closed this discussion on Nov 16, 2015 @ 02:06 AM.