Skip to content

Commit 3ed7b6f

Browse files
committed
feat: Add CI status checker script
- Create scripts/check-ci.sh for monitoring GitHub Actions - Add npm run ci:status command - Workaround for GitHub Actions VSCode extension auth issues - Shows status, conclusion, commit, and run URL
1 parent cecf964 commit 3ed7b6f

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"bench": "node benchmarks/index.js",
2727
"lint": "eslint src/**/*.ts",
2828
"format": "prettier --write src/**/*.ts",
29-
"prepublishOnly": "npm run build && npm test"
29+
"prepublishOnly": "npm run build && npm test",
30+
"ci:status": "./scripts/check-ci.sh"
3031
},
3132
"dependencies": {
3233
"better-sqlite3": "^11.0.0"

scripts/check-ci.sh

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#!/bin/bash
2+
# Quick CI status checker for sqlite-graph
3+
4+
echo "🔍 Checking CI status for sqlite-graph..."
5+
echo ""
6+
7+
# Get latest CI run
8+
LATEST=$(gh run list --repo michaeloboyle/sqlite-graph --workflow=CI --limit 1 --json status,conclusion,displayTitle,createdAt,databaseId)
9+
10+
# Parse and display
11+
STATUS=$(echo "$LATEST" | jq -r '.[0].status')
12+
CONCLUSION=$(echo "$LATEST" | jq -r '.[0].conclusion')
13+
TITLE=$(echo "$LATEST" | jq -r '.[0].displayTitle')
14+
CREATED=$(echo "$LATEST" | jq -r '.[0].createdAt')
15+
RUN_ID=$(echo "$LATEST" | jq -r '.[0].databaseId')
16+
17+
# Color output
18+
if [ "$STATUS" = "completed" ]; then
19+
if [ "$CONCLUSION" = "success" ]; then
20+
echo "✅ Status: SUCCESS"
21+
else
22+
echo "❌ Status: FAILED ($CONCLUSION)"
23+
fi
24+
else
25+
echo "⏳ Status: $STATUS"
26+
fi
27+
28+
echo "📝 Commit: $TITLE"
29+
echo "🕐 Started: $CREATED"
30+
echo "🔗 URL: https://github.com/michaeloboyle/sqlite-graph/actions/runs/$RUN_ID"
31+
echo ""
32+
33+
# Offer to view logs if failed
34+
if [ "$STATUS" = "completed" ] && [ "$CONCLUSION" != "success" ]; then
35+
echo "View failure logs? (y/n)"
36+
read -r response
37+
if [ "$response" = "y" ]; then
38+
gh run view $RUN_ID --log-failed
39+
fi
40+
fi

0 commit comments

Comments
 (0)