-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove email announcements; rename ansible-email-announcement.txt → a…
…nsible-forum-announcement.md; remove mention of mailing lists from Ansible PyPI page (#613) * Stop trying to send mails to mailing list. * Rename ansible-email-announcement.txt to ansible-forum-announcement.md. * Remove mention of mailing list from Ansible's README, make sure to mention the forum instead.
- Loading branch information
1 parent
f44e8c8
commit 9c29a94
Showing
15 changed files
with
42 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
removed_features: | ||
- "The ``announcements --send`` command no longer attempts to send mails to the mailing lists, which have been sunset | ||
(https://github.com/ansible-community/antsibull/pull/613)." | ||
minor_changes: | ||
- "Remove the mention of mailing lists from the Ansible README (https://github.com/ansible-community/antsibull/pull/613)." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,16 +44,11 @@ | |
from _typeshed import StrOrBytesPath | ||
|
||
ANNOUNCEMENTS = { | ||
"ansible-email-announcement.txt": "ansible-email-announcement.j2", | ||
"ansible-forum-announcement.md": "ansible-forum-announcement.j2", | ||
"ansible-matrix-announcement.md": "ansible-matrix-announcement.j2", | ||
} | ||
SUBJECT = "Release announcement: Ansible community package {version}" | ||
SUBJECT_PRE_RELEASE = SUBJECT + " (Pre-Release)" | ||
MAIL_RECIPIENTS = ( | ||
"[email protected]", | ||
"[email protected]", | ||
"[email protected]", | ||
) | ||
# pylint: disable-next=line-too-long | ||
# https://meta.discourse.org/t/create-a-link-to-start-a-new-topic-with-pre-filled-information/28074 # noqa | ||
FORUM_TAGS = ("release", "distro-packaging", "release-management") | ||
|
@@ -72,17 +67,17 @@ | |
) | ||
|
||
|
||
def email_heading(content): | ||
def forum_heading(content): | ||
""" | ||
Given a string, convert it into an email heading | ||
Given a string, convert it into an forum heading | ||
Args: | ||
content: filter content | ||
""" | ||
return content + "\n" + "-" * len(content) | ||
|
||
|
||
jinja_env.filters["email_heading"] = email_heading | ||
jinja_env.filters["forum_heading"] = forum_heading | ||
|
||
|
||
class TemplateVars(TypedDict): | ||
|
@@ -298,30 +293,13 @@ def forum_announcement_webbrowser( | |
Open a pre-filled Ansible Forum post in a browser | ||
""" | ||
subject = get_subject(info) | ||
body = get_body(directory, "ansible-email-announcement.txt") | ||
body = get_body(directory, "ansible-forum-announcement.md") | ||
params_dict = FORUM_PARAMS | {"title": subject, "body": body} | ||
params = "?" + urlencode(params_dict, quote_via=url_quote) | ||
url = urljoin(ANSIBLE_FORUM_URL, "new-topic") + params | ||
webbrowser.open(url) | ||
|
||
|
||
def email_announcement_webbrowser( | ||
directory: Path, | ||
info: AnnouncementsInfo, | ||
ctx: SendCtx, # pylint: disable=unused-argument | ||
) -> None: | ||
""" | ||
Construct a pre-filled mailto link with the appropriate subject, body, | ||
and recipients and open it an a browser | ||
""" | ||
subject = get_subject(info) | ||
body = get_body(directory, "ansible-email-announcement.txt") | ||
params_dict: dict[str, str] = {"subject": subject, "body": body} | ||
params = "?" + urlencode(params_dict, quote_via=url_quote) | ||
url = "mailto:" + ",".join(MAIL_RECIPIENTS) + params | ||
webbrowser.open(url) | ||
|
||
|
||
def matrix_announcement( | ||
directory: Path, | ||
info: AnnouncementsInfo, # pylint: disable=unused-argument | ||
|
@@ -356,7 +334,6 @@ def matrix_announcement( | |
|
||
ACTIONS: dict[str, Callable[[Path, AnnouncementsInfo, SendCtx], None]] = { | ||
"forum": forum_announcement_webbrowser, | ||
"email": email_announcement_webbrowser, | ||
"matrix": matrix_announcement, | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters