Skip to content
Merged
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
52 changes: 25 additions & 27 deletions scripts/trigger-ci-workflows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# Trigger continuous-improvement workflows via workflow_dispatch.
#
# Usage:
# ./scripts/trigger-ci-workflows.sh # trigger all categories
# ./scripts/trigger-ci-workflows.sh detectors # trigger one category
# ./scripts/trigger-ci-workflows.sh improvers monitors # trigger multiple categories
# ./scripts/trigger-ci-workflows.sh --dry-run # show what would be triggered
# ./scripts/trigger-ci-workflows.sh --list # list workflows by category
# ./scripts/trigger-ci-workflows.sh # trigger all categories
# ./scripts/trigger-ci-workflows.sh detectors # trigger one category
# ./scripts/trigger-ci-workflows.sh fixers monitors # trigger multiple categories
# ./scripts/trigger-ci-workflows.sh --dry-run # show what would be triggered
# ./scripts/trigger-ci-workflows.sh --list # list workflows by category

set -euo pipefail

Expand All @@ -16,36 +16,34 @@ REF="main"
# --- Categories ---

DETECTORS=(
"Trigger Autonomy Atomicity Analyzer"
"Trigger Breaking Change Detector"
"Trigger Bug Hunter"
"Trigger Code Duplication Detector"
"Trigger Docs Patrol"
"Trigger Framework Best Practices"
"Trigger Information Architecture"
"Trigger Newbie Contributor Patrol"
"Trigger Code Duplication Detector"
"Trigger Stale Issues"
"Trigger Prompt Audit"
"Trigger Stale Issues Investigator"
"Trigger Test Coverage Detector"
"Trigger Text Auditor"
"Trigger UX Design Patrol"
)

IMPROVERS=(
"Trigger Bug Exterminator"
"Trigger Code Duplication Fixer"
"Trigger Code Simplifier"
"Trigger Newbie Contributor Fixer"
"Trigger Small Problem Fixer"
"Trigger Test Improver"
"Trigger Text Beautifier"
FIXERS=(
"Trigger Refactor Opportunist"
"Trigger Stale Issues Remediator"
)

MONITORS=(
"Agent Deep Dive"
"Agent Efficiency"
"Trigger Agent Suggestions"
"Trigger Downstream Health"
"Trigger Estc Downstream Health"
"Trigger Product Manager Impersonator"
"Trigger Project Summary"
"Trigger Release Update Check"
)

ALL_CATEGORIES=(detectors improvers monitors)
ALL_CATEGORIES=(detectors fixers monitors)

# --- Argument parsing ---

Expand All @@ -60,22 +58,22 @@ for arg in "$@"; do
--help|-h)
echo "Usage: $0 [--dry-run] [--list] [category ...]"
echo ""
echo "Categories: detectors, improvers, monitors"
echo "Categories: detectors, fixers, monitors"
echo " detectors — find issues, drift, stale items, breaking changes"
echo " improvers — fix bugs, simplify code, improve tests/text/perf"
echo " monitors — efficiency reports, downstream health, project summaries"
echo " fixers — refactor code, remediate stale issues"
echo " monitors — downstream health, project summaries, suggestions"
echo ""
echo " --dry-run Show what would be triggered without dispatching"
echo " --list List workflows by category"
echo ""
echo "If no categories are specified, all are triggered."
exit 0
;;
detectors|improvers|monitors)
detectors|fixers|monitors)
CATEGORIES+=("$arg")
;;
*)
echo "Unknown argument: $arg (expected: detectors, improvers, monitors, --dry-run, --list)" >&2
echo "Unknown argument: $arg (expected: detectors, fixers, monitors, --dry-run, --list)" >&2
exit 1
;;
esac
Expand All @@ -91,7 +89,7 @@ get_workflows() {
local category="$1"
case "$category" in
detectors) printf '%s\n' "${DETECTORS[@]}" ;;
improvers) printf '%s\n' "${IMPROVERS[@]}" ;;
fixers) printf '%s\n' "${FIXERS[@]}" ;;
monitors) printf '%s\n' "${MONITORS[@]}" ;;
esac
}
Expand Down Expand Up @@ -139,7 +137,7 @@ if [[ "$DRY_RUN" == "false" ]]; then
for category in "${CATEGORIES[@]}"; do
case "$category" in
detectors) total=$((total + ${#DETECTORS[@]})) ;;
improvers) total=$((total + ${#IMPROVERS[@]})) ;;
fixers) total=$((total + ${#FIXERS[@]})) ;;
monitors) total=$((total + ${#MONITORS[@]})) ;;
esac
done
Expand Down
Loading