Skip to content

Commit

Permalink
Merge pull request #29 from guilhemmarchand/version_1018
Browse files Browse the repository at this point in the history
Version 1.0.18
  • Loading branch information
guilhemmarchand authored Aug 28, 2020
2 parents edf9219 + 6dabd6e commit a872ebf
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 3 deletions.
1 change: 1 addition & 0 deletions TA-ms-teams-alert-action/README/alert_actions.conf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ param.alert_ms_teams_activity_title = <string> Message Activity Title. It's a re
param.alert_ms_teams_fields_list = <string> Message fields list. It's a required parameter.
param.alert_ms_teams_fields_order = <string> Message fields ordering. It's a required parameter.
param.alert_ms_teams_image_link = <string> Override MS teams image link for publication.
param.alert_ms_teams_theme_color = <string> Use a theme color for the publication.
param.alert_ms_teams_potential_action_name = <string> Potential Action Name.
param.alert_ms_teams_potential_action_url = <string> Potential Action URL.
param.alert_ms_teams_potential_action_name2 = <string> Second Potential Action Name.
Expand Down
2 changes: 1 addition & 1 deletion TA-ms-teams-alert-action/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": {
"group": null,
"name": "TA-ms-teams-alert-action",
"version": "1.0.17"
"version": "1.0.18"
},
"author": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,18 @@ def process_event(helper, *args, **kwargs):
helper.log_debug(
"alert_ms_teams_activity_title={}".format(alert_ms_teams_activity_title))

# Theme color
alert_ms_teams_theme_color = helper.get_param("alert_ms_teams_theme_color")
if alert_ms_teams_theme_color is None:
alert_ms_teams_theme_color = "0076D7"
helper.log_debug("Theme color is not defined, reverted to default")
else:
helper.log_debug(
"alert_ms_teams_theme_color={}".format(alert_ms_teams_theme_color))

# Start building the json object
data_json = '{\n' + '\"@type\": \"MessageCard\",\n' + '\"@context\": \"http://schema.org/extensions\",\n' + \
'\"themeColor\": \"0076D7\",\n'
'\"themeColor\": \"' + alert_ms_teams_theme_color + '\",\n'

# Add the message title
data_json = data_json + '\n' + '\"summary\": \"' + alert_ms_teams_activity_title + '\",\n'
Expand Down
2 changes: 1 addition & 1 deletion TA-ms-teams-alert-action/default/app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build = 1

[launcher]
author = Guilhem Marchand
version = 1.0.17
version = 1.0.18
description = This addon allows publishing messages to Microsoft Teams channels with markdown formatting.

[ui]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@
</span>
</div>
</div>
<div class="control-group">
<label class="control-label" for="ms_teams_publish_to_channel_alert_ms_teams_theme_color">Theme color </label>
<div class="controls">
<input type="text" name="action.ms_teams_publish_to_channel.param.alert_ms_teams_theme_color" id="ms_teams_publish_to_channel_alert_ms_teams_theme_color"/>
<span class="help-block">
Specifies a custom brand color for the card in hexadecimal code format. (optional, defaults to 0076D7)
</span>
</div>
</div>
<div class="control-group">
<label class="control-label" for="ms_teams_publish_to_channel_alert_ms_teams_potential_action_name">OpenURL Potential Action Name </label>
<div class="controls">
Expand Down
Binary file removed TA-ms-teams-alert-action_1017.tgz
Binary file not shown.
Binary file added TA-ms-teams-alert-action_1018.tgz
Binary file not shown.
4 changes: 4 additions & 0 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ This setting is required, and at least one field needs to be defined.

This defines the icon link to be used for the message publication, and will override any global setting that has been set.

- **Theme color**

Specifies a custom brand color for the card in hexadecimal code format. (optional, defaults to 0076D7)

- **Potential Action Name** and **Potential Action URL**

These two items define the action link button and target that can automatically be added when the message is published in Microsoft Teams.
Expand Down
5 changes: 5 additions & 0 deletions docs/releasenotes.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Release notes
#############

Version 1.0.18
==============

- Feature: Issue #28 - Theme Color as configurable option #28

Version 1.0.17
==============

Expand Down

0 comments on commit a872ebf

Please sign in to comment.