Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: Convert update notes to plaintext before sending email #5049

Closed
oturpe opened this issue Feb 12, 2023 · 2 comments · Fixed by #5516
Closed

RFE: Convert update notes to plaintext before sending email #5049

oturpe opened this issue Feb 12, 2023 · 2 comments · Fixed by #5516
Assignees
Milestone

Comments

@oturpe
Copy link

oturpe commented Feb 12, 2023

Currently, Bodhi's notification emails look like this:

       Bugs: 2156900 - None
      Notes: Automatic update for systemd-253~rc2-2.fc38.  ##### **Changelog**
           : ``` * Thu Feb  2 2023 Michael Catanzaro
           :[<mcatanzaro@redhat.com> - 253~rc2-2 - Shorten shutdown
           : timeout to 45 s * Thu Feb  2 2023 Zbigniew
           : Jędrzejewski-Szmek <zbyszek@in.waw.pl>) - 253~rc2-1 -
           : Version 253~rc2 - Sysusers fixup (rhbz#2156900) +
           : other small changes * Thu Feb  2 2023 Yaakov Selkowitz
           : <yselkowi@redhat.com> - 253~rc1-5 - Build with xen
           : only on Fedora  ```
  Submitter: zbyszek
  Submitted: 2023-02-02 20:11:41.724093
   Comments: bodhi - 2023-02-02 20:11:41.727324 (karma 0)
             This update was automatically created

  https://bodhi.fedoraproject.org/updates/FEDORA-2023-2ac77d299f

Observe that the Notes section is quite corrupted,
with visible Markdown formatting
and line breaks that were originally present in the package's changelog missing.

For readability, before sending update notification email,
Notes should be converted to plaintext, retaining original linebreaks.

This issue has been discussed in the Fedora devel mailing list.

@mattiaverga mattiaverga self-assigned this Oct 15, 2023
@mattiaverga mattiaverga added this to the 8.0 milestone Oct 15, 2023
@mattiaverga mattiaverga linked a pull request Oct 23, 2023 that will close this issue
@mattiaverga
Copy link
Contributor

With the proposed PR the output would be:

>>> up = m.Update.get('FEDORA-2023-2ac77d299f')
>>> print(up)
================================================================================
     FEDORA-2023-2ac77d299f
================================================================================
    Release: Fedora 38
     Status: stable
       Type: unspecified
   Severity: unspecified
      Karma: 0
   Critpath: True
       Bugs: 2156900 - /usr/lib/sysusers.d/basic.conf:9: Conflict with earlier
             configuration for user 'root', ignoring line.
      Notes: Automatic update for systemd-253~rc2-2.fc38.
             Changelog
             * Thu Feb  2 2023 Michael Catanzaro <mcatanzaro@redhat.com> -
             253~rc2-2
             - Shorten shutdown timeout to 45 s
             * Thu Feb  2 2023 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
             - 253~rc2-1
             - Version 253~rc2
             - Sysusers fixup (rhbz#2156900) + other small changes
             * Thu Feb  2 2023 Yaakov Selkowitz <yselkowi@redhat.com> -
             253~rc1-5
             - Build with xen only on Fedora
  Submitter: zbyszek
  Submitted: 2023-02-02 20:11:41.724093
   Comments: bodhi - 2023-02-02 20:18:12.944264 (karma 0)
             This update has been submitted for stable by bodhi
             bodhi - 2023-02-02 20:17:25.043341 (karma 0)
             This update's test gating status has been changed to 'ignored'.
             bodhi - 2023-02-02 20:17:24.775290 (karma 0)
             This update's test gating status has been changed to 'waiting'.
             bodhi - 2023-02-02 20:11:41.727324 (karma 0)
             This update was automatically created

  https://bodhi-dev.example.com/updates/FEDORA-2023-2ac77d299f
>>> 

Thoughts?

@oturpe
Copy link
Author

oturpe commented Oct 30, 2023

Looks great to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants