tcWebHooksPlugin 1.1-alpha13.203.278
Pre-releaseThis release will be the last 1.1 Alpha. The next will be 1.1 RC1 with a view to releasing 1.1 soon!
New Features
- Add support for
${capitalise()}
,${capitalize()}
and${substr()}
to webhook and template "macros".
Issues Resolved
- #77 Templates can now be edited in TeamCity 9 (tested on 9.1.7)
- #13 New and improved Slack templates.
The updated WebHook Templates for Slack take advantage of the ${capitalise()}
and ${substr()}
macros.
Slack WebHook Template example
The following is an example message sent by the updated Slack template:
Slack Compact WebHook Template example
The following is an example message sent by the updated Slack Compact template:
Changes and other clean-up
- Updated icon locations for flowdock template.
- Remove old and unused templates. All bundled templates should now be XML based.
- Support only one template in an XML template config.
Previously XML based bundled templates had the <webhook-template>
xml element wrapped inside an outer <webhook-templates>
element. This is superfluous. Bundled templates will only ever include a single template. This is an internal change and will not affect any users.
However, this change means that the output from /app/rest/webhooks/templates/id:abc/rawConfig
is suitable for insertion straight into a new template rather than having to wrap it in a superfluous tag.
Examples of using the capitalise
, capitalize
and substr
macros
${substr(build.vcs.number,0,7,32)}
turns3b0a11eda029aaeb349993cb070a1c2e5987906c
into3b0a11e
. This takes chars from 0 to 7 but only because the string is 32 chars in length or greater. In this exmaple, any string passed tosubstr
which is less than 32 chars will not be changed.${capitalise(string)}
turnswe are all lowercase
intoWe Are All Lowercase
by capitalising the first letter of each word.${capitalize(string)}
is the same as above, but in American rather than English ;-)