mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-21 07:29:37 +01:00
Merge pull request #708 from GromNaN/patch-1
docs: Add a notification example for Google Hangouts Chat
This commit is contained in:
commit
5ea3c1695c
@ -10,7 +10,7 @@ commands.
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
An example with a **hipchat** hook:
|
An example with a **HipChat** and **Google Hangouts Chat** hook:
|
||||||
|
|
||||||
#### Single notification
|
#### Single notification
|
||||||
|
|
||||||
@ -26,23 +26,16 @@ notify:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
notify:
|
notify:
|
||||||
'example-package-1'
|
'example-google-chat':
|
||||||
|
method: POST
|
||||||
|
headers: [{'Content-Type': 'application/json'}]
|
||||||
|
endpoint: https://chat.googleapis.com/v1/spaces/AAAAB_TcJYs/messages?key=myKey&token=myToken
|
||||||
|
content: '{"text":"New package published: `{{ name }}{{#each versions}} v{{version}}{{/each}}`"}'
|
||||||
|
'example-hipchat':
|
||||||
method: POST
|
method: POST
|
||||||
headers: [{'Content-Type': 'application/json'}]
|
headers: [{'Content-Type': 'application/json'}]
|
||||||
endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken
|
endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken
|
||||||
content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}'
|
content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}'
|
||||||
'example-package-2'
|
|
||||||
method: POST
|
|
||||||
headers: [{'Content-Type': 'application/json'}]
|
|
||||||
endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken
|
|
||||||
content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}'
|
|
||||||
'example-package-3'
|
|
||||||
method: POST
|
|
||||||
headers: [{'Content-Type': 'application/json'}]
|
|
||||||
endpoint: https://usagge.hipchat.com/v2/room/3729485/notification?auth_token=mySecretToken
|
|
||||||
content: '{"color":"green","message":"New package published: * {{ name }}*","notify":true,"message_format":"text"}'
|
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
@ -54,5 +47,4 @@ packagePattern| string | No | all | | Only run this notification if the package
|
|||||||
packagePatternFlags| string | No | all | | Any flags to be used with the regular expression
|
packagePatternFlags| string | No | all | | Any flags to be used with the regular expression
|
||||||
headers| array/object | Yes | all | | If this endpoint requires specific headers, set them here as an array of key: value objects.
|
headers| array/object | Yes | all | | If this endpoint requires specific headers, set them here as an array of key: value objects.
|
||||||
endpoint| string | Yes | all | | set the URL endpoint for this call
|
endpoint| string | Yes | all | | set the URL endpoint for this call
|
||||||
content| string | Yes | all | | any Handlebar expressions
|
content| string | Yes | all | | any [handlebar](https://handlebarsjs.com/) expressions
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user