GitXplorerGitXplorer
M

github-discord-bot

public
7 stars
1 forks
4 issues

Commits

List of commits on branch main.
Unverified
e6953962f2caf26aa78e2e3f6f2524870cc1d8e9

updated requirements.txt

ddiananova committed 4 years ago
Unverified
61e97a916ff114330ec4860179f3e9a4f18e99ff

fixed link bug

ddiananova committed 4 years ago
Verified
592066eb942a1b9931eaf349241affadbe32f28b

Merge pull request #46 from MLH-Fellowship/hotfix/readme-update

ddiananova committed 4 years ago
Unverified
7cc713de624fb10865e24019a50a19053ee1e30b

updated readme and name of a command

LLaurell876 committed 4 years ago
Verified
bde9164f74a768cc97397123eb62a5acfeeeac77

Update README.md

ddiananova committed 4 years ago
Verified
120f1f9a15d05cc2b26efd89e39fd1c2ef33475a

Add files via upload

ddiananova committed 4 years ago

README

The README file for this repository.

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.

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

Quick Demo

Alt Text

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_token

  • run test bot: python example_tester.py $clientId $discord_test_bot_token -c $channelId --run all