| |
@@ -40,7 +40,7 @@
|
| |
)
|
| |
|
| |
|
| |
- def handle_orphaning(bug, tracker, comment_header):
|
| |
+ def handle_orphaning(bug, tracker, reminder_template):
|
| |
bz = bug.bugzilla
|
| |
|
| |
history = bug.get_history_raw()["bugs"][0]["history"]
|
| |
@@ -76,11 +76,7 @@
|
| |
if not needinfos:
|
| |
print("Asking for the first needinfo")
|
| |
bzupdate = bz.build_update(
|
| |
- comment=comment_header+"""
|
| |
-
|
| |
- This is the first reminder (step 3 from https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs).
|
| |
-
|
| |
- If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.""",
|
| |
+ comment=reminder_template.render(nth="first", step=3, orphan_weeks=7),
|
| |
flags=[flag],
|
| |
)
|
| |
else:
|
| |
@@ -114,11 +110,7 @@
|
| |
if NOW - needinfo_after_week >= datetime.timedelta(weeks=3):
|
| |
print("Asking for another needinfo")
|
| |
bzupdate = bz.build_update(
|
| |
- comment=comment_header+"""
|
| |
-
|
| |
- This is the second reminder (step 4 from https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/#_package_removal_for_long_standing_ftbfs_and_fti_bugs).
|
| |
-
|
| |
- If you know about this problem and are planning on fixing it, please acknowledge so by setting the bug status to ASSIGNED. If you don't have time to maintain this package, consider orphaning it, so maintainers of dependent packages realize the problem.""",
|
| |
+ comment=reminder_template.render(nth="second", step=4, orphan_weeks=4),
|
| |
flags=[flag],
|
| |
)
|
| |
else:
|
| |
@@ -433,10 +425,10 @@
|
| |
for src, b in current_ftis.items()
|
| |
if b.status == "NEW" and src not in orphaned
|
| |
}
|
| |
- comment_header = env.get_template("header.j2").render()
|
| |
+ reminder_template = env.get_template("reminder-fti.j2")
|
| |
for src, b in current_ftis.items():
|
| |
print(f"Checking {b.id} ({src})…")
|
| |
- handle_orphaning(b, ftibug, comment_header)
|
| |
+ handle_orphaning(b, ftibug, reminder_template)
|
| |
|
| |
|
| |
if __name__ == "__main__":
|
| |
Fixes https://pagure.io/releng/issue/11168