Skip to content

Commit 4774fa7

Browse files
committed
Drop manual cross-link step; GitHub links via the Backport of: reference
1 parent 582c9ea commit 4774fa7

1 file changed

Lines changed: 4 additions & 14 deletions

File tree

.agents/skills/backport-pr/SKILL.md

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -147,27 +147,17 @@ git status --porcelain # expect no output
147147

148148
### 6. Push and open the draft PR
149149

150-
`gh pr create` prints the new PR's URL — capture it, since step 7 needs its number.
150+
The `Backport of: #<PR>` body references the original PR, so GitHub cross-links the two
151+
automatically — no separate comment needed.
151152

152153
```bash
153154
git push -u origin <branch>
154155

155-
backport_url=$(gh pr create \
156+
gh pr create \
156157
--draft \
157158
--base <major> \
158159
--title "<namespaced-title>" \
159-
--body "Backport of: #<PR>")
160-
echo "$backport_url"
161-
```
162-
163-
### 7. Cross-link on the original PR
164-
165-
Comment on the original PR with a link to the backport (e.g. `v10 backport: #NNNN`). Pass the
166-
URL captured above — `gh pr comment` accepts it directly, so you don't have to parse the number
167-
out:
168-
169-
```bash
170-
gh pr comment <PR> --body "<major> backport: $backport_url"
160+
--body "Backport of: #<PR>"
171161
```
172162

173163
## Notes

0 commit comments

Comments
 (0)