From 54ee67e8f348523ac777e8aa8a4fbd7be5ca2291 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 22 Apr 2024 11:51:50 +0200 Subject: [PATCH] ci: improve backport PR title and body (#421) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- Backport 2e44ada6e733610a86192d2f429e99da607962a2 from #420. Co-authored-by: Julian Tölle --- .github/workflows/backport.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index 971e8a65..479369b7 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -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 }} \ No newline at end of file + 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