diff --git a/.github/workflows/daily-architecture-diagram.lock.yml b/.github/workflows/daily-architecture-diagram.lock.yml index d05d42b9e58..e3e7edeab79 100644 --- a/.github/workflows/daily-architecture-diagram.lock.yml +++ b/.github/workflows/daily-architecture-diagram.lock.yml @@ -32,6 +32,8 @@ # - GH_AW_CI_TRIGGER_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -62,6 +64,11 @@ concurrency: run-name: "Architecture Diagram Generator" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -807,6 +814,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-assign-issue-to-user.lock.yml b/.github/workflows/daily-assign-issue-to-user.lock.yml index ce48c37421d..47cc6121266 100644 --- a/.github/workflows/daily-assign-issue-to-user.lock.yml +++ b/.github/workflows/daily-assign-issue-to-user.lock.yml @@ -29,6 +29,8 @@ # Secrets used: # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -57,6 +59,11 @@ concurrency: run-name: "Auto-Assign Issue" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -746,6 +753,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-choice-test.lock.yml b/.github/workflows/daily-choice-test.lock.yml index d66dc1c4654..92b16933edd 100644 --- a/.github/workflows/daily-choice-test.lock.yml +++ b/.github/workflows/daily-choice-test.lock.yml @@ -31,6 +31,8 @@ # - ANTHROPIC_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -60,6 +62,11 @@ concurrency: run-name: "Daily Choice Type Test" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -803,6 +810,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-cli-performance.lock.yml b/.github/workflows/daily-cli-performance.lock.yml index b0252230f49..e929b0954e3 100644 --- a/.github/workflows/daily-cli-performance.lock.yml +++ b/.github/workflows/daily-cli-performance.lock.yml @@ -32,6 +32,8 @@ # Secrets used: # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -83,6 +85,11 @@ concurrency: run-name: "Daily CLI Performance Agent" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -973,6 +980,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-cli-tools-tester.lock.yml b/.github/workflows/daily-cli-tools-tester.lock.yml index dd5ee41701d..df0c08bffc9 100644 --- a/.github/workflows/daily-cli-tools-tester.lock.yml +++ b/.github/workflows/daily-cli-tools-tester.lock.yml @@ -32,6 +32,8 @@ # - COPILOT_GITHUB_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -63,6 +65,11 @@ concurrency: run-name: "Daily CLI Tools Exploratory Tester" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -829,6 +836,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-code-metrics.lock.yml b/.github/workflows/daily-code-metrics.lock.yml index 34c574a64ad..95811497fdc 100644 --- a/.github/workflows/daily-code-metrics.lock.yml +++ b/.github/workflows/daily-code-metrics.lock.yml @@ -35,6 +35,8 @@ # - ANTHROPIC_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -67,6 +69,11 @@ concurrency: run-name: "Daily Code Metrics and Trend Tracking Agent" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -903,6 +910,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-community-attribution.lock.yml b/.github/workflows/daily-community-attribution.lock.yml index 9e0900c5ae3..bc7a8d88267 100644 --- a/.github/workflows/daily-community-attribution.lock.yml +++ b/.github/workflows/daily-community-attribution.lock.yml @@ -33,6 +33,8 @@ # - GH_AW_CI_TRIGGER_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -61,6 +63,11 @@ concurrency: run-name: "Daily Community Attribution Updater" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -820,6 +827,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-compiler-quality.lock.yml b/.github/workflows/daily-compiler-quality.lock.yml index 763ebb1c6e5..0015f1c95af 100644 --- a/.github/workflows/daily-compiler-quality.lock.yml +++ b/.github/workflows/daily-compiler-quality.lock.yml @@ -35,6 +35,8 @@ # Secrets used: # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -65,6 +67,11 @@ concurrency: run-name: "Daily Compiler Quality Check" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -856,6 +863,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-doc-healer.lock.yml b/.github/workflows/daily-doc-healer.lock.yml index 94553b68ee8..9f75bf36d3e 100644 --- a/.github/workflows/daily-doc-healer.lock.yml +++ b/.github/workflows/daily-doc-healer.lock.yml @@ -35,6 +35,8 @@ # - GH_AW_CI_TRIGGER_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -67,6 +69,11 @@ concurrency: run-name: "Daily Documentation Healer" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -980,6 +987,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-doc-updater.lock.yml b/.github/workflows/daily-doc-updater.lock.yml index a2fd3fed568..3647c6da32f 100644 --- a/.github/workflows/daily-doc-updater.lock.yml +++ b/.github/workflows/daily-doc-updater.lock.yml @@ -34,6 +34,8 @@ # - GH_AW_CI_TRIGGER_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -66,6 +68,11 @@ concurrency: run-name: "Daily Documentation Updater" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -945,6 +952,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-fact.lock.yml b/.github/workflows/daily-fact.lock.yml index b082d986cf6..3e69aff5e4d 100644 --- a/.github/workflows/daily-fact.lock.yml +++ b/.github/workflows/daily-fact.lock.yml @@ -33,6 +33,8 @@ # - CODEX_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # - OPENAI_API_KEY # @@ -63,6 +65,11 @@ concurrency: run-name: "Daily Fact About gh-aw" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -821,6 +828,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-file-diet.lock.yml b/.github/workflows/daily-file-diet.lock.yml index b3aa69e4369..6ea605d0fe7 100644 --- a/.github/workflows/daily-file-diet.lock.yml +++ b/.github/workflows/daily-file-diet.lock.yml @@ -36,6 +36,8 @@ # Secrets used: # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -65,6 +67,11 @@ concurrency: run-name: "Daily File Diet" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -844,6 +851,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-firewall-report.lock.yml b/.github/workflows/daily-firewall-report.lock.yml index 0b016082e46..37f0703bd87 100644 --- a/.github/workflows/daily-firewall-report.lock.yml +++ b/.github/workflows/daily-firewall-report.lock.yml @@ -34,6 +34,8 @@ # - COPILOT_GITHUB_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -68,6 +70,11 @@ concurrency: run-name: "Daily Firewall Logs Collector and Reporter" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -893,6 +900,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-function-namer.lock.yml b/.github/workflows/daily-function-namer.lock.yml index d2df564d00e..44a3da310ea 100644 --- a/.github/workflows/daily-function-namer.lock.yml +++ b/.github/workflows/daily-function-namer.lock.yml @@ -34,6 +34,8 @@ # - ANTHROPIC_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -65,6 +67,11 @@ concurrency: run-name: "Daily Go Function Namer" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -898,6 +905,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-integrity-analysis.lock.yml b/.github/workflows/daily-integrity-analysis.lock.yml index ff0664219ca..8ccd28012c6 100644 --- a/.github/workflows/daily-integrity-analysis.lock.yml +++ b/.github/workflows/daily-integrity-analysis.lock.yml @@ -34,6 +34,8 @@ # - COPILOT_GITHUB_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -68,6 +70,11 @@ concurrency: run-name: "Daily DIFC Integrity-Filtered Events Analyzer" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -910,6 +917,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-issues-report.lock.yml b/.github/workflows/daily-issues-report.lock.yml index 31bcb690bae..a6ed6f40dc2 100644 --- a/.github/workflows/daily-issues-report.lock.yml +++ b/.github/workflows/daily-issues-report.lock.yml @@ -39,6 +39,8 @@ # - CODEX_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # - OPENAI_API_KEY # @@ -72,6 +74,11 @@ concurrency: run-name: "Daily Issues Report Generator" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -877,6 +884,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-malicious-code-scan.lock.yml b/.github/workflows/daily-malicious-code-scan.lock.yml index eda24851dd0..b15ba5227e4 100644 --- a/.github/workflows/daily-malicious-code-scan.lock.yml +++ b/.github/workflows/daily-malicious-code-scan.lock.yml @@ -31,6 +31,8 @@ # Secrets used: # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -60,6 +62,11 @@ concurrency: run-name: "Daily Malicious Code Scan Agent" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -750,6 +757,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-mcp-concurrency-analysis.lock.yml b/.github/workflows/daily-mcp-concurrency-analysis.lock.yml index 17b755deb10..e38d1e86d26 100644 --- a/.github/workflows/daily-mcp-concurrency-analysis.lock.yml +++ b/.github/workflows/daily-mcp-concurrency-analysis.lock.yml @@ -34,6 +34,8 @@ # - COPILOT_GITHUB_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -64,6 +66,11 @@ concurrency: run-name: "Daily MCP Tool Concurrency Analysis" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -873,6 +880,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-multi-device-docs-tester.lock.yml b/.github/workflows/daily-multi-device-docs-tester.lock.yml index da3336e7431..41ba8a649ff 100644 --- a/.github/workflows/daily-multi-device-docs-tester.lock.yml +++ b/.github/workflows/daily-multi-device-docs-tester.lock.yml @@ -33,6 +33,8 @@ # - ANTHROPIC_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -66,6 +68,11 @@ concurrency: run-name: "Multi-Device Docs Tester" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -914,6 +921,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-news.lock.yml b/.github/workflows/daily-news.lock.yml index b1c41ba8ad8..10416912951 100644 --- a/.github/workflows/daily-news.lock.yml +++ b/.github/workflows/daily-news.lock.yml @@ -36,6 +36,8 @@ # Secrets used: # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # - TAVILY_API_KEY # @@ -68,6 +70,11 @@ concurrency: run-name: "Daily News" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -935,6 +942,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-observability-report.lock.yml b/.github/workflows/daily-observability-report.lock.yml index faa0f916847..82d6b4787a7 100644 --- a/.github/workflows/daily-observability-report.lock.yml +++ b/.github/workflows/daily-observability-report.lock.yml @@ -33,6 +33,8 @@ # - CODEX_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # - OPENAI_API_KEY # @@ -66,6 +68,11 @@ concurrency: run-name: "Daily Observability Report for AWF Firewall and MCP Gateway" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -856,6 +863,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-otel-instrumentation-advisor.lock.yml b/.github/workflows/daily-otel-instrumentation-advisor.lock.yml index 7650492bea5..b41ecd18922 100644 --- a/.github/workflows/daily-otel-instrumentation-advisor.lock.yml +++ b/.github/workflows/daily-otel-instrumentation-advisor.lock.yml @@ -31,6 +31,8 @@ # - ANTHROPIC_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # - SENTRY_API_KEY # @@ -61,6 +63,11 @@ concurrency: run-name: "Daily OTel Instrumentation Advisor" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -832,6 +839,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-performance-summary.lock.yml b/.github/workflows/daily-performance-summary.lock.yml index ff1d9f7d3a5..11155322840 100644 --- a/.github/workflows/daily-performance-summary.lock.yml +++ b/.github/workflows/daily-performance-summary.lock.yml @@ -35,6 +35,8 @@ # - COPILOT_GITHUB_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -66,6 +68,11 @@ concurrency: run-name: "Daily Project Performance Summary Generator (Using MCP Scripts)" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -1301,6 +1308,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-regulatory.lock.yml b/.github/workflows/daily-regulatory.lock.yml index a46394aed02..1ae34fc03f8 100644 --- a/.github/workflows/daily-regulatory.lock.yml +++ b/.github/workflows/daily-regulatory.lock.yml @@ -34,6 +34,8 @@ # - COPILOT_GITHUB_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -62,6 +64,11 @@ concurrency: run-name: "Daily Regulatory Report Generator" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -1231,6 +1238,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-rendering-scripts-verifier.lock.yml b/.github/workflows/daily-rendering-scripts-verifier.lock.yml index 27b3449a057..ee64722a9c6 100644 --- a/.github/workflows/daily-rendering-scripts-verifier.lock.yml +++ b/.github/workflows/daily-rendering-scripts-verifier.lock.yml @@ -34,6 +34,8 @@ # - GH_AW_CI_TRIGGER_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -69,6 +71,11 @@ concurrency: run-name: "Daily Rendering Scripts Verifier" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -960,6 +967,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-repo-chronicle.lock.yml b/.github/workflows/daily-repo-chronicle.lock.yml index 219f4d2b9c2..2f7db19481b 100644 --- a/.github/workflows/daily-repo-chronicle.lock.yml +++ b/.github/workflows/daily-repo-chronicle.lock.yml @@ -33,6 +33,8 @@ # Secrets used: # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -64,6 +66,11 @@ concurrency: run-name: "The Daily Repository Chronicle" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -811,6 +818,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-safe-output-integrator.lock.yml b/.github/workflows/daily-safe-output-integrator.lock.yml index 50fbd0f0fb1..4e369c710a0 100644 --- a/.github/workflows/daily-safe-output-integrator.lock.yml +++ b/.github/workflows/daily-safe-output-integrator.lock.yml @@ -32,6 +32,8 @@ # - GH_AW_CI_TRIGGER_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -60,6 +62,11 @@ concurrency: run-name: "Daily Safe Output Integrator" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -785,6 +792,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-safe-output-optimizer.lock.yml b/.github/workflows/daily-safe-output-optimizer.lock.yml index 0880bfd7bd8..fc2cc3d77e2 100644 --- a/.github/workflows/daily-safe-output-optimizer.lock.yml +++ b/.github/workflows/daily-safe-output-optimizer.lock.yml @@ -35,6 +35,8 @@ # - ANTHROPIC_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -70,6 +72,11 @@ concurrency: run-name: "Daily Safe Output Tool Optimizer" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -948,6 +955,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-safe-outputs-conformance.lock.yml b/.github/workflows/daily-safe-outputs-conformance.lock.yml index 2e7feb6578e..a2476be7059 100644 --- a/.github/workflows/daily-safe-outputs-conformance.lock.yml +++ b/.github/workflows/daily-safe-outputs-conformance.lock.yml @@ -32,6 +32,8 @@ # - ANTHROPIC_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -61,6 +63,11 @@ concurrency: run-name: "Daily Safe Outputs Conformance Checker" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -808,6 +815,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-secrets-analysis.lock.yml b/.github/workflows/daily-secrets-analysis.lock.yml index eb21a5d9546..04a258b421d 100644 --- a/.github/workflows/daily-secrets-analysis.lock.yml +++ b/.github/workflows/daily-secrets-analysis.lock.yml @@ -32,6 +32,8 @@ # Secrets used: # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -60,6 +62,11 @@ concurrency: run-name: "Daily Secrets Analysis Agent" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -739,6 +746,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-security-red-team.lock.yml b/.github/workflows/daily-security-red-team.lock.yml index 43444ad813e..ab51a315d54 100644 --- a/.github/workflows/daily-security-red-team.lock.yml +++ b/.github/workflows/daily-security-red-team.lock.yml @@ -32,6 +32,8 @@ # - ANTHROPIC_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -61,6 +63,11 @@ concurrency: run-name: "Daily Security Red Team Agent" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -812,6 +819,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-semgrep-scan.lock.yml b/.github/workflows/daily-semgrep-scan.lock.yml index 7e286ee6a44..9af75a85d99 100644 --- a/.github/workflows/daily-semgrep-scan.lock.yml +++ b/.github/workflows/daily-semgrep-scan.lock.yml @@ -32,6 +32,8 @@ # - COPILOT_GITHUB_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -61,6 +63,11 @@ concurrency: run-name: "Daily Semgrep Scan" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -776,6 +783,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-syntax-error-quality.lock.yml b/.github/workflows/daily-syntax-error-quality.lock.yml index 8f161447463..f18407f54ad 100644 --- a/.github/workflows/daily-syntax-error-quality.lock.yml +++ b/.github/workflows/daily-syntax-error-quality.lock.yml @@ -31,6 +31,8 @@ # Secrets used: # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -59,6 +61,11 @@ concurrency: run-name: "Daily Syntax Error Quality Check" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -776,6 +783,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-team-evolution-insights.lock.yml b/.github/workflows/daily-team-evolution-insights.lock.yml index 25b757398fc..cd98cee2898 100644 --- a/.github/workflows/daily-team-evolution-insights.lock.yml +++ b/.github/workflows/daily-team-evolution-insights.lock.yml @@ -33,6 +33,8 @@ # - ANTHROPIC_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -62,6 +64,11 @@ concurrency: run-name: "Daily Team Evolution Insights" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -805,6 +812,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-team-status.lock.yml b/.github/workflows/daily-team-status.lock.yml index 2e7c8a5302b..0db5f079d5a 100644 --- a/.github/workflows/daily-team-status.lock.yml +++ b/.github/workflows/daily-team-status.lock.yml @@ -38,6 +38,8 @@ # - COPILOT_GITHUB_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -67,6 +69,11 @@ concurrency: run-name: "Daily Team Status" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -760,6 +767,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-testify-uber-super-expert.lock.yml b/.github/workflows/daily-testify-uber-super-expert.lock.yml index a24a689e6b1..3f651b55549 100644 --- a/.github/workflows/daily-testify-uber-super-expert.lock.yml +++ b/.github/workflows/daily-testify-uber-super-expert.lock.yml @@ -36,6 +36,8 @@ # Secrets used: # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -65,6 +67,11 @@ concurrency: run-name: "Daily Testify Uber Super Expert" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -872,6 +879,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/daily-workflow-updater.lock.yml b/.github/workflows/daily-workflow-updater.lock.yml index be33301aa9d..9064db5defd 100644 --- a/.github/workflows/daily-workflow-updater.lock.yml +++ b/.github/workflows/daily-workflow-updater.lock.yml @@ -31,6 +31,8 @@ # - GH_AW_CI_TRIGGER_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -59,6 +61,11 @@ concurrency: run-name: "Daily Workflow Updater" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: runs-on: ubuntu-slim @@ -747,6 +754,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-agent-all-merged.lock.yml b/.github/workflows/smoke-agent-all-merged.lock.yml index d11018bb85c..7e3f36fbfac 100644 --- a/.github/workflows/smoke-agent-all-merged.lock.yml +++ b/.github/workflows/smoke-agent-all-merged.lock.yml @@ -31,6 +31,8 @@ # - CODEX_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # - OPENAI_API_KEY # @@ -64,6 +66,11 @@ concurrency: run-name: "Smoke Agent: all/merged" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -785,6 +792,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-agent-all-none.lock.yml b/.github/workflows/smoke-agent-all-none.lock.yml index 8f18995ac20..151a5e62986 100644 --- a/.github/workflows/smoke-agent-all-none.lock.yml +++ b/.github/workflows/smoke-agent-all-none.lock.yml @@ -31,6 +31,8 @@ # - CODEX_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # - OPENAI_API_KEY # @@ -64,6 +66,11 @@ concurrency: run-name: "Smoke Agent: all/none" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -785,6 +792,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-agent-public-approved.lock.yml b/.github/workflows/smoke-agent-public-approved.lock.yml index 4a82064a320..31080c20a78 100644 --- a/.github/workflows/smoke-agent-public-approved.lock.yml +++ b/.github/workflows/smoke-agent-public-approved.lock.yml @@ -33,6 +33,8 @@ # - GH_AW_AGENT_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # - OPENAI_API_KEY # @@ -66,6 +68,11 @@ concurrency: run-name: "Smoke Agent: public/approved" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -815,6 +822,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-agent-public-none.lock.yml b/.github/workflows/smoke-agent-public-none.lock.yml index 58a64f1b431..bcd34d3f38a 100644 --- a/.github/workflows/smoke-agent-public-none.lock.yml +++ b/.github/workflows/smoke-agent-public-none.lock.yml @@ -31,6 +31,8 @@ # - CODEX_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # - OPENAI_API_KEY # @@ -64,6 +66,11 @@ concurrency: run-name: "Smoke Agent: public/none" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -785,6 +792,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-agent-scoped-approved.lock.yml b/.github/workflows/smoke-agent-scoped-approved.lock.yml index 910e9c81746..a79cdbd2473 100644 --- a/.github/workflows/smoke-agent-scoped-approved.lock.yml +++ b/.github/workflows/smoke-agent-scoped-approved.lock.yml @@ -32,6 +32,8 @@ # - CODEX_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # - OPENAI_API_KEY # @@ -65,6 +67,11 @@ concurrency: run-name: "Smoke Agent: scoped/approved" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -792,6 +799,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-call-workflow.lock.yml b/.github/workflows/smoke-call-workflow.lock.yml index 0de4ee50bdb..8782b886e37 100644 --- a/.github/workflows/smoke-call-workflow.lock.yml +++ b/.github/workflows/smoke-call-workflow.lock.yml @@ -31,6 +31,8 @@ # - CODEX_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # - OPENAI_API_KEY # @@ -64,6 +66,11 @@ concurrency: run-name: "Smoke Call Workflow" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -769,6 +776,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-claude.lock.yml b/.github/workflows/smoke-claude.lock.yml index bd6162d2790..b6eb329bc79 100644 --- a/.github/workflows/smoke-claude.lock.yml +++ b/.github/workflows/smoke-claude.lock.yml @@ -43,6 +43,8 @@ # - ANTHROPIC_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GH_AW_PLUGINS_TOKEN # - GITHUB_TOKEN # - TAVILY_API_KEY @@ -86,6 +88,11 @@ concurrency: run-name: "Smoke Claude" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -2336,6 +2343,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-codex.lock.yml b/.github/workflows/smoke-codex.lock.yml index eb79310cb6f..c71c051c9e2 100644 --- a/.github/workflows/smoke-codex.lock.yml +++ b/.github/workflows/smoke-codex.lock.yml @@ -36,6 +36,8 @@ # - CODEX_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # - OPENAI_API_KEY # @@ -76,6 +78,11 @@ concurrency: run-name: "Smoke Codex" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -1340,6 +1347,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-copilot-arm.lock.yml b/.github/workflows/smoke-copilot-arm.lock.yml index 37b34d6ee8a..187fc9c6e2b 100644 --- a/.github/workflows/smoke-copilot-arm.lock.yml +++ b/.github/workflows/smoke-copilot-arm.lock.yml @@ -36,6 +36,8 @@ # - COPILOT_GITHUB_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -72,6 +74,11 @@ concurrency: run-name: "Smoke Copilot ARM64" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -1709,6 +1716,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index 10000665d40..e51a00e1d99 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -37,6 +37,8 @@ # - COPILOT_GITHUB_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -77,6 +79,11 @@ concurrency: run-name: "Smoke Copilot" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -1759,6 +1766,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-create-cross-repo-pr.lock.yml b/.github/workflows/smoke-create-cross-repo-pr.lock.yml index a7e373d3932..5a01ce2c721 100644 --- a/.github/workflows/smoke-create-cross-repo-pr.lock.yml +++ b/.github/workflows/smoke-create-cross-repo-pr.lock.yml @@ -31,6 +31,8 @@ # - GH_AW_CI_TRIGGER_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GH_AW_SIDE_REPO_PAT # - GITHUB_TOKEN # @@ -65,6 +67,11 @@ concurrency: run-name: "Smoke Create Cross-Repo PR" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -858,6 +865,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-gemini.lock.yml b/.github/workflows/smoke-gemini.lock.yml index df2f33b3c40..3984af1491f 100644 --- a/.github/workflows/smoke-gemini.lock.yml +++ b/.github/workflows/smoke-gemini.lock.yml @@ -33,6 +33,8 @@ # - GEMINI_API_KEY # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -69,6 +71,11 @@ concurrency: run-name: "Smoke Gemini" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -999,6 +1006,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-multi-pr.lock.yml b/.github/workflows/smoke-multi-pr.lock.yml index c114f9252b4..4df115196d9 100644 --- a/.github/workflows/smoke-multi-pr.lock.yml +++ b/.github/workflows/smoke-multi-pr.lock.yml @@ -32,6 +32,8 @@ # - GH_AW_CI_TRIGGER_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -65,6 +67,11 @@ concurrency: run-name: "Smoke Multi PR" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -849,6 +856,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-project.lock.yml b/.github/workflows/smoke-project.lock.yml index bbe5f4fec94..f15e2db61a2 100644 --- a/.github/workflows/smoke-project.lock.yml +++ b/.github/workflows/smoke-project.lock.yml @@ -32,6 +32,8 @@ # - GH_AW_CI_TRIGGER_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GH_AW_PROJECT_GITHUB_TOKEN # - GITHUB_TOKEN # @@ -64,6 +66,11 @@ concurrency: run-name: "Smoke Project" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -985,6 +992,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-service-ports.lock.yml b/.github/workflows/smoke-service-ports.lock.yml index f1ccc19a49d..65a60bf3772 100644 --- a/.github/workflows/smoke-service-ports.lock.yml +++ b/.github/workflows/smoke-service-ports.lock.yml @@ -31,6 +31,8 @@ # - COPILOT_GITHUB_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -58,6 +60,11 @@ concurrency: run-name: "Smoke Service Ports" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -758,6 +765,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-temporary-id.lock.yml b/.github/workflows/smoke-temporary-id.lock.yml index c916986d783..9244a29f04a 100644 --- a/.github/workflows/smoke-temporary-id.lock.yml +++ b/.github/workflows/smoke-temporary-id.lock.yml @@ -31,6 +31,8 @@ # - COPILOT_GITHUB_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -62,6 +64,11 @@ concurrency: run-name: "Smoke Temporary ID" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -834,6 +841,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-test-tools.lock.yml b/.github/workflows/smoke-test-tools.lock.yml index 072fba2e15e..2e7fa86810d 100644 --- a/.github/workflows/smoke-test-tools.lock.yml +++ b/.github/workflows/smoke-test-tools.lock.yml @@ -31,6 +31,8 @@ # - COPILOT_GITHUB_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GITHUB_TOKEN # # Custom actions used: @@ -69,6 +71,11 @@ concurrency: run-name: "Agent Container Smoke Test" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -800,6 +807,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/.github/workflows/smoke-update-cross-repo-pr.lock.yml b/.github/workflows/smoke-update-cross-repo-pr.lock.yml index 17d446266a3..0554980f743 100644 --- a/.github/workflows/smoke-update-cross-repo-pr.lock.yml +++ b/.github/workflows/smoke-update-cross-repo-pr.lock.yml @@ -31,6 +31,8 @@ # - GH_AW_CI_TRIGGER_TOKEN # - GH_AW_GITHUB_MCP_SERVER_TOKEN # - GH_AW_GITHUB_TOKEN +# - GH_AW_OTEL_ENDPOINT +# - GH_AW_OTEL_HEADERS # - GH_AW_SIDE_REPO_PAT # - GITHUB_TOKEN # @@ -67,6 +69,11 @@ concurrency: run-name: "Smoke Update Cross-Repo PR" +env: + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.GH_AW_OTEL_ENDPOINT }} + OTEL_SERVICE_NAME: gh-aw + OTEL_EXPORTER_OTLP_HEADERS: ${{ secrets.GH_AW_OTEL_HEADERS }} + jobs: activation: needs: pre_activation @@ -872,6 +879,15 @@ jobs: setupGlobals(core, github, context, exec, io); const { main } = require('${{ runner.temp }}/gh-aw/actions/parse_token_usage.cjs'); await main(); + - name: Generate observability summary + if: always() + uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 + with: + script: | + const { setupGlobals } = require('${{ runner.temp }}/gh-aw/actions/setup_globals.cjs'); + setupGlobals(core, github, context, exec, io); + const { main } = require('${{ runner.temp }}/gh-aw/actions/generate_observability_summary.cjs'); + await main(core); - name: Write agent output placeholder if missing if: always() run: | diff --git a/pkg/cli/codemod_bots.go b/pkg/cli/codemod_bots.go index da4465d42cd..5f8b16830cc 100644 --- a/pkg/cli/codemod_bots.go +++ b/pkg/cli/codemod_bots.go @@ -1,7 +1,6 @@ package cli import ( - "fmt" "strings" "github.com/github/gh-aw/pkg/logger" @@ -11,186 +10,15 @@ var botsCodemodLog = logger.New("cli:codemod_bots") // getBotsToOnBotsCodemod creates a codemod for moving top-level 'bots' to 'on.bots' func getBotsToOnBotsCodemod() Codemod { - return Codemod{ + return newMoveTopLevelKeyToOnBlockCodemod(moveToOnBlockConfig{ ID: "bots-to-on-bots", Name: "Move bots to on.bots", Description: "Moves the top-level 'bots' field to 'on.bots' as per the new frontmatter structure", IntroducedIn: "0.10.0", - Apply: func(content string, frontmatter map[string]any) (string, bool, error) { - // Check if top-level bots exists - _, hasTopLevelBots := frontmatter["bots"] - if !hasTopLevelBots { - return content, false, nil - } - - // Check if on.bots already exists (shouldn't happen, but be safe) - if onValue, hasOn := frontmatter["on"]; hasOn { - if onMap, ok := onValue.(map[string]any); ok { - if _, hasOnBots := onMap["bots"]; hasOnBots { - botsCodemodLog.Print("Both top-level 'bots' and 'on.bots' exist - skipping migration") - return content, false, nil - } - } - } - - return applyFrontmatterLineTransform(content, func(frontmatterLines []string) ([]string, bool) { - // Find bots line and on: block - var botsLineIdx = -1 - var botsLineValue string - var onBlockIdx = -1 - var onIndent string - - // First pass: find the bots line and on: block - for i, line := range frontmatterLines { - trimmedLine := strings.TrimSpace(line) - - // Find top-level bots - if isTopLevelKey(line) && strings.HasPrefix(trimmedLine, "bots:") { - botsLineIdx = i - // Extract the value (could be on same line or on next lines) - parts := strings.SplitN(line, ":", 2) - if len(parts) == 2 { - botsLineValue = strings.TrimSpace(parts[1]) - } - botsCodemodLog.Printf("Found top-level bots at line %d", i+1) - } - - // Find on: block - if isTopLevelKey(line) && strings.HasPrefix(trimmedLine, "on:") { - onBlockIdx = i - onIndent = getIndentation(line) - botsCodemodLog.Printf("Found 'on:' block at line %d", i+1) - } - } - - // If no bots found, nothing to do - if botsLineIdx == -1 { - return frontmatterLines, false - } - - // Determine how bots is formatted - var botsLines []string - var botsEndIdx int - - if strings.HasPrefix(botsLineValue, "[") { - // bots: [dependabot, renovate] - single line format - botsLines = []string{frontmatterLines[botsLineIdx]} - botsEndIdx = botsLineIdx - } else { - // Multi-line array format OR bots: with empty value - // Find all lines that are part of the bots block - botsStartIndent := getIndentation(frontmatterLines[botsLineIdx]) - botsLines = append(botsLines, frontmatterLines[botsLineIdx]) - botsEndIdx = botsLineIdx - - for j := botsLineIdx + 1; j < len(frontmatterLines); j++ { - line := frontmatterLines[j] - trimmed := strings.TrimSpace(line) - - // Empty lines or comments might be part of the block - if trimmed == "" || strings.HasPrefix(trimmed, "#") { - botsLines = append(botsLines, line) - botsEndIdx = j - continue - } - - // Check if still in the bots block (indented more than bots:) - if isNestedUnder(line, botsStartIndent) { - botsLines = append(botsLines, line) - botsEndIdx = j - } else { - // Exited the block - break - } - } - } - - botsCodemodLog.Printf("Bots spans lines %d to %d (%d lines)", botsLineIdx+1, botsEndIdx+1, len(botsLines)) - - // If no on: block found, we need to create one - result := make([]string, 0, len(frontmatterLines)) - - if onBlockIdx == -1 { - // No on: block exists - create one with bots inside it - botsCodemodLog.Print("No 'on:' block found - creating new one with bots") - - for i, line := range frontmatterLines { - if i >= botsLineIdx && i <= botsEndIdx { - // Skip the original bots lines - we'll add them to the new on: block - if i == botsLineIdx { - // Add new on: block with bots inside - result = append(result, "on:") - // Add bots lines with proper indentation - for _, botsLine := range botsLines { - trimmed := strings.TrimSpace(botsLine) - if trimmed == "" { - result = append(result, botsLine) - } else if strings.HasPrefix(trimmed, "bots:") { - // bots: line gets 2 spaces (nested under on:) - result = append(result, " "+botsLine) - } else { - // Array items get 4 spaces (nested under on: and bots:) - result = append(result, " "+trimmed) - } - } - } - // Skip all other bots lines - continue - } - result = append(result, line) - } - } else { - // on: block exists - add bots to it - botsCodemodLog.Print("Found 'on:' block - adding bots to it") - - // Determine indentation for items inside on: block - onItemIndent := onIndent + " " - - // Track if we've inserted bots - insertedBots := false - - for i, line := range frontmatterLines { - // Skip the original bots lines - if i >= botsLineIdx && i <= botsEndIdx { - continue - } - - // Add the line - result = append(result, line) - - // After the on: line, insert bots - if i == onBlockIdx && !insertedBots { - // Add bots lines with proper indentation inside on: block - for _, botsLine := range botsLines { - trimmed := strings.TrimSpace(botsLine) - if trimmed == "" { - result = append(result, botsLine) - } else { - // Adjust indentation to be nested under on: - // Remove "bots:" prefix and re-add with proper indentation - if strings.HasPrefix(trimmed, "bots:") { - // bots: value or bots: - parts := strings.SplitN(trimmed, ":", 2) - if len(parts) == 2 { - result = append(result, fmt.Sprintf("%sbots:%s", onItemIndent, parts[1])) - } else { - result = append(result, onItemIndent+"bots:") - } - } else { - // Array item line (e.g., "- dependabot") - // These should be indented 2 more spaces than bots: to be nested under it - result = append(result, onItemIndent+" "+trimmed) - } - } - } - insertedBots = true - } - } - } - - botsCodemodLog.Print("Successfully migrated top-level 'bots' to 'on.bots'") - return result, true - }) + FieldKey: "bots", + IsInlineSingle: func(v string) bool { + return strings.HasPrefix(v, "[") }, - } + Log: botsCodemodLog, + }) } diff --git a/pkg/cli/codemod_factory.go b/pkg/cli/codemod_factory.go index c9618fd5fcf..bf898f79356 100644 --- a/pkg/cli/codemod_factory.go +++ b/pkg/cli/codemod_factory.go @@ -1,6 +1,11 @@ package cli -import "github.com/github/gh-aw/pkg/logger" +import ( + "fmt" + "strings" + + "github.com/github/gh-aw/pkg/logger" +) // PostTransformFunc is an optional hook called after the primary field removal. // It receives the already-modified lines, the full frontmatter, and the removed @@ -66,3 +71,182 @@ func newFieldRemovalCodemod(cfg fieldRemovalCodemodConfig) Codemod { }, } } + +// moveToOnBlockConfig holds the configuration for a codemod that moves a top-level +// frontmatter key into the 'on:' block. +type moveToOnBlockConfig struct { + ID string + Name string + Description string + IntroducedIn string + FieldKey string // The top-level key to move (e.g. "bots" or "roles") + IsInlineSingle func(string) bool // Returns true when the value fits on a single line as-is + Log *logger.Logger +} + +// newMoveTopLevelKeyToOnBlockCodemod creates a Codemod that moves a top-level frontmatter +// key (e.g. "bots" or "roles") into the 'on:' block, creating the block if necessary. +// +// The algorithm: +// 1. Bail out if the top-level key is absent. +// 2. Bail out if on. already exists (avoid double-migration). +// 3. Locate the field block and the existing 'on:' block in the YAML lines. +// 4. If no 'on:' block exists, replace the field lines with a new 'on:' block +// that contains the field nested inside it. +// 5. If an 'on:' block exists, remove the original field lines and insert them +// immediately after the 'on:' line with adjusted indentation. +func newMoveTopLevelKeyToOnBlockCodemod(cfg moveToOnBlockConfig) Codemod { + fieldKey := cfg.FieldKey + fieldKeyPrefix := fieldKey + ":" + + return Codemod{ + ID: cfg.ID, + Name: cfg.Name, + Description: cfg.Description, + IntroducedIn: cfg.IntroducedIn, + Apply: func(content string, frontmatter map[string]any) (string, bool, error) { + // Bail out if the top-level field does not exist. + if _, hasField := frontmatter[fieldKey]; !hasField { + return content, false, nil + } + + // Bail out if on. already exists. + if onValue, hasOn := frontmatter["on"]; hasOn { + if onMap, ok := onValue.(map[string]any); ok { + if _, hasOnField := onMap[fieldKey]; hasOnField { + cfg.Log.Printf("Both top-level '%s' and 'on.%s' exist - skipping migration", fieldKey, fieldKey) + return content, false, nil + } + } + } + + return applyFrontmatterLineTransform(content, func(frontmatterLines []string) ([]string, bool) { + var fieldLineIdx = -1 + var fieldLineValue string + var onBlockIdx = -1 + var onIndent string + + for i, line := range frontmatterLines { + trimmedLine := strings.TrimSpace(line) + + if isTopLevelKey(line) && strings.HasPrefix(trimmedLine, fieldKeyPrefix) { + fieldLineIdx = i + parts := strings.SplitN(line, ":", 2) + if len(parts) == 2 { + fieldLineValue = strings.TrimSpace(parts[1]) + } + cfg.Log.Printf("Found top-level %s at line %d", fieldKey, i+1) + } + + if isTopLevelKey(line) && strings.HasPrefix(trimmedLine, "on:") { + onBlockIdx = i + onIndent = getIndentation(line) + cfg.Log.Printf("Found 'on:' block at line %d", i+1) + } + } + + if fieldLineIdx == -1 { + return frontmatterLines, false + } + + // Collect all lines that belong to the field block. + var fieldLines []string + var fieldEndIdx int + + if cfg.IsInlineSingle != nil && cfg.IsInlineSingle(fieldLineValue) { + // Single-line format (e.g. "bots: [a, b]" or "roles: all") + fieldLines = []string{frontmatterLines[fieldLineIdx]} + fieldEndIdx = fieldLineIdx + } else { + // Multi-line or empty-value format — collect nested lines. + fieldStartIndent := getIndentation(frontmatterLines[fieldLineIdx]) + fieldLines = append(fieldLines, frontmatterLines[fieldLineIdx]) + fieldEndIdx = fieldLineIdx + + for j := fieldLineIdx + 1; j < len(frontmatterLines); j++ { + line := frontmatterLines[j] + trimmed := strings.TrimSpace(line) + + if trimmed == "" || strings.HasPrefix(trimmed, "#") { + fieldLines = append(fieldLines, line) + fieldEndIdx = j + continue + } + + if isNestedUnder(line, fieldStartIndent) { + fieldLines = append(fieldLines, line) + fieldEndIdx = j + } else { + break + } + } + } + + cfg.Log.Printf("%s spans lines %d to %d (%d lines)", fieldKey, fieldLineIdx+1, fieldEndIdx+1, len(fieldLines)) + + result := make([]string, 0, len(frontmatterLines)) + + if onBlockIdx == -1 { + // No 'on:' block — create one and place the field inside it. + cfg.Log.Printf("No 'on:' block found - creating new one with %s", fieldKey) + + for i, line := range frontmatterLines { + if i >= fieldLineIdx && i <= fieldEndIdx { + if i == fieldLineIdx { + result = append(result, "on:") + for _, fl := range fieldLines { + trimmed := strings.TrimSpace(fl) + if trimmed == "" { + result = append(result, fl) + } else if strings.HasPrefix(trimmed, fieldKeyPrefix) { + result = append(result, " "+fl) + } else { + result = append(result, " "+trimmed) + } + } + } + continue + } + result = append(result, line) + } + } else { + // 'on:' block exists — insert the field right after the 'on:' line. + cfg.Log.Printf("Found 'on:' block - adding %s to it", fieldKey) + + onItemIndent := onIndent + " " + insertedField := false + + for i, line := range frontmatterLines { + if i >= fieldLineIdx && i <= fieldEndIdx { + continue + } + + result = append(result, line) + + if i == onBlockIdx && !insertedField { + for _, fl := range fieldLines { + trimmed := strings.TrimSpace(fl) + if trimmed == "" { + result = append(result, fl) + } else if strings.HasPrefix(trimmed, fieldKeyPrefix) { + parts := strings.SplitN(trimmed, ":", 2) + if len(parts) == 2 { + result = append(result, fmt.Sprintf("%s%s:%s", onItemIndent, fieldKey, parts[1])) + } else { + result = append(result, onItemIndent+fieldKey+":") + } + } else { + result = append(result, onItemIndent+" "+trimmed) + } + } + insertedField = true + } + } + } + + cfg.Log.Printf("Successfully migrated top-level '%s' to 'on.%s'", fieldKey, fieldKey) + return result, true + }) + }, + } +} diff --git a/pkg/cli/codemod_roles.go b/pkg/cli/codemod_roles.go index ca0a4cf1481..7e3ae9742fc 100644 --- a/pkg/cli/codemod_roles.go +++ b/pkg/cli/codemod_roles.go @@ -1,7 +1,6 @@ package cli import ( - "fmt" "strings" "github.com/github/gh-aw/pkg/logger" @@ -11,186 +10,15 @@ var rolesCodemodLog = logger.New("cli:codemod_roles") // getRolesToOnRolesCodemod creates a codemod for moving top-level 'roles' to 'on.roles' func getRolesToOnRolesCodemod() Codemod { - return Codemod{ + return newMoveTopLevelKeyToOnBlockCodemod(moveToOnBlockConfig{ ID: "roles-to-on-roles", Name: "Move roles to on.roles", Description: "Moves the top-level 'roles' field to 'on.roles' as per the new frontmatter structure", IntroducedIn: "0.10.0", - Apply: func(content string, frontmatter map[string]any) (string, bool, error) { - // Check if top-level roles exists - _, hasTopLevelRoles := frontmatter["roles"] - if !hasTopLevelRoles { - return content, false, nil - } - - // Check if on.roles already exists (shouldn't happen, but be safe) - if onValue, hasOn := frontmatter["on"]; hasOn { - if onMap, ok := onValue.(map[string]any); ok { - if _, hasOnRoles := onMap["roles"]; hasOnRoles { - rolesCodemodLog.Print("Both top-level 'roles' and 'on.roles' exist - skipping migration") - return content, false, nil - } - } - } - - return applyFrontmatterLineTransform(content, func(frontmatterLines []string) ([]string, bool) { - // Find roles line and on: block - var rolesLineIdx = -1 - var rolesLineValue string - var onBlockIdx = -1 - var onIndent string - - // First pass: find the roles line and on: block - for i, line := range frontmatterLines { - trimmedLine := strings.TrimSpace(line) - - // Find top-level roles - if isTopLevelKey(line) && strings.HasPrefix(trimmedLine, "roles:") { - rolesLineIdx = i - // Extract the value (could be on same line or on next lines) - parts := strings.SplitN(line, ":", 2) - if len(parts) == 2 { - rolesLineValue = strings.TrimSpace(parts[1]) - } - rolesCodemodLog.Printf("Found top-level roles at line %d", i+1) - } - - // Find on: block - if isTopLevelKey(line) && strings.HasPrefix(trimmedLine, "on:") { - onBlockIdx = i - onIndent = getIndentation(line) - rolesCodemodLog.Printf("Found 'on:' block at line %d", i+1) - } - } - - // If no roles found, nothing to do - if rolesLineIdx == -1 { - return frontmatterLines, false - } - - // Determine how roles is formatted - var rolesLines []string - var rolesEndIdx int - - if rolesLineValue == "all" || strings.HasPrefix(rolesLineValue, "[") { - // roles: all or roles: [admin, write] - single line format - rolesLines = []string{frontmatterLines[rolesLineIdx]} - rolesEndIdx = rolesLineIdx - } else { - // Multi-line array format OR roles: with empty value - // Find all lines that are part of the roles block - rolesStartIndent := getIndentation(frontmatterLines[rolesLineIdx]) - rolesLines = append(rolesLines, frontmatterLines[rolesLineIdx]) - rolesEndIdx = rolesLineIdx - - for j := rolesLineIdx + 1; j < len(frontmatterLines); j++ { - line := frontmatterLines[j] - trimmed := strings.TrimSpace(line) - - // Empty lines or comments might be part of the block - if trimmed == "" || strings.HasPrefix(trimmed, "#") { - rolesLines = append(rolesLines, line) - rolesEndIdx = j - continue - } - - // Check if still in the roles block (indented more than roles:) - if isNestedUnder(line, rolesStartIndent) { - rolesLines = append(rolesLines, line) - rolesEndIdx = j - } else { - // Exited the block - break - } - } - } - - rolesCodemodLog.Printf("Roles spans lines %d to %d (%d lines)", rolesLineIdx+1, rolesEndIdx+1, len(rolesLines)) - - // If no on: block found, we need to create one - result := make([]string, 0, len(frontmatterLines)) - - if onBlockIdx == -1 { - // No on: block exists - create one with roles inside it - rolesCodemodLog.Print("No 'on:' block found - creating new one with roles") - - for i, line := range frontmatterLines { - if i >= rolesLineIdx && i <= rolesEndIdx { - // Skip the original roles lines - we'll add them to the new on: block - if i == rolesLineIdx { - // Add new on: block with roles inside - result = append(result, "on:") - // Add roles lines with proper indentation - for _, rolesLine := range rolesLines { - trimmed := strings.TrimSpace(rolesLine) - if trimmed == "" { - result = append(result, rolesLine) - } else if strings.HasPrefix(trimmed, "roles:") { - // roles: line gets 2 spaces (nested under on:) - result = append(result, " "+rolesLine) - } else { - // Array items get 4 spaces (nested under on: and roles:) - result = append(result, " "+trimmed) - } - } - } - // Skip all other roles lines - continue - } - result = append(result, line) - } - } else { - // on: block exists - add roles to it - rolesCodemodLog.Print("Found 'on:' block - adding roles to it") - - // Determine indentation for items inside on: block - onItemIndent := onIndent + " " - - // Track if we've inserted roles - insertedRoles := false - - for i, line := range frontmatterLines { - // Skip the original roles lines - if i >= rolesLineIdx && i <= rolesEndIdx { - continue - } - - // Add the line - result = append(result, line) - - // After the on: line, insert roles - if i == onBlockIdx && !insertedRoles { - // Add roles lines with proper indentation inside on: block - for _, rolesLine := range rolesLines { - trimmed := strings.TrimSpace(rolesLine) - if trimmed == "" { - result = append(result, rolesLine) - } else { - // Adjust indentation to be nested under on: - // Remove "roles:" prefix and re-add with proper indentation - if strings.HasPrefix(trimmed, "roles:") { - // roles: value or roles: - parts := strings.SplitN(trimmed, ":", 2) - if len(parts) == 2 { - result = append(result, fmt.Sprintf("%sroles:%s", onItemIndent, parts[1])) - } else { - result = append(result, onItemIndent+"roles:") - } - } else { - // Array item line (e.g., "- admin") - // These should be indented 2 more spaces than roles: to be nested under it - result = append(result, onItemIndent+" "+trimmed) - } - } - } - insertedRoles = true - } - } - } - - rolesCodemodLog.Print("Successfully migrated top-level 'roles' to 'on.roles'") - return result, true - }) + FieldKey: "roles", + IsInlineSingle: func(v string) bool { + return v == "all" || strings.HasPrefix(v, "[") }, - } + Log: rolesCodemodLog, + }) } diff --git a/pkg/workflow/compiler_safe_outputs.go b/pkg/workflow/compiler_safe_outputs.go index 8aedb5c8656..40f549d0930 100644 --- a/pkg/workflow/compiler_safe_outputs.go +++ b/pkg/workflow/compiler_safe_outputs.go @@ -169,7 +169,7 @@ func (c *Compiler) parseOnSection(frontmatter map[string]any, workflowData *Work } // Extract other (non-conflicting) events excluding slash_command, command, label_command, reaction, status-comment, and stop-after - otherEvents = filterMapKeys(onMap, "slash_command", "command", "label_command", "reaction", "status-comment", "stop-after", "github-token", "github-app") + otherEvents = excludeMapKeys(onMap, "slash_command", "command", "label_command", "reaction", "status-comment", "stop-after", "github-token", "github-app") } } diff --git a/pkg/workflow/map_helpers.go b/pkg/workflow/map_helpers.go index 3e3b93479cf..01e103f1c0b 100644 --- a/pkg/workflow/map_helpers.go +++ b/pkg/workflow/map_helpers.go @@ -28,7 +28,7 @@ // - ConvertToFloat() - Safely convert any value (float64/int/int64/string) to float64 // // Map Operations: -// - filterMapKeys() - Create new map excluding specified keys +// - excludeMapKeys() - Create new map excluding specified keys // - sortedMapKeys() - Return sorted keys of a map[string]string // // These utilities handle common type conversion and map manipulation patterns that @@ -93,8 +93,8 @@ func safeUint64ToInt(u uint64) int { // This is a thin wrapper around safeUint64ToInt that widens the uint argument first. func safeUintToInt(u uint) int { return safeUint64ToInt(uint64(u)) } -// filterMapKeys creates a new map excluding the specified keys -func filterMapKeys(original map[string]any, excludeKeys ...string) map[string]any { +// excludeMapKeys creates a new map excluding the specified keys +func excludeMapKeys(original map[string]any, excludeKeys ...string) map[string]any { excludeSet := make(map[string]bool) for _, key := range excludeKeys { excludeSet[key] = true diff --git a/pkg/workflow/map_helpers_test.go b/pkg/workflow/map_helpers_test.go index 902dde4d4e6..eac11182e9d 100644 --- a/pkg/workflow/map_helpers_test.go +++ b/pkg/workflow/map_helpers_test.go @@ -142,7 +142,7 @@ func TestParseIntValueTruncation(t *testing.T) { } } -func TestFilterMapKeys(t *testing.T) { +func TestExcludeMapKeys(t *testing.T) { tests := []struct { name string original map[string]any @@ -219,28 +219,28 @@ func TestFilterMapKeys(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - result := filterMapKeys(tt.original, tt.excludeKeys...) + result := excludeMapKeys(tt.original, tt.excludeKeys...) // Check length if len(result) != len(tt.expected) { - t.Errorf("filterMapKeys() length = %v, want %v", len(result), len(tt.expected)) + t.Errorf("excludeMapKeys() length = %v, want %v", len(result), len(tt.expected)) } // Check each key-value pair for key, expectedValue := range tt.expected { resultValue, exists := result[key] if !exists { - t.Errorf("filterMapKeys() missing key %v", key) + t.Errorf("excludeMapKeys() missing key %v", key) } if resultValue != expectedValue { - t.Errorf("filterMapKeys() value for key %v = %v, want %v", key, resultValue, expectedValue) + t.Errorf("excludeMapKeys() value for key %v = %v, want %v", key, resultValue, expectedValue) } } // Check for unexpected keys for key := range result { if _, exists := tt.expected[key]; !exists { - t.Errorf("filterMapKeys() unexpected key %v", key) + t.Errorf("excludeMapKeys() unexpected key %v", key) } } })