mirror of
https://github.com/jlengrand/jreleaser.github.io.git
synced 2026-03-10 08:31:25 +00:00
328 lines
9.6 KiB
Plaintext
328 lines
9.6 KiB
Plaintext
= GitHub Discussions
|
|
|
|
Posts a message to link:https://docs.github.com/en/discussions[GitHub Discussions]. You must provide a GitHub token with
|
|
the `write:discussion` scope enabled. Will use the same token set in xref:configuration:release/github.adoc[].
|
|
|
|
NOTE: GitHub discussions are currently only possible for repositories that belong to organizations.
|
|
|
|
include::partial$legend.adoc[]
|
|
|
|
[tabs]
|
|
====
|
|
YAML::
|
|
+
|
|
[source,yaml]
|
|
[subs="+macros"]
|
|
----
|
|
announce:
|
|
# icon:dot-circle[]
|
|
discussions:
|
|
|
|
# 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 GitHub organization that owns the discussion.
|
|
# icon:exclamation-triangle[]
|
|
organization: some-org
|
|
|
|
# The GitHub team that owns the discussion.
|
|
# icon:exclamation-triangle[]
|
|
team: some-team
|
|
|
|
# The messages' title.
|
|
# Review the available xref:configuration:name-templates.adoc[].
|
|
# icon:dot-circle[] icon:file-alt[]
|
|
title: {{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/discussions.tpl`.
|
|
# icon:dot-circle[]
|
|
messageTemplate: path/to/template/discussions.tpl
|
|
|
|
# Additional properties used when evaluating templates.
|
|
# icon:dot-circle[] icon:file-alt[]
|
|
extraProperties:
|
|
# Key will be capitalized and prefixed with `discussions`, i.e, `discussionsFoo`.
|
|
foo: bar
|
|
----
|
|
TOML::
|
|
+
|
|
[source,toml]
|
|
[subs="+macros"]
|
|
----
|
|
# icon:dot-circle[]
|
|
[announce.discussions]
|
|
|
|
# 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 GitHub organization that owns the discussion.
|
|
# icon:exclamation-triangle[]
|
|
organization = "some-org"
|
|
|
|
# The GitHub team that owns the discussion.
|
|
# icon:exclamation-triangle[]
|
|
team = "some-team"
|
|
|
|
# The messages' title.
|
|
# Review the available xref:configuration:name-templates.adoc[].
|
|
# icon:dot-circle[] icon:file-alt[]
|
|
title = "{{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/discussions.tpl`.
|
|
# icon:dot-circle[]
|
|
messageTemplate = "path/to/template/discussions.tpl"
|
|
|
|
# Additional properties used when evaluating templates.
|
|
# icon:dot-circle[] icon:file-alt[]
|
|
extraProperties.foo = "bar"
|
|
# Key will be capitalized and prefixed with `discussions`, i.e, `discussionsFoo`.
|
|
----
|
|
JSON::
|
|
+
|
|
[source,json]
|
|
[subs="+macros"]
|
|
----
|
|
{
|
|
"announce": {
|
|
// icon:dot-circle[]
|
|
"discussions": {
|
|
|
|
// 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 GitHub organization that owns the discussion.
|
|
// icon:exclamation-triangle[]
|
|
"organization": "some-org",
|
|
|
|
// The GitHub team that owns the discussion.
|
|
// icon:exclamation-triangle[]
|
|
"team": "some-team",
|
|
|
|
// The messages' title.
|
|
// Review the available xref:configuration:name-templates.adoc[].
|
|
// icon:dot-circle[] icon:file-alt[]
|
|
"title": "{{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/discussions.tpl`.
|
|
// icon:dot-circle[]
|
|
"messageTemplate": "path/to/template/discussions.tpl",
|
|
|
|
// Additional properties used when evaluating templates.
|
|
// icon:dot-circle[] icon:file-alt[]
|
|
"extraProperties": {
|
|
// Key will be capitalized and prefixed with `discussions`, i.e, `discussionsFoo`.
|
|
"foo": "bar"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
----
|
|
Maven::
|
|
+
|
|
[source,xml]
|
|
[subs="+macros,verbatim"]
|
|
----
|
|
<jreleaser>
|
|
<!--
|
|
icon:dot-circle[]
|
|
-->
|
|
<announce>
|
|
<!--
|
|
icon:dot-circle[]
|
|
-->
|
|
<discussions>
|
|
|
|
<!--
|
|
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 GitHub organization that owns the discussion.
|
|
icon:exclamation-triangle[]
|
|
-->
|
|
<organization>some-org</organization>
|
|
|
|
<!--
|
|
The GitHub team that owns the discussion.
|
|
icon:exclamation-triangle[]
|
|
-->
|
|
<team>some-team</team>
|
|
|
|
<!--
|
|
The messages' title.
|
|
Review the available xref:configuration:name-templates.adoc[].
|
|
icon:dot-circle[] icon:file-alt[]
|
|
-->
|
|
<title>{{projectNameCapitalized}} {{projectVersion}} released!</title>
|
|
|
|
<!--
|
|
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/discussions.tpl`.
|
|
icon:dot-circle[]
|
|
-->
|
|
<messageTemplate>path/to/template/discussions.tpl</messageTemplate>
|
|
|
|
<!--
|
|
Additional properties used when evaluating templates.
|
|
icon:dot-circle[] icon:file-alt[]
|
|
-->
|
|
<extraProperties>
|
|
<!--
|
|
Key will be capitalized and prefixed with `discussions`, i.e, `discussionsFoo`.
|
|
-->
|
|
<foo>bar</foo>
|
|
</extraProperties>
|
|
</discussions>
|
|
</announce>
|
|
</jreleaser>
|
|
----
|
|
Gradle::
|
|
+
|
|
[source,groovy]
|
|
[subs="+macros"]
|
|
----
|
|
jreleaser {
|
|
announce {
|
|
// icon:dot-circle[]
|
|
discussions {
|
|
|
|
// 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 GitHub organization that owns the discussion.
|
|
// icon:exclamation-triangle[]
|
|
organization = 'some-org'
|
|
|
|
// The GitHub team that owns the discussion.
|
|
// icon:exclamation-triangle[]
|
|
team = 'some-team'
|
|
|
|
// The messages' title.
|
|
// Review the available xref:configuration:name-templates.adoc[].
|
|
// icon:dot-circle[] icon:file-alt[]
|
|
title = '{{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/discussions.tpl`.
|
|
// icon:dot-circle[]
|
|
messageTemplate = 'path/to/template/discussions.tpl'
|
|
|
|
// Additional properties used when evaluating templates.
|
|
// Key will be capitalized and prefixed with `discussions`, i.e, `discussionsFoo`.
|
|
// 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.
|