(
ticket="ticket-36991",
description=(
"Fix regression in template rendering where nested blocks were"
" incorrectly evaluated."
),
no_ai_checked=True,
ai_used_checked=False,
ai_description="",
checked_items=5,
)
| 19 | |
| 20 | |
| 21 | def make_pr_body( |
| 22 | ticket="ticket-36991", |
| 23 | description=( |
| 24 | "Fix regression in template rendering where nested blocks were" |
| 25 | " incorrectly evaluated." |
| 26 | ), |
| 27 | no_ai_checked=True, |
| 28 | ai_used_checked=False, |
| 29 | ai_description="", |
| 30 | checked_items=5, |
| 31 | ): |
| 32 | no_ai_box = "[x]" if no_ai_checked else "[ ]" |
| 33 | ai_used_box = "[x]" if ai_used_checked else "[ ]" |
| 34 | ai_extra = f"\n{ai_description}" if ai_description else "" |
| 35 | |
| 36 | checklist_items = [ |
| 37 | "This PR follows the [contribution guidelines]" |
| 38 | "(https://docs.djangoproject.com/en/stable/internals/contributing/" |
| 39 | "writing-code/submitting-patches/).", |
| 40 | "This PR **does not** disclose a security vulnerability" |
| 41 | " (see [vulnerability reporting]" |
| 42 | "(https://docs.djangoproject.com/en/stable/internals/security/)).", |
| 43 | "This PR targets the `main` branch." |
| 44 | " <!-- Backports will be evaluated and done by mergers, when necessary. -->", |
| 45 | "The commit message is written in past tense, mentions the ticket" |
| 46 | " number, and ends with a period (see [guidelines]" |
| 47 | "(https://docs.djangoproject.com/en/dev/internals/contributing/" |
| 48 | "committing-code/#committing-guidelines)).", |
| 49 | "I have not requested, and will not request, an automated AI review" |
| 50 | " for this PR." |
| 51 | " <!-- You are welcome to do so in your own fork. -->", |
| 52 | 'I have checked the "Has patch" ticket flag in the Trac system.', |
| 53 | "I have added or updated relevant tests.", |
| 54 | "I have added or updated relevant docs, including release notes if" |
| 55 | " applicable.", |
| 56 | "I have attached screenshots in both light and dark modes for any UI" |
| 57 | " changes.", |
| 58 | ] |
| 59 | checklist_lines = "\n".join( |
| 60 | f"- [x] {item}" if i < checked_items else f"- [ ] {item}" |
| 61 | for i, item in enumerate(checklist_items) |
| 62 | ) |
| 63 | |
| 64 | # GitHub PR bodies are plain markdown with no leading spaces. |
| 65 | return ( |
| 66 | f"#### Trac ticket number\n" |
| 67 | f"<!-- Replace XXXXX with the corresponding Trac ticket number. -->\n" |
| 68 | f'<!-- Or delete the line and write "N/A - typo" for typo fixes. -->\n' |
| 69 | f"\n" |
| 70 | f"{ticket}\n" |
| 71 | f"\n" |
| 72 | f"#### Branch description\n" |
| 73 | f"{description}\n" |
| 74 | f"\n" |
| 75 | f"#### AI Assistance Disclosure (REQUIRED)\n" |
| 76 | f"<!-- Please select exactly ONE of the following: -->\n" |
| 77 | f"- {no_ai_box} **No AI tools were used** in preparing this PR.\n" |
| 78 | f"- {ai_used_box} **If AI tools were used**, I have disclosed which" |
no test coverage detected