= Zulip

Posts a message to a link:https://zulip.com/[Zulip] server. You must procure an account and apiKey to use
this announcer.

include::partial$legend.adoc[]

[tabs]
====
YAML::
+
[source,yaml]
[subs="+macros"]
----
announce:
  # icon:dot-circle[]
  zulip:

    # Enable or disable this announcer.
    # Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
    # Defaults to `NEVER`.
    # icon:dot-circle[]
    active: ALWAYS

    # Defines the connection timeout in seconds.
    # Defaults to `20`.
    # icon:dot-circle[]
    connectTimeout: 20

    # Defines the read timeout in seconds.
    # Defaults to `60`.
    # icon:dot-circle[]
    readTimeout: 60

    # The Zulip account (typically an email address) to use.
    # icon:exclamation-triangle[]
    account: pass:[announce-bot@my.zulipchat.com]

    # The Zulip server endpoint.
    # icon:exclamation-triangle[]
    apiHost: pass:[https://my.zulipchat.com/api/v1]

    # The ApiKey associated with the given account.
    # If left unspecified, the `JRELEASER_ZULIP_API_KEY`
    # environment variable must be defined.
    # icon:exclamation-triangle[] icon:eye-slash[]
    apiKey: __DO_NOT_SET_HERE__

    # The channel where the message will be sent to
    # Defaults to `announce`.
    # icon:dot-circle[]
    channel: announce

    # The messages' subject.
    # Review the available xref:configuration:name-templates.adoc[].
    # icon:dot-circle[] icon:file-alt[]
    subject: {{projectNameCapitalized}} {{projectVersion}} released!

    # The announcement message.
    # Review the available xref:configuration:name-templates.adoc[].
    # icon:dot-circle[] icon:file-alt[]
    message: icon:rocket[] {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}

    # Path to a template file that contains the message.
    # Review the available xref:configuration:name-templates.adoc[].
    # Defaults to `src/jreleaser/templates/zulip.tpl`.
    # icon:dot-circle[]
    messageTemplate: path/to/template/zulip.tpl

    # Additional properties used when evaluating templates.
    # icon:dot-circle[] icon:file-alt[]
    extraProperties:
      # Key will be capitalized and prefixed with `zulip`, i.e, `zulipFoo`.
      foo: bar
----
TOML::
+
[source,toml]
[subs="+macros"]
----
# icon:dot-circle[]
[announce.zulip]

  # Enable or disable this announcer.
  # Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
  # Defaults to `NEVER`.
  # icon:dot-circle[]
  active = "ALWAYS"

  # Defines the connection timeout in seconds.
  # Defaults to `20`.
  # icon:dot-circle[]
  connectTimeout = 20

  # Defines the read timeout in seconds.
  # Defaults to `60`.
  # icon:dot-circle[]
  readTimeout = 60

  # The Zulip account (typically an email address) to use.
  # icon:exclamation-triangle[]
  account = "pass:[announce-bot@my.zulipchat.com]"

  # The Zulip server endpoint.
  # icon:exclamation-triangle[]
  apiHost = "pass:[https://my.zulipchat.com/api/v1]"

  # The ApiKey associated with the given account.
  # If left unspecified, the `JRELEASER_ZULIP_API_KEY`
  # environment variable must be defined.
  # icon:exclamation-triangle[] icon:eye-slash[]
  apiKey = "__DO_NOT_SET_HERE__"

  # The channel where the message will be sent to
  # Defaults to `announce`.
  # icon:dot-circle[]
  channel = "announce"

  # The messages' subject.
  # Review the available xref:configuration:name-templates.adoc[].
  # icon:dot-circle[] icon:file-alt[]
  subject = "{{projectNameCapitalized}} {{projectVersion}} released!"

  # The announcement message.
  # Review the available xref:configuration:name-templates.adoc[].
  # icon:dot-circle[] icon:file-alt[]
  message = "icon:rocket[] {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}"

  # Path to a template file that contains the message.
  # Review the available xref:configuration:name-templates.adoc[].
  # Defaults to `src/jreleaser/templates/zulip.tpl`.
  # icon:dot-circle[]
  messageTemplate = "path/to/template/zulip.tpl"

  # Additional properties used when evaluating templates.
  # icon:dot-circle[] icon:file-alt[]
  extraProperties.foo = "bar"
  # Key will be capitalized and prefixed with `zulip`, i.e, `zulipFoo`.
----
JSON::
+
[source,json]
[subs="+macros"]
----
{
  "announce": {
    // icon:dot-circle[]
    "zulip": {

      // Enable or disable this announcer.
      // Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
      // Defaults to `NEVER`.
      // icon:dot-circle[]
      "active": "ALWAYS",

      // Defines the connection timeout in seconds.
      // Defaults to `20`.
      // icon:dot-circle[]
      "connectTimeout": 20,

      // Defines the read timeout in seconds.
      // Defaults to `60`.
      // icon:dot-circle[]
      "readTimeout": 60,

      // The Zulip account (typically an email address) to use.
      // icon:exclamation-triangle[]
      "account": "pass:[announce-bot@my.zulipchat.com]",

      // The Zulip server endpoint.
      // icon:exclamation-triangle[]
      "apiHost": "pass:[https://my.zulipchat.com/api/v1]",

      // The ApiKey associated with the given account.
      // If left unspecified, the `JRELEASER_ZULIP_API_KEY`
      // environment variable must be defined.
      // icon:exclamation-triangle[] icon:eye-slash[]
      "apiKey": "__DO_NOT_SET_HERE__",

      // The channel where the message will be sent to
      // Defaults to `announce`.
      // icon:dot-circle[]
      "channel": "announce",

      // The messages' subject.
      // Review the available xref:configuration:name-templates.adoc[].
      // icon:dot-circle[]
      "subject": "{{projectNameCapitalized}} {{projectVersion}} released!",

      // The announcement message.
      // Review the available xref:configuration:name-templates.adoc[].
      // icon:dot-circle[] icon:file-alt[]
      "message": "icon:rocket[] {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}",

      // Path to a template file that contains the message.
      // Review the available xref:configuration:name-templates.adoc[].
      // Defaults to `src/jreleaser/templates/zulip.tpl`.
      // icon:dot-circle[]
      "messageTemplate": "path/to/template/zulip.tpl",

      // Additional properties used when evaluating templates.
      // icon:dot-circle[] icon:file-alt[]
      "extraProperties": {
        // Key will be capitalized and prefixed with `zulip`, i.e, `zulipFoo`.
        "foo": "bar"
      }
    }
  }
}
----
Maven::
+
[source,xml]
[subs="+macros,verbatim"]
----
<jreleaser>
  <!--
    icon:dot-circle[]
  -->
  <announce>
    <!--
      icon:dot-circle[]
    -->
    <zulip>

      <!--
        Enable or disable this announcer.
        Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
        Defaults to `NEVER`.
        icon:dot-circle[]
      -->
      <active>ALWAYS</active>

      <!--
        Defines the connection timeout in seconds.
        Defaults to `20`.
        icon:dot-circle[]
      -->
      <connectTimeout>20</connectTimeout>

      <!--
        Defines the read timeout in seconds.
        Defaults to `60`.
        icon:dot-circle[]
      -->
      <readTimeout>60</readTimeout>

      <!--
        The Zulip account (typically an email address) to use.
        icon:exclamation-triangle[]
      -->
      <account>pass:[announce-bot@my.zulipchat.com]</account>

      <!--
        The Zulip server endpoint.
        icon:exclamation-triangle[]
      -->
      <apiHost>pass:[https://my.zulipchat.com/api/v1]</apiHost>

      <!--
        The ApiKey associated with the given account.
        If left unspecified, the `JRELEASER_ZULIP_API_KEY`
        environment variable must be defined.
        icon:exclamation-triangle[] icon:eye-slash[]
      -->
      <apiKey>__DO_NOT_SET_HERE__</apiKey>

      <!--
        The channel where the message will be sent to
        Defaults to `announce`.
        icon:dot-circle[]
      -->
      <channel>announce</channel>

      <!--
        The messages' subject.
        Review the available xref:configuration:name-templates.adoc[].
        icon:dot-circle[]
      -->
      <subject>{{projectNameCapitalized}} {{projectVersion}} released!</subject>

      <!--
        The announcement message.
        Review the available xref:configuration:name-templates.adoc[].
        icon:dot-circle[] icon:file-alt[]
      -->
      <message>icon:rocket[] {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}</message>

      <!--
        Path to a template file that contains the message.
        Review the available xref:configuration:name-templates.adoc[].
        Defaults to `src/jreleaser/templates/zulip.tpl`.
        icon:dot-circle[]
      -->
      <messageTemplate>path/to/template/zulip.tpl</messageTemplate>

      <!--
        Additional properties used when evaluating templates.
        icon:dot-circle[] icon:file-alt[]
      -->
      <extraProperties>
        <!--
          Key will be capitalized and prefixed with `zulip`, i.e, `zulipFoo`.
        -->
        <foo>bar</foo>
      </extraProperties>
    </zulip>
  </announce>
</jreleaser>
----
Gradle::
+
[source,groovy]
[subs="+macros"]
----
jreleaser {
  announce {
    // icon:dot-circle[]
    zulip {

      // Enable or disable this announcer.
      // Valid values are [`NEVER`, `ALWAYS`, `RELEASE`, `SNAPSHOT`].
      // Defaults to `NEVER`.
      // icon:dot-circle[]
      active = 'ALWAYS'

      // Defines the connection timeout in seconds.
      // Defaults to `20`.
      // icon:dot-circle[]
      connectTimeout = 20

      // Defines the read timeout in seconds.
      // Defaults to `60`.
      // icon:dot-circle[]
      readTimeout = 60

      // The Zulip account (typically an email address) to use.
      // icon:exclamation-triangle[]
      account = 'pass:[announce-bot@my.zulipchat.com]'

      // The Zulip server endpoint.
      // icon:exclamation-triangle[]
      apiHost = 'pass:[https://my.zulipchat.com/api/v1]'

      // The ApiKey associated with the given account.
      // If left unspecified, the `JRELEASER_ZULIP_API_KEY`
      // environment variable must be defined.
      // icon:exclamation-triangle[] icon:eye-slash[]
      apiKey = '__DO_NOT_SET_HERE__'

      // The channel where the message will be sent to
      // Defaults to `announce`.
      // icon:dot-circle[]
      channel = 'announce'

      // The messages' subject.
      // Review the available xref:configuration:name-templates.adoc[].
      // icon:dot-circle[]
      subject = '{{projectNameCapitalized}} {{projectVersion}} released!'

      // The announcement message.
      // Review the available xref:configuration:name-templates.adoc[].
      // icon:dot-circle[] icon:file-alt[]
      message = 'icon:rocket[] {{projectNameCapitalized}} {{projectVersion}} has been released! {{releaseNotesUrl}}'

      // Path to a template file that contains the message.
      // Review the available xref:configuration:name-templates.adoc[].
      // Defaults to `src/jreleaser/templates/zulip.tpl`.
      // icon:dot-circle[]
      messageTemplate = 'path/to/template/zulip.tpl'

      // Additional properties used when evaluating templates.
      // Key will be capitalized and prefixed with `zulip`, i.e, `zulipFoo`.
      // icon:dot-circle[] icon:file-alt[]
      extraProperties.put('foo', 'bar')
    }
  }
}
----
====

You may define either `message` or `messageTemplate`, with the former taking precedence over the latter.

The template file may be initialized using the `template` command.
