diff --git a/README.md b/README.md index 0818653..e2a355a 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ For instructions on how to run soba on Kubernetes, see [here](kubernetes/README. ## scheduling backups -Backups can be scheduled to run by setting an additional environment variable: `GIT_BACKUP_INTERVAL`. The value is the can be specified in hours (default) or minutes. For example, this will run the backup daily: +Backups can be scheduled to run by setting an additional environment variable: `GIT_BACKUP_INTERVAL`. The value can be specified in hours (default) or minutes. For example, this will run the backup daily: ```bash export GIT_BACKUP_INTERVAL=24h @@ -185,6 +185,7 @@ To get the bot token: - submit a name, e.g. soba-notifier - submit a username for the bot - record bot token + To get the chat id: - add the bot user to the group (get group info and click Add) - run command:`curl -s -X POST https://api.telegram.org/bot/getUpdates` @@ -193,30 +194,30 @@ To get the chat id: ### Slack *(since release 1.2.16)* To send a Slack message on completion, set the environment variables: -`SLACK_CHANNEL_ID` with the channel id -`SLACK_API_TOKEN` with the token for the Slack app -For example: -`$ export SLACK_CHANNEL_ID=C12345678` -`$ export SLACK_API_TOKEN=xoxb-***********-************-************************` +`SLACK_CHANNEL_ID` with the channel id +`SLACK_API_TOKEN` with the token for the Slack app +For example: +`$ export SLACK_CHANNEL_ID=C12345678` +`$ export SLACK_API_TOKEN=xoxb-***********-************-************************` #### note -- channel id can be in `About` section at bottom of the channel details -- the app needs to be added under `Apps` in the `Integrations` section of channel details -- use the token starting with `xoxb-` and not the one starting with `xoxp-` +- channel id can be in `About` section at bottom of the channel details +- the app needs to be added under `Apps` in the `Integrations` section of channel details +- use the token starting with `xoxb-` and not the one starting with `xoxp-` ### webhooks -*(since release 1.2.8)* -To send a webhook on completion of a run: set the environment variable `SOBA_WEBHOOK_URL` with the url of the endpoint. -For example: -`$ export SOBA_WEBHOOK_URL=https://api.example.com/webhook` +*(since release 1.2.8)* +To send a webhook on completion of a run: set the environment variable `SOBA_WEBHOOK_URL` with the url of the endpoint. +For example: +`$ export SOBA_WEBHOOK_URL=https://api.example.com/webhook` #### webhook payload -The payload is a JSON document containing details of the backup run. The default format lists each repository and the success or failure of its backup. You can see an example [here](examples/webhook.json). -For a shorter format, with just stats on the success and failure counts, use the environment variable `SOBA_WEBHOOK_FORMAT`. -For example: -`$ export SOBA_WEBHOOK_FORMAT=short` -You can see a sample [here](examples/webhook-short.json). -*The default format (if not specified) is `long`* +The payload is a JSON document containing details of the backup run. The default format lists each repository and the success or failure of its backup. You can see an example [here](examples/webhook.json). +For a shorter format, with just stats on the success and failure counts, use the environment variable `SOBA_WEBHOOK_FORMAT`. +For example: +`$ export SOBA_WEBHOOK_FORMAT=short` +You can see a sample [here](examples/webhook-short.json). +*The default format (if not specified) is `long`* > NOTE: The long format webhook will contain a list of your repos and, if there's an error, may contain other details including URLs. Please keep this in mind when sending to endpoints that may be insecure.