Skip to content

Commit 458dbe8

Browse files
committed
Send PHEP 3 reminder emails as HTML
1 parent 40c84f2 commit 458dbe8

File tree

2 files changed

+36
-22
lines changed

2 files changed

+36
-22
lines changed

.github/workflows/phep3_email_reminder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ jobs:
4949
body: ${{ steps.email.outputs.body }}
5050
to: ${{ inputs.test_recipient || '[email protected]' }}
5151
from: PyHC <${{ secrets.PYHC_EMAIL_ADDRESS }}>
52-
content_type: text/plain
52+
content_type: text/html

_pages/docs/phep-3/generate_email.py

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -65,47 +65,61 @@ def extract_quarter_data(quarter_content):
6565

6666

6767
def format_email(year, quarter, adopt_items, drop_items):
68-
"""Generate email subject and body."""
68+
"""Generate email subject and HTML body."""
6969
quarter_names = {1: "Q1", 2: "Q2", 3: "Q3", 4: "Q4"}
7070
q_name = quarter_names[quarter]
7171

7272
subject = f"PHEP 3 Reminder: {q_name} {year} Support Schedule"
7373

74-
body = f"""Hello PyHC Community,
75-
76-
This is a quarterly reminder about the PHEP 3 Python & Upstream Package Support Policy.
74+
body = f"""<html>
75+
<body style="font-family: Arial, sans-serif; line-height: 1.6; color: #333;">
76+
<p>Hello PyHC Community,</p>
7777
78+
<p>This is a quarterly reminder about the PHEP 3 Python &amp; Upstream Package Support Policy.</p>
7879
"""
7980

8081
if adopt_items:
81-
body += f"## Adopt Support For (by end of {q_name} {year})\n\n"
82-
body += "The following package versions should be supported by PyHC packages:\n\n"
82+
body += f"""
83+
<h3 style="color: #2e7d32;">Adopt Support For (by end of {q_name} {year})</h3>
84+
<p>The following package versions should be supported by PyHC packages:</p>
85+
<ul>
86+
"""
8387
for package, version, info in adopt_items:
84-
body += f"- **{package}** {version} ({info})\n"
85-
body += "\n"
88+
body += f"<li><strong>{package}</strong> {version} <em>({info})</em></li>\n"
89+
body += "</ul>\n"
8690

8791
if drop_items:
88-
body += f"## Can Drop Support For (as of {q_name} {year})\n\n"
89-
body += "PyHC packages may now drop support for:\n\n"
92+
body += f"""
93+
<h3 style="color: #c62828;">Can Drop Support For (as of {q_name} {year})</h3>
94+
<p>PyHC packages may now drop support for:</p>
95+
<ul>
96+
"""
9097
for package, version, info in drop_items:
91-
body += f"- **{package}** {version} ({info})\n"
92-
body += "\n"
98+
body += f"<li><strong>{package}</strong> {version} <em>({info})</em></li>\n"
99+
body += "</ul>\n"
93100

94101
if not adopt_items and not drop_items:
95-
body += "No changes to the support schedule this quarter.\n\n"
102+
body += "<p>No changes to the support schedule this quarter.</p>\n"
96103

97-
body += """---
104+
body += """
105+
<hr style="border: none; border-top: 1px solid #ccc; margin: 20px 0;">
98106
99-
For the full support schedule and Gantt chart, visit:
100-
https://heliopython.org/docs/pheps/phep-3-support-schedule/
107+
<p>
108+
<strong>Full support schedule and timeline:</strong><br>
109+
<a href="https://heliopython.org/docs/pheps/phep-3-support-schedule/">https://heliopython.org/docs/pheps/phep-3-support-schedule/</a>
110+
</p>
101111
102-
For the complete PHEP 3 specification:
103-
https://github.com/heliophysicsPy/standards/blob/main/pheps/phep-0003.md
112+
<p>
113+
<strong>Complete PHEP 3 specification:</strong><br>
114+
<a href="https://github.com/heliophysicsPy/standards/blob/main/pheps/phep-0003.md">https://github.com/heliophysicsPy/standards/blob/main/pheps/phep-0003.md</a>
115+
</p>
104116
105-
Questions? Reply to this email or discuss on PyHC Slack.
117+
<p>Questions? Reply to this email or discuss on PyHC's Slack.</p>
106118
107-
Best regards,
108-
PyHC Tech Lead
119+
<p>Best regards,<br>
120+
<strong>PyHC Tech Lead</strong></p>
121+
</body>
122+
</html>
109123
"""
110124

111125
return subject, body

0 commit comments

Comments
 (0)