Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/patch-add-status-badges-docs.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ logs/
node_modules/
gh-aw-test/

# Root package.json and package-lock.json are only for build tooling
/package.json
/package-lock.json

pkg/cli/workflows/*.yml
.github/workflows/test-update.md
.github/workflows/test-update.lock.yml
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ install: build
generate-schema-docs:
node scripts/generate-schema-docs.js

# Generate status badges documentation
.PHONY: generate-status-badges
generate-status-badges:
node scripts/generate-status-badges.js

# Recompile all workflow files
.PHONY: recompile
recompile: build
Expand Down Expand Up @@ -203,7 +208,7 @@ release: test

# Agent should run this task before finishing its turns
.PHONY: agent-finish
agent-finish: deps-dev fmt fmt-cjs lint build test-all recompile generate-schema-docs
agent-finish: deps-dev fmt fmt-cjs lint build test-all recompile generate-schema-docs generate-status-badges
@echo "Agent finished tasks successfully."

# Help target
Expand Down Expand Up @@ -231,6 +236,7 @@ help:
@echo " install - Install binary locally"
@echo " recompile - Recompile all workflow files (runs init, depends on build)"
@echo " generate-schema-docs - Generate frontmatter full reference documentation from JSON schema"
@echo " generate-status-badges - Generate workflow status badges documentation page"

@echo " agent-finish - Complete validation sequence (build, test, recompile, fmt, lint)"
@echo " version - Preview next version from changesets"
Expand Down
4 changes: 3 additions & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"prebuild": "npm run generate-status-badges",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"validate-links": "astro build"
"validate-links": "astro build",
"generate-status-badges": "cd .. && node scripts/generate-status-badges.js"
},
"dependencies": {
"@astrojs/starlight": "^0.35.2",
Expand Down
55 changes: 55 additions & 0 deletions docs/src/content/docs/reference/status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
---
title: Workflow Status
description: Status badges for all GitHub Actions workflows in the repository.
sidebar:
order: 999
---

This page shows the current status of all agentic workflows in the repository.

[![Agentic Workflow Audit Agent](https://github.com/githubnext/gh-aw/actions/workflows/audit-workflows.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/audit-workflows.lock.yml)
[![Artifacts Summary](https://github.com/githubnext/gh-aw/actions/workflows/artifacts-summary.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/artifacts-summary.lock.yml)
[![Basic Research Agent](https://github.com/githubnext/gh-aw/actions/workflows/research.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/research.lock.yml)
[![Brave Web Search Agent](https://github.com/githubnext/gh-aw/actions/workflows/brave.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/brave.lock.yml)
[![Changeset Generator](https://github.com/githubnext/gh-aw/actions/workflows/changeset-generator.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/changeset-generator.lock.yml)
[![CI Failure Doctor](https://github.com/githubnext/gh-aw/actions/workflows/ci-doctor.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/ci-doctor.lock.yml)
[![CLI Version Checker](https://github.com/githubnext/gh-aw/actions/workflows/cli-version-checker.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/cli-version-checker.lock.yml)
[![Commit Changes Analyzer](https://github.com/githubnext/gh-aw/actions/workflows/commit-changes-analyzer.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/commit-changes-analyzer.lock.yml)
[![Copilot Agent PR Analysis](https://github.com/githubnext/gh-aw/actions/workflows/copilot-agent-analysis.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/copilot-agent-analysis.lock.yml)
[![Daily Documentation Updater](https://github.com/githubnext/gh-aw/actions/workflows/daily-doc-updater.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/daily-doc-updater.lock.yml)
[![Daily News](https://github.com/githubnext/gh-aw/actions/workflows/daily-news.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/daily-news.lock.yml)
[![Dev](https://github.com/githubnext/gh-aw/actions/workflows/dev.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/dev.lock.yml)
[![Dev Hawk](https://github.com/githubnext/gh-aw/actions/workflows/dev-hawk.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/dev-hawk.lock.yml)
[![Documentation Unbloat](https://github.com/githubnext/gh-aw/actions/workflows/unbloat-docs.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/unbloat-docs.lock.yml)
[![Duplicate Code Detector](https://github.com/githubnext/gh-aw/actions/workflows/duplicate-code-detector.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/duplicate-code-detector.lock.yml)
[![GitHub MCP Remote Server Tools Report Generator](https://github.com/githubnext/gh-aw/actions/workflows/github-mcp-tools-report.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/github-mcp-tools-report.lock.yml)
[![Go Logger Enhancement](https://github.com/githubnext/gh-aw/actions/workflows/go-logger.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/go-logger.lock.yml)
[![Go Pattern Detector](https://github.com/githubnext/gh-aw/actions/workflows/go-pattern-detector.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/go-pattern-detector.lock.yml)
[![Issue Classifier](https://github.com/githubnext/gh-aw/actions/workflows/issue-classifier.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/issue-classifier.lock.yml)
[![Issue Summary to Notion](https://github.com/githubnext/gh-aw/actions/workflows/notion-issue-summary.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/notion-issue-summary.lock.yml)
[![Lockfile Statistics Analysis Agent](https://github.com/githubnext/gh-aw/actions/workflows/lockfile-stats.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/lockfile-stats.lock.yml)
[![MCP Inspector Agent](https://github.com/githubnext/gh-aw/actions/workflows/mcp-inspector.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/mcp-inspector.lock.yml)
[![Plan Command](https://github.com/githubnext/gh-aw/actions/workflows/plan.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/plan.lock.yml)
[![Poem Bot - A Creative Agentic Workflow](https://github.com/githubnext/gh-aw/actions/workflows/poem-bot.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/poem-bot.lock.yml)
[![Q](https://github.com/githubnext/gh-aw/actions/workflows/q.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/q.lock.yml)
[![Repository Tree Map Generator](https://github.com/githubnext/gh-aw/actions/workflows/repo-tree-map.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/repo-tree-map.lock.yml)
[![Resource Summarizer Agent](https://github.com/githubnext/gh-aw/actions/workflows/pdf-summary.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/pdf-summary.lock.yml)
[![Scout](https://github.com/githubnext/gh-aw/actions/workflows/scout.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/scout.lock.yml)
[![Security Fix PR](https://github.com/githubnext/gh-aw/actions/workflows/security-fix-pr.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/security-fix-pr.lock.yml)
[![Smoke Claude](https://github.com/githubnext/gh-aw/actions/workflows/smoke-claude.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/smoke-claude.lock.yml)
[![Smoke Codex](https://github.com/githubnext/gh-aw/actions/workflows/smoke-codex.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/smoke-codex.lock.yml)
[![Smoke Copilot](https://github.com/githubnext/gh-aw/actions/workflows/smoke-copilot.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/smoke-copilot.lock.yml)
[![Smoke GenAIScript](https://github.com/githubnext/gh-aw/actions/workflows/smoke-genaiscript.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/smoke-genaiscript.lock.yml)
[![Smoke OpenCode](https://github.com/githubnext/gh-aw/actions/workflows/smoke-opencode.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/smoke-opencode.lock.yml)
[![Technical Documentation Writer for GitHub Actions](https://github.com/githubnext/gh-aw/actions/workflows/technical-doc-writer.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/technical-doc-writer.lock.yml)
[![Test jqschema](https://github.com/githubnext/gh-aw/actions/workflows/test-jqschema.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/test-jqschema.lock.yml)
[![Test Post-Steps Workflow](https://github.com/githubnext/gh-aw/actions/workflows/test-post-steps.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/test-post-steps.lock.yml)
[![Test Svelte MCP](https://github.com/githubnext/gh-aw/actions/workflows/test-svelte.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/test-svelte.lock.yml)
[![Tidy](https://github.com/githubnext/gh-aw/actions/workflows/tidy.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/tidy.lock.yml)
[![Video Analysis Agent](https://github.com/githubnext/gh-aw/actions/workflows/video-analyzer.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/video-analyzer.lock.yml)
[![Weekly Issue Summary](https://github.com/githubnext/gh-aw/actions/workflows/weekly-issue-summary.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/weekly-issue-summary.lock.yml)
[![Weekly Workflow Analysis](https://github.com/githubnext/gh-aw/actions/workflows/example-workflow-analyzer.lock.yml/badge.svg)](https://github.com/githubnext/gh-aw/actions/workflows/example-workflow-analyzer.lock.yml)

:::note
Status badges update automatically based on the latest workflow runs. Click on a badge to view the workflow details and run history.
:::
121 changes: 121 additions & 0 deletions scripts/generate-status-badges.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
#!/usr/bin/env node

/**
* Status Badges Generator
*
* Generates a markdown documentation page with GitHub Actions status badges
* for all workflows in the repository (only from .lock.yml files).
*
* Usage:
* node scripts/generate-status-badges.js
*/

