Skip to content

Commit 73b758f

Browse files
committed
ci: improve backport PR title and body
The previous templates were not compatible with our usage: - The title was prefixed with `[Backport release-1.x]` which broke `release-please` - The body was empty besides the comment about backporting. By default we use the PR body as the commit message, so we should include the relevant details here.
1 parent 6c96d19 commit 73b758f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/backport.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,13 @@ jobs:
2323
steps:
2424
- uses: tibdex/backport@v2
2525
with:
26-
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
github_token: ${{ secrets.GITHUB_TOKEN }}
27+
28+
# These templates are compatible with release-please and our default commit body (body of PR).
29+
title_template: "<%= title %> [Backport <%= base %>]"
30+
body_template: |
31+
<%= body %>
32+
33+
---
34+
Backport <%= mergeCommitSha %> from #<%= number %>.
35+

0 commit comments

Comments
 (0)