1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-17 07:45:52 +01:00
verdaccio/website/translated_docs/es-ES/notifications.md
verdacciobot cb18eeae4f New Crowdin translations (#458)
* New translations notifications.md (Chinese Simplified)

* New translations en.json (Chinese Traditional, Hong Kong)

* New translations en.json (Chinese Traditional)

* New translations en.json (Portuguese, Brazilian)

* New translations en.json (Spanish)

* New translations en.json (Urdu (Pakistan))

* New translations notifications.md (Chinese Traditional)

* New translations notifications.md (Chinese Traditional, Hong Kong)

* New translations notifications.md (Portuguese, Brazilian)

* New translations notifications.md (Spanish)

* New translations notifications.md (Urdu (Pakistan))

* New translations en.json (Chinese Simplified)
2018-01-09 09:55:16 +01:00

2.9 KiB

id date title
notifications 2017-07-10T23:36:56.503Z Notifications

Notify was built primarily to use with Slack's Incoming webhooks, but will also deliver a simple payload to any endpoint. Currently only active for publish / create commands.

Usage

An example with a hipchat hook:

Single notification

notify:
  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"}'

Multiple notification

notify:
  'example-package-1'
     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-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

Property Type Required Support Default Description
method string No all HTTP verb
packagePattern string No all Only run this notification if the package name matches 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.
endpoint string Yes all set the URL endpoint for this call
content string Yes all any Handlebar expressions