GoogleCloudPlatform / GoogleCloudPlatform/nodejs-docs-samples
Refactor alerts.replaceChannels.js snippet to align with code sample snippet guidelines
- Lenguaje dominante
- JavaScript
- Estrellas
- 3k
- Forks
- 2k
- Merge medio
- 2 d 19 h
- PR fusionados (30 d)
- 44
Descripción
The current version of [alerts.replaceChannels.js] contains four different region tags that demonstrate 3 (or, arguably 4) different actions. The sample flow does three different actions:
* runs through hardcoded list of notification channel names
* calls API to enable each channel using its name
* on (_any_) creates a new email notification channel with that name
* modifies hardcoded alert policy to send notifications to the hardcoded list of channels
The code should be split into 3 snippets (a snippet per file) to demonstrate the following three actions:
1. Update notification channel. The snippet can be conditioned that the channel should exist.
1. Create a new notification channel.
1. Update an alert policy with a notification channel.
All snippets should provide a reasonable error handling. Inputs should be clearly commented to explain expectations. Error handling should, at least, handle errors when inputs are invalid.
[alerts.replaceChannels.js]: https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/main/monitoring/snippets/alerts.replaceChannels.js
Guía de contribución
Línea de trabajo
Comienza con monitoring/snippets/alerts.replaceChannels.js y revisa sus cuatro etiquetas de región en relación con las tres acciones solicitadas. Divide el ejemplo en tres snippets, comenta claramente las entradas esperadas y añade el manejo de entradas no válidas; se considera terminado cuando cada acción se demuestra de forma independiente con un manejo de errores razonable.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- google-cloud, javascript
- Área
- cloud, documentation
- Tipo de issue
- Refactorización
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100