Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add send-system-notification callable workflow #144

Open
wants to merge 29 commits into
base: main
Choose a base branch
from

Conversation

lorenyu
Copy link
Collaborator

@lorenyu lorenyu commented Dec 13, 2024

Ticket

Related to navapbc/template-infra#808

Changes

  • Add callable workflow send-system-notification.yml
  • Add project-config/system-notifications.tf configuration for defining channel

Context for reviewers

I plan on adding documentation in a future PR once I get this working end to end for a few workflows

Testing

Ran workflow manually: https://github.com/navapbc/platform-test/actions/runs/12324530980

image

Preview environment for app

@lorenyu lorenyu changed the title Lorenyu/systemnotifications Add send-system-notification callable workflow Dec 13, 2024
Copy link
Contributor

@coilysiren coilysiren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have styling suggestions, LGTM besides


system_notifications_config = {
channels = {
"workflow-failures" = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"workflow-failures" = {
workflow-failures = {

I don't think either - or _ in variable names requires quotes?

workflow_dispatch:
inputs:
channel:
description: "Name of channel to use. Must be defined in /infra/project-config"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: "Name of channel to use. Must be defined in /infra/project-config"
description: "Name of channel to use. Must be defined in /infra/project-config/system-notifications.tf"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that was intentional since I was just referring to the module not the specific file in case we rename the file, but you're right this is probably clearer will change


- name: Send Slack message
if: ${{ steps.get-channel-type.outputs.channel_type == 'slack' }}
uses: slackapi/[email protected]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm glad this exists! I wrote my version using curl, and it was hecka annoying

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants