Skip to content

Add test agentic workflows and integrate into build process#746

Merged
pelikhan merged 4 commits intomainfrom
copilot/fix-d542a7a6-29fa-4805-b67c-08794d4d86a1
Sep 11, 2025
Merged

Add test agentic workflows and integrate into build process#746
pelikhan merged 4 commits intomainfrom
copilot/fix-d542a7a6-29fa-4805-b67c-08794d4d86a1

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 11, 2025

This PR restores the test agentic workflows that were removed in commit 8476ca2 and integrates them into the build process as requested.

Changes Made

📁 Created pkg/cli/workflows/ directory with 14 test workflow files:

Claude-based workflows:

  • test-claude-add-issue-comment.md - Tests adding comments to GitHub issues
  • test-claude-add-issue-labels.md - Tests adding labels to issues
  • test-claude-command.md - Tests basic Claude command execution
  • test-claude-create-issue.md - Tests creating new GitHub issues
  • test-claude-create-pull-request.md - Tests creating pull requests
  • test-claude-create-pull-request-review-comment.md - Tests PR review comments
  • test-claude-create-repository-security-advisory.md - Tests security advisory creation
  • test-claude-mcp.md - Tests Model Context Protocol (MCP) capabilities
  • test-claude-push-to-pr-branch.md - Tests pushing changes to PR branches
  • test-claude-update-issue.md - Tests updating existing issues

Codex-based workflows:

  • test-codex-add-issue-comment.md - Tests Codex issue commenting
  • test-codex-add-issue-labels.md - Tests Codex label management
  • test-codex-command.md - Tests basic Codex command execution

AI inference workflow:

  • test-ai-inference-github-models.md - Tests GitHub Models AI inference

🔧 Updated Makefile

Modified the recompile target to automatically compile test workflows using the --workflow-dir flag:

recompile: build
	./$(BINARY_NAME) compile --validate --instructions
	@if [ -d "pkg/cli/workflows" ]; then \
		echo "Compiling test workflows from pkg/cli/workflows..."; \
		./$(BINARY_NAME) compile --workflow-dir pkg/cli/workflows --validate; \
	fi

This leverages the built-in --workflow-dir functionality for cleaner and more efficient workflow compilation.

✅ Updated .gitattributes

Added merge strategy for test workflow .lock.yml files to handle conflicts automatically:

.github/workflows/*.lock.yml linguist-generated=true merge=ours
pkg/cli/workflows/*.lock.yml linguist-generated=true merge=ours

Both locations now have the proper merge=ours configuration for .lock.yml files to automatically take the cloud version during conflicts.

Testing

  • ✅ All 14 test workflows compile successfully with validation enabled
  • ✅ Generated .lock.yml files are properly created and tracked
  • ✅ All existing tests continue to pass
  • ✅ Build process works correctly with new workflow compilation
  • ✅ The make recompile command now includes test workflow compilation using --workflow-dir flag
  • ✅ Git attributes properly configured for conflict resolution

These test workflows provide comprehensive coverage for testing various GitHub operations and AI engine capabilities, ensuring the agentic workflow system works correctly across different scenarios and use cases.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add all the test agentic workflows (test-*.md) that were removed in https://github.com/githubnext/gh-aw/commit/8476ca237c05e36eab77c82528802fa08f69b1ae and place than in the pkg/cli/workflows folder. Add a task in the makefile to compile those workflow... Add test agentic workflows and integrate into build process Sep 11, 2025
Copilot AI requested a review from pelikhan September 11, 2025 20:00
@@ -0,0 +1,629 @@
# This file was automatically generated by gh-aw. DO NOT EDIT.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot add .gitattributes in file to handle conflicts automatically by taking the cloud version of .lock.yml files.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated .gitattributes to include pkg/cli/workflows/*.lock.yml linguist-generated=true merge=ours for automatic conflict resolution using the cloud version. Commit 1bdcc6d.

Comment thread Makefile
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Sep 11, 2025

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.contoso.com
    • Triggering command: /tmp/go-build896474789/b278/cli.test -test.testlogfile=/tmp/go-build896474789/b278/testlog.txt -test.paniconexit0 -test.timeout=10m0s -test.v=true (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@pelikhan pelikhan marked this pull request as ready for review September 11, 2025 23:11
@pelikhan
Copy link
Copy Markdown
Collaborator

@dsyme compiled but out of reach of actions

@pelikhan pelikhan merged commit d768ff2 into main Sep 11, 2025
13 of 14 checks passed
@pelikhan pelikhan deleted the copilot/fix-d542a7a6-29fa-4805-b67c-08794d4d86a1 branch September 11, 2025 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants