Merge remote-tracking branch 'upstream/dev' into fix/documents

This commit is contained in:
Anish Sarkar 2026-02-04 18:19:09 +05:30
commit bbb367cc53
12 changed files with 895 additions and 93 deletions

View file

@ -0,0 +1,33 @@
"""Add DISCORD_JOIN to incentive task type enum
Revision ID: 91
Revises: 90
Changes:
1. Add DISCORD_JOIN value to incentivetasktype enum
"""
from collections.abc import Sequence
from alembic import op
# revision identifiers, used by Alembic.
revision: str = "91"
down_revision: str | None = "90"
branch_labels: str | Sequence[str] | None = None
depends_on: str | Sequence[str] | None = None
def upgrade() -> None:
"""Add DISCORD_JOIN to incentivetasktype enum."""
op.execute("ALTER TYPE incentivetasktype ADD VALUE IF NOT EXISTS 'DISCORD_JOIN'")
def downgrade() -> None:
"""Remove DISCORD_JOIN from incentivetasktype enum.
Note: PostgreSQL doesn't support removing values from enums directly.
This would require recreating the enum type, which is complex and risky.
For safety, we leave the enum value in place during downgrade.
"""
pass

View file

@ -164,6 +164,7 @@ class IncentiveTaskType(str, Enum):
GITHUB_STAR = "GITHUB_STAR"
REDDIT_FOLLOW = "REDDIT_FOLLOW"
DISCORD_JOIN = "DISCORD_JOIN"
# Future tasks can be added here:
# GITHUB_ISSUE = "GITHUB_ISSUE"
# SOCIAL_SHARE = "SOCIAL_SHARE"
@ -185,6 +186,12 @@ INCENTIVE_TASKS_CONFIG = {
"pages_reward": 100,
"action_url": "https://www.reddit.com/r/SurfSense/",
},
IncentiveTaskType.DISCORD_JOIN: {
"title": "Join our Discord",
"description": "Join the SurfSense community on Discord",
"pages_reward": 100,
"action_url": "https://discord.gg/ejRNvftDp9",
},
# Future tasks can be configured here:
# IncentiveTaskType.GITHUB_ISSUE: {
# "title": "Create an issue",