From dac43fae13f2820d11804352cb2eaa97bb71ccfb Mon Sep 17 00:00:00 2001 From: Kush Date: Thu, 16 Apr 2026 15:51:39 -0400 Subject: [PATCH] Add workflow to prefix GoReleaser PRs with SWI-10615 Automatically prepends the Jira ticket to PR titles when GoReleaser opens a formula update PR (detected by goreleaser/* branch prefix). Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/prefix-pr-title.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/prefix-pr-title.yml diff --git a/.github/workflows/prefix-pr-title.yml b/.github/workflows/prefix-pr-title.yml new file mode 100644 index 0000000..60320ca --- /dev/null +++ b/.github/workflows/prefix-pr-title.yml @@ -0,0 +1,20 @@ +name: Prefix PR Title + +on: + pull_request: + types: [opened] + +permissions: + pull-requests: write + +jobs: + prefix: + if: startsWith(github.head_ref, 'goreleaser/') + runs-on: macos-latest + steps: + - name: Add ticket prefix to PR title + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + CURRENT_TITLE=$(gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --json title -q .title) + gh pr edit ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --title "SWI-10615 $CURRENT_TITLE"