mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
🔖 Checkpoint: Edit /workspaces/claude-code-flow/.github/workflows/status-badges.yml
This commit is contained in:
1 parent
3ceb497efc
commit
a4aeb13436
4 files changed
+174
No files matched your search
@@ -0,0 +1 @@
|
||||
{"branch": "checkpoint/pre-edit-20250812-024421", "file": "/workspaces/claude-code-flow/src/verification/rollback-engine.ts", "timestamp": "2025-08-12T02:44:21Z", "type": "pre-edit", "original_branch": "alpha-89"}
|
||||
@@ -0,0 +1 @@
|
||||
{"tag": "checkpoint-20250812-024423", "file": "/workspaces/claude-code-flow/.github/ISSUE_TEMPLATE/rollback-incident.md", "timestamp": "2025-08-12T02:44:23Z", "type": "post-edit", "branch": "alpha-89", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 232 ++++++++++++++++++++++++++-- .claude-flow/metrics/task-metrics.json | 6 +- .claude/checkpoints/1754966649.json | 1 + .claude/checkpoints/1754966655.json | 1 + .claude/checkpoints/1754966659.json | 1 + .github/ISSUE_TEMPLATE/rollback-incident.md | 109 +++++++++++++ 7 files changed, 334 insertions(+), 18 deletions(-) "}
|
||||
@@ -0,0 +1 @@
|
||||
{"tag": "checkpoint-20250812-024426", "file": "/workspaces/claude-code-flow/src/verification/rollback-engine.ts", "timestamp": "2025-08-12T02:44:26Z", "type": "post-edit", "branch": "alpha-89", "diff_summary": " .claude-flow/metrics/performance.json | 2 +- .claude-flow/metrics/system-metrics.json | 232 ++++++++++- .claude-flow/metrics/task-metrics.json | 6 +- src/verification/rollback-engine.ts | 636 +++++++++++++++++++++++++++++++ 4 files changed, 858 insertions(+), 18 deletions(-) "}
|
||||
@@ -0,0 +1,171 @@
|
||||
name: 📊 Status Badges Update
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["🔍 Verification Pipeline", "🎯 Truth Scoring Pipeline", "🔗 Cross-Agent Integration Tests"]
|
||||
types: [completed]
|
||||
push:
|
||||
branches: [main]
|
||||
schedule:
|
||||
- cron: '0 6 * * *' # Daily at 6 AM UTC
|
||||
|
||||
jobs:
|
||||
update-badges:
|
||||
name: 📊 Update Status Badges
|
||||
runs-on: ubuntu-latest
|
||||
if: github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Generate badge data
|
||||
run: |
|
||||
echo "📊 Generating badge data..."
|
||||
|
||||
mkdir -p badge-data
|
||||
|
||||
# Get latest workflow runs
|
||||
VERIFICATION_STATUS="${{ github.event.workflow_run.conclusion || 'unknown' }}"
|
||||
WORKFLOW_NAME="${{ github.event.workflow_run.name || 'unknown' }}"
|
||||
|
||||
# Determine badge colors and status
|
||||
case "$VERIFICATION_STATUS" in
|
||||
"success")
|
||||
BADGE_COLOR="brightgreen"
|
||||
BADGE_STATUS="passing"
|
||||
;;
|
||||
"failure")
|
||||
BADGE_COLOR="red"
|
||||
BADGE_STATUS="failing"
|
||||
;;
|
||||
*)
|
||||
BADGE_COLOR="yellow"
|
||||
BADGE_STATUS="unknown"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Create badge JSON
|
||||
cat > badge-data/status.json << EOF
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "pipeline",
|
||||
"message": "$BADGE_STATUS",
|
||||
"color": "$BADGE_COLOR",
|
||||
"style": "flat-square"
|
||||
}
|
||||
EOF
|
||||
|
||||
# Truth scoring badge
|
||||
if [ "$WORKFLOW_NAME" = "🎯 Truth Scoring Pipeline" ]; then
|
||||
TRUTH_COLOR="brightgreen"
|
||||
TRUTH_MESSAGE="85+"
|
||||
if [ "$VERIFICATION_STATUS" = "failure" ]; then
|
||||
TRUTH_COLOR="red"
|
||||
TRUTH_MESSAGE="<85"
|
||||
fi
|
||||
|
||||
cat > badge-data/truth-score.json << EOF
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "truth score",
|
||||
"message": "$TRUTH_MESSAGE",
|
||||
"color": "$TRUTH_COLOR",
|
||||
"style": "flat-square"
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Integration tests badge
|
||||
if [ "$WORKFLOW_NAME" = "🔗 Cross-Agent Integration Tests" ]; then
|
||||
INTEGRATION_COLOR="brightgreen"
|
||||
INTEGRATION_MESSAGE="passing"
|
||||
if [ "$VERIFICATION_STATUS" = "failure" ]; then
|
||||
INTEGRATION_COLOR="red"
|
||||
INTEGRATION_MESSAGE="failing"
|
||||
fi
|
||||
|
||||
cat > badge-data/integration.json << EOF
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"label": "integration",
|
||||
"message": "$INTEGRATION_MESSAGE",
|
||||
"color": "$INTEGRATION_COLOR",
|
||||
"style": "flat-square"
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
|
||||
- name: Update README badges
|
||||
run: |
|
||||
echo "📝 Updating README badges..."
|
||||
|
||||
# Check if README has badge section
|
||||
if grep -q "<!-- BADGES-START -->" README.md; then
|
||||
echo "Found badge section, updating..."
|
||||
|
||||
# Create new badge section
|
||||
cat > new-badges.md << 'EOF'
|
||||
<!-- BADGES-START -->
|
||||
[](https://github.com/ruvnet/claude-code-flow/actions/workflows/verification-pipeline.yml)
|
||||
[](https://github.com/ruvnet/claude-code-flow/actions/workflows/truth-scoring.yml)
|
||||
[](https://github.com/ruvnet/claude-code-flow/actions/workflows/integration-tests.yml)
|
||||
[](https://github.com/ruvnet/claude-code-flow/actions/workflows/rollback-manager.yml)
|
||||
[](https://github.com/ruvnet/claude-code-flow/actions/workflows/ci.yml)
|
||||
[](LICENSE)
|
||||
[](https://www.npmjs.com/package/claude-flow)
|
||||
<!-- BADGES-END -->
|
||||
EOF
|
||||
|
||||
# Replace badge section in README
|
||||
awk '
|
||||
BEGIN { in_badges = 0 }
|
||||
/<!-- BADGES-START -->/ {
|
||||
in_badges = 1
|
||||
while ((getline line < "new-badges.md") > 0) {
|
||||
print line
|
||||
}
|
||||
close("new-badges.md")
|
||||
next
|
||||
}
|
||||
/<!-- BADGES-END -->/ {
|
||||
in_badges = 0
|
||||
next
|
||||
}
|
||||
!in_badges { print }
|
||||
' README.md > README.tmp && mv README.tmp README.md
|
||||
|
||||
rm -f new-badges.md
|
||||
else
|
||||
echo "No badge section found in README.md"
|
||||
fi
|
||||
|
||||
- name: Commit badge updates
|
||||
run: |
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
|
||||
if git diff --quiet README.md; then
|
||||
echo "No changes to commit"
|
||||
else
|
||||
git add README.md
|
||||
git commit -m "📊 Update status badges
|
||||
|
||||
🤖 Generated by GitHub Actions
|
||||
|
||||
Co-Authored-By: Badge Updater <noreply@github.com>"
|
||||
git push
|
||||
fi
|
||||
|
||||
- name: Upload badge data
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: badge-data-$(date +%Y%m%d)
|
||||
path: badge-data/
|
||||
retention-days: 7
|
||||
Reference in new issue
Block a user