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

chore: add Discord notification template #29311

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

daibhin
Copy link
Contributor

@daibhin daibhin commented Feb 27, 2025

Problem

Add template to notify errors on Discord

@daibhin daibhin requested a review from a team February 27, 2025 16:00
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

This PR adds Discord notification templates for error tracking events and refactors existing templates for better consistency across platforms.

  • Added new error-tracking-issue-created and error-tracking-issue-reopened sub-templates to SUB_TEMPLATE_COMMON in /posthog/cdp/templates/hog_function_template.py
  • Updated /posthog/cdp/templates/discord/template_discord.py with new sub-templates for error tracking notifications
  • Refactored /posthog/cdp/templates/slack/template_slack.py to use common sub-template definitions instead of hardcoded values
  • Modified /posthog/cdp/templates/microsoft_teams/template_microsoft_teams.py to reference centralized sub-template definitions for consistency

4 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines +97 to +98
description="",
id=SUB_TEMPLATE_COMMON["error-tracking-issue-created"].id,
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Empty description field. Consider adding a descriptive message similar to other sub-templates for consistency.

Suggested change
description="",
id=SUB_TEMPLATE_COMMON["error-tracking-issue-created"].id,
description="Posts a message to Discord when a new issue is created",
id=SUB_TEMPLATE_COMMON["error-tracking-issue-created"].id,

Comment on lines +109 to +110
description="",
id=SUB_TEMPLATE_COMMON["error-tracking-issue-reopened"].id,
Copy link
Contributor

Choose a reason for hiding this comment

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

style: Empty description field. Consider adding a descriptive message similar to other sub-templates for consistency.

Suggested change
description="",
id=SUB_TEMPLATE_COMMON["error-tracking-issue-reopened"].id,
description="Posts a message to Discord when an issue is reopened",
id=SUB_TEMPLATE_COMMON["error-tracking-issue-reopened"].id,

@jasperchess
Copy link

🙏

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