-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
--- | ||
title: Template Functions | ||
--- | ||
|
||
Special Slack template functions are made available on notifications to complex block formation easier. | ||
Check warning on line 5 in mission-control/docs/reference/notifications/template_functions.mdx GitHub Actions / vale[vale] mission-control/docs/reference/notifications/template_functions.mdx#L5
Raw output
|
||
|
||
**slackHealthEmoji:** | ||
<SlackHealthEmoji /> | ||
|
||
**labelsFormat:** | ||
Check failure on line 10 in mission-control/docs/reference/notifications/template_functions.mdx GitHub Actions / vale[vale] mission-control/docs/reference/notifications/template_functions.mdx#L10
Raw output
|
||
<LabelsFormat /> | ||
|
||
**slackSectionLabels:** | ||
<SlackSectionLabels /> | ||
|
||
**slackSectionTextFieldPlain:** | ||
<SlackSectionTextFieldPlain /> | ||
|
||
**slackSectionTextFieldMD:** | ||
<SlackSectionTextFieldMD /> | ||
|
||
**slackSectionTextMD:** | ||
<SlackSectionTextMD /> | ||
|
||
**slackSectionTextPlain:** | ||
<SlackSectionTextPlain /> | ||
|
||
**SlackURLAction:** | ||
<SlackURLAction /> | ||
|
||
export function SlackHealthEmoji() { | ||
return <> | ||
<pre> | ||
slackHealthEmoji(health): string | ||
</pre> | ||
<p>Returns a slack emoji based on the supplied health</p> | ||
</> | ||
} | ||
|
||
export function LabelsFormat() { | ||
return <> | ||
<pre> | ||
labelsFormat(map[string]any): string | ||
</pre> | ||
<p>Formats the given set of labels</p> | ||
</> | ||
} | ||
|
||
export const SlackSectionLabels = () => ( | ||
Check failure on line 49 in mission-control/docs/reference/notifications/template_functions.mdx GitHub Actions / vale[vale] mission-control/docs/reference/notifications/template_functions.mdx#L49
Raw output
|
||
<> | ||
<pre> | ||
slackSectionLabels(map[string]any): SlackSection | ||
</pre> | ||
<p>Formats the given set of labels into fields of a <a href="https://api.slack.com/reference/block-kit/blocks#section">slack section block</a></p> | ||
</> | ||
) | ||
|
||
export const SlackSectionTextFieldPlain = () => ( | ||
Check failure on line 58 in mission-control/docs/reference/notifications/template_functions.mdx GitHub Actions / vale[vale] mission-control/docs/reference/notifications/template_functions.mdx#L58
Raw output
|
||
<> | ||
<pre> | ||
slackSectionTextFieldPlain(text: string): string | ||
</pre> | ||
<p>Creates a plain text field for a Slack section block</p> | ||
</> | ||
) | ||
|
||
export const SlackSectionTextFieldMD = () => ( | ||
Check failure on line 67 in mission-control/docs/reference/notifications/template_functions.mdx GitHub Actions / vale[vale] mission-control/docs/reference/notifications/template_functions.mdx#L67
Raw output
|
||
<> | ||
<pre> | ||
slackSectionTextFieldMD(text: string): string | ||
</pre> | ||
<p>Creates a markdown text field for a Slack section block</p> | ||
</> | ||
) | ||
|
||
export const SlackSectionTextMD = () => ( | ||
Check failure on line 76 in mission-control/docs/reference/notifications/template_functions.mdx GitHub Actions / vale[vale] mission-control/docs/reference/notifications/template_functions.mdx#L76
Raw output
|
||
<> | ||
<pre> | ||
slackSectionTextMD(text: string): string | ||
</pre> | ||
<p>Creates a Slack section block with markdown text</p> | ||
</> | ||
) | ||
|
||
export const SlackSectionTextPlain = () => ( | ||
Check failure on line 85 in mission-control/docs/reference/notifications/template_functions.mdx GitHub Actions / vale[vale] mission-control/docs/reference/notifications/template_functions.mdx#L85
Raw output
|
||
<> | ||
<pre> | ||
slackSectionTextPlain(text: string): string | ||
</pre> | ||
<p>Creates a Slack section block with plain text</p> | ||
</> | ||
) | ||
|
||
export const SlackURLAction = () => ( | ||
Check failure on line 94 in mission-control/docs/reference/notifications/template_functions.mdx GitHub Actions / vale[vale] mission-control/docs/reference/notifications/template_functions.mdx#L94
Raw output
|
||
<> | ||
<pre> | ||
slackURLAction(name: string, url: string): string | ||
</pre> | ||
<p>Creates a Slack action block with a URL button</p> | ||
</> | ||
) |