From ab07020e0b836929c396a2199ba5f5ef93ed880e Mon Sep 17 00:00:00 2001 From: Sai Cheemalapati Date: Mon, 30 Mar 2026 12:05:13 -0400 Subject: [PATCH] DEV-1168: Fetch current PR title from API so reruns see updated titles --- .github/workflows/pr-title-check.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-title-check.yml b/.github/workflows/pr-title-check.yml index b3fbbd3..5dae45a 100644 --- a/.github/workflows/pr-title-check.yml +++ b/.github/workflows/pr-title-check.yml @@ -10,9 +10,13 @@ jobs: steps: - name: Check for Linear issue ID env: - PR_TITLE: ${{ github.event.pull_request.title }} - PR_AUTHOR_TYPE: ${{ github.event.pull_request.user.type }} + GH_TOKEN: ${{ github.token }} + PR_NUMBER: ${{ github.event.pull_request.number }} + REPO: ${{ github.repository }} run: | + PR_DATA=$(gh api "repos/$REPO/pulls/$PR_NUMBER" --jq '{title: .title, author_type: .user.type}') + PR_TITLE=$(echo "$PR_DATA" | jq -r '.title') + PR_AUTHOR_TYPE=$(echo "$PR_DATA" | jq -r '.author_type') if [ "$PR_AUTHOR_TYPE" = "Bot" ]; then echo "Bot PR — skipping check." elif echo "$PR_TITLE" | grep -qPi '^[A-Z]+[-\s]\d+\b'; then