From fc6cc9ea685af4d1e2031d16bab2569ae50ef9be Mon Sep 17 00:00:00 2001 From: "Ian Y. Choi" Date: Sun, 31 Aug 2025 16:40:21 +0900 Subject: [PATCH] Add email template for direct reminder about CIVS This new template can be generated for a single project or tc (by specifying project as 'tc' for combined). It is intended to be sent during voting periods to the contributors who are not activated to CIVS voting system. Change-Id: I82e8be5a016d624d8e8486ae4953c68bc9994249 Signed-off-by: Ian Y. Choi --- README.rst | 13 +++++++++++++ openstack_election/cmds/template_emails.py | 17 ++++++++++++++++- ...ombined_voting_optin_civs_direct_reminder.j2 | 17 +++++++++++++++++ .../ptl_voting_optin_civs_direct_reminder.j2 | 17 +++++++++++++++++ .../tc_voting_optin_civs_direct_reminder.j2 | 17 +++++++++++++++++ 5 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 openstack_election/templates/combined_voting_optin_civs_direct_reminder.j2 create mode 100644 openstack_election/templates/ptl_voting_optin_civs_direct_reminder.j2 create mode 100644 openstack_election/templates/tc_voting_optin_civs_direct_reminder.j2 diff --git a/README.rst b/README.rst index 8a6a5a6f..870e7b00 100644 --- a/README.rst +++ b/README.rst @@ -144,6 +144,12 @@ When PTL Election begins: * ``tox -e venv -- template-emails voting_kickoff`` +* Optionally send direct *voting opt-in CIVS direct reminder* email to the members + who are not activated to CIVS voting system + + * ``tox -evenv -- template-emails voting_optin_civs_direct_reminder -p + `` + A couple of days before the PTL Election ends: * Send *PTL Voting Last Days* email @@ -287,6 +293,13 @@ When TC Election begins: * ``tox -e venv -- template-emails voting_kickoff`` +* Optionally send direct *voting opt-in CIVS direct reminder* email to the members + who are not activated to CIVS voting system + (for combined election, put -p argument as 'tc' value) + + * ``tox -evenv -- template-emails voting_optin_civs_direct_reminder -p + `` + A couple of days before the TC Election ends: * Send *TC Voting Last Days* email diff --git a/openstack_election/cmds/template_emails.py b/openstack_election/cmds/template_emails.py index 34581690..8528d514 100644 --- a/openstack_election/cmds/template_emails.py +++ b/openstack_election/cmds/template_emails.py @@ -20,7 +20,7 @@ start_release, _, end_release = conf['timeframe']['name'].partition('-') template_names = ['election_season', 'nominations_kickoff', 'nominations_last_days', 'nominations_direct_reminder', - 'end_nominations', + 'end_nominations', 'voting_optin_civs_direct_reminder', 'voting_optin_civs', 'voting_kickoff', 'voting_last_days'] fmt_args = dict( email_deadline=conf['timeframe']['email_deadline'], @@ -112,6 +112,21 @@ def main(): contributors=contributors )) + if args.template == 'voting_optin_civs_direct_reminder': + if not args.project_name: + print("Project name is required for the " + "'voting_optin_civs_direct_reminder' template to be " + "generated", file=sys.stderr) + return 1 + + # Note: purposely set election_type as tc for combined election + if args.project_name == 'tc': + conf['election_type'] = 'tc' + + fmt_args.update(dict( + project_name=args.project_name.title() + )) + func_name = ('%(election_type)s_%(template)s' % (dict(election_type=conf['election_type'], template=args.template))) diff --git a/openstack_election/templates/combined_voting_optin_civs_direct_reminder.j2 b/openstack_election/templates/combined_voting_optin_civs_direct_reminder.j2 new file mode 100644 index 00000000..6c9d42ae --- /dev/null +++ b/openstack_election/templates/combined_voting_optin_civs_direct_reminder.j2 @@ -0,0 +1,17 @@ +BCC: (e-mails from CIVS which are not been activated by the recipient) +Subject: Opt in to CIVS voting system for OpenStack {{ project_name }} PTL {{ release }} cycle Election + +You are a contributor to the OpenStack {{ project_name }} project, +and eligible for voting to the current {{ project_name }} PTL election. + +The election uses the Condorcet Internet Voting Service (CIVS). +Due to CIVS policy, to vote in private CIVS polls, you must opt in to email +communication. + +To opt in, please enter your Gerrit email address in the following page, and +confirm with the code that will sent to you via email. + +https://civs1.civs.us/cgi-bin/opt_in.pl + +If you have any question, please contact the election officials. +https://governance.openstack.org/election/#election-officials \ No newline at end of file diff --git a/openstack_election/templates/ptl_voting_optin_civs_direct_reminder.j2 b/openstack_election/templates/ptl_voting_optin_civs_direct_reminder.j2 new file mode 100644 index 00000000..6c9d42ae --- /dev/null +++ b/openstack_election/templates/ptl_voting_optin_civs_direct_reminder.j2 @@ -0,0 +1,17 @@ +BCC: (e-mails from CIVS which are not been activated by the recipient) +Subject: Opt in to CIVS voting system for OpenStack {{ project_name }} PTL {{ release }} cycle Election + +You are a contributor to the OpenStack {{ project_name }} project, +and eligible for voting to the current {{ project_name }} PTL election. + +The election uses the Condorcet Internet Voting Service (CIVS). +Due to CIVS policy, to vote in private CIVS polls, you must opt in to email +communication. + +To opt in, please enter your Gerrit email address in the following page, and +confirm with the code that will sent to you via email. + +https://civs1.civs.us/cgi-bin/opt_in.pl + +If you have any question, please contact the election officials. +https://governance.openstack.org/election/#election-officials \ No newline at end of file diff --git a/openstack_election/templates/tc_voting_optin_civs_direct_reminder.j2 b/openstack_election/templates/tc_voting_optin_civs_direct_reminder.j2 new file mode 100644 index 00000000..d7b5f0b6 --- /dev/null +++ b/openstack_election/templates/tc_voting_optin_civs_direct_reminder.j2 @@ -0,0 +1,17 @@ +BCC: (e-mails from CIVS which are not been activated by the recipient) +Subject: Opt in to CIVS voting system for OpenStack TC {{ release }} cycle Election + +You are a contributor to the OpenStack project, and eligible for voting to the +current TC election. + +The election uses the Condorcet Internet Voting Service (CIVS). +Due to CIVS policy, to vote in private CIVS polls, you must opt in to email +communication. + +To opt in, please enter your Gerrit email address in the following page, and +confirm with the code that will sent to you via email. + +https://civs1.civs.us/cgi-bin/opt_in.pl + +If you have any question, please contact the election officials. +https://governance.openstack.org/election/#election-officials \ No newline at end of file