Skip to content
/ olotl Public

Add temporary pull request threads to Discord for faster merging

Notifications You must be signed in to change notification settings

inngest/olotl

Repository files navigation

Discord PR management: olotl

This is an open-source set of functions built using NextJS and the Inngest SDK which deploy to Inngest, allowing you to coordinate pull requests within single-use ephemeral channels in Discord.

Think of this as a free, open-source version of Axolo for discord.

This lets you:

  • Create new temporary threads for each PR
  • Be notified when PRs are reviewed, updated, or switched from draft within Discord
  • Communicate and chat easily on code changes
  • Merge and ship features faster via increased collaboration.

Deploying

To deploy:

  1. Clone this repo
  2. Deploy to your provider of choice
  3. Register your functions with Inngest

The functions will be deployed, ready to run from any GitHub event as soon as the events are triggered.


Configuring Github webhooks

  1. Create a new Github webhook within Inngest
  2. Copy the generated URL as a webhook into your target repos.

That's it! Events from Github will start flowing through to Inngest, automatically triggering any functions that respond to those events. Now in order for our functions to succeed, we need to give them auth access to Discord.


Configuring your Discord channels

You'll need to make your own Discord bot to grant your functions access to your server.

  1. Pop on over to Discord Developers and make an app with a bot.
  2. Connect your server via the URL generator with access to:
  • Manage channels
  • Send messages
  • Create public threads
  • Send mesasges in threads
  • Manage messages
  • Manage threads
  • Mention everyone
  1. Copy the bot token and add it as a secret to Inngest, with the name of DISCORD_TOKEN. Be sure to prefix the bot token with Bot: Bot your-token.
  2. Copy your guild ID (server ID) as a secret to Inngest, with the name of DISCORD_GUILD_ID.
  3. Copy the channel ID which will house the threads to Inngest, with the name of DISCORD_CHANNEL_ID.

See .env for an example of the secrets to save.

How it works

This repo uses Inngest to receive events from GitHub via webhooks.

The functions in this repo are event-driven: they declaratively specify the events that trigger them within their inngest.json files.

Each time Inngest receives an event, it checks which functions should run and automatically executes the serverless function.

About

Add temporary pull request threads to Discord for faster merging

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •