Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[announce] Allow raw messages to be sent to Mattermost #1080

Closed
aalmiray opened this issue Dec 1, 2022 Discussed in #1079 · 1 comment
Closed

[announce] Allow raw messages to be sent to Mattermost #1080

aalmiray opened this issue Dec 1, 2022 Discussed in #1079 · 1 comment
Assignees
Labels
enhancement New feature or request hackergarten Contributed at a Hackergarten event released Issue has been released
Milestone

Comments

@aalmiray
Copy link
Member

aalmiray commented Dec 1, 2022

Discussed in #1079

Originally posted by cyrillesondag December 1, 2022
hi,

In annoncers (at least in Mattermost ) wouldn't it be more richfull to templatize the raw post body ?

So like this you could have either a "simple text" message with "text" property, or a more elaborate message with the "template"

For exemple some thing like this :

Object message;
if (isNotBlank(mattermost.getMessage())) {
    message = Message.of(mattermost.getResolvedMessage(context));
} else {
    Map<String, Object> props = new LinkedHashMap<>();
    props.put(Constants.KEY_CHANGELOG, MustacheUtils.passThrough(context.getChangelog()));
    context.getModel().getRelease().getReleaser().fillProps(props, context.getModel());
    message = mattermost.getResolvedMessageTemplate(context, props);  // raw json message body
}
```</div>
@aalmiray aalmiray added the enhancement New feature or request label Dec 1, 2022
@aalmiray aalmiray changed the title [announce] Allow raw messages to sent to Mastodon [announce] Allow raw messages to be sent to Mastodon Dec 1, 2022
@aalmiray aalmiray self-assigned this Dec 1, 2022
@aalmiray aalmiray added this to the v1.4.0 milestone Dec 1, 2022
@aalmiray aalmiray added the hackergarten Contributed at a Hackergarten event label Dec 1, 2022
aalmiray added a commit to jreleaser/jreleaser.github.io that referenced this issue Dec 1, 2022
aalmiray added a commit to jreleaser/jreleaser.github.io that referenced this issue Dec 2, 2022
aalmiray added a commit to jreleaser/jreleaser.github.io that referenced this issue Dec 13, 2022
@aalmiray aalmiray changed the title [announce] Allow raw messages to be sent to Mastodon [announce] Allow raw messages to be sent to Mattermost Dec 23, 2022
@aalmiray
Copy link
Member Author

@aalmiray aalmiray added the released Issue has been released label Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hackergarten Contributed at a Hackergarten event released Issue has been released
Projects
None yet
Development

No branches or pull requests

1 participant