-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Add backport email template #124085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add backport email template #124085
Changes from all commits
1a4401e
91712b3
6c813d5
5d301de
26c1a9d
2ca2a09
c5c81c1
803f36e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,52 @@ | ||||||||||
| --- | ||||||||||
| 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 (filled in from the `pr_description_template` in `.github/workflows/backport.yml`) | ||||||||||
|
|
||||||||||
| 2. **Read the email template** at `.github/skills/backport-email/templates/BACKPORT_EMAIL_TEMPLATE.md` | ||||||||||
|
|
||||||||||
| 3. **Generate the email** by: | ||||||||||
| - Filling in the subject line with the release branch, PR title, and PR number | ||||||||||
| - Extracting the issue link and main PR link from the PR description | ||||||||||
| - Copying the PR description verbatim as the email body | ||||||||||
|
|
||||||||||
| ## 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>) | ||||||||||
|
||||||||||
| Subject: [release/X.0] Backport request: <TITLE> (#<PR_NUMBER>) | |
| Subject: [release/X.0] Backport request: <BRIEF_DESCRIPTION> (#<PR_NUMBER>) |
Copilot
AI
Feb 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The placeholder naming in the sample output uses <TITLE>, but the template file uses <BRIEF_DESCRIPTION>. Using consistent placeholder names across both files will reduce confusion when following the instructions.
| Subject: [release/X.0] Backport request: <TITLE> (#<PR_NUMBER>) | |
| Subject: [release/X.0] Backport request: <BRIEF_DESCRIPTION> (#<PR_NUMBER>) |
Copilot
AI
Feb 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sample email hardcodes release/X.0 in the subject/body. Backport PRs may target release/X.0-staging, so this can generate an approval request for the wrong branch. Use a <TARGET_BRANCH> placeholder populated from the PR base branch instead of release/X.0.
Copilot
AI
Feb 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The instructions say to extract the release branch version (e.g., 9.0) from the PR base branch, but that would drop a -staging suffix and can produce the wrong target (e.g., release/9.0 vs release/9.0-staging). Use the full base branch name as the target branch in the generated subject/body.
Copilot
AI
Feb 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There’s a contradiction between “Copy the PR description verbatim — do not rewrite or restructure it” and “If any section is missing from the PR description, note it and leave a placeholder.” If the PR description must be verbatim, missing-section placeholders should be added outside the verbatim block (or change the instruction to allow modifying the description).
| - If any section is missing from the PR description, note it and leave a placeholder. | |
| - If any section is missing from the PR description, note it in the email outside the copied PR description and leave a placeholder there. |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,20 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Backport Email Template | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could likely put this anywhere and tell the skill where to pick it up. It seemed 'better' to have this under .github since it's intended to work with the skill.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Can this be a sub-directory in the skill directory? Like https://github.com/dotnet/runtime/tree/main/.github/skills/azdo-helix-failures
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I created a template folder and moved it into there. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Use this template when emailing Tactics to request approval for a backport to a release branch. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
steveisok marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| The body of the email should be the PR description verbatim (based on the `pr_description_template` in `.github/workflows/backport.yml`). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Subject:** [release/X.0] Backport request: <BRIEF_DESCRIPTION> (#<PR_NUMBER>) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| **Subject:** [release/X.0] Backport request: <BRIEF_DESCRIPTION> (#<PR_NUMBER>) | |
| Subject: [release/X.0] Backport request: <BRIEF_DESCRIPTION> (#<PR_NUMBER>) |
Copilot
AI
Feb 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Placeholder naming is inconsistent between the skill (<TITLE>) and the template (<BRIEF_DESCRIPTION>), which makes it harder to follow both. Align on a single placeholder name across both files.
| **Subject:** [release/X.0] Backport request: <BRIEF_DESCRIPTION> (#<PR_NUMBER>) | |
| **Subject:** [release/X.0] Backport request: <TITLE> (#<PR_NUMBER>) |
steveisok marked this conversation as resolved.
Show resolved
Hide resolved
Copilot
AI
Feb 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This subject line hardcodes release/X.0, but backport PRs can target release/X.0-staging. Use a <TARGET_BRANCH> placeholder (filled from the PR base branch) so the email targets the correct branch.
| **Subject:** [release/X.0] Backport request: <BRIEF_DESCRIPTION> (#<PR_NUMBER>) | |
| --- | |
| Hello Tactics, | |
| Please consider https://github.com/dotnet/runtime/pull/<PR_NUMBER> for backporting into release/X.0. | |
| **Subject:** [<TARGET_BRANCH>] Backport request: <BRIEF_DESCRIPTION> (#<PR_NUMBER>) | |
| --- | |
| Hello Tactics, | |
| Please consider https://github.com/dotnet/runtime/pull/<PR_NUMBER> for backporting into <TARGET_BRANCH>. |
Copilot
AI
Feb 7, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line hardcodes release/X.0, but the correct backport target can be release/X.0-staging. Use <TARGET_BRANCH> (from the PR base branch) here to avoid requesting approval for the wrong branch.
| **Subject:** [release/X.0] Backport request: <BRIEF_DESCRIPTION> (#<PR_NUMBER>) | |
| --- | |
| Hello Tactics, | |
| Please consider https://github.com/dotnet/runtime/pull/<PR_NUMBER> for backporting into release/X.0. | |
| **Subject:** [<TARGET_BRANCH>] Backport request: <BRIEF_DESCRIPTION> (#<PR_NUMBER>) | |
| --- | |
| Hello Tactics, | |
| Please consider https://github.com/dotnet/runtime/pull/<PR_NUMBER> for backporting into <TARGET_BRANCH>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This suggests the target branch is something like
release/9.0, but servicing backports may targetrelease/X.0-staging(see the notes in.github/workflows/backport.yml). Consider updating the example/wording to reflect that the base branch might include-staging.