import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
import yaml from 'js-yaml';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

// Paths
const WORKFLOWS_DIR = path.join(__dirname, '../.github/workflows');
const OUTPUT_PATH = path.join(__dirname, '../docs/src/content/docs/reference/status.md');

// Repository owner and name
const REPO_OWNER = 'githubnext';
const REPO_NAME = 'gh-aw';

/**
* Extract workflow name and filename from a lock file
*/
function extractWorkflowInfo(filePath) {
try {
const content = fs.readFileSync(filePath, 'utf-8');
const workflow = yaml.load(content);

if (!workflow || !workflow.name) {
return null;
}

const filename = path.basename(filePath);

return {
name: workflow.name,
filename: filename,
badgeUrl: `https://github.com/${REPO_OWNER}/${REPO_NAME}/actions/workflows/${filename}/badge.svg`,
workflowUrl: `https://github.com/${REPO_OWNER}/${REPO_NAME}/actions/workflows/${filename}`
};
} catch (error) {
console.error(`Error parsing ${filePath}:`, error.message);
return null;
}
}

/**
* Generate the markdown documentation
*/
function generateMarkdown(workflows) {
const lines = [];

// Frontmatter
lines.push('---');
lines.push('title: Workflow Status');
lines.push('description: Status badges for all GitHub Actions workflows in the repository.');
lines.push('sidebar:');
lines.push(' order: 999');
lines.push('---');
lines.push('');

// Introduction
lines.push('This page shows the current status of all agentic workflows in the repository.');
lines.push('');

// Sort workflows alphabetically by name
workflows.sort((a, b) => a.name.localeCompare(b.name));

// Generate status badges - one per line
for (const workflow of workflows) {
const badge = `[![${workflow.name}](${workflow.badgeUrl})](${workflow.workflowUrl})`;
lines.push(badge);
}

lines.push('');
lines.push(':::note');
lines.push('Status badges update automatically based on the latest workflow runs. Click on a badge to view the workflow details and run history.');
lines.push(':::');
lines.push('');

return lines.join('\n');
}

// Main execution
console.log('Generating status badges documentation...');

// Read all .lock.yml files
const files = fs.readdirSync(WORKFLOWS_DIR)
.filter(file => file.endsWith('.lock.yml'))
.map(file => path.join(WORKFLOWS_DIR, file));

console.log(`Found ${files.length} lock files`);

// Extract workflow information
const workflows = files
.map(extractWorkflowInfo)
.filter(info => info !== null);

console.log(`Extracted ${workflows.length} workflows with valid names`);

// Generate the markdown
const markdown = generateMarkdown(workflows);

// Ensure output directory exists
const outputDir = path.dirname(OUTPUT_PATH);
if (!fs.existsSync(outputDir)) {
fs.mkdirSync(outputDir, { recursive: true });
}

// Write the output
fs.writeFileSync(OUTPUT_PATH, markdown, 'utf-8');
console.log(`✓ Generated status badges documentation: ${OUTPUT_PATH}`);
console.log(`✓ Total workflows: ${workflows.length}`);
Loading