@@ -127,8 +127,6 @@ jobs:
127
127
128
128
- name : Setup Bun
129
129
uses : oven-sh/setup-bun@v2
130
- with :
131
- bun-version : latest
132
130
133
131
- name : Setup PHP and Composer (if needed)
134
132
if : ${{ hashFiles('composer.json') != '' }}
@@ -166,8 +164,6 @@ jobs:
166
164
167
165
- name : Setup Bun
168
166
uses : oven-sh/setup-bun@v2
169
- with :
170
- bun-version : latest
171
167
172
168
- name : Install dependencies
173
169
run : bun install
@@ -249,8 +245,6 @@ jobs:
249
245
250
246
- name : Setup Bun
251
247
uses : oven-sh/setup-bun@v2
252
- with :
253
- bun-version : latest
254
248
255
249
- name : Setup PHP and Composer (if needed)
256
250
if : ${{ hashFiles('composer.json') != '' }}
@@ -358,8 +352,6 @@ jobs:
358
352
359
353
- name : Setup Bun
360
354
uses : oven-sh/setup-bun@v2
361
- with :
362
- bun-version : latest
363
355
364
356
- name : Install dependencies
365
357
run : bun install
@@ -376,6 +368,31 @@ jobs:
376
368
echo "Repository: ${{ github.repository }}"
377
369
echo "Branch: ${{ github.ref_name }}"
378
370
371
+ - name : Pre-flight dashboard check
372
+ if : ${{ github.event.inputs.dry_run != 'true' }}
373
+ run : |
374
+ echo "🔍 Pre-flight check: Looking for existing dashboard issues..."
375
+
376
+ # Check for existing dashboard issues to prevent duplicates
377
+ if command -v gh &> /dev/null; then
378
+ EXISTING_DASHBOARDS=$(gh issue list --label "dashboard,dependencies" --state open --json number,title,url --jq length 2>/dev/null || echo "0")
379
+ echo "Found $EXISTING_DASHBOARDS existing dashboard issue(s)"
380
+
381
+ if [ "$EXISTING_DASHBOARDS" -gt 1 ]; then
382
+ echo "⚠️ WARNING: Multiple dashboard issues detected!"
383
+ gh issue list --label "dashboard,dependencies" --state open --json number,title,url --jq '.[] | " - #\(.number): \(.title) - \(.url)"' 2>/dev/null || true
384
+ echo ""
385
+ echo "🔧 Buddy Bot will attempt to update the most recent one and may close duplicates"
386
+ elif [ "$EXISTING_DASHBOARDS" -eq 1 ]; then
387
+ DASHBOARD_INFO=$(gh issue list --label "dashboard,dependencies" --state open --json number,title,url --jq '.[0] | "#\(.number): \(.title) - \(.url)"' 2>/dev/null || echo "Found 1 dashboard")
388
+ echo "✅ Found existing dashboard: $DASHBOARD_INFO"
389
+ else
390
+ echo "ℹ️ No existing dashboard found - a new one will be created"
391
+ fi
392
+ else
393
+ echo "⚠️ GitHub CLI not available - cannot perform pre-flight check"
394
+ fi
395
+
379
396
- name : Update Dependency Dashboard
380
397
run : |
381
398
PIN="${{ github.event.inputs.pin || 'true' }}"
@@ -397,10 +414,6 @@ jobs:
397
414
# Build the command
398
415
COMMAND="bunx buddy-bot dashboard"
399
416
400
- if [ "$PIN" = "true" ]; then
401
- COMMAND="$COMMAND --pin"
402
- fi
403
-
404
417
if [ "$TITLE" != "" ]; then
405
418
COMMAND="$COMMAND --title \"$TITLE\""
406
419
fi
0 commit comments