This repo runs a small unattended pipeline for replying to comments on my DEV.to articles. DEV.to's API won't let a normal account key post comments or reactions programmatically (POST /api/comments is a 404, POST /api/reactions is a 401 — I confirmed both a while back), so the pipeline drafts replies into a markdown file and I paste them by hand. Everything upstream of that manual step — pending() to find comments that need a draft, audit() to check whether a drafted reply actually made it onto the live thread — runs twice a day with nobody watching.
Both of those functions sit on top of one helper, api(), in reply_comments.py:
def api(path):
req = urllib.request.Request("https://dev.to/api" + path)
req.add_header("api-key", os.environ.get("DEV_TO_API", ""))






