Coder Social home page Coder Social logo

morristech / perforce-commit-discord-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jamesives/perforce-commit-discord-bot

0.0 1.0 0.0 570 KB

🗒️ ✏️Posts the most recent commit messages from a Perforce version control server to a Discord channel.

License: MIT License

Python 100.00%

perforce-commit-discord-bot's Introduction

Perforce Commit Logger Discord Bot 🗒️ ✏️

Build Status Issues

With this bot you're able to keep track of commits made to a Perforce version control server within a Discord channel.

Installation Steps 💽

  1. Within your Discord server go to the settings for the channel you'd like the commit logs to be posted to and copy the webhook URL.
  2. Save the webhook URL as an environment variable called DISCORD_WEBHOOK_URL.
  3. The service requires access to the p4 changes command in the terminal, your bot should be installed somewhere where it can automatically perform this command without the session expiring. Once suitable access has been provided you'll need to run $ pip install -r requirements.txt followed by $ python app.py to initialize it.
  4. Optionally you should consider creating a CRON script or something similar that restarts the app.py file on server reboot in order to keep the bot alive.

Unit tests can be run using the $ python tests.py command.

Getting Started ✈️

Every thirty seconds the bot runs a Perforce command in the terminal that checks for the most recent changes. If it finds one it stores it in memory, if the change it finds is the same as the one it gathered previously then it discards it. You'll need to provide the bot with access to your servers Perforce command line. One way of doing this is running the Python application on the server which hosts your Perforce instance. If you can type p4 changes yourself then the bot will be able to do its thing.

Configuration 📁

The installation will require you to enter a number of settings as environment variables. Below you'll find an explanation of each.

Key Value Information Required
DISCORD_WEBHOOK_URL The Webhook URL for the Discord channel you'd like the bot to post its messages to. Yes

Example

perforce-commit-discord-bot's People

Contributors

dependabot-support avatar jamesives avatar

Watchers

 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.