GitXplorerGitXplorer
M

github-discord-bot

public
7 stars
1 forks
4 issues

Commits

List of commits on branch main.
Verified
1ef81d4e9e0ca5119a38681d76afd717f0e59735

Add files via upload

ddiananova committed 4 years ago
Verified
4bc9ef58d85ee84afe707fea9348ce877800c3d6

Delete bot-demo.gif

ddiananova committed 4 years ago
Verified
db777b113d340977954f0833b8c2cdc254c64b84

Add files via upload

ddiananova committed 4 years ago
Verified
e22e95cde5606be7e2426e9cb9cac935f18c05a1

Delete bot-demo.gif

ddiananova committed 4 years ago
Verified
1a5c583c705ee5a67ed6831023c38bf60ce0db15

Update README.md

ddiananova committed 4 years ago
Verified
c146dadc697d737ba1edd53541686bcc2b60e113

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