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 step in examples yml #944

Merged
merged 3 commits into from
Dec 11, 2024
Merged

fix: Slack step in examples yml #944

merged 3 commits into from
Dec 11, 2024

Conversation

plxity
Copy link
Contributor

@plxity plxity commented Dec 3, 2024

Important

Update Slack notification details in examples_js.yml to notify specific users and change message content.

  • Slack Notification Updates in examples_js.yml:
    • Change SLACK_WEBHOOK from SLACK_WEBHOOK to SLACK_TECH_WEBHOOK.
    • Update SLACK_TITLE from "JS Example Tests Failed" to "Example Tests Failed".
    • Modify SLACK_MESSAGE to notify <@Apoorv> <@kaavee> instead of <@team>.
    • Update SLACK_FOOTER from "Failed JS Example Tests | GitHub Actions" to "Failed Example Tests | GitHub Actions".

This description was created by Ellipsis for 65d8851. It will automatically update as commits are pushed.

Copy link

vercel bot commented Dec 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
composio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 11, 2024 9:20am

@plxity plxity enabled auto-merge (squash) December 3, 2024 13:48
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 152f56a in 1 minute and 1 seconds

More details
  • Looked at 23 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. .github/workflows/examples_js.yml:82
  • Draft comment:
    Ensure that SLACK_TECH_WEBHOOK is correctly set in the repository secrets.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The change from SLACK_WEBHOOK to SLACK_TECH_WEBHOOK seems intentional, but it's important to ensure that this secret is correctly set in the repository settings.

Workflow ID: wflow_A4njGP3gQLK3EQsl


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on 65d8851 in 12 seconds

More details
  • Looked at 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. .github/workflows/examples_js.yml:83
  • Draft comment:
    The SLACK_TITLE should be updated to "Example Tests Failed" as per the PR description.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_UPJmRHpY3avqGL8d


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

SLACK_MSG_AUTHOR: ${{ inputs.author || github.actor }}
SLACK_MESSAGE: "<@team> ${{ inputs.commit_message || github.event.head_commit.message }}"
SLACK_MESSAGE: "<@Apoorv> <@kaavee> ${{ inputs.commit_message || github.event.head_commit.message }}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hardcoding specific user mentions (@Apoorv and @kaavee) in the workflow file is not a maintainable practice. Consider:

  1. Using a team mention instead (@team as before)
  2. Or using a configurable environment variable/secret that can store the list of users to notify
    This would make it easier to update notification targets without changing the workflow file.

@@ -79,12 +79,12 @@ jobs:
if: ${{ failure() && github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, 'release') && !contains(github.event.head_commit.message, 'Release') && !inputs.dont_notify }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_TITLE: "JS Example Tests Failed"
SLACK_WEBHOOK: ${{ secrets.SLACK_TECH_WEBHOOK }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

The change from SLACK_WEBHOOK to SLACK_TECH_WEBHOOK represents a significant configuration change. Please ensure:

  1. The new webhook secret is properly configured in repository settings
  2. The new webhook has appropriate permissions and is pointing to the correct Slack channel
  3. Consider adding a comment explaining why this webhook change was necessary

@shreysingla11
Copy link
Collaborator

Code Review Summary

Changes Overview

The PR modifies the Slack notification configuration in the JavaScript example tests workflow.

Code Quality Assessment: ⚠️ Needs Improvement

Positive Aspects:

  • Clean YAML formatting and structure
  • Clear environment variable naming
  • Simplified notification messages

Areas for Improvement:

  1. Maintainability Issues:

    • Hardcoded user mentions make the workflow brittle to team changes
    • Consider using configurable user lists instead
  2. Configuration Changes:

    • New webhook configuration needs proper setup verification
    • Documentation needed for webhook change rationale
  3. Consistency Concerns:

    • Removing "JS" prefix from notifications while keeping it in the workflow name might cause confusion
    • Consider maintaining consistent naming or documenting the reason for the difference

Recommendations:

  1. Replace hardcoded user mentions with a more maintainable solution
  2. Document the webhook change and ensure proper configuration
  3. Consider adding inline comments for future maintainers

The changes are functional but could benefit from these improvements to enhance maintainability and clarity.

Copy link

github-actions bot commented Dec 3, 2024

This comment was generated by github-actions[bot]!

JS SDK Coverage Report

📊 Coverage report for JS SDK can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/coverage-12273275865/coverage/index.html

📁 Test report folder can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/html-report-12273275865/html-report/report.html

@plxity plxity merged commit db060f3 into master Dec 11, 2024
11 checks passed
@plxity plxity deleted the fix-examples-yml branch December 11, 2024 09:35
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.

3 participants