diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 5c48852..488e403 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -23,7 +23,7 @@ jobs: env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - existing_pr=$(gh pr list --repo ${{ github.repository }} --head "auto-update-flake-" --state open --json number --jq '.[0].number') + existing_pr=$(gh pr list --repo ${{ github.repository }} --state open --json number,headRefName --jq '.[] | select(.headRefName | startswith("auto-update-flake")) | .number' | head -n1) echo "$existing_pr" if [ -n "$existing_pr" ]; then echo "pr_exists=true" >> $GITHUB_OUTPUT