Github in irc announcer

From NURDspace
Revision as of 20:17, 31 July 2021 by Flok (talk | contribs) (Created page with "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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Poll every hour for new shit on github by our members:

  • 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"
  },