Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/BACKPORT_EMAIL_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Backport Email Template
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much does the file name matter for copilot? Can the file be in a subdirectory and have a name that does not look like a special name recognized by github? (For example, the existing PULL_REQUEST_TEMPLATE is a special directory name that github knowns about.)


Use this template when emailing Tactics to request approval for a backport to a release branch.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may want to explicitly say to include a verbatim text from the PR description in the email. I do not think we want the PR description and the description in the email to be different.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The intended flow I had in mind is definitely that way. The backport PR is the basis for any email we send out.

I'll see if we can enforce (or nudge) that flow through the template.


> **Important:** The email content should come directly from your backport PR description
> (see `servicing_pull_request_template.md`). Do not write different text for the email —
> copy the sections verbatim from the PR to ensure consistency.

> **Note:** Most email clients (Outlook, Gmail, etc.) don't render Markdown. The section
> headers use `**bold**` syntax which appears with asterisks in plain-text emails.

---

**Subject:** [release/X.0] Backport request: <BRIEF_DESCRIPTION> (#<PR_NUMBER>)

---

Hello Tactics,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not belong into the PR description

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you sleep ;-)?

I changed it to compliment the existing template. Will help with email generation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand you want this in the email, but I do not think we want this in the commit history.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I'm sure there will be another way to have templates outside the repo to achieve the same result.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have missed that this is meant to be an email template only. The filename made it look like one of the those templates that are picked up by github workflows automatically.

It is fine to have the automation for this checked in. Should it be under skills directory?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it needs a skill. I think it's similar to the other templates and it can just find it accordingly. Allows you to say something like "I want to create an email to tactics for PR ".

I'll open this back up shortly.


Please consider https://github.com/dotnet/runtime/pull/<PR_NUMBER> for backporting into release/X.0.

Fixes https://github.com/dotnet/runtime/issues/<ISSUE_NUMBER>

main PR: <MAIN_PR_LINK>

<!-- Copy the following sections verbatim from your backport PR description -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this just say "Copy the PR description verbatim" and drop the rest that is duplicating the PR template content?


**DESCRIPTION**

<Copy from PR: Description section>

**CUSTOMER IMPACT**

- [ ] Customer reported
- [ ] Found internally
Comment on lines +34 to +35
Copy link

Copilot AI Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkbox syntax - [ ] is GitHub Flavored Markdown that won't render as checkboxes in email clients. When copied to email, these will appear as plain text like - [ ] Customer reported. Consider whether this is the intended format for an email template, or if a simpler format like ☐ Customer reported or just removing the brackets entirely would be more appropriate for email use.

Copilot uses AI. Check for mistakes.

<Copy from PR: Customer Impact section>

**REGRESSION**

- [ ] Yes
- [ ] No

<Copy from PR: Regression section>

**TESTING**

<Copy from PR: Testing section>

**RISK**

<Copy from PR: Risk section>
Comment on lines +50 to +52
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description says the email template includes a Risk High/Medium/Low selection with justification, but the template only has a free-form <Copy from PR: Risk section> placeholder and no standard options. Consider adding the Risk level options (e.g., checkboxes or an explicit Risk: High|Medium|Low line) so the template matches the intended standardized format.

Copilot uses AI. Check for mistakes.
81 changes: 81 additions & 0 deletions .github/skills/backport-email/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
name: backport-email
description: Generate a backport email from a PR for sending to Tactics. Use when asked to create or generate a backport email.
---

# Backport Email Generation

Generate a formatted email for requesting backport approval from Tactics.

## Required Input

Ask the user for the **backport PR URL** if not provided. Example:
- `https://github.com/dotnet/runtime/pull/124058`

## Process

1. **Fetch the backport PR** using the GitHub MCP tools to get:
- PR number and title
- Target release branch (e.g., `release/9.0`)
- PR description containing the servicing template sections

2. **Extract from the PR description:**
- Link to the original main PR
- Link to the issue being fixed
- DESCRIPTION section
- CUSTOMER IMPACT section (including checkboxes)
- REGRESSION section (including checkboxes)
- TESTING section
- RISK section
Comment on lines +22 to +29
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This skill says the PR description contains checkbox blocks for Customer Impact/Regression and instructs to preserve - [ ] / - [x], but the existing servicing PR template (.github/PULL_REQUEST_TEMPLATE/servicing_pull_request_template.md) only has section headings and HTML comments (no checkboxes). Either adjust this skill/template to not assume checkboxes exist, or update the servicing PR template in the same PR so the flow is consistent.

Copilot uses AI. Check for mistakes.

3. **Generate the email** following the template at `.github/BACKPORT_EMAIL_TEMPLATE.md`

## Output Format

Output the email as **plain text** (not markdown) since email clients don't render markdown.

```
Subject: [release/X.0] Backport request: <TITLE> (#<PR_NUMBER>)
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sample subject line here uses Subject: ... <TITLE> while .github/BACKPORT_EMAIL_TEMPLATE.md uses **Subject:** ... <BRIEF_DESCRIPTION>. Align the placeholder naming/format between the skill output example and the template to reduce ambiguity about what should be inserted (full PR title vs brief description).

Suggested change
Subject: [release/X.0] Backport request: <TITLE> (#<PR_NUMBER>)
Subject: [release/X.0] Backport request: <BRIEF_DESCRIPTION> (#<PR_NUMBER>)

Copilot uses AI. Check for mistakes.

Hello Tactics,

Please consider https://github.com/dotnet/runtime/pull/<PR_NUMBER> for backporting into release/X.0.

Fixes https://github.com/dotnet/runtime/issues/<ISSUE_NUMBER>

main PR: <MAIN_PR_LINK>

**DESCRIPTION**

<description text>

**CUSTOMER IMPACT**

- [ ] Customer reported
- [ ] Found internally

<customer impact text>

**REGRESSION**

- [ ] Yes
- [ ] No

<regression text>

**TESTING**

<testing text>

**RISK**

<risk text>
```

## Important Notes

- **Do NOT attempt to open the email in Outlook or any email client.** Just output the formatted text for the user to copy.
- Preserve the `**bold**` section headers as they appear reasonably well in plain-text emails.
- Preserve the checkbox format `- [ ]` or `- [x]` from the PR description.
- Extract the release branch version (e.g., `9.0`) from the PR's base branch.
- If any section is missing from the PR description, note it and leave a placeholder.