Repo Relay is configured through GitHub Action inputs (in the workflow) or, for the manual workflow path, environment variables. Every channel except the PR channel is optional and falls back to the PR channel when unset.
Action inputs
| Input | Required | Default | Description |
|---|---|---|---|
discord_bot_token | Yes | — | Discord bot token |
channel_prs | Yes | — | Channel ID for PR notifications |
channel_issues | No | channel_prs | Channel ID for issue notifications |
channel_releases | No | channel_prs | Channel ID for release notifications |
channel_deployments | No | channel_prs | Channel ID for deployment notifications |
channel_security | No | channel_prs | Channel ID for security alert notifications |
state_dir | No | ~/.repo-relay | Directory for SQLite state persistence |
github_token | No | github.token | GitHub token for API access (review detection) |
The action validates inputs before running: the bot token and PR channel must be present, and channel_prs must be a numeric Discord channel ID.
Environment variables
When running the bot directly (the manual workflow or local development), the same configuration is read from environment variables:
| Variable | Required | Description |
|---|---|---|
DISCORD_BOT_TOKEN | Yes | Discord bot token |
DISCORD_CHANNEL_PRS | Yes | Channel ID for PR notifications |
DISCORD_CHANNEL_ISSUES | No | Issues channel (defaults to PR channel) |
DISCORD_CHANNEL_RELEASES | No | Releases channel (defaults to PR channel) |
DISCORD_CHANNEL_DEPLOYMENTS | No | Deployments channel (defaults to PR channel) |
DISCORD_CHANNEL_SECURITY | No | Security channel (defaults to PR channel) |
GITHUB_TOKEN | Yes | GitHub API access for review detection |
STATE_DIR | No | Custom state directory (default ~/.repo-relay) |
REPO_RELAY_SESSION_MAX_WAIT | No | Max ms to wait for a Discord session-limit reset (default 300000, i.e. 5 min). Set 0 to fail immediately. |
Channel routing
There is one required channel (PRs) and four optional ones. PR, CI, review, comment, and push notifications always go to the PR channel. Issues, releases, deployments, and security alerts go to their dedicated channel if set, otherwise they fall back to the PR channel. This means a minimal setup with a single channel ID relays everything to one place.
See the Event and Notification Model for which GitHub events map to which channel.
Required Discord permissions
When generating the bot invite URL, enable these. They are also re-checked at runtime per channel — if any are missing the run fails with a clear error.
| Permission | Why it is needed |
|---|---|
| Send Messages | Post PR / issue / release embeds |
| Create Public Threads | Create threads for PR updates |
| Send Messages in Threads | Post updates into PR threads |
| Manage Threads | Unarchive and manage PR threads |
| Embed Links | Render rich embeds with PR info |
| Read Message History | Find existing PR messages to update |
Invite URL scope: bot. If the bot connects but cannot post, check channel-level permission overrides — see Troubleshooting.
Related
- Getting Started for the full workflow file.
- Runners and State Persistence for
state_dirand caching.