https://github.com/inngest/olotl
Add temporary pull request threads to Discord for faster merging
https://github.com/inngest/olotl
discord github
Last synced: 10 months ago
JSON representation
Add temporary pull request threads to Discord for faster merging
- Host: GitHub
- URL: https://github.com/inngest/olotl
- Owner: inngest
- Created: 2022-09-03T02:07:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-01T08:24:47.000Z (over 1 year ago)
- Last Synced: 2025-06-06T02:45:03.406Z (10 months ago)
- Topics: discord, github
- Language: TypeScript
- Homepage: olotl-4ghr.vercel.app
- Size: 822 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Discord PR management: olotl
This is an open-source set of functions built using NextJS and the **[Inngest SDK](https://github.com/inngest/inngest-js)**
which deploy to [Inngest](https://inngest.com/), allowing you to coordinate pull requests within single-use ephemeral channels in Discord.
Think of this as a free, open-source version of [Axolo](https://axolo.co/) 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](https://www.inngest.com/docs/deploy#registering-live-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](https://app.inngest.com/sources/new)
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](https://discord.com/developers/applications) 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
3. 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`.
4. Copy your guild ID (server ID) as a secret to Inngest, with the name of `DISCORD_GUILD_ID`.
5. 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](https://www.inngest.com) 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.