You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement an optional generic PR comment forwarding feature.
Whenever a relevant patchwork subject is processed in
sync_relevant_subject(), inspect pull request comments and send
selected comment body via email according to KPD configuration.
This by design only affects pull request with corresponding up-to-date
patch series on patchwork.
To be forwarded the comment must pass the following filters:
- the comment hasn't been forwarded yet
- KPD is stateless, and so we determine this by checking for other
comments on the same PR that report previous notifications
- comment author's GitHub login is in configured allowlist
- comment body contains an "In-Reply-To-Subject" tag with the subject
string of a patch message to reply to
- rationale for such tag is the necessity for a mechanism to
determine the exact message in a thread to reply to; commit hash
or index can change between series version, and a subject string
uniquely identifies a patch message within a series
When a comment is selected for forwarding KPD:
- posts a PR comment reporting the forward action
- sends an email to all original recipients of the patch message,
filtered according to the configured allow/denylist
An example of PR comments forwarding configuration:
"email": {
...
"pr_comments_forwarding": {
"enabled": true,
"commenter_allowlist": ["kpd-bot[bot]"],
"always_cc": ["[email protected]"],
"recipient_denylist": [".*@foobar.org"]
}
}
Signed-off-by: Ihor Solodrai <[email protected]>
0 commit comments