Skip to content

Instantly share code, notes, and snippets.

@jerray
Last active November 20, 2019 05:51
Show Gist options
  • Save jerray/c36c28a10e53eb69bc9f8a8772156bd8 to your computer and use it in GitHub Desktop.
Save jerray/c36c28a10e53eb69bc9f8a8772156bd8 to your computer and use it in GitHub Desktop.
Drone WebHook Templates
{
"msgtype": "markdown",
"markdown": {
"title": "{{ repo.owner }}/{{ repo.name }} build {{#success build.status}}succeeded{{else}}failed{{/success}}.",
"text": "### {{#success build.status}} 🔵 {{else}} 🔴 {{/success}}{{ repo.owner }}/{{ repo.name }}\n\n{{#if build.tag}}[tag {{ build.tag }}](https://github.com/{{ repo.owner }}/{{ repo.name }}/tree/{{ build.tag }}){{else}}[commit {{regexReplace "([\w\d]{8}).*" build.commit "$1" }}](https://github.com/{{ repo.owner }}/{{ repo.name }}/commit/{{ build.commit }}) on branch **{{build.branch}}**{{/if}} build {{#success build.status}}succeeded{{else}}failed{{/success}}.\n\nClick [here]({{ build.link }}) to check the detailed information."
}
}
{{#success build.status}} 🔵 {{else}} 🔴 {{/success}} *{{ repo.owner }}/{{ repo.name }}*
{{#if build.tag}}<https://github.com/{{ repo.owner }}/{{ repo.name }}/tree/{{ build.tag }}|tag {{ build.tag }}>{{else}}<https://github.com/{{ repo.owner }}/{{ repo.name }}/commit/{{ build.commit }}|commit {{truncate build.commit 8 }}> on branch *{{build.branch}}*{{/if}} build {{#success build.status}}succeeded{{else}}failed{{/success}}.
Click <{{ build.link }}|here> to check the detailed information.
{
"msgtype": "markdown",
"markdown": {
"content": "### {{#success build.status}} 🔵 {{else}} 🔴 {{/success}}{{ repo.owner }}/{{ repo.name }}\n\n{{#if build.tag}}[tag {{ build.tag }}](https://github.com/{{ repo.owner }}/{{ repo.name }}/tree/{{ build.tag }}){{else}}[commit {{regexReplace "([\w\d]{8}).*" build.commit "$1" }}](https://github.com/{{ repo.owner }}/{{ repo.name }}/commit/{{ build.commit }}) on branch **{{build.branch}}**{{/if}} build {{#success build.status}}succeeded{{else}}failed{{/success}}.\n\nClick [here]({{ build.link }}) to check the detailed information."
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment