File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 9595 git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
9696 git fetch origin
9797
98- if gh pr list --head "update-bindings-${{ matrix.ros_distribution }}" --state open --json number --jq length | grep -q '^0$'; then
98+ BRANCH_NAME="update-bindings-${{ matrix.ros_distribution }}"
99+ if gh pr list --head "$BRANCH_NAME" --state open --json number --jq length | grep -q '^0$'; then
99100 echo "No existing PR found, will create new one"
100101 CREATE_PR=1
101102 else
@@ -106,10 +107,14 @@ jobs:
106107 git add rclrs/src/rcl_bindings_generated_${{ matrix.ros_distribution }}.rs
107108 git commit -m "Regenerate bindings for ${{ matrix.ros_distribution }}"
108109
109- git push -f origin HEAD:refs/heads/update-bindings-${{ matrix.ros_distribution }}
110+ git push -f origin HEAD:refs/heads/$BRANCH_NAME
110111
111112 if [ $CREATE_PR -eq 1 ]; then
112- gh pr create --base main --head update-bindings-${{ matrix.ros_distribution }} --title "Regenerate bindings for ${{ matrix.ros_distribution }}" --body "This PR regenerates the bindings for ${{ matrix.ros_distribution }}."
113+ gh pr create \
114+ --base main \
115+ --head "$BRANCH_NAME" \
116+ --title "Regenerate bindings for ${{ matrix.ros_distribution }}" \
117+ --body "This PR regenerates the bindings for ${{ matrix.ros_distribution }}."
113118 else
114119 echo "PR already exists and has been updated with new commit"
115120 fi
You can’t perform that action at this time.
0 commit comments