Skip to content

Commit

Permalink
Merge pull request #11 from datarobot-oss/kimd/APP-3395-missingparams
Browse files Browse the repository at this point in the history
[APP-3395] Fix missing params condition & add autostopping readme
  • Loading branch information
kideh88 authored Oct 22, 2024
2 parents 2762341 + bf424b9 commit 1d6d878
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,20 @@ Lastly, scroll to the top of the application source and click **Build applicatio
To test the bot, navigate to your Slack chat and use @-mention: `@testbot Hello!`. Be sure to use your own bot username and to invite them to the public channel that you're testing within.
If the @-mention worked, you can also verify the messages sample by saying `hello` or `bye`.

### Disable auto-stopping

Custom applications auto-stop after a while of inactivity. To turn this off for your Slack bot, please run the following
command using your `<application_id>` and `<authorization_token>`:

```shell
curl --location --request PATCH 'https://app.datarobot.com/api/v2/customApplications/<application_id>/' \
--header 'Content-Type: application/json' \
--header 'Authorization: <authorization_token>' \
--data '{
"allowAutoStopping": false
}'
```

## Add more actions

You can find examples for all available Slack listeners in the [Bolt for Python starter template](https://github.com/slack-samples/bolt-python-starter-template/tree/main). The approach is the exact same as in this repository, but they provide other, more advanced actions.
Expand Down
3 changes: 2 additions & 1 deletion src/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ <h2>Missing required environment variable(s):</h2>
<ul>
{% if not has_bot_token %}
<li class="bold">SLACK_BOT_TOKEN</li>
{% elif not has_app_token %}
{% endif %}
{% if not has_app_token %}
<li class="bold">SLACK_APP_TOKEN</li>
{% endif %}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion template_info.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
],
"source": {
"repositoryUrl": "https://github.com/datarobot-oss/slack-bot-app",
"releaseTag": "10.2.3"
"releaseTag": "10.2.4"
},
"previewImage": null
},
Expand Down

0 comments on commit 1d6d878

Please sign in to comment.