Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

JamesIves/perforce-commit-discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages