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

InputRequiredDefaultDescription
discord_bot_tokenYesDiscord bot token
channel_prsYesChannel ID for PR notifications
channel_issuesNochannel_prsChannel ID for issue notifications
channel_releasesNochannel_prsChannel ID for release notifications
channel_deploymentsNochannel_prsChannel ID for deployment notifications
channel_securityNochannel_prsChannel ID for security alert notifications
state_dirNo~/.repo-relayDirectory for SQLite state persistence
github_tokenNogithub.tokenGitHub 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:

VariableRequiredDescription
DISCORD_BOT_TOKENYesDiscord bot token
DISCORD_CHANNEL_PRSYesChannel ID for PR notifications
DISCORD_CHANNEL_ISSUESNoIssues channel (defaults to PR channel)
DISCORD_CHANNEL_RELEASESNoReleases channel (defaults to PR channel)
DISCORD_CHANNEL_DEPLOYMENTSNoDeployments channel (defaults to PR channel)
DISCORD_CHANNEL_SECURITYNoSecurity channel (defaults to PR channel)
GITHUB_TOKENYesGitHub API access for review detection
STATE_DIRNoCustom state directory (default ~/.repo-relay)
REPO_RELAY_SESSION_MAX_WAITNoMax 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.

PermissionWhy it is needed
Send MessagesPost PR / issue / release embeds
Create Public ThreadsCreate threads for PR updates
Send Messages in ThreadsPost updates into PR threads
Manage ThreadsUnarchive and manage PR threads
Embed LinksRender rich embeds with PR info
Read Message HistoryFind existing PR messages to update

Invite URL scope: bot. If the bot connects but cannot post, check channel-level permission overrides — see Troubleshooting.