From 7ae483335998ab150cc78fd67a77a0251e55f6e7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 21 Aug 2025 15:16:26 +0000 Subject: [PATCH 1/9] Initial plan From 6ab13ffbcdd26fcd3a5c529b8584c50644d7e83b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 21 Aug 2025 15:25:46 +0000 Subject: [PATCH 2/9] Add integration test workflow for agentics repository Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .../workflows/integration-test-agentics.yml | 102 ++++++++++++++++++ package-lock.json | 2 +- 2 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/integration-test-agentics.yml diff --git a/.github/workflows/integration-test-agentics.yml b/.github/workflows/integration-test-agentics.yml new file mode 100644 index 00000000000..acf721c0451 --- /dev/null +++ b/.github/workflows/integration-test-agentics.yml @@ -0,0 +1,102 @@ +name: Integration Test Agentics + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +jobs: + integration-test-agentics: + name: Test Agentics Repository Integration + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + cache: true + + - name: Verify dependencies + run: go mod verify + + - name: Install development dependencies + run: make deps-dev + + - name: Build gh-aw binary + run: make build + + - name: Verify GitHub CLI is available + run: | + gh --version + echo "GitHub CLI is available" + + - name: Set up GitHub token for CLI + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "Setting up GitHub CLI authentication" + gh auth status || gh auth login --with-token <<< "$GITHUB_TOKEN" + + - name: Install gh-aw CLI extension locally + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "Installing gh-aw extension locally..." + make install + + - name: Verify gh-aw extension installation + run: | + gh aw --help + gh aw version + + - name: Install workflows from agentics repository + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "Installing workflows from githubnext/agentics..." + gh aw install githubnext/agentics + echo "Successfully installed agentics workflows" + + - name: List installed workflows + run: | + echo "Listing installed workflows..." + gh aw list + + - name: Recompile all workflows + run: | + echo "Recompiling all installed workflows..." + make recompile + echo "Successfully recompiled all workflows" + + - name: Check for compilation artifacts + run: | + echo "Checking for generated .lock.yml files..." + find .github/workflows -name "*.lock.yml" | head -10 || echo "No lock files found yet" + + - name: Verify no compilation errors + run: | + echo "Verifying workflow compilation completed without errors..." + if [ -n "$(find .github/workflows -name "*.md" -newer .github/workflows/*.lock.yml 2>/dev/null)" ]; then + echo "Warning: Some markdown files may be newer than their compiled versions" + fi + + - name: Run agent-finish validation + run: | + echo "Running final validation sequence..." + make agent-finish + echo "✓ Integration test completed successfully" + + - name: Display integration test summary + if: always() + run: | + echo "=== Integration Test Summary ===" + echo "Repository: githubnext/agentics" + echo "Workflows installed and compiled successfully" + echo "All validations passed" + ls -la .github/workflows/*.lock.yml 2>/dev/null || echo "Note: Check workflow compilation status above" \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 65c1a3c0b49..8ec282e9ffd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "gh-aw-copilots", + "name": "gh-aw", "lockfileVersion": 3, "requires": true, "packages": { From 18d1a8bf4f45cb663981c3369bb9fa095beaa576 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 21 Aug 2025 15:44:42 +0000 Subject: [PATCH 3/9] Add workflow_dispatch support to integration test workflow Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/integration-test-agentics.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration-test-agentics.yml b/.github/workflows/integration-test-agentics.yml index acf721c0451..17fdc2cbe9d 100644 --- a/.github/workflows/integration-test-agentics.yml +++ b/.github/workflows/integration-test-agentics.yml @@ -4,6 +4,7 @@ on: push: branches: [main] pull_request: + workflow_dispatch: permissions: contents: read From bcbc48c601d07f778bb2eea0da70011401de3fba Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 21 Aug 2025 16:07:34 +0000 Subject: [PATCH 4/9] Fix TypeScript typing issues in .cjs files Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/test-claude.lock.yml | 6 ++++-- pkg/workflow/js/create_issue.cjs | 2 +- pkg/workflow/js/create_pull_request.cjs | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-claude.lock.yml b/.github/workflows/test-claude.lock.yml index 9a32a38a343..36696fbcfa9 100644 --- a/.github/workflows/test-claude.lock.yml +++ b/.github/workflows/test-claude.lock.yml @@ -573,7 +573,7 @@ jobs: const parentIssueNumber = context.payload?.issue?.number; // Parse labels from environment variable (comma-separated string) const labelsEnv = process.env.GITHUB_AW_ISSUE_LABELS; - const labels = labelsEnv ? labelsEnv.split(',').map(label => label.trim()).filter(label => label) : []; + const labels = labelsEnv ? labelsEnv.split(',').map(/** @param {string} label */ label => label.trim()).filter(/** @param {string} label */ label => label) : []; // Parse the output to extract title and body const lines = outputContent.split('\n'); @@ -814,7 +814,9 @@ jobs: GITHUB_AW_PR_DRAFT: "true" with: script: | + /** @type {typeof import("fs")} */ const fs = require("fs"); + /** @type {typeof import("crypto")} */ const crypto = require("crypto"); const { execSync } = require("child_process"); @@ -898,7 +900,7 @@ jobs: // Parse labels from environment variable (comma-separated string) const labelsEnv = process.env.GITHUB_AW_PR_LABELS; - const labels = labelsEnv ? labelsEnv.split(',').map(label => label.trim()).filter(label => label) : []; + const labels = labelsEnv ? labelsEnv.split(',').map(/** @param {string} label */ label => label.trim()).filter(/** @param {string} label */ label => label) : []; // Parse draft setting from environment variable (defaults to true) const draftEnv = process.env.GITHUB_AW_PR_DRAFT; diff --git a/pkg/workflow/js/create_issue.cjs b/pkg/workflow/js/create_issue.cjs index ce0dece1954..51de1839c6d 100644 --- a/pkg/workflow/js/create_issue.cjs +++ b/pkg/workflow/js/create_issue.cjs @@ -14,7 +14,7 @@ async function main() { const parentIssueNumber = context.payload?.issue?.number; // Parse labels from environment variable (comma-separated string) const labelsEnv = process.env.GITHUB_AW_ISSUE_LABELS; - const labels = labelsEnv ? labelsEnv.split(',').map(label => label.trim()).filter(label => label) : []; + const labels = labelsEnv ? labelsEnv.split(',').map(/** @param {string} label */ label => label.trim()).filter(/** @param {string} label */ label => label) : []; // Parse the output to extract title and body const lines = outputContent.split('\n'); diff --git a/pkg/workflow/js/create_pull_request.cjs b/pkg/workflow/js/create_pull_request.cjs index 656bad0cbfa..ea73782332a 100644 --- a/pkg/workflow/js/create_pull_request.cjs +++ b/pkg/workflow/js/create_pull_request.cjs @@ -1,4 +1,6 @@ +/** @type {typeof import("fs")} */ const fs = require("fs"); +/** @type {typeof import("crypto")} */ const crypto = require("crypto"); const { execSync } = require("child_process"); @@ -82,7 +84,7 @@ async function main() { // Parse labels from environment variable (comma-separated string) const labelsEnv = process.env.GITHUB_AW_PR_LABELS; - const labels = labelsEnv ? labelsEnv.split(',').map(label => label.trim()).filter(label => label) : []; + const labels = labelsEnv ? labelsEnv.split(',').map(/** @param {string} label */ label => label.trim()).filter(/** @param {string} label */ label => label) : []; // Parse draft setting from environment variable (defaults to true) const draftEnv = process.env.GITHUB_AW_PR_DRAFT; From 8f88f0c8404c81b70cf2f77e8aa8c59baa0c237c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 21 Aug 2025 16:34:06 +0000 Subject: [PATCH 5/9] Remove redundant GitHub token setup step from integration test workflow Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/integration-test-agentics.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/integration-test-agentics.yml b/.github/workflows/integration-test-agentics.yml index 17fdc2cbe9d..5e390e5d660 100644 --- a/.github/workflows/integration-test-agentics.yml +++ b/.github/workflows/integration-test-agentics.yml @@ -37,13 +37,6 @@ jobs: gh --version echo "GitHub CLI is available" - - name: Set up GitHub token for CLI - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - echo "Setting up GitHub CLI authentication" - gh auth status || gh auth login --with-token <<< "$GITHUB_TOKEN" - - name: Install gh-aw CLI extension locally env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 2fc3b1e78653dc9f5934cb5ac9d3aa06fb98b38c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 21 Aug 2025 17:05:34 +0000 Subject: [PATCH 6/9] Update deps-dev target to use npm ci instead of npm install --package-lock-only Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 24075c62e6b..88b352bccb1 100644 --- a/Makefile +++ b/Makefile @@ -63,7 +63,7 @@ deps: .PHONY: deps-dev deps-dev: deps copy-copilot-to-claude go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest - npm install --package-lock-only + npm ci # Run linter .PHONY: golint From b84e8f98fa971d2355c182611feafd38d5c01d83 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 21 Aug 2025 17:06:44 +0000 Subject: [PATCH 7/9] Remove final validation step from integration test workflow --- .github/workflows/integration-test-agentics.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/integration-test-agentics.yml b/.github/workflows/integration-test-agentics.yml index 5e390e5d660..f8edbd29f63 100644 --- a/.github/workflows/integration-test-agentics.yml +++ b/.github/workflows/integration-test-agentics.yml @@ -80,12 +80,6 @@ jobs: echo "Warning: Some markdown files may be newer than their compiled versions" fi - - name: Run agent-finish validation - run: | - echo "Running final validation sequence..." - make agent-finish - echo "✓ Integration test completed successfully" - - name: Display integration test summary if: always() run: | From a054019764f4a7951a149de16969e2b23786d2de Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 21 Aug 2025 17:16:54 +0000 Subject: [PATCH 8/9] Add concurrency configuration to CI workflow --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 06439e02ea9..2fa396a5f60 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,9 @@ name: CI on: [push, pull_request] - +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: test: name: Run Unit Tests From 3349c84fb6d1583d7b0e24090afdfd8cbec80ba6 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 21 Aug 2025 17:17:05 +0000 Subject: [PATCH 9/9] add ci-prefix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2fa396a5f60..8b3af8c0490 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: [push, pull_request] concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ci-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: test: