How to use Github webhooks

谁说我不能喝 提交于 2020-01-03 05:30:09

问题


I need your help !

How to download the updated files in github project (not all files) using git hook api when project members commiting the new version ?


回答1:


The idea is to register a webhook for your repo, which will emit a JSON payload that you would listen.
You can register a webhook for push event

The listener depends on your local environment.
For example, you have Introducing Gith - GitHub WebHooks For Node, which can filter the payloads by payload type: repository, branch, file or tag

You have simpler listeners, for instance on in python.
Again, the specifics of the listener and what you can do when you receive the message (like a git pull to download what has changed) depend on your particular environment.



来源:https://stackoverflow.com/questions/24949943/how-to-use-github-webhooks

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!