GitHub Commands
The /github
command provides several subcommands to manage GitHub integration in your server.
Setup Commands
Setup Integration
/github integration [repoUrl]
Start the GitHub integration setup process. This interactive command will:
- Ask for your repository URL
- Let you choose which features to enable as express installation - these are all configurable any times afterwards:
- Repository statistics (Counter info channels to display number of pull requests, issues, stars etc.)
- Event notifications (Notifications for pull requests, issues, build statuses and more - See full list of events in Github Integration)
- Or both of the above
- Guide you through GitHub App installation if needed (Required for notifications or for private repositories)
Configure Settings
/github configure
Configure GitHub integration settings, including:
- Event notification rules (What channel to notify in, who to mention, enable/disable etc)
- Channel mappings
- Statistics display preferences
All of these settings are also easily configurable on the CodeCord dashboard, where it’s even possible to customize notification embeds, add silent hours, and much more.
View Status
/github settings
Shows the current GitHub integration status and configurations:
- Connected repository
- Enabled features
- Notification settings
- Installation status
Account Management
Link GitHub Account
/github link [gist]
For repository members who want personalized notifications. This command links your Discord account with your GitHub account to enable:
- Notifications when you’re assigned to review a pull request
- Mentions when you’re assigned to an issue
- Other personal GitHub notifications
Who should use this:
- Repository contributors
- Team members
- Anyone who wants to receive personal notifications about their GitHub activities
Parameters:
gist
(optional) - URL to your verification gist
Usage:
-
Without gist URL:
- Bot sends instructions via DM
- Create a gist with the verification token
- Run command again with gist URL
-
With gist URL:
- Bot verifies the gist
- Links accounts if verification succeeds
Permissions Required
Command | Permission |
---|---|
/github integration | Administrator |
/github configure | Administrator |
/github settings | Administrator |
/github link | Any member |
Examples
Setting up GitHub Integration
/github integration https://github.com/CodeC/CodeCord
# Follow the interactive prompts
Configuring Notifications
/github configure
# Use the interactive menu to configure settings if needed
Link your account for personal notifications
# Step 1: Get instructions
/github link
# Step 2: After creating gist
/github link https://gist.github.com/username/gistid
Notes
- Commands with interactive menus will guide you through the process
- Configuration changes takes up to 5 minutes to take effect
- Some features require GitHub App installation for private repositories. Do note that the Github App is limited to no read-access for the repository code to protect your code’s privacy.
- Account linking is required to get personal notifications. I.e if you want to get notified when you’re assigned as a reviewer on a pull request and more.