diff --git a/.github/workflows/pr-title-update.yml b/.github/workflows/pr-title-update.yml index a4f6e32ebf47..482794257069 100644 --- a/.github/workflows/pr-title-update.yml +++ b/.github/workflows/pr-title-update.yml @@ -18,8 +18,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | PR_NUMBER=${{ github.event.pull_request.number }} - TARGET_BRANCH=$(gh pr view $PR_NUMBER --json baseRefName -q .baseRefName) - PR_TITLE=$(gh pr view $PR_NUMBER --json title -q .title) + TARGET_BRANCH="${{ github.base_ref }}" + PR_TITLE="${{ github.event.pull_request.title }}" VERSION=$(echo $TARGET_BRANCH | grep -oP '\d+\.\d+') if [[ -n "$VERSION" && ! "$PR_TITLE" =~ ^\[$VERSION\] ]]; then NEW_TITLE="[$VERSION] $PR_TITLE"