Coder Social home page Coder Social logo

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

View Code? Open in Web Editor NEW
23.0 7.0 16.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 perforce-command commit logger discord discord-bot p4 p4v p4-changes

perforce-commit-discord-bot's Introduction

perforce-commit-discord-bot's People

Contributors

dependabot-support avatar jamesives avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

perforce-commit-discord-bot's Issues

Use crontabs as opposed to keeping the process open

It would be nice if we could feed app.py an argument, which when set instead of keeping the process open it just checks once then pushes any changes to webhook then quits. This way instead of leaving the process open 24/7 people can just setup a cron and have it set to run at whatever frequency they want which will run the app, push any changes to discord then exit

No clue how to set this up on windows

Hi im trying to set this up with my discord channel and have no clue how to go about setting this up.
Specifically having troubles with these parts
2. Save the webhook URL as an environment variable called DISCORD_WEBHOOK_URL.

I have no clue what you mean by an environment variable and what to do with it.

  1. 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.

Where do i execute these commands, i have no clue where i am supposed to execute them from and no idea have to give whatever is meant to access this suitable access.

I think you could have made things a little clearer and easier to understand, i know nothing about discord bots and am just trying to set this up and i am having some real difficulty's understanding this

Thanks in advance.

Looking for installation help

So I'm sorry to do it like this, but I'm very unsure on what to do after getting p4 changes to work. I'm honestly not all sure what and where all these files from the git are to be located and where to install python. Do any files need to be uploaded to the perforce server for this to work? I'm also getting invalid syntax when I try to do the $ pip install -r requirements.txt and such. Took hours to get this far and I feel like I have files just lying around in places they shouldn't be.
python error

Unit Tests

Is your feature request related to a problem? Please describe.

Please provide a clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

It would be nice to have some bare minimum unit tests for this service.

Describe the solution you'd like

Please provide a clear and concise description of what you want to happen.

Write some unit tests.

Additional Comments

Add any other context or screenshots about the feature request here.

  • Test to make sure that the payload properly throws out **pending**.
  • Test to make sure that the payload gets correctly pushed through the Discord-Webhooks module.
  • Test to make sure that it's correctly polling the p4 payload and saving it to the global_store object.

Littles changes

Hi, I have changed some things from your code :

p4_changes = subprocess.Popen('p4 changes -t -m 1 -l', stdout=subprocess.PIPE, shell=True)
The -l give the entire description, its more readable and clear.

output = p4_changes.stdout.read().decode("ISO-8859-1")
Prevent the error on decode with utf-8 with accents or stranges characters (I'm french ^^)

Bot will sometimes error fatally

Sometimes the bot will fatally error and not come back. This should be fixed. Not sure what the error is but it seems related to something specific being pasted in a change log.

git clone issue

Trying to use this command here

git clone -b develop --single-branch https://github.com/JamesIves/perforce-commit-discord-bot.git

Cloning into 'perforce-commit-discord-bot'...
warning: Could not find remote branch develop to clone.

I'm totally newbie with discordbot and git, but I tryed to use this setup here.
https://twentysix26.github.io/Red-Docs/red_install_debian/

Only changes this here
git clone -b develop --single-branch https://github.com/Twentysix26/Red-DiscordBot.git

to

git clone -b develop --single-branch https://github.com/JamesIves/perforce-commit-discord-bot.git

I can download it fine manully. But not with SSH

P4PASSWD invalid or unset

Where is it trying to pull this password from?

image

EDIT: sorry if this is super obvious, I'm not to Perforce

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.