|
| 1 | +--- |
| 2 | +agent: agent |
| 3 | +tools: |
| 4 | + [ |
| 5 | + "github/add_issue_comment", |
| 6 | + "github/get_label", |
| 7 | + "github/get_me", |
| 8 | + "github/issue_read", |
| 9 | + "github/issue_write", |
| 10 | + "github/search_issues", |
| 11 | + "github/search_pull_requests", |
| 12 | + "github/search_repositories", |
| 13 | + "github/sub_issue_write", |
| 14 | + ] |
| 15 | +--- |
| 16 | + |
| 17 | +# Issue Migration Prompt |
| 18 | + |
| 19 | +Use this prompt when migrating issues from one GitHub repository to another (e.g., from `microsoft/vscode-copilot` to `microsoft/vscode`). |
| 20 | + |
| 21 | +## Input Methods |
| 22 | + |
| 23 | +You can specify which issues to migrate using **any** of these three methods: |
| 24 | + |
| 25 | +### Option A: GitHub Search Query URL |
| 26 | + |
| 27 | +Provide a full GitHub issues search URL. **All matching issues will be migrated.** |
| 28 | + |
| 29 | +``` |
| 30 | +https://github.com/microsoft/vscode-copilot/issues?q=is%3Aissue+is%3Aopen+assignee%3Ayoyokrazy |
| 31 | +``` |
| 32 | + |
| 33 | +### Option B: GitHub Search Query Parameters |
| 34 | + |
| 35 | +Provide search query syntax for a specific repo. **All matching issues will be migrated.** |
| 36 | + |
| 37 | +``` |
| 38 | +repo:microsoft/vscode-copilot is:issue is:open assignee:yoyokrazy |
| 39 | +``` |
| 40 | + |
| 41 | +Common query filters: |
| 42 | + |
| 43 | +- `is:issue` / `is:pr` - Filter by type |
| 44 | +- `is:open` / `is:closed` - Filter by state |
| 45 | +- `assignee:USERNAME` - Filter by assignee |
| 46 | +- `author:USERNAME` - Filter by author |
| 47 | +- `label:LABEL` - Filter by label |
| 48 | +- `milestone:MILESTONE` - Filter by milestone |
| 49 | + |
| 50 | +### Option C: Specific Issue URL |
| 51 | + |
| 52 | +Provide a direct link to a single issue. **Only this issue will be migrated.** |
| 53 | + |
| 54 | +``` |
| 55 | +https://github.com/microsoft/vscode-copilot/issues/12345 |
| 56 | +``` |
| 57 | + |
| 58 | +## Task |
| 59 | + |
| 60 | +**Target Repository:** `{TARGET_REPO}` |
| 61 | + |
| 62 | +Based on the input provided, migrate the issue(s) to the target repository following all requirements below. |
| 63 | + |
| 64 | +## Requirements |
| 65 | + |
| 66 | +### 1. Issue Body Format |
| 67 | + |
| 68 | +Create the new issue with this header format: |
| 69 | + |
| 70 | +```markdown |
| 71 | +_Transferred from {SOURCE_REPO}#{ORIGINAL_ISSUE_NUMBER}_ |
| 72 | +_Original author: `@{ORIGINAL_AUTHOR}`_ |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +{ORIGINAL_ISSUE_BODY} |
| 77 | +``` |
| 78 | + |
| 79 | +### 2. Comment Migration |
| 80 | + |
| 81 | +For each comment on the original issue, add a comment to the new issue: |
| 82 | + |
| 83 | +```markdown |
| 84 | +_`@{COMMENT_AUTHOR}` commented:_ |
| 85 | + |
| 86 | +--- |
| 87 | + |
| 88 | +{COMMENT_BODY} |
| 89 | +``` |
| 90 | + |
| 91 | +### 3. CRITICAL: Preventing GitHub Pings |
| 92 | + |
| 93 | +**ALL `@username` mentions MUST be wrapped in backticks to prevent GitHub from sending notifications.** |
| 94 | + |
| 95 | +✅ Correct: `` `@username` `` |
| 96 | +❌ Wrong: `@username` |
| 97 | + |
| 98 | +This applies to: |
| 99 | + |
| 100 | +- The "Original author" line in the issue body |
| 101 | +- Any `@mentions` within the issue body content |
| 102 | +- The comment author attribution line |
| 103 | +- Any `@mentions` within comment content |
| 104 | +- Any quoted content that contains `@mentions` |
| 105 | + |
| 106 | +### 4. CRITICAL: Issue/PR Link Reformatting |
| 107 | + |
| 108 | +**Issue references like `#12345` are REPO-SPECIFIC.** If you copy `#12345` from the source repo to the target repo, it will incorrectly link to issue 12345 in the _target_ repo instead of the source. |
| 109 | + |
| 110 | +**Convert ALL `#NUMBER` references to full URLs:** |
| 111 | + |
| 112 | +✅ Correct: `https://github.com/microsoft/vscode-copilot/issues/12345` |
| 113 | +✅ Also OK: `microsoft/vscode-copilot#12345` |
| 114 | +❌ Wrong: `#12345` (will link to wrong repo) |
| 115 | + |
| 116 | +This applies to: |
| 117 | + |
| 118 | +- Issue references in the body (`#12345` → full URL) |
| 119 | +- PR references in the body (`#12345` → full URL) |
| 120 | +- References in comments |
| 121 | +- References in quoted content |
| 122 | +- References in image alt text or links |
| 123 | + |
| 124 | +**Exception:** References that are _already_ full URLs should be left unchanged. |
| 125 | + |
| 126 | +### 5. Metadata Preservation |
| 127 | + |
| 128 | +- Copy all applicable labels to the new issue |
| 129 | +- Assign the new issue to the same assignees (if they exist in target repo) |
| 130 | +- Preserve the issue title exactly |
| 131 | + |
| 132 | +### 5. Post-Migration |
| 133 | + |
| 134 | +After creating the new issue and all comments: |
| 135 | + |
| 136 | +- Add a comment to the **original** issue linking to the new issue: |
| 137 | + ```markdown |
| 138 | + Migrated to {TARGET_REPO}#{NEW_ISSUE_NUMBER} |
| 139 | + ``` |
| 140 | +- Close the original issue as not_planned |
| 141 | + |
| 142 | +## Example Transformation |
| 143 | + |
| 144 | +### Original Issue Body (in `microsoft/vscode-copilot`): |
| 145 | + |
| 146 | +```markdown |
| 147 | +I noticed @johndoe had a similar issue in #9999. cc @janedoe for visibility. |
| 148 | + |
| 149 | +Related to #8888 and microsoft/vscode#12345. |
| 150 | + |
| 151 | +Steps to reproduce: |
| 152 | + |
| 153 | +1. Open VS Code |
| 154 | +2. ... |
| 155 | +``` |
| 156 | + |
| 157 | +### Migrated Issue Body (in `microsoft/vscode`): |
| 158 | + |
| 159 | +```markdown |
| 160 | +_Transferred from microsoft/vscode-copilot#12345_ |
| 161 | +_Original author: `@originalauthor`_ |
| 162 | + |
| 163 | +--- |
| 164 | + |
| 165 | +I noticed `@johndoe` had a similar issue in https://github.com/microsoft/vscode-copilot/issues/9999. cc `@janedoe` for visibility. |
| 166 | + |
| 167 | +Related to https://github.com/microsoft/vscode-copilot/issues/8888 and microsoft/vscode#12345. |
| 168 | + |
| 169 | +Steps to reproduce: |
| 170 | + |
| 171 | +1. Open VS Code |
| 172 | +2. ... |
| 173 | +``` |
| 174 | + |
| 175 | +Note: The `microsoft/vscode#12345` reference was already a cross-repo link, so it stays unchanged. |
| 176 | + |
| 177 | +## Checklist Before Migration |
| 178 | + |
| 179 | +- [ ] Confirm input method (query URL, query params, or specific issue URL) |
| 180 | +- [ ] Confirm target repository |
| 181 | +- [ ] If using query: verify the query returns the expected issues |
| 182 | +- [ ] Verify all `@mentions` are wrapped in backticks |
| 183 | +- [ ] Verify all `#NUMBER` references are converted to full URLs |
| 184 | +- [ ] Decide whether to close original issues after migration |
0 commit comments