Skip to content

Conversation

@theihor
Copy link
Contributor

@theihor theihor commented Oct 30, 2025

The format of PR comments (which is github-style markdown) may not be suitable for plain-text email responses, depending on the use-case.

Implement a mechanism for pre-processing the contents of PR comments before forwarding them with email.

The function transforming the content string must be a method of BranchWorker class, and then its name can be specified (or not) in the pr_comments_forwarding of the KPD config.

If pre-processing function is not specified, couldn't be found or fails, the comment text remains unchanged.

The format of PR comments (which is github-style markdown) may not be
suitable for plain-text email responses, depending on the use-case.

Implement a mechanism for pre-processing the contents of PR comments
before forwarding them with email.

The function transforming the content string must be a method of
BranchWorker class, and then its name can be specified (or not) in the
pr_comments_forwarding of the KPD config.

If pre-processing function is not specified, couldn't be found or
fails, the comment text remains unchanged.

Signed-off-by: Ihor Solodrai <[email protected]>
return comment_body

maybe_func = getattr(self, func_name, None)
if not callable(maybe_func):
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be a warning? For is not None case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think error logging is necessary here.

If pre-processing isn't working it'll be immediately noticeable in the emails.

@theihor theihor merged commit 40da435 into kernel-patches:main Oct 30, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants