File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -94,10 +94,12 @@ jobs:
9494 git config --global user.name "GitHub Action"
9595 git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
9696 git remote update origin
97- CREATE_PR=0
98- if ! git checkout update-bindings-${{ matrix.ros_distribution }}; then
97+ if gh pr list --head "update-bindings-${{ matrix.ros_distribution }}" --state open --json number --jq length | grep -q '^0$'; then
98+ echo "No existing PR found, will create new one"
9999 CREATE_PR=1
100- git checkout -b update-bindings-${{ matrix.ros_distribution }}
100+ else
101+ echo "PR already exists, will update it"
102+ CREATE_PR=0
101103 fi
102104 git add rclrs/src/rcl_bindings_generated_${{ matrix.ros_distribution }}.rs
103105 git commit -m "Regenerate bindings for ${{ matrix.ros_distribution }}"
You can’t perform that action at this time.
0 commit comments