Code Monkey home page Code Monkey logo

mjfdhh / broly Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mulx10/broly

0.0 0.0 0.0 485 KB

An all in one bot for the communication, management, fun, productivity of the developers participating in a project. Deployment of builds & automating response management Tracking pull requests, build results & logs. Weekly report appreciating the significant contributions. Extracting memes, thought of the day, horoscope etc.

Home Page: https://mm-broly.herokuapp.com/

License: MIT License

Shell 0.04% Python 88.15% CSS 9.71% HTML 2.11%

broly's Introduction

Broly

An all in one bot for the communication, management, fun, productivity of the developers participating in a project.

  • Deployment of builds & automating response management
  • Tracking pull requests, build results & logs.
  • Weekly report appreciating the significant contributions.
  • Extracting memes, thought of the day, horoscope etc.

Setup

Enable Access Token

Go to System Console -> Integration Management Follow steps 1->2->3

Create a bot

Enable Bot Accounts

Create Bots

Note the Bot access token, It is needed as API Key for command line

Editing config file

# Github API
GH_API_KEY = os.getenv('GH_API_KEY', 'Fill here or add to the environment variable')

# Reddit API
REDDIT_API_CLIENT_ID = os.getenv('REDDIT_API_CLIENT_ID', 'Fill here or add to the environment variable') 
REDDIT_API_CLIENT_SECRET = os.getenv('REDDIT_API_CLIENT_SECRET', 'Fill here or add to the environment variable')
REDDIT_API_USER_AGENT = "Meme collector"

BOT_API_KEY = os.getenv('BOT_API_KEY', 'Fill here or add to the environment variable') # Mattermost Broly bot access token
ADMIN_API_KEY = os.getenv('ADMIN_API_KEY', 'Fill here or add to the environment variable') # Mattermost Admin access token needed to get team ids (described below)
MATTERMOST_URL = "https://mm-broly.herokuapp.com" # Mattermost url

Github API Resource can be found here

Reddit API Go to app preferences and click on create app or create another app which will take you to this screen. For the redirect URL, put in http://localhost:8080

Get Teams

Account Settings -> Security -> Personal Access Tokens

$ python config.py
[{"id":"xh956esr83bhpkom35zekfzxdy","create_at":1583095734153,"update_at":1583095734153,"delete_at":0,"display_name":"BotFest","name":"botfest","description":"","email":"[email protected]","type":"O","company_name":"","allowed_domains":"","invite_id":"h6cfgdpjh3neumfgeba9oy55qe","allow_open_invite":false,"scheme_id":null,"group_constrained":null}]

Choose the team id and add it in config.py

TEAM_ID = "xh956esr83bhpkom35zekfzxdy"
ORG_NAME = 'mattermost' # Organization name on Github eg. 'mattermost'
PROJECTS = ['mattermost-mobile'] # list conatining projects eg. ['mattermost-mobile']

Requirements & Installation

  • Python v3
  • Mattermost v4

Other requirements

$ pip install -r requirements.txt

Run

$ python app.py

Usage

Broly has two parts.

  • Cron Job: Scheduled jobs which are performed on a fixed time interval
    • Start with an intriguing thought of the day
    • Prepare and post Weekly report
    • Present a daily dose of memes
    • Gather the status of PR on a daily basis
    • Daily Horoscope
  • Chatbot: The above things can also be requested at will
    • Meme: Broly share a meme
    • Thought of the day: Give me a tod
    • Report: Show the contribution report
    • PR status: pr status
    • Horoscope: horoscope

Screenshots

meme pr horo tod report

If you want API keys contact Me [email protected]

Hope you had a nice time ๐Ÿ˜„

Deploy

broly's People

Contributors

mulx10 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.