|author||christoferdutz <firstname.lastname@example.org>||Sat Apr 29 18:35:10 2023 +0200|
|committer||christoferdutz <email@example.com>||Sat Apr 29 18:35:10 2023 +0200|
feature: Added initial support for custom email subjects for GitHub discussions
This service picks up on GitHub Discussions payloads (sent via webhooks) and distributes to pubsub and (if configured) mailing lists at the ASF. It is designed as a PipService but can be run manually using pipenv or python3.
All activity is relayed through PyPubSub at pubsub.apache.org, and to the appropriate mailing lists if such have been set up via .asf.yaml.
To enable notifications for a repository, the
notifications directive in .asf.yaml should be appended with a
discussions target, like so:
notifications: commits: firstname.lastname@example.org discussions: email@example.com
The different actions I identified and how to detect them:
NOTE: Problem is, that it seems impossible to distinguish between someone adding a comment to a closed discussion and someone closing a discussion with a comment. For simplicity reasons, we'll assume that if a comment is added and the discussion state is “closed”, that this is someone closing a discussion with a comment.