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

fix: slack notification #4

Merged
merged 1 commit into from
Feb 19, 2025
Merged

fix: slack notification #4

merged 1 commit into from
Feb 19, 2025

Conversation

Arjxm
Copy link
Collaborator

@Arjxm Arjxm commented Feb 19, 2025

This pull request includes several changes to the index.js file to improve the deployment notification process and update API endpoints. The most important changes include updating URLs, adding a function to extract contract data, validating deployment data, and handling deployment failures more robustly.

API endpoint updates:

  • Updated the sandbox API URL from https://api.dev.buildbear.io/v1/buildbear-sandbox to https://api.buildbear.io/v1/buildbear-sandbox in the createNode function.
  • Updated the deployment notification API URL from https://api.dev.buildbear.io/ci/deployment-notification to https://api.buildbear.io/ci/deployment-notification in the sendNotificationToBackend function.

Deployment data extraction and validation:

  • Added the extractContractData function to extract relevant contract data for notification.
  • Added the validateDeployment function to validate if deployment was successful by checking for valid transactions.

Enhanced error handling:

  • Modified the sendNotificationToBackend function to process deployment data, validate deployment success, and update the status and summary accordingly. If validation fails, the status is set to "failed" and the summary is updated with the validation message. Additionally, if the status is changed to "failed", the GitHub Action is set to fail.

@Arjxm Arjxm requested review from alatras and itsshantanu February 19, 2025 16:52
@alatras alatras merged commit 562d9fd into main Feb 19, 2025
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