Skip to content

Commit 08da08a

Browse files
committed
update pr opening logic
1 parent fe57c1e commit 08da08a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.github/workflows/generate_bindings.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ env:
1717
BEVY_PATH: ${{ github.workspace }}/target/codegen/bevy
1818
OUTPUT_PATH: ${{ github.workspace }}/crates/bevy_mod_scripting_functions/src/bevy/
1919
BEVY_FEATURES: bevy_asset,bevy_animation,bevy_core_pipeline,bevy_ui,bevy_pbr,bevy_render,bevy_text,bevy_sprite,file_watcher,multi_threaded
20-
BRANCH_NAME: update-bevy-bindings-${{ github.run_id }}
20+
BRANCH_NAME: __update-bevy-bindings-${{ github.head_ref || github.ref_name }}
2121
GH_TOKEN: ${{ github.token }}
2222
jobs:
2323
generate_bindings:
@@ -78,4 +78,7 @@ jobs:
7878
- name: Create Or Update PR
7979
if: success() && steps.findPR.outputs.number
8080
run: |
81-
gh pr create --title "chore(codegen): update bevy bindings" --body "This PR updates the bevy bindings. #${{ steps.findPR.outputs.number }}" --base ${{ github.ref }} --head ${{ env.BRANCH_NAME }} || true
81+
gh pr list --base feature/bevy-system-refactor --search "chore(codegen): update bevy bindings" --json number > prs.json
82+
if [ $(jq '. | length' prs.json) -eq 0 ]; then
83+
gh pr create --title "chore(codegen): update bevy bindings" --body "This PR updates the bevy bindings. #${{ steps.findPR.outputs.number }}" --base ${{ github.ref }} --head ${{ env.BRANCH_NAME }} || true
84+
fi

0 commit comments

Comments
 (0)