Skip to content

Commit cd86a6c

Browse files
committed
st2chatops docs updates
1 parent 4edbfb7 commit cd86a6c

File tree

6 files changed

+50
-36
lines changed

6 files changed

+50
-36
lines changed

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM ubuntu:18.04
1+
FROM ubuntu:22.04
22

33
RUN apt-get -qq update && apt-get -q install -y \
44
curl git \
55
libffi-dev libldap2-dev libsasl2-dev libssl-dev \
6-
python3-dev python3-pip python-virtualenv
6+
python3-dev python3-pip python3-virtualenv python3-venv
77

88
ADD . /st2docs
99
WORKDIR /st2docs

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ docker-build:
208208
@echo
209209
@echo "==================== Building st2docs Docker ===================="
210210
@echo
211-
docker build -t st2/st2docs -f Dockerfile .
211+
docker build --platform=linux/amd64 -t st2/st2docs -f Dockerfile .
212212

213213
.PHONY: docker-run
214214
docker-run:

docs/source/chatops/aliases.rst

+20
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,26 @@ depending on execution status:
373373
374374
To disable the result message, you can use the ``enabled`` flag in the same way as in ``ack``.
375375

376+
Threading Replies (Slack)
377+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
378+
379+
You can configure the hubot ``ack`` and ``result`` messages to be sent as a threaded reply to the invoked command in slack. This defaults to false if not set.
380+
381+
.. code-block:: yaml
382+
383+
ack:
384+
extra:
385+
slack:
386+
thread_response: true
387+
format: ":green-check: Querying those items for you..."
388+
append_url: false
389+
result:
390+
extra:
391+
slack:
392+
thread_response: true
393+
format: |
394+
```{{execution.result.output.results}}```
395+
376396
Plaintext Messages (Slack)
377397
^^^^^^^^^^^^^^^^^^^^^^^^^^
378398

docs/source/chatops/chatops.rst

+22-32
Original file line numberDiff line numberDiff line change
@@ -50,41 +50,33 @@ Officially Supported Chat Providers
5050

5151
We officially provide support for the following chat providers with hubot:
5252

53-
* `Slack <https://github.com/slackapi/hubot-slack>`_
54-
* Microsoft Teams (via `BotFramework <https://github.com/Microsoft/BotFramework-Hubot>`_)
55-
* `Mattermost version 5 <https://github.com/loafoe/hubot-matteruser>`_
56-
* `Rocket.Chat <https://github.com/RocketChat/hubot-rocketchat>`_
57-
* `Cisco Spark <https://github.com/tonybaloney/hubot-spark>`_
53+
* `Slack <https://github.com/hubot-friends/hubot-slack>`_
5854

5955
Officially Unsupported Chat Providers
6056
=====================================
6157

62-
We do not provide support for the following adapters, but they are still bundled in the
63-
st2chatops package, can be configured in ``st2chatops.env``, and still work (as far as we
64-
know).
58+
We do not provide support for the following adapters as of st2chatops 3.9. They are still bundled in the
59+
st2chatops 3.8 package, and can be configured in ``st2chatops.env``, and may still work.
6560

61+
* Microsoft Teams (via `BotFramework <https://github.com/Microsoft/BotFramework-Hubot>`_) See :doc:`3.8 documentation <msteams>`
62+
* `Mattermost version 5 <https://github.com/loafoe/hubot-matteruser>`_
63+
* `Rocket.Chat <https://github.com/RocketChat/hubot-rocketchat>`_
64+
* `Cisco Spark <https://github.com/tonybaloney/hubot-spark>`_
6665
* `Flowdock <https://github.com/flowdock/hubot-flowdock>`_
6766
* `XMPP <https://github.com/markstory/hubot-xmpp>`_
6867
* `IRC <https://github.com/nandub/hubot-irc>`_
6968

7069
Configuration
7170
=============
7271

73-
.. note::
74-
75-
Configuring st2chatops with Microsoft Teams is a more involved process. Please see
76-
:doc:`our documentation <msteams>` specifically for that chat provider.
77-
All other chat providers can be configured in ``st2chatops.env`` with the instructions
78-
below.
79-
8072
Package-based Install
8173
~~~~~~~~~~~~~~~~~~~~~
8274

8375
If you installed |st2| following the :doc:`install docs </install/index>`, the ``st2chatops``
8476
package will take care of `almost` everything for you. Hubot with the necessary adapters is already
8577
installed, and StackStorm :ref:`API keys <authentication-apikeys>` have been configured.
8678

87-
You just need to tell |st2| which Chat service to use - e.g. Slack, MatterMost, etc. You will also need
79+
You just need to tell |st2| which Chat service to use - e.g. Slack. You will also need
8880
to give it credentials. Your Chat service may also need configuration. For example, to configure Slack,
8981
you first need to add a new Hubot integration to Slack. You can do this through Slack's admin interface.
9082
Take note of the ``HUBOT_SLACK_TOKEN`` that Slack provides.
@@ -94,27 +86,25 @@ your adapter. For example, if you are configuring Slack, look for this section:
9486

9587
.. code-block:: bash
9688
97-
# Slack settings (https://github.com/slackhq/hubot-slack):
98-
#
89+
# Slack App YAML settings (https://github.com/hubot-friends/hubot-slack?tab=readme-ov-file#sample-yaml)
90+
# Confirm your existing Modern Slack App or a newly created Modern slack app has the above permissions
9991
# export HUBOT_ADAPTER=slack
100-
# Obtain the Slack token from your app page at api.slack.com, it's the "Bot
101-
# User OAuth Access Token" in the "OAuth & Permissions" section.
102-
# export HUBOT_SLACK_TOKEN=xoxb-CHANGE-ME-PLEASE
103-
# Uncomment the following line to force hubot to exit if disconnected from slack.
104-
# export HUBOT_SLACK_EXIT_ON_DISCONNECT=1
92+
# Obtain the Bot user OAuth Token on the Oauth & Permissions section
93+
# export HUBOT_SLACK_BOT_TOKEN=xoxb-CHANGE-ME-PLEASE
94+
# Obtain a App-Level Token on the Basic Information section, scopes required: connections:write
95+
# export HUBOT_SLACK_APP_TOKEN=xapp-CHANGE-ME-PLEASE
10596
10697
Edit this file so it looks something like this:
10798

10899
.. code-block:: bash
109100
110-
# Slack settings (https://github.com/slackhq/hubot-slack):
111-
#
101+
# Slack App YAML settings (https://github.com/hubot-friends/hubot-slack?tab=readme-ov-file#sample-yaml)
102+
# Confirm your existing Modern Slack App or a newly created Modern slack app has the above permissions
112103
export HUBOT_ADAPTER=slack
113-
# Obtain the Slack token from your app page at api.slack.com, it's the "Bot
114-
# User OAuth Access Token" in the "OAuth & Permissions" section.
115-
export HUBOT_SLACK_TOKEN=xoxb-SUPER-SECRET-TOKEN
116-
# Uncomment the following line to force hubot to exit if disconnected from slack.
117-
export HUBOT_SLACK_EXIT_ON_DISCONNECT=1
104+
# Obtain the Bot user OAuth Token on the Oauth & Permissions section
105+
export HUBOT_SLACK_BOT_TOKEN=xoxb-####-####-####
106+
# Obtain a App-Level Token on the Basic Information section, scopes required: connections:write
107+
export HUBOT_SLACK_APP_TOKEN=xapp-####-####-####
118108
119109
Your specific Chat service may require different settings. Any environment settings needed can be
120110
added to this file.
@@ -144,8 +134,8 @@ Restart ``st2chatops`` after creating that file.
144134
Using an External Adapter
145135
~~~~~~~~~~~~~~~~~~~~~~~~~
146136

147-
The ``st2chatops`` package includes adapters for common chat services, but if an
148-
adapter for a service you use isn't bundled there, don't worry: you can install it manually.
137+
The ``st2chatops`` package includes adapters for Slack, but if an
138+
adapter for a service you use isn't bundled there, don't worry: you can install it manually or try st2chatops 3.8.
149139

150140
For example, here's how to connect |st2| to Yammer using the ``hubot-yammer`` adapter:
151141

docs/source/chatops/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Interested in learning more? Here are some things to get you started on your voy
5050
:maxdepth: 1
5151

5252
chatops
53-
Configuration for Microsoft Teams <msteams>
53+
Configuration for Microsoft Teams (3.8) <msteams>
5454
Action Aliases <aliases>
5555
notifications
5656
Pack Deployment <pack_deploy>

docs/source/chatops/msteams.rst

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Using Microsoft Teams (with BotFramework)
22
=========================================
33

4+
.. warning::
5+
6+
This is documentation assumes you are using st2chatops 3.8. Support for Microsoft Teams was removed in 3.9.
7+
48
Configurating st2chatops with Microsoft Teams is **much** more involved than configuring
59
other chat providers.
610

0 commit comments

Comments
 (0)