|
| 1 | +--- |
| 2 | +name: backport-email |
| 3 | +description: Generate a backport email from a PR for sending to Tactics. Use when asked to create or generate a backport email. |
| 4 | +--- |
| 5 | + |
| 6 | +# Backport Email Generation |
| 7 | + |
| 8 | +Generate a formatted email for requesting backport approval from Tactics. |
| 9 | + |
| 10 | +## Required Input |
| 11 | + |
| 12 | +Ask the user for the **backport PR URL** if not provided. Example: |
| 13 | +- `https://github.com/dotnet/runtime/pull/124058` |
| 14 | + |
| 15 | +## Process |
| 16 | + |
| 17 | +1. **Fetch the backport PR** using the GitHub MCP tools to get: |
| 18 | + - PR number and title |
| 19 | + - Target release branch (e.g., `release/9.0`) |
| 20 | + - PR description containing the servicing template sections |
| 21 | + |
| 22 | +2. **Extract from the PR description:** |
| 23 | + - Link to the original main PR |
| 24 | + - Link to the issue being fixed |
| 25 | + - DESCRIPTION section |
| 26 | + - CUSTOMER IMPACT section (including checkboxes) |
| 27 | + - REGRESSION section (including checkboxes) |
| 28 | + - TESTING section |
| 29 | + - RISK section |
| 30 | + |
| 31 | +3. **Generate the email** following the template at `.github/BACKPORT_EMAIL_TEMPLATE.md` |
| 32 | + |
| 33 | +## Output Format |
| 34 | + |
| 35 | +Output the email as **plain text** (not markdown) since email clients don't render markdown. |
| 36 | + |
| 37 | +``` |
| 38 | +Subject: [release/X.0] Backport request: <TITLE> (#<PR_NUMBER>) |
| 39 | +
|
| 40 | +Hello Tactics, |
| 41 | +
|
| 42 | +Please consider https://github.com/dotnet/runtime/pull/<PR_NUMBER> for backporting into release/X.0. |
| 43 | +
|
| 44 | +Fixes https://github.com/dotnet/runtime/issues/<ISSUE_NUMBER> |
| 45 | +
|
| 46 | +main PR: <MAIN_PR_LINK> |
| 47 | +
|
| 48 | +**DESCRIPTION** |
| 49 | +
|
| 50 | +<description text> |
| 51 | +
|
| 52 | +**CUSTOMER IMPACT** |
| 53 | +
|
| 54 | +- [ ] Customer reported |
| 55 | +- [ ] Found internally |
| 56 | +
|
| 57 | +<customer impact text> |
| 58 | +
|
| 59 | +**REGRESSION** |
| 60 | +
|
| 61 | +- [ ] Yes |
| 62 | +- [ ] No |
| 63 | +
|
| 64 | +<regression text> |
| 65 | +
|
| 66 | +**TESTING** |
| 67 | +
|
| 68 | +<testing text> |
| 69 | +
|
| 70 | +**RISK** |
| 71 | +
|
| 72 | +<risk text> |
| 73 | +``` |
| 74 | + |
| 75 | +## Important Notes |
| 76 | + |
| 77 | +- **Do NOT attempt to open the email in Outlook or any email client.** Just output the formatted text for the user to copy. |
| 78 | +- Preserve the `**bold**` section headers as they appear reasonably well in plain-text emails. |
| 79 | +- Preserve the checkbox format `- [ ]` or `- [x]` from the PR description. |
| 80 | +- Extract the release branch version (e.g., `9.0`) from the PR's base branch. |
| 81 | +- If any section is missing from the PR description, note it and leave a placeholder. |
0 commit comments