From 80e76dabd5dcb01719ceb01732abae32aa8e64d2 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Thu, 21 Nov 2024 17:13:26 +0000 Subject: [PATCH] Update title of edited PRs only if base ref changed Also: - Update title of reopened PRs too. - Don't unnecessarily checkout the repo. --- .github/workflows/pr-title-update.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-title-update.yml b/.github/workflows/pr-title-update.yml index 6a4c5021f63d..b3146ed262fe 100644 --- a/.github/workflows/pr-title-update.yml +++ b/.github/workflows/pr-title-update.yml @@ -2,17 +2,17 @@ name: Update PR title on: pull_request_target: - types: [opened, edited] + types: [opened, edited, reopened] branches: - "release_**" jobs: update-title: + if: github.event.action != 'edited' || github.event.changes.base.ref.from != '' runs-on: ubuntu-latest permissions: pull-requests: write steps: - - uses: actions/checkout@v4 - name: Update PR title env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}