No edit summary |
No edit summary |
||
Line 38: | Line 38: | ||
* https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps | * https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps | ||
* Apparently there's a python thing for accessing github meta data: https://github.com/PyGithub/PyGithub |
Revision as of 21:42, 13 August 2021
Poll every hour for new shit on github by our members:
- e.g.: curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/users/folkertvanheusden/events
- this returns a list of events. each has an 'id'. keep track for each member the last id retrieved.
- if an id is newer, push the url etc to irc
Rest sample output:
{ "id": "17380485057", "type": "CreateEvent", "actor": { "id": 85709915, "login": "folkertvanheusden", "display_login": "folkertvanheusden", "gravatar_id": "", "url": "https://api.github.com/users/folkertvanheusden", "avatar_url": "https://avatars.githubusercontent.com/u/85709915?" }, "repo": { "id": 391194092, "name": "folkertvanheusden/rtpmidid", "url": "https://api.github.com/repos/folkertvanheusden/rtpmidid" }, "payload": { "ref": "cmake", "ref_type": "branch", "master_branch": "master", "description": "RTP MIDI (AppleMIDI) daemon for Linux", "pusher_type": "user" }, "public": true, "created_at": "2021-07-31T15:55:04Z" },
- Apparently there's a python thing for accessing github meta data: https://github.com/PyGithub/PyGithub