Skip to content

Commit

Permalink
ci: improve backport PR title and body (#420)
Browse files Browse the repository at this point in the history
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.

(cherry picked from commit 2e44ada)
  • Loading branch information
apricote authored and github-actions[bot] committed Apr 22, 2024
1 parent f7f96a5 commit 7d135d3
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,19 @@ jobs:
)
)
steps:
- uses: tibdex/backport@v2
- uses: jooola/backport@main
# Using a fork of tibdex/backport@v2 to get https://github.com/tibdex/backport/pull/109
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}

# These templates are compatible with release-please and our default commit body (body of PR).
title_template: "<%= title %> [Backport <%= base %>]"
body_template: |
<%= body %>
---
Backport <%= mergeCommitSha %> from #<%= number %>.
BEGIN_COMMIT_OVERRIDE
<%= title %>
END_COMMIT_OVERRIDE

0 comments on commit 7d135d3

Please sign in to comment.