How do I receive Github Webhooks in Python

后端 未结 4 1495
野的像风
野的像风 2020-12-04 08:14

Github offers to send Post-receive hooks to an URL of your choice when there\'s activity on your repo. I want to write a small Python command-line/backgroun

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-04 08:56

    I would use:

    https://github.com/carlos-jenkins/python-github-webhooks

    You can configure a web server to use it, or if you just need a process running there without a web server you can launch the integrated server:

    python webhooks.py
    

    This will allow you to do everything you said you need. It, nevertheless, requires a bit of setup in your repository and in your hooks.

    Late to the party and shameless autopromotion, sorry.

提交回复
热议问题