This Discord bot serves as a seamless bridge between Discord thread channel and GitHub repository issues, enabling efficient issue management and synchronization between the two platforms. This integration allows for efficient project management, ensuring that actions performed on either Discord or GitHub are reflected in both platforms, facilitating smoother collaboration and issue tracking across teams.
- Discord Post Creation -> Automatically generates a corresponding GitHub issue.
- GitHub Issue Creation -> Pending feature: Creation of Discord posts from GitHub issues.
- Discord Post Comments -> Mirrored as comments on associated GitHub issues.
- GitHub Issue Comments -> Pending feature: Synchronization with Discord post comments.
- Discord Post Tags -> Translated into GitHub issue labels for better categorization.
- Discord Post Tag Changes -> Future implementation: Update GitHub issue labels from Discord.
- GitHub Issue Label Changes -> Future implementation: Reflect changes in Discord post tags from GitHub.
- Discord Post Lock/Unlock -> Corresponding action on GitHub issues for security or access control.
- GitHub Issue Lock/Unlock -> Syncing locking status with Discord posts.
- Discord Post Open/Close -> Triggers opening or closing of related GitHub issues.
- GitHub Issue Open/Close -> Update Discord post status based on GitHub issue status.
- Discord Post Deletion -> Initiates the removal of the associated GitHub issue.
- GitHub Issue Deletion -> Sync deletion actions from GitHub to Discord posts.
- Supported File Types: png, jpeg
- Planned Support: gif, text, video
Create bot https://discord.com/developers/applications?new_application=true
Bot settings:
- PRESENCE INTENT
- MESSAGE CONTENT INTENT
Invite url: https://discord.com/api/oauth2/authorize?client_id=APPLICATION_ID&permissions=0&scope=bot
- Go to GitHub Apps settings and click "New GitHub App"
- Fill in the required information:
- GitHub App name: Choose a unique name
- Homepage URL: Your app's homepage (can be a placeholder)
- User authorization callback URL: Your app's callback URL (can be a placeholder)
- Webhook URL: Your webhook endpoint (optional, for future webhook support)
- Webhook secret: Generate a random secret (optional)
- Set the following permissions:
- Repository permissions:
- Issues: Read & Write
- Metadata: Read
- Contents: Read (if you need to access repository content)
- Repository permissions:
- Subscribe to events (optional, for future webhook support):
- Issues
- Issue comment
- Choose installation options:
- Where can this GitHub App be installed?: Any account
- Click "Create GitHub App"
- After creation, you'll need:
- App ID: Found on the app's general settings page
- Client ID: Found on the app's general settings page
- Client Secret: Generate one in the app's general settings page
- Private Key: Generate and download from the app's general settings page
- Install the app on your repository:
- Go to the app's "Install App" tab
- Click "Install" on your target repository
- Note the Installation ID from the URL after installation
- DISCORD_TOKEN - Discord developer bot page "Settings->bot->reset token" (https://discord.com/developers/applications/APPLICATION_ID/bot)
- DISCORD_CHANNEL_ID - In the Discord server, create a forum channel and right-click (RMB) to copy the channel ID (developer settings must be turned on for this). Alternatively, you can copy the ID from the link. Example: https://discord.com/channels/<GUILD_ID>/<DISCORD_CHANNEL_ID>
- GITHUB_REPOSITORY - Repository in the format "owner/repo" (e.g., "produkt/panels")
- PORT - Server port (default: 3000)
- ADDITIONAL_LABELS - Comma-separated list of additional labels to add to GitHub issues (e.g., "discord,bug")
- GITHUB_APP_ID - Your GitHub App ID
- GITHUB_APP_PRIVATE_KEY - Your GitHub App private key (PEM format)
- GITHUB_INSTALLATION_ID - Installation ID for your GitHub App
- GITHUB_CLIENT_ID - GitHub App client ID (for OAuth)
- GITHUB_CLIENT_SECRET - GitHub App client secret (for OAuth)
NOTE: For detailed information about GitHub Apps, visit the GitHub Apps documentation.
npm run devor
npm run build && npm run startForward for github webhooks:
ssh -R 80:localhost:5000 serveo.net