Skip to content

Commit e5f615b

Browse files
committed
Additional comments
1 parent 5fa6e04 commit e5f615b

File tree

3 files changed

+5
-22
lines changed

3 files changed

+5
-22
lines changed

pgcommitfest/commitfest/models.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -191,22 +191,6 @@ def send_closure_notifications(self):
191191
if not open_pocs:
192192
return
193193

194-
# Get the next open commitfest if available
195-
next_cf = (
196-
CommitFest.objects.filter(
197-
status=CommitFest.STATUS_OPEN,
198-
draft=self.draft,
199-
startdate__gt=self.enddate,
200-
)
201-
.order_by("startdate")
202-
.first()
203-
)
204-
205-
if next_cf:
206-
next_cf_url = f"https://commitfest.postgresql.org/{next_cf.id}/"
207-
else:
208-
next_cf_url = "https://commitfest.postgresql.org/"
209-
210194
# Collect unique authors and their patches
211195
authors_patches = {}
212196
for poc in open_pocs:
@@ -230,14 +214,12 @@ def send_closure_notifications(self):
230214
settings.NOTIFICATION_FROM,
231215
None,
232216
email,
233-
f"Commitfest {self.name} has closed",
217+
f"Commitfest {self.name} has closed and you have unmoved patches",
234218
"mail/commitfest_closure.txt",
235219
{
236220
"user": author,
237221
"commitfest": self,
238222
"patches": patches,
239-
"next_cf": next_cf,
240-
"next_cf_url": next_cf_url,
241223
},
242224
)
243225

pgcommitfest/commitfest/templates/mail/commitfest_closure.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
Hello {{user.first_name|default:user.username}},
2-
31
Commitfest {{commitfest.name}} has now closed.
42

53
You have {{patches|length}} open patch{{patches|length|pluralize:"es"}} that need{{patches|length|pluralize:"s,"}} attention:
@@ -11,6 +9,6 @@ You have {{patches|length}} open patch{{patches|length|pluralize:"es"}} that nee
119

1210
Please take action on {{patches|length|pluralize:"these patches,this patch"}} by doing either of the following:
1311

14-
1. If you want to continue working on {{patches|length|pluralize:"them,it"}}, move {{patches|length|pluralize:"them,it"}} to the next commitfest{% if next_cf %}: {{next_cf_url}}{% endif %}
12+
1. If you want to continue working on {{patches|length|pluralize:"them,it"}}, move {{patches|length|pluralize:"them,it"}} to the next commitfest.
1513

1614
2. If you no longer wish to pursue {{patches|length|pluralize:"these patches,this patch"}}, please close {{patches|length|pluralize:"them,it"}} with an appropriate status (Withdrawn, Returned with feedback, etc.)

pgcommitfest/commitfest/tests/test_refresh_commitfests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def test_inprogress_cf_closes_when_enddate_passed(commitfests, alice):
3535
in_progress_cf.refresh_from_db()
3636
assert in_progress_cf.status == CommitFest.STATUS_CLOSED
3737

38+
# Patch should be auto-moved
3839
patch.refresh_from_db()
3940
assert patch.current_commitfest().id == open_cf.id
4041

@@ -83,6 +84,7 @@ def test_open_cf_closes_when_enddate_passed(commitfests, alice):
8384
).first()
8485
assert new_open is not None
8586

87+
# Patch should be auto-moved
8688
patch.refresh_from_db()
8789
assert patch.current_commitfest().id == new_open.id
8890

@@ -130,6 +132,7 @@ def test_draft_cf_closes_when_enddate_passed(commitfests, alice):
130132
assert new_draft is not None
131133
assert new_draft.startdate > draft_cf.enddate
132134

135+
# Patch should be auto-moved
133136
patch.refresh_from_db()
134137
assert patch.current_commitfest().id == new_draft.id
135138

0 commit comments

Comments
 (0)