github-discord-bot
This bot allows you to associate a Github repo to a channel and get quick info, such as summary, recent issues, pull requests, etc.
Contributors
Pod 1.1.1 Stork Overflow ✨
Commands
!git hello- says hi (to check if the bot is working)!git associate repoName- associate a repo to this channel (that way you don't have to specify it every time). Stored in JSON file.!git summary- returns the description, number of stars, contributors, issues and prs!git issues- returns a list of issues (title, number, link). You can specify a maximum (the default is 10).!git pull_requests- returns a list of prs (title, number, link). You can specify a maximum (the default is 5)!git issue number- return the issue info (title, number, link) given its number!git pull_request number- return the pull request info (title, number, link) given its number!git issue_by_title title_of_issue state_of_issue- returns the issue info (title, number, link) given its title
Why?
- We created this bot for the MLH fellowship although it can be used in other ways as well.
- Team members can track their progress and without opening their browser, they can check which issues are still open and need to be worked on or if there's a pull request that requires a review.
- Our mentors and pod leaders can see what we've been up to and if perhaps they can help us out.
- Fellows can see what other teams have been doing and this can encourage more interaction between different teams and pods.
To use the bot on your server
- simply copy and paste this in your browser and choose the server that you want the bot to have access to.
- This bot has only one scope: bot.
Running Tests
- Because of the package being used to run tests a separate bot had to be used as a target bot for the tests instead of the main bot.
This is due to the fact that the main bot uses the @bot.command annotation but the testing package is only compatible with the @client.event annotation
run target bot for testing:
python example_target.py $discord_target_bot_tokenrun test bot:
python example_tester.py $clientId $discord_test_bot_token -c $channelId --run all
Challenges we ran into
- writing tests was a bit more complicated as we had to create a new tester bot and some of the commands had to be replicated.
Built With
- pygithub
- python


Log in or sign up for Devpost to join the conversation.