diff --git a/.github/workflows/pr-health.yml b/.github/workflows/pr-health.yml index 1b266e05c..ad41fddcb 100644 --- a/.github/workflows/pr-health.yml +++ b/.github/workflows/pr-health.yml @@ -144,6 +144,10 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} REPO: ${{ github.repository }} steps: + - uses: actions/checkout@v6 + with: + ref: ${{ github.event.pull_request.base.sha }} + - name: Ensure maintenance labels exist run: | set -euo pipefail @@ -189,7 +193,7 @@ jobs: --json isDraft,labels,mergeStateStatus,statusCheckRollup)" merge_state="$(jq -r '.mergeStateStatus // "UNKNOWN"' <<<"$data")" - check_state="$(python3 .github/scripts/pr-health-labels.py --state-json "$data")" + check_state="$(python3 .github/scripts/pr-health-labels.py --state-json "$data")" is_draft="$(jq -r '.isDraft' <<<"$data")" if [[ "$merge_state" == "BEHIND" ]]; then