Skip to content

Add Discord as a 4th source to the user-signal-report pipeline #12627

Closed

Description

@nathanchengx

scripts/user_signals/ (see scripts/user_signals/README.md) currently pulls user
feedback signal from GitHub issues, App Store reviews, and Google Play reviews,
scores it against the ISSUE_TRIAGE_GUIDE.MD formula, and writes a ranked report.
Discord (the community's bug-report / feedback channels, e.g. via r/OmiAI-adjacent
Discord activity) was scoped out of the first version because building it needs a
bot token with read-only message-history access to the relevant channels, which
wasn't available at the time.

To add it:

  1. Create a bot in the Discord Developer Portal, invite it to the server with
    "Read Messages/View Channels" + "Read Message History" (no write scopes needed),
    and get the channel ID(s) that hold bug reports / feedback.
  2. Implement sources_discord.py following the existing sources as a template:
    a pure parse_entry(raw) -> Signal | None plus fetch(...) -> list[Signal]
    that calls Discord's REST API (GET /channels/{channel_id}/messages) with the
    bot token — no discord.py/gateway dependency needed for a read-only history pull.
  3. Register it in cli.py's fetch_all().
  4. Add fixture-based unit tests for parse_entry() alongside the existing
    tests/test_parsers.py pattern (hermetic, no network).
  5. Wire DISCORD_BOT_TOKEN / DISCORD_CHANNEL_IDS as secrets in
    .github/workflows/user-signal-report.yml if the scheduled run should include it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